Commit graph

944 commits

Author SHA1 Message Date
Leonardo de Moura
4c9723e5ed fix(library/unifier): assertion violation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 09:07:34 -07:00
Leonardo de Moura
02b7f980b0 fix(library/num): bug in to_pos_num, missing test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 08:18:07 -07:00
Leonardo de Moura
fbf13994d8 refactor(*): use + for concatenating format objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-24 09:35:25 -07:00
Leonardo de Moura
2f699fa53a feat(*): make sections 'permanent', and add 'transient' contexts, closes #88
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 15:45:15 -07:00
Leonardo de Moura
b13851ba13 feat(frontends/lean): add kind and type to index, closes #89
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 12:39:59 -07:00
Leonardo de Moura
01000ff7df feat(library): add typed_expr macro
We use it to enforce that a let-variable has the expected type

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 11:26:06 -07:00
Leonardo de Moura
d4ac482d76 refactor(kernel): move annotation to library
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 10:38:10 -07:00
Leonardo de Moura
b746492ac8 refactor(library/simple_formatter): rename simple_formatter to print
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 10:32:08 -07:00
Leonardo de Moura
7d987df429 refactor(kernel/formatter): move simple_formatter to library
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 10:26:45 -07:00
Leonardo de Moura
937c465685 fix(library/unifier): too much reduction
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 21:37:51 -07:00
Leonardo de Moura
6cf73b51e2 fix(library/unifier): bug in occurs_check, the dependency may be eliminated by reducing term
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 17:56:18 -07:00
Leonardo de Moura
bb6dbe0e6f fix(library/unifier): we should preprocess choice constraints before we start solving any constraint, fixes #85
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 16:58:25 -07:00
Leonardo de Moura
e5057ed155 fix(library/unifier): remove incorrect assertion, a local constant may occur in the type of a metavariable that was not instantiated yet
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 18:22:43 -07:00
Jeremy Avigad
6264fb52d6 fix(lean/library/standard): fix tests, more cleanup 2014-08-20 18:04:31 -07:00
Leonardo de Moura
f5987b7bda refactor(library/unifier): make it easier to add new options to the unifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 17:30:08 -07:00
Leonardo de Moura
0450e81392 feat(library/unifier): allow computation when solving flex-rigid constraints
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:20 -07:00
Leonardo de Moura
fa342c8ea7 fix(library/unifier): missing set_conflict
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:19 -07:00
Leonardo de Moura
9588336c15 refactor(kernel/type_checker): remove "global" constraint buffer from type_checker, and use constraint_seq instead
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:19 -07:00
Leonardo de Moura
4cf3d32e0c chore(*): create alias for std::pair
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:19 -07:00
Leonardo de Moura
4a96fefd96 fix(library/unifier): bug in unifier priority queue
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-18 18:58:50 -07:00
Leonardo de Moura
3d8477f7de fix(library/module): ignore multiple declarations of 'sorry', fixes #59
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 15:55:58 -07:00
Leonardo de Moura
55b0a03e3d refactor(frontends/lean/info_manager): to allow cache to be used when producing info data, fixes #37, closes #45
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 12:16:32 -07:00
Leonardo de Moura
5bc62f0ba9 fix(library/coercion): error message
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 06:59:52 -07:00
Leonardo de Moura
1436212a34 fix(library/unifier): use depth-first search strategy for solving class-instance constraints
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-16 13:51:24 -07:00
Leonardo de Moura
dc1613f535 feat(frontends/lean): annotate 'notation' subterms with 'noinfo' annotation (goal: improve typeinfo generation); fix initialization problem (with annotations)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 15:07:14 -07:00
Leonardo de Moura
6a6c9f472e feat(frontends/lean): add synthesis information only for 'explicit' placeholder
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 12:48:36 -07:00
Leonardo de Moura
2edb53397f fix(library/declaration_index): style
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 18:19:17 -07:00
Leonardo de Moura
dc3e9a15d2 refactor(library/definitions_cache): rename to definition_cache
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 18:12:12 -07:00
Leonardo de Moura
343407b1b6 feat(shell/lean): add --index option
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 18:05:48 -07:00
Leonardo de Moura
40f7ef5097 feat(shell/lean): display src file name when printing 'file not found in the LEAN_PATH' error, closes #47
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 15:48:31 -07:00
Leonardo de Moura
0d97fff280 feat(library/module): include name of corrupted .olean file
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 11:28:44 -07:00
Leonardo de Moura
ebbca0d613 perf(library/num): avoid exception
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 09:12:22 -07:00
Leonardo de Moura
2869d9059f feat(frontends/lean): change 'proof-qed' semantics: no backtracking
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-12 17:40:30 -07:00
Leonardo de Moura
562926e7ad refactor(kernel/instantiate): add functions instantiate_value_univ_params and instantiate_type_univ_params
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-12 17:40:30 -07:00
Leonardo de Moura
d47d326cef fix(library/unifier): bug in mk_imitiation_arg
Remove bogus constraint
     cs.push_back(mk_eq_cnstr(mk_app(maux_type, locals), type, j, relax));
This constraint is incorrect because 'type' may contain local constants that are not in 'locals'.

We just rely on
   cs.push_back(mk_eq_cnstr(mk_app(maux, margs), arg, j, relax));
When maux is assigned, the system will inforce that its type (which is based on maux_type) must be type correct

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-11 15:44:23 -07:00
Leonardo de Moura
cb8185f016 feat(frontends/lean): add '#erase_cache' command (for debugging purposes)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-11 13:55:29 -07:00
Leonardo de Moura
f896771987 refactor(library/tactic/expr_to_tactic): use annotations for implementing 'by'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-10 11:16:46 -07:00
Leonardo de Moura
9d4c073618 feat(frontends/lean): add option --cache
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-10 11:04:16 -07:00
Leonardo de Moura
dc503e6e3d feat(library): add definitions_cache datastructure for implementing .clean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-10 09:53:13 -07:00
Leonardo de Moura
ee9be2837b refactor(library/unifier): remove redundant code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-09 15:04:34 -07:00
Leonardo de Moura
0af55beb56 perf(library/unifier): improve flex_rigid performance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-09 08:07:15 -07:00
Leonardo de Moura
9d13f634f3 refactor(library/unifier): group flex_rigid case related methods in a functional object
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-08 16:44:59 -07:00
Leonardo de Moura
49070895d1 perf(library/unifier): improve 'assign' method, keep old version
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 22:29:56 -07:00
Leonardo de Moura
24e8dca014 feat(library/explicit): allow 'as-is', 'explicit' and 'implicit' annotations to be saved in .olean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 19:13:48 -07:00
Leonardo de Moura
969afa8245 perf(library/unifier): improve check_imitation performance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 18:28:23 -07:00
Leonardo de Moura
70c0eda9fc feat(frontends/lean): make sure all scopes are closed in the end of the module
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 17:08:59 -07:00
Leonardo de Moura
1a67e69678 feat(library/scoped_ext): force user to end a scope with an identifier matching the one used in beginning of scope, closes #30
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 16:59:08 -07:00
Leonardo de Moura
2486c483cf chore(kernel/error_msgs): change type mismatch error messages, closes #33
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 16:18:40 -07:00
Leonardo de Moura
9e6c5695be fix(library/unifier): make sure the imitation step is type correct, fix ensure_sufficient_args
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 16:09:45 -07:00
Leonardo de Moura
6d6c62461f chore(library/kernel_serializer): add assertions for invalid uses of anonymous names
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 08:32:32 -07:00