lean2/src/kernel
Leonardo de Moura af42078205 fix(kernel): incorrect use of scoped_map
This commit also adds a new test that exposes the problem.
The scoped_map should not be used for caching values in the normalizer and type_checker. When we extend the context, the meaning of all variables is modified (we are essentially performing a lift). So, the values stored in the cache are not correct in the new context.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-16 15:11:39 -08:00
..
abstract.cpp chore(*): consistent file name convention 2013-12-03 12:40:52 -08:00
abstract.h refactor(kernel/expr): remove 'null' expression, and operator bool for expression 2013-12-07 23:21:10 -08:00
builtin.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
builtin.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
CMakeLists.txt refactor(kernel): add find_fn, replace for_each_fn with find_fn when appropriate, remove unnecessary function has_cached_type 2013-11-19 13:03:46 -08:00
context.cpp feat(kernel/context): add operator== for contexts, and new constructor 2013-12-12 16:48:33 -08:00
context.h feat(kernel/context): add operator== for contexts, and new constructor 2013-12-12 16:48:33 -08:00
environment.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
environment.h fix(kernel/environment): compilation warnings 2013-12-13 13:54:45 -08:00
expr.cpp refactor(*): isolate std::thread dependency 2013-12-09 15:20:26 -08:00
expr.h chore(util/rc): remove unnecessary argument from LEAN_COPY_REF and LEAN_MOVE_REF macros 2013-12-13 15:01:24 -08:00
expr_eq.h refactor(kernel/expr): remove 'null' expression, and operator bool for expression 2013-12-07 23:21:10 -08:00
expr_maps.h feat(kernel/expr): add hash code based on allocation time 2013-11-14 02:43:11 -08:00
expr_sets.h feat(kernel/expr): add hash code based on allocation time 2013-11-14 02:43:11 -08:00
find_fn.h feat(kernel/expr): add some_expr and none_expr for building values of type optional<expr> 2013-12-08 10:34:38 -08:00
for_each_fn.h refactor(kernel/expr): remove 'null' expression, and operator bool for expression 2013-12-07 23:21:10 -08:00
formatter.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
formatter.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
free_vars.cpp refactor(kernel/metavar_env): use the same approach used in the class environment in the class metavar_env 2013-12-13 18:59:15 -08:00
free_vars.h refactor(kernel/metavar_env): use the same approach used in the class environment in the class metavar_env 2013-12-13 18:59:15 -08:00
instantiate.cpp refactor(kernel/metavar_env): use the same approach used in the class environment in the class metavar_env 2013-12-13 18:59:15 -08:00
instantiate.h refactor(kernel/metavar_env): use the same approach used in the class environment in the class metavar_env 2013-12-13 18:59:15 -08:00
justification.cpp feat(kernel/expr): add some_expr and none_expr for building values of type optional<expr> 2013-12-08 10:34:38 -08:00
justification.h chore(util/rc): remove unnecessary argument from LEAN_COPY_REF and LEAN_MOVE_REF macros 2013-12-13 15:01:24 -08:00
kernel_exception.cpp fix(kernel/type_checker): add missing test, and kernel_exception has_no_type_exception 2013-11-10 11:14:04 -08:00
kernel_exception.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
level.cpp chore(util/rc): remove unnecessary argument from LEAN_COPY_REF and LEAN_MOVE_REF macros 2013-12-13 15:01:24 -08:00
level.h refactor(lua): cleanup Lua bindings 2013-11-13 13:55:05 -08:00
metavar.cpp feat(kernel/metavar): make sure that a metavariable 'm' can only be assigned to a term that contains free variables available in the context associated with 'm' 2013-12-14 12:25:00 -08:00
metavar.h feat(kernel/metavar): make sure that a metavariable 'm' can only be assigned to a term that contains free variables available in the context associated with 'm' 2013-12-14 12:25:00 -08:00
normalizer.cpp fix(kernel): incorrect use of scoped_map 2013-12-16 15:11:39 -08:00
normalizer.h feat(kernel/normalizer): provide the metavar_env to instantiate and add_inst in the normalizer, it will minimize the number of local_entries needed 2013-12-14 15:41:50 -08:00
object.cpp refactor(kernel/object): remove 'null' object, and operator bool for kernel objects 2013-12-08 14:37:38 -08:00
object.h chore(util/rc): remove unnecessary argument from LEAN_COPY_REF and LEAN_MOVE_REF macros 2013-12-13 15:01:24 -08:00
occurs.cpp chore(*): use 'explicit operator bool' everywhere. 2013-12-02 23:02:45 -08:00
occurs.h fix(kernel/occurs): typos 2013-11-13 17:04:56 -08:00
pos_info_provider.cpp feat(pos_info_provider): add position information provider for expressions 2013-10-22 08:15:36 -07:00
pos_info_provider.h feat(pos_info_provider): add position information provider for expressions 2013-10-22 08:15:36 -07:00
printer.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
printer.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
replace_fn.h feat(kernel/expr): add some_expr and none_expr for building values of type optional<expr> 2013-12-08 10:34:38 -08:00
replace_visitor.cpp fix(kernel): incorrect use of scoped_map 2013-12-16 15:11:39 -08:00
replace_visitor.h fix(kernel): incorrect use of scoped_map 2013-12-16 15:11:39 -08:00
threadsafe_environment.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
type_checker.cpp fix(kernel): incorrect use of scoped_map 2013-12-16 15:11:39 -08:00
type_checker.h refactor(kernel/metavar_env): use the same approach used in the class environment in the class metavar_env 2013-12-13 18:59:15 -08:00
type_checker_justification.cpp feat(kernel/expr): add some_expr and none_expr for building values of type optional<expr> 2013-12-08 10:34:38 -08:00
type_checker_justification.h refactor(kernel/expr): remove 'null' expression, and operator bool for expression 2013-12-07 23:21:10 -08:00
unification_constraint.cpp fix(kernel/unification_constraint): memory leak 2013-10-25 08:06:21 -07:00
unification_constraint.h chore(util/rc): remove unnecessary argument from LEAN_COPY_REF and LEAN_MOVE_REF macros 2013-12-13 15:01:24 -08:00
value.h Modify Doxygen file to extract all elements even the undocumented ones. Disable warnings for undocumented entities. Add extra comments. 2013-09-13 13:46:22 -07:00