Leonardo de Moura
92e90fbd07
feat(library/error_handling): add flycheck_scope helper class
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 12:45:54 -07:00
Leonardo de Moura
1a8a2b0811
refactor(library/unifier): process_flex_rigid method before adding yet another case split
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 12:25:35 -07:00
Soonho Kong
14a406d4d7
feat: add "--flycheck" option to print out error msgs for flycheck
2014-07-31 11:18:51 -07:00
Leonardo de Moura
450131692a
fix(library/converter): missing constraint on eta expansion
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-30 10:43:47 -07:00
Leonardo de Moura
936bb2744b
fix(library/unifier): add a flag to sign that a choice constraint owns a metavariable ?m, that is, it has the right to assign ?m, and the unifier should postpone any other constraint that tries to assign ?m
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 17:32:55 -07:00
Leonardo de Moura
7df78ea503
feat(kernel): add combinator for combining normalizer_extensions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 10:00:40 -07:00
Leonardo de Moura
105c29b51e
refactor(library/standard): use new coding style, rename bool.b0 and bool.b1 to bool.ff and bool.tt
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-28 19:59:38 -07:00
Leonardo de Moura
864fdd37da
refactor(library/aliases): aliases are from name to names
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-27 21:01:59 -07:00
Leonardo de Moura
d1fe1286c0
fix(library/unifier): bug introduced today in consume_tc_cnstrs
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-27 17:16:30 -07:00
Leonardo de Moura
faee08591f
fix(*): make sure elaborator and type_checker use the same "rules" for treating opaque definitions
...
This is a big change because we have to store in constraints whether we can use the "relaxed" rules or not.
The "relaxed" case says that when type checking the value of an opaque definition we can treat other opaque definitions in the same module as transparent.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-27 12:12:54 -07:00
Leonardo de Moura
cb232f2a9b
fix(kernel/inductive): use has_expr_metavar_strict instead of has_expr_metavar
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 19:57:54 -07:00
Leonardo de Moura
23af5ab217
fix(library/unifier): eager whnf application
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 10:37:02 -07:00
Leonardo de Moura
556861c8d6
fix(library/unifier): remove incorrect assertion
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 07:52:10 -07:00
Leonardo de Moura
70c887a0bd
fix(library/unifier): fix cryptic error message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 21:10:32 -07:00
Leonardo de Moura
01cec1e1f1
fix(library/unifier): more bugs in the unifier
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 20:05:37 -07:00
Leonardo de Moura
cf44c80ffb
fix(library/inductive_unifier_plugin): do not try to solve type incorrect constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 16:00:38 -07:00
Leonardo de Moura
7b84503133
fix(library/unifier): do not let a unification plugin to 'prioritize' a flex-flex constraint, and add missing case
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 15:03:57 -07:00
Leonardo de Moura
0f12e5a35b
fix(library/inductive_unifier_plugin): unification problem failure on problems with inductive datatypes
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 13:49:45 -07:00
Leonardo de Moura
022a151cf7
feat(kernel): add general purpose 'annotations', they are just a generalization of the 'let'-annotations
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 09:33:31 -07:00
Leonardo de Moura
48b902dc37
feat(library/unifier): solve constraints of the form '(max l1 l2) =?= 0' and '(imax l1 l2) =?= 0'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-24 20:30:51 -07:00
Leonardo de Moura
a533bf29da
fix(library/unifier): broken optimization was missing solution
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-24 17:41:22 -07:00
Leonardo de Moura
2eb84c5f74
fix(library/unifier): make sure we do not miss dependency
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-24 11:38:43 -07:00
Leonardo de Moura
314c0822de
fix(library/unifier): bugs exposed by recent changes
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 17:31:07 -07:00
Leonardo de Moura
13fe28dd1c
perf(library/unifier): delay the instantiation of metavariables occurring in the types of local constants
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 14:31:30 -07:00
Leonardo de Moura
35481cb045
fix(library/unifier): potentially changing flag from l_false ==> l_undef
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 10:59:53 -07:00
Leonardo de Moura
301c395e59
perf(kernel/metavar): performance problem with occurs method
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 10:35:27 -07:00
Leonardo de Moura
61661478ad
refactor(kernel/metavar): simplify substitution class, and remove dead code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 10:03:03 -07:00
Leonardo de Moura
75005765d6
perf(library/unifier): add small performance improvement
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 17:58:40 -07:00
Leonardo de Moura
697bcf4b4f
perf(library/unifier): improve performance of instantiate_meta method
...
It provides a significant performance boost in some files.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 16:24:07 -07:00
Leonardo de Moura
b522ea6f2d
refactor(library/standard): rename bit to bool
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:49:54 -07:00
Leonardo de Moura
5eaf04518b
refactor(*): rename Bool to Prop
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:43:18 -07:00
Leonardo de Moura
de657e8df0
fix(util/rc): reference counter memory_order flags
...
See discussion at
http://www.chaoticmind.net/~hcb/projects/boost.atomic/doc/atomic/usage_examples.html#boost_atomic.usage_examples.example_reference_counters
http://stackoverflow.com/questions/10268737/c11-atomics-and-intrusive-shared-pointer-reference-count
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 08:23:01 -07:00
Leonardo de Moura
cff6bf8c6d
fix(library/module): sign error is circular module dependency is detected
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 19:21:54 -07:00
Leonardo de Moura
ba9dd8b686
fix(library/choice): style
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 01:36:53 +01:00
Leonardo de Moura
438a42d010
feat(library/unifier): improve error message when metavar assignment is type incorrect
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:32 +01:00
Leonardo de Moura
55db3aaaa1
fix(library/module): module index assignment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
c1b7d7bf7e
fix(library/choice): we should be able to store 'choice' operators in .olean files, this can happen because of notation decls
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
d69db172a1
chore(kernel/replace_fn): add syntax sugar for replace function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-19 12:53:37 +01:00
Leonardo de Moura
6b60db7b93
fix(frontends/lean/elaborator): bug when mixing implicit arguments and sections
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-19 09:55:34 +01:00
Leonardo de Moura
a78fb8f013
perf(library/unifier): minimize the number of constraints generated in the flex_rigid 'imitation' step
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-17 06:32:21 +01:00
Leonardo de Moura
6ddba9c276
fix(library/unifier): bug in process_delta
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-16 04:55:09 +01:00
Leonardo de Moura
c8849d42e9
fix(library/unifier): tolerate exceptions in the type_checker::infer method. This can happen since when we try projections we don't check whether they are type correct
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-16 03:05:19 +01:00
Leonardo de Moura
bd0cc5c365
fix(library/expr_pair): typo
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 04:11:27 +01:00
Leonardo de Moura
a18cf94d09
perf(library/unifier): minimize the use of instantiate_metavars
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 03:55:27 +01:00
Leonardo de Moura
29c7eeaa99
refactor(library/unifier): improve occurs_context_check
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 02:08:16 +01:00
Leonardo de Moura
2e6184a721
fix(frontends/lean): more bugs in section management
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 06:27:36 +01:00
Leonardo de Moura
5c51be4585
refactor(frontends/lean): use expr_struct_set when collecting locals
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 04:12:58 +01:00
Leonardo de Moura
fab7934265
refactor(frontends/lean/elaborator): modify when tactic_hints are invoked, add the notion of strict placeholder
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 02:53:02 +01:00
Leonardo de Moura
614d8a768b
fix(library/unifier): flex_rigid case (?M ...) =?= (f ...), where f is not a constant nor a local
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-13 02:46:04 +01:00
Leonardo de Moura
6d95250d4b
fix(library/kernel_serializer): make sure temporary (internal) binder names do not leak into .olean files
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 20:23:38 +01:00
Leonardo de Moura
391e5e2bc2
perf(library/unifier): use d_instantiate_metavars
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 05:12:09 +01:00
Leonardo de Moura
9517f31a71
refactor(kernel/metavar): remove unnecessary functionality
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 04:45:50 +01:00
Leonardo de Moura
50f76fd138
perf(library/unifier): improve m_mvar_occs management
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 04:23:02 +01:00
Leonardo de Moura
c3e8e83e50
perf(library/unifier): simple optimization
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-11 20:21:41 +01:00
Leonardo de Moura
1230e942aa
feat(library/unifier): handle 'first-order' flex-flex constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-11 04:51:28 +01:00
Leonardo de Moura
b62abf0f06
refactor(library/tactic/goal): remove redundance, goal pp method was duplicating some of the functionality provided by the pretty printer
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 18:59:03 +01:00
Leonardo de Moura
405e57eb2d
refactor(kernel/formatter): add formatter_factory, and simplify formatter interface
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 18:32:00 +01:00
Leonardo de Moura
2ef7b9be2f
feat(frontends/lean): add basic pretty printer
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-09 01:12:36 -07:00
Leonardo de Moura
91b0dcad0f
fix(library/tactic): avoid 'unknown' message in trace_tac when position information is not available
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 17:48:41 -07:00
Leonardo de Moura
a1601e7a5f
feat(library/tactic/apply_tactic): add option for 'refreshing' universe metavariables in the 'apply' tactic
...
The new test ../../tests/lean/run/tactic27.lean demonstrates why we need this feature. The tactic 'apply @refl' is actually 'apply @refl.{?l}'. It is used inside of a repeat tactical. Each iteration of the 'repeat' may need to use a different value for ?l. Before this commit, there was not way to say we want a fresh ?l each iteration.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 16:55:23 -07:00
Leonardo de Moura
547ca9b3c4
fix(library/inductive_unifier_plugin): missing test
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 16:39:39 -07:00
Leonardo de Moura
a3be63af73
feat(frontends/lean): add tactic_hint command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 15:08:13 -07:00
Leonardo de Moura
33cb2db5b5
feat(library/head_map): a simple indexing datastructure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 15:08:13 -07:00
Leonardo de Moura
b43fb7448c
feat(frontends/lean): search for identifiers in the stack of namespaces; reject non-atomic names as local names
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 19:00:06 -07:00
Leonardo de Moura
e6d4c01b88
feat(frontends/lean): check whether namespace exists or not in the 'using' command, add to_valid_namespace_name helper function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 18:17:10 -07:00
Leonardo de Moura
c16951aba6
fix(library/aliases): aliasing behavior
...
The new test '../../tests/lean/run/alias3.lean' demonstrates the issue being fixed.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 15:40:55 -07:00
Leonardo de Moura
6ceecf6a15
feat(library/aliases): remove duplicates from aliasing tables
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 12:59:57 -07:00
Leonardo de Moura
b956ce68d2
feat(frontends/lean/elaborator): keep postponing delayed coercions until the type can be inferred
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 12:50:43 -07:00
Leonardo de Moura
fe448d47be
feat(library/unifier): improve failure report
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 12:03:37 -07:00
Leonardo de Moura
48b28ad75c
fix(library/unifier): missing test in flex_rigid
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-06 21:36:23 -07:00
Leonardo de Moura
dcf7cf00ff
fix(*): bugs in the type checker, inductive datatypes, and unifier
...
The bugs were indentified when performing the tiny change in the file
tests/lean/run/group.lean
2014-07-06 18:44:56 -07:00
Leonardo de Moura
9be1a4ab46
fix(library/module): module index assignment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 23:32:18 -07:00
Leonardo de Moura
55894f01e3
feat(frontends/lean): add 'opaque_hint' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 18:58:20 -07:00
Leonardo de Moura
59755289e4
feat(library/unifier): case split on constraints of the form (f ...) =?= (f ...), where f can be unfolded, and there are metavariables in the arguments
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 15:52:40 -07:00
Leonardo de Moura
8aa217ea76
chore(library/unifier): update comments
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 11:06:13 -07:00
Leonardo de Moura
72bce91c18
refactor(library/unifier): move inductive datatype support to inductive_unifier_plugin
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 11:00:35 -07:00
Leonardo de Moura
e445515f2b
refactor(kernel): move standard and hott kernel instantiations to library
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 10:31:27 -07:00
Leonardo de Moura
ab929d7201
refactor(library/unifier): store the unifier_plugin in the environment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 10:25:58 -07:00
Leonardo de Moura
a52c9f4e2b
feat(library/unifier): add option 'unifier.unfold_opaque', remove option 'unifier.use_exceptions' (the user should not be able to change this)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 09:43:16 -07:00
Leonardo de Moura
efabd2280c
feat(library/unifier): allow unifier to unfold opaque definitions of the current module
...
It is not clear whether this is a good idea or not. In some cases, it seems to do more harm than good.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 00:46:03 -07:00
Leonardo de Moura
ac1585fd1a
feat(library/unifier): divide constraints in clear groups
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 00:04:38 -07:00
Leonardo de Moura
f242971b55
feat(library/unifier): delay constraints where the lhs or rhs are of the form (?m ... (intro ...))
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 23:36:31 -07:00
Leonardo de Moura
1e40525a0c
fix(library/unifier): simple bug
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 21:15:32 -07:00
Leonardo de Moura
d7cb1952ae
feat(kernel): simplify choice_fn, and make its interface closer to the unifier_plugin interface
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 12:47:33 -07:00
Leonardo de Moura
b94ce412ae
fix(library/unifier): non-termination
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 10:32:01 -07:00
Leonardo de Moura
e0501104e2
feat(library/tactic): add 'fixpoint' tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 01:30:28 -07:00
Leonardo de Moura
7fb2b0f6d8
feat(kernel): add method 'may_reduce_later' to normalizer_extension, and improve unifier
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 22:31:05 -07:00
Leonardo de Moura
110b622b83
feat(library/unifier): add support for unification constraints of the form "(elim ... (?m ...)) =?= t", where elim is an eliminator
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 20:41:51 -07:00
Leonardo de Moura
c854ad3d65
refactor(library/unifier): add is_def_eq alias
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 18:01:59 -07:00
Leonardo de Moura
aba4534acb
feat(library/unifier): 'forget' justifications after finding a solution, the justifications are only needed inside the unifier (for implementing nonchronological backtracking)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 14:14:07 -07:00
Leonardo de Moura
a009225435
feat(kernel/metavar): expose destructive assign
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 14:07:47 -07:00
Leonardo de Moura
abbd054b51
feat(library/tactic): add eassumption tactic, and remove redundant 'subgoals' from apply tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 13:04:46 -07:00
Leonardo de Moura
079592c446
feat(library/unifier): eagerly apply substitution to improve quick failure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 12:58:30 -07:00
Leonardo de Moura
c9cfb844f1
feat(library/unifier): add 'quick' failure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 11:28:21 -07:00
Leonardo de Moura
dd96bb151b
refactor(library/unifier): reduce the number unify procedure 'flavors'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 11:15:43 -07:00
Leonardo de Moura
d63ccbcf94
fix(library/unifier): missing case
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 10:51:59 -07:00
Leonardo de Moura
0ff145e59b
feat(library/tactic): add apply tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 09:20:01 -07:00
Leonardo de Moura
c9994ca00c
feat(library/unifier): when projecting give preference to most recent locals
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 09:01:29 -07:00
Leonardo de Moura
e3ab0a1d10
feat(frontends/lean): improve error messages when users forget to import 'tactic'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 08:33:29 -07:00
Leonardo de Moura
6b8b5f3dd8
feat(library/tactic): expose more builtin tactics, cleanup expr_to_tactic procedure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 08:06:28 -07:00
Leonardo de Moura
a7d660f875
feat(frontends/lean): add command for customizing the behavior of proof-qed blocks: we can automatically register tactics to be automatically applied before each component
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 20:45:10 -07:00
Leonardo de Moura
5527955ba8
feat(frontends/lean): add 'proof-qed' notation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 19:30:48 -07:00
Leonardo de Moura
138267b53a
feat(frontends/lean/elaborator) add trick for improving error messages when mixing tactics, elaboration and exact tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 18:58:32 -07:00
Leonardo de Moura
60c637fb9d
feat(library/tactic): add 'exact' tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 18:37:32 -07:00
Leonardo de Moura
37b5b7c4c2
feat(library/tactic): rename 'exact' to 'assumption', 'exact' is a different tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 18:10:42 -07:00
Leonardo de Moura
6a6ebd5c2d
refactor(kernel/metavar): add method instantiate as alias for instantiate_metavars_wo_jst
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 15:39:25 -07:00
Leonardo de Moura
3e1bb96935
feat(library/tactic/goal): propagate tag (for position information) from goal to subgoal
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 14:47:18 -07:00
Leonardo de Moura
ee531ec0e2
feat(frontends/parser): improve error message when an apply tactic refers a local constant that is not marked as [fact]
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 14:09:01 -07:00
Leonardo de Moura
0f27856e4a
feat(library/tactic): new apply tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 13:14:50 -07:00
Leonardo de Moura
6ab46396d8
feat(library/tactic): expose 'trace' tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 10:52:45 -07:00
Leonardo de Moura
e1d909455c
refactor(library/tactic): add namespace 'tactic', improve expr_to_tactic failure error message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 10:45:09 -07:00
Leonardo de Moura
a66a08c89e
feat(frontends/lean): parse strings as expressions of type 'string.string'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 10:00:55 -07:00
Leonardo de Moura
0198dfc7c5
feat(frontends/lean): parse numerals as expressions of type 'num.num'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 08:09:33 -07:00
Leonardo de Moura
7593ee1468
refactor(library/standard): remove parameter from 'tactic' inductive type
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 08:09:24 -07:00
Leonardo de Moura
b2b76b078f
feat(frontends/lean): remove build_tactic_cmds, and use expressions for representing tactics
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 20:43:53 -07:00
Leonardo de Moura
cbac21ec7f
feat(library/tactic): add trick for 'embedding' tactics inside Lean expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 19:05:22 -07:00
Leonardo de Moura
2df92b0701
refactor(library/tactic): simplify proof_state
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 18:02:17 -07:00
Leonardo de Moura
4cb5f97038
refactor(library/tactic): simplify tactic framework, no more proof builders
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 16:11:19 -07:00
Leonardo de Moura
ad12abcdb4
fix(library/unifier): bug in process_eq_constraint
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 18:22:05 -07:00
Leonardo de Moura
cb000eda13
refactor(kernel): store binder_infor in local constants
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 11:37:46 -07:00
Leonardo de Moura
c2ab31113f
refactor(library/tactic): remove cex_builder and 'precision' for proof_state's
...
These two features make sense for solvers, but not in a general purpose tactic framework for building proofs like the one in Lean.
In most cases, we cannot build a counterexample anyway. These two features should be added in a custom framework for combining preprocessing techniques like in Z3.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 08:48:07 -07:00
Leonardo de Moura
8d584e54da
feat(frontends/lean): add exact_apply
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 00:51:11 -07:00
Leonardo de Moura
360e9b9486
feat(library/tactic): add apply tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 18:33:53 -07:00
Leonardo de Moura
a8f9594046
refactor(kernel/instantiate): rename instantiate_params to instantiate_univ_params
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:09:55 -07:00
Leonardo de Moura
937d7b2813
fix(library/tactic): unfold tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:04:58 -07:00
Leonardo de Moura
6d09d82a7c
feat(frontends/lean): add notation for orelse tactic, add show and now tactics
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 11:39:18 -07:00
Leonardo de Moura
a1bbb09de4
feat(frontends/lean): add notation for then tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 11:24:56 -07:00
Leonardo de Moura
15f270d9f3
fix(library/tactic): memory leak that only happens when compiling with clang++
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 11:07:06 -07:00
Leonardo de Moura
6891f48c67
fix(library/module): do not store full path of imported modules
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 10:48:57 -07:00
Leonardo de Moura
ffa175009b
feat(frontends/lean): use tactics for solving unassigned metavariables
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:50:16 -07:00
Leonardo de Moura
ec18bd93f9
feat(frontends/lean): send tactic hint table to elaborator
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 07:03:25 -07:00
Leonardo de Moura
193ce35419
refactor(frontends/lean/inductive_cmd): redesign inductive datatype elaboration, use the new elaborator, and use simpler algorithm to infer the resulting universe
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 15:33:56 -07:00
Leonardo de Moura
0e015974ca
fix(library/unifier): bug in process_flex_rigid, also cleanup the code and break it into different cases
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 11:19:56 -07:00
Leonardo de Moura
7075f6e94a
fix(library/module): make sure decls from imported modules have module_idx > 0
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 08:36:54 -07:00
Leonardo de Moura
58b6169e8b
fix(library/max_sharing): take binder annotations into account
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 08:31:09 -07:00
Leonardo de Moura
e408998e06
fix(library/tactic): name convention
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 18:42:59 -07:00
Leonardo de Moura
fa72e7b874
refactor(library/tactic): simplify tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 18:35:59 -07:00
Leonardo de Moura
5524c6c3d8
refactor(library/tactic/proof_state): simplify proof state
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 14:49:48 -07:00
Leonardo de Moura
c6ac89d967
refactor(library/tactic/proof_builder): simplify proof builder
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 12:25:04 -07:00
Leonardo de Moura
aaa7960b75
refactor(library/tactic/goal): use local names for hypotheses
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 11:11:12 -07:00
Leonardo de Moura
d84b745241
refactor(library/tactic/cex_builder): simplify cex_builder
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:14:33 -07:00
Leonardo de Moura
b4e4c4d610
chore(library/tactic): remove unnecessary file
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:02:13 -07:00
Leonardo de Moura
f1d8d8dcf9
chore(library/tactic): update goal objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:00:12 -07:00
Leonardo de Moura
ad70044ae1
chore(library/tactic): remove dead code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:00:12 -07:00
Leonardo de Moura
e55b4bf86d
fix(library/unifier): bug in flex_rigid case: binding imitation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 20:43:49 -07:00
Leonardo de Moura
50e21586b0
feat(library/unifier): do not create a case-split for choice constraints that produce only one alternative
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 18:52:13 -07:00
Leonardo de Moura
ed299c0914
feat(library/coercion): add has_coercions_to function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 18:38:27 -07:00
Leonardo de Moura
e769121c2a
fix(frontends/lean/elaborator): memory leaks that only occur when compiling with clang++
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 16:02:54 -07:00
Leonardo de Moura
150d285b39
fix (library/unifier): occurs_context_check
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 14:45:36 -07:00
Leonardo de Moura
16bdc51fc4
refactor(kernel/type_checker): simplify type checker API, and remove add_cnstr_fn
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 13:36:31 -07:00
Leonardo de Moura
5e0e737213
feat(library/scoped_ext): do not import 'children' namespace objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 10:32:34 -07:00
Leonardo de Moura
6085a54416
feat(library/error_handling): improve unifier_exception error message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:49:50 -07:00
Leonardo de Moura
e735a8e5ff
fix(library/unifier): bug in conflict resolution
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:42:40 -07:00
Leonardo de Moura
52ff29a6f7
feat(frontends/lean): add 'coercion' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:08:39 -07:00
Leonardo de Moura
acf8c13619
feat(kernel): add strict implicit arguments
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 17:50:49 -07:00
Leonardo de Moura
a42a80407a
fix(library/unifier): when imitating (f a), abstract local constants occurring in f
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 16:11:31 -07:00
Leonardo de Moura
f981a4c1fe
fix(library/unifier): bug in lambda_abstract_locals auxiliary function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 09:59:08 -07:00
Leonardo de Moura
6db6048bf8
feat(library/error_handling): pretty print unifier exceptions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 09:41:25 -07:00
Leonardo de Moura
18a883ab1b
fix(library/unifier): set conflict if type mismatch during metavariable assignment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 09:33:34 -07:00
Leonardo de Moura
d055c4880f
feat(frontends/lean): connect new elaborator to frontend
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 08:31:00 -07:00
Leonardo de Moura
d7436e600b
fix(library/resolve_macro): typo
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-24 17:40:58 -07:00
Leonardo de Moura
603dafbaf7
refactor(kernel): remove 'let'-expressions
...
We simulate it in the following way:
1- An opaque 'let'-expressions (let x : t := v in b) is encoded as
((fun (x : t), b) v)
We also use a macro (let-macro) to mark this pattern.
Thus, the pretty-printer knows how to display it correctly.
2- Transparent 'let'-expressions are eagerly expanded by the parser.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-24 16:27:27 -07:00
Leonardo de Moura
2c0f596665
fix(library/choice): avoid assertion violation when Lua API is misused
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-24 12:14:38 -07:00
Leonardo de Moura
3169f8c126
feat(library): add mk_explicit/is_explicit procedures for '@'-expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-24 12:11:27 -07:00
Leonardo de Moura
aa8b5655dd
feat(frontends/lean): add notation overwrite
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 16:10:36 -07:00
Leonardo de Moura
60f230a206
doc(library/unifier): ignore flex-flex constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 14:33:09 -07:00
Leonardo de Moura
7df397fe63
test(lua): add universe constraint unifier test
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 14:19:02 -07:00
Leonardo de Moura
a0e4dccdac
refactor(kernel/constraint): rename choice constraint fields
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 13:52:03 -07:00
Leonardo de Moura
60c60c6cf5
feat(library/kernel_bindings): add mk_choice_cnstr to Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 13:39:21 -07:00
Leonardo de Moura
6d14de76f3
feat(kernel/constraint): add 'delayed' flag to choice constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 12:56:06 -07:00
Leonardo de Moura
66016df0ad
feat(library/unifier): add imitation step for macros
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 12:44:22 -07:00
Leonardo de Moura
2fa5b17592
feat(library/unifier): add unifier.max_steps unifier.use_exceptions options
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 12:38:57 -07:00
Leonardo de Moura
7b188ea37e
feat(library/unifier): implement flex-rigid case
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 11:00:35 -07:00
Leonardo de Moura
68d55ef398
doc(library/unifier): document some of the unifier_fn methods
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 08:22:38 -07:00
Leonardo de Moura
9f7b92a410
refactor(library/unifier): combine active and delayed constraint sets
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 21:10:59 -07:00
Leonardo de Moura
228f51dcfa
feat(library/unifier): add support for choice constraint
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 17:21:24 -07:00
Leonardo de Moura
611f29a954
chore(library/elaborator): remove dead code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 16:35:00 -07:00
Leonardo de Moura
c8a07dee53
feat(library/unifier): add unifier_plugin support, and unit test with plugin implemented using Lua
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 16:27:04 -07:00
Leonardo de Moura
238a0dbfba
fix(library/unifier): memory violation, and missing set_conflict
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 14:09:06 -07:00
Leonardo de Moura
29a00c46d0
feat(library/unifier): add main loop and resolve_conflict
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 11:57:10 -07:00
Leonardo de Moura
644c387cfe
refactor(kernel/constraint): rename: level constraints are also equality constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 10:50:47 -07:00
Leonardo de Moura
73666af4a4
fix(library/register_module): missing open_unifier
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 10:01:51 -07:00
Leonardo de Moura
3953d4d122
feat(kernel/type_checker): add push/pop methods to type_checker, they control the cache, and allow the type checker to reuse results even when it is used inside of a backtracking search
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 09:58:05 -07:00
Leonardo de Moura
9c745057b4
feat(library/unifier): add unify_fn skeleton
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-21 20:08:39 -07:00
Leonardo de Moura
bf8f3318d8
feat(library): add unifier module skeleton
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-21 13:38:17 -07:00
Leonardo de Moura
37bee8c852
refactor(kernel/type_checker): simplify replace constraint_handler with closure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-21 12:25:54 -07:00
Leonardo de Moura
86a56fbd2d
feat(library/kernel_bindings): expose methods substitution::for_each_expr and substitution::for_each_level in the Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-21 12:25:54 -07:00
Leonardo de Moura
67088b130e
refactor(kernel/constraint): simplify constraint interface, and add choice constraint
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-21 12:25:54 -07:00
Leonardo de Moura
05d1832425
refactor(kernel/type_checker): improve ensure_pi and ensure_sort APIs
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-19 22:33:58 -07:00
Leonardo de Moura
77c5319c4a
chore(*): remove Lua 'migrate'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-18 07:01:34 -07:00
Leonardo de Moura
3ea24c0f32
fix(library/kernel_bindings): set_environment and set_io_state objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 22:36:47 -07:00
Leonardo de Moura
f9d81c24d3
feat(library/expr_lt): add lex comparison for expression pairs
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 12:14:22 -07:00
Leonardo de Moura
0779db7ae9
fix(kernel): set module_idx on theorems, otherwise we are not able to import theorems that use opaque definitions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 16:56:11 -07:00
Leonardo de Moura
2c4175341c
feat(library/placeholder): allow types to be attached to placeholders
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 14:35:55 -07:00
Leonardo de Moura
07f2379dec
refactor(kernel): add mk_local function that has only two arguments
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 14:27:26 -07:00
Leonardo de Moura
e7019ec840
feat(frontends/lean): add infixl/infixr/postfix/precedence commands, add support for storing notation in .olean files, add support for organizing notation into namespaces
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-14 22:13:25 -07:00
Leonardo de Moura
a65c43c0db
feat(frontends/lean/builtin_cmds): add definition command family
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 17:30:35 -07:00
Leonardo de Moura
01cecb76db
feat(frontends/lean/builtin_cmds): add 'variable' command family
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 15:13:50 -07:00
Leonardo de Moura
ce259e6265
feat(frontends/lean/parser): add namespace/section/end commands, add support for explicit universe levels, fix Type notation'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 11:34:43 -07:00
Leonardo de Moura
5aca452439
feat(library/aliases): add 'exceptions' and support for universes to add_aliases procedure, add for_each_universe method to environment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 08:26:05 -07:00