Commit graph

13547 commits

Author SHA1 Message Date
Leonardo de Moura
7954b56cd8 fix(library/tactic/revert_tactic): missing catch 2018-02-23 12:26:18 -08:00
Leonardo de Moura
6c3d90e20e fix(library/type_context): type_context was not checking if to_revert dependencies were frozen 2018-02-23 11:59:18 -08:00
Leonardo de Moura
24e7a5a339 feat(library/tactic): add frozen_local_instances tactic for retrieving list of frozen local instances 2018-02-23 11:39:38 -08:00
Leonardo de Moura
db4fcac40c feat(library): add tactic unfreeze_local_instances 2018-02-23 11:12:05 -08:00
Leonardo de Moura
f376c48c7f fix(library/type_context): throw exception if trying to revert frozen local instance 2018-02-23 11:11:16 -08:00
Leonardo de Moura
2cb018734e chore(library/metavar_context): add TODO's 2018-02-23 10:35:21 -08:00
Leonardo de Moura
173eb1c6b7 refactor(util/fresh_name): implement fresh_name using unique thread id
@kha This commit is retracting the experiment using
`mk_fresh_name_generator_child` when creating new tasks.
The names get too long.

I'm still refactoring the code and trying to eliminate all occurrences
of `mk_fresh_name`. I still have a long way to go, but I am merging
this branch into master since it has many other fixes.
2018-02-23 10:35:04 -08:00
Leonardo de Moura
eb648a3298 feat(library/metavar_context): add name_generator field.
This is work-in-progress. The change exposed many problems in the
metavar_context propagation.
2018-02-23 10:34:00 -08:00
Leonardo de Moura
993770e14a feat(library/persistent_context_cache): use abstract_context_cache 2018-02-21 16:20:42 -08:00
Leonardo de Moura
6bb592caf0 perf(util/name): avoid unnecessary memory allocations 2018-02-21 16:04:53 -08:00
Leonardo de Moura
5607884787 feat(library/tactic): use new cache
Remark: so far, caching, in the tactic framework, only makes a difference for the `simp` tactic.
This is not surprising since the simplifier tries to apply rewriting
lemmas over and over again.
2018-02-21 15:04:20 -08:00
Leonardo de Moura
80b88c53cb fix(library/persistent_context_cache): missing reset 2018-02-21 15:04:20 -08:00
Leonardo de Moura
4a936f004b feat(library/tactic): use new cache in the apply and simp tactics 2018-02-21 15:04:20 -08:00
Leonardo de Moura
11a05ae4c5 feat(library/tactic): add tactic_state_context_cache helper class
This commit also renames `token` ==> `unique_id`.
We already use `token` in the scanner.
2018-02-21 15:04:20 -08:00
Leonardo de Moura
2ff301babd chore(library/persistent_context_cache): style 2018-02-21 15:04:20 -08:00
Leonardo de Moura
028bd8c6c6 fix(library/type_context): performance bug 2018-02-21 15:04:20 -08:00
Leonardo de Moura
d581fb10a8 chore(library/abstract_context_cache): missing override annotations 2018-02-21 15:04:20 -08:00
Leonardo de Moura
20db4edf27 feat(library): add persistent_context_cache 2018-02-21 15:04:20 -08:00
Leonardo de Moura
1aeaed0cae feat(library/abstract_context_cache): make it fully abstract 2018-02-21 15:04:20 -08:00
Leonardo de Moura
70b6e5c958 feat(library): unique token generator 2018-02-21 15:04:20 -08:00
Leonardo de Moura
8a93d2770e feat(library/equations_compiler): add new cache support to equation compiler 2018-02-21 15:04:20 -08:00
Leonardo de Moura
ada4932507 feat(library/compiler): add new cache support to compiler 2018-02-21 15:04:20 -08:00
Leonardo de Moura
9d9ac16e7a feat(library): add implementation of abstract_context_cache 2018-02-21 15:04:20 -08:00
Leonardo de Moura
89bd571b53 chore(library): adjust include files 2018-02-21 15:04:20 -08:00
Leonardo de Moura
a175e9393e refactor(library): context_cache ==> abstract_context_cache 2018-02-21 15:04:20 -08:00
Leonardo de Moura
7762dc381a feat(library/type_context): use context_cache interface 2018-02-21 15:04:20 -08:00
Leonardo de Moura
c97134760d feat(library): add new context_cache interface 2018-02-21 15:04:20 -08:00
Leonardo de Moura
46ed0ad677 refactor(library/congr_lemma): remove mk_rel_iff_congr_lemma and mk_rel_eq_congr_lemma 2018-02-21 15:04:20 -08:00
Leonardo de Moura
8f25f903da chore(library/app_builder): remove unnecessary caching 2018-02-21 15:04:19 -08:00
Leonardo de Moura
f8aa9e6bd4 doc(library/type_context): alternative approach for tactic_state cache 2018-02-21 15:04:19 -08:00
Leonardo de Moura
5428767f11 refactor(library/tactic): remove two thread local caches
The AC manager cache will be rewritten for the AC matcher.

The congruence closure module has to be rewritten for performance
reasons. During the rewrite, we should evaluate whether we need
a new cache management policy or not.
2018-02-21 15:04:19 -08:00
Leonardo de Moura
6c2f65d541 doc(library/type_context): document new cache management for type_context/app_builder/fun_info 2018-02-21 15:04:19 -08:00
Leonardo de Moura
3535b0f870 refactor(library/equations_compiler/structural_rec): do no use mk_fresh_name 2018-02-21 15:04:19 -08:00
Leonardo de Moura
d54d759d56 refactor(library): do not use mk_fresh_name 2018-02-21 15:04:19 -08:00
Leonardo de Moura
11e87545be chore(frontends/lean): remove dead variables 2018-02-21 15:04:19 -08:00
Leonardo de Moura
f8e0916c64 feat(library/tactic, frontends/lean): replace a few mk_tagged_fresh_name with mk_unused_name 2018-02-21 15:04:19 -08:00
Leonardo de Moura
73eda00ba3 refactor(library/compiler): mk_unused_name ==> mk_compiler_unused_name 2018-02-21 15:04:19 -08:00
Leonardo de Moura
058520d6e4 feat(frontends/lean/pp,library/local_context): use sanitize_name_generator_name
Remark: we should remove `sanitize_if_fresh` as soon as we delete `::lean::mk_fresh_name`
2018-02-21 15:04:19 -08:00
Leonardo de Moura
49e8867d29 feat(util/name_generator): mk_tagged_child ==> mk_child_with
This commit also adds assertions to make sure only registered prefixes
are used to create name generators.
2018-02-21 15:04:19 -08:00
Leonardo de Moura
b16f641179 feat(util/name_generator): name generator prefix bookkeeping 2018-02-21 15:04:19 -08:00
Leonardo de Moura
ce028d651d refactor(kernel): abstract_type_context::mk_fresh_name ==> abstract_type_context::next_name 2018-02-21 15:04:19 -08:00
Leonardo de Moura
28d6326228 refactor(frontends/lean/parser): add name_generator 2018-02-21 15:04:19 -08:00
Leonardo de Moura
fa2e67e8f3 refactor(library/compiler/vm_compiler): do not use mk_fresh_name 2018-02-21 15:04:19 -08:00
Leonardo de Moura
6ba4607c28 refactor(library/compiler): rename compiler mk_fresh_name to mk_unused_name 2018-02-21 15:04:19 -08:00
Leonardo de Moura
c0ded37f24 refactor(library/inductive_compiler): do not use fresh names in the inductive compiler 2018-02-21 15:04:19 -08:00
Leonardo de Moura
e06c3cbd8f chore(library/type_context): fix compilation warning 2018-02-21 15:04:19 -08:00
Leonardo de Moura
21e52408b2 refactor(library/constructions): make sure constructions do not use ::lean::mk_fresh_name 2018-02-21 15:04:19 -08:00
Leonardo de Moura
c176faed32 feat(kernel/inductive): make sure constructor types do not contain local constants nor metavariables 2018-02-21 15:04:19 -08:00
Leonardo de Moura
cc8eb83507 refactor(library/util,util): move is_internal_name to util/ 2018-02-21 15:04:19 -08:00
Leonardo de Moura
2e5b66a5f1 refactor(kernel): make sure kernel does not use global ::lean::mk_fresh_name 2018-02-21 15:04:19 -08:00