lean4-htt/src/library/tactic
Leonardo de Moura f97c260b0b refactor(kernel/environment): add ro_environment
The environment object is a "smart-pointer".
Before this commit, the use of "const &" for environment objects was broken.
For example, suppose we have a function f that should not modify the input environment.
Before this commit, its signature would be
       void f(environment const & env)
This is broken, f's implementation can easilty convert it to a read-write pointer by using
the copy constructor.
       environment rw_env(env);
Now, f can use rw_env to update env.

To fix this issue, we now have ro_environment. It is a shared *const* pointer.
We can convert an environment into a ro_environment, but not the other way around.

ro_environment can also be seen as a form of documentation.
For example, now it is clear that type_inferer is not updating the environment, since its constructor takes a ro_environment.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-12 16:48:34 -08:00
..
apply_tactic.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
apply_tactic.h feat(library/tactic): add apply_tactic 2013-12-05 03:22:12 -08:00
assignment.h refactor(kernel/expr): remove 'null' expression, and operator bool for expression 2013-12-07 23:21:10 -08:00
boolean_tactics.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
boolean_tactics.h refactor(library/tactic): rename boolean.* to boolean_tactics.* 2013-12-05 05:03:18 -08:00
cex_builder.cpp feat(library/tactic): add focus tactical 2013-11-30 11:28:38 -08:00
cex_builder.h feat(library/tactic): add focus tactical 2013-11-30 11:28:38 -08:00
CMakeLists.txt refactor(library/tactic): rename boolean.* to boolean_tactics.* 2013-12-05 05:03:18 -08:00
goal.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
goal.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
proof_builder.cpp refactor(kernel/expr): remove 'null' expression, and operator bool for expression 2013-12-07 23:21:10 -08:00
proof_builder.h refactor(library/tactic): remove duplicate code, add add_proofs 2013-12-01 07:55:01 -08:00
proof_state.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
proof_state.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
register_module.h refactor(library/tactic): rename boolean.* to boolean_tactics.* 2013-12-05 05:03:18 -08:00
tactic.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
tactic.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00