lean2/src/library/elaborator
Leonardo de Moura d4b08fcf96 feat(library/elaborator): be 'lazy' when normalizing terms in the elaborator
Unification constraints of the form

         ctx |- ?m[inst:i v] == T

         and

         ctx |- (?m a1 ... an) == T

are delayed by elaborator because the produce case-splits.
On the other hand, the step that puts terms is head-normal form is eagerly applied.
This is a bad idea for constraints like the two above. The elaborator will put T in head normal form
before executing process_meta_app and process_meta_inst. This is just wasted work, and creates
fully unfolded terms for solvers and provers.

The new test demonstrates the problem. In this test, we mark several terms as non-opaque.
Without this commit, the produced goal is a huge term.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-06 21:08:00 -08:00
..
CMakeLists.txt refactor(kernel): rename trace to justification 2013-10-23 13:42:17 -07:00
elaborator.cpp feat(library/elaborator): be 'lazy' when normalizing terms in the elaborator 2014-02-06 21:08:00 -08:00
elaborator.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
elaborator_exception.h refactor(util/lua): propagate C++ Lean exceptions in Lua 2013-11-27 12:25:29 -08:00
elaborator_justification.cpp fix(library/elaborator): remove_detail procedure was keeping a lot of details when typeof_mvar_justification was being used 2014-01-07 13:24:46 -08:00
elaborator_justification.h fix(library/elaborator): remove_detail procedure was keeping a lot of details when typeof_mvar_justification was being used 2014-01-07 13:24:46 -08:00
elaborator_plugin.h feat(*): simplify interrupt propagation 2013-11-12 21:45:48 -08:00