Leonardo de Moura
8cfb3ae687
fix(library/module): bug in import_module
2014-10-18 21:03:22 -07:00
Leonardo de Moura
d2cbd25985
refactor(kernel): replace_visitor doesn't need to be in the kernel anymore
2014-10-17 10:23:35 -07:00
Leonardo de Moura
8974b52f7b
perf(library/unifier): avoid unnecessary wasteful computation
2014-10-16 17:16:49 -07:00
Leonardo de Moura
c4f02bd16a
refactor(kernel/expr): remove dead code
2014-10-16 13:09:26 -07:00
Leonardo de Moura
28128e0330
fix(frontends/lean): EXTRA_TYPE info
2014-10-16 12:25:18 -07:00
Leonardo de Moura
d960c1994e
refactor(library/tactic/apply_tactic): reuse type_checker object
2014-10-15 09:28:01 -07:00
Leonardo de Moura
bbe4017790
refactor(library/tactic/apply_tactic): remove dead code
2014-10-15 09:15:11 -07:00
Leonardo de Moura
b94d121580
refactor(library): move flycheck "helper" classes to separate module
2014-10-15 09:08:04 -07:00
Leonardo de Moura
e6606ef2ac
feat(library/tactic): add 'rename' hypothesis tactic
2014-10-14 18:19:34 -07:00
Leonardo de Moura
90dba868e3
feat(library/tactic/proof_state): apply substitutions when pretty printing state
2014-10-14 17:37:20 -07:00
Leonardo de Moura
58c9421bab
refactor(library/tactic): elaborate expressions nested in tactics with respect to current goal, save postponed constraints (e.g., flex-flex constraints) closes #44 , fixes #70
2014-10-14 17:18:40 -07:00
Soonho Kong
0f5d88517d
chore(library/rewriter): remove lean-0.1 files
2014-10-14 16:03:34 -07:00
Leonardo de Moura
5ff200c516
chore(library/simplifier): delete old simplifier
...
This was the simplifier used in Lean 0.1.
2014-10-14 15:56:09 -07:00
Leonardo de Moura
a30232b99a
fix(library/module): race condition on m_imported
2014-10-14 15:19:50 -07:00
Leonardo de Moura
7231aa0d73
fix(library/module): allow multiple calls to import_modules with the same modules
...
The idea is to store a set of already imported files.
This feature is useful when using the import_modules API directly (e.g.,
from javascript).
2014-10-14 08:13:41 -07:00
Leonardo de Moura
7d0db4cc60
feat(library/kernel_serializer): compress binder modifier annotations when saving .olean file
2014-10-13 10:14:56 -07:00
Leonardo de Moura
a26618e0f2
feat(frontends/lean): add '[]' notation for marking arguments where class-instance resolution should be applied
2014-10-12 13:06:00 -07:00
Leonardo de Moura
78b8a67015
refactor(library/scoped_ext): sections are just "nameless" namespaces
2014-10-11 17:36:46 -07:00
Leonardo de Moura
3d65b1c25c
fix(frontends/lean/elaborator): incorrect type information being reports in lean-mode, fixes #241
2014-10-10 15:41:55 -07:00
Leonardo de Moura
9ba59c6b25
feat(library/universe): improve support for universe level constraints in the unifier
2014-10-09 20:28:39 -07:00
Leonardo de Moura
86410d392b
feat(util/list_fn): generalize map_filter template
2014-10-08 22:23:20 -07:00
Leonardo de Moura
8fa171cb92
refactor(library/unifier): allow general 'unify' procedure to take an initial substitution as argument
2014-10-07 17:30:57 -07:00
Leonardo de Moura
92c424936a
refactor(kernel/macro_definition_cell): improve macro get_type API
2014-10-07 16:38:31 -07:00
Soonho Kong
2cf6cf19c0
feat(src): add LEAN_VERSION_PATCH
2014-10-07 12:30:38 -07:00
Leonardo de Moura
60d8369688
fix(library/unifier): missing justification when updating choice constraints
...
The bug was not producing incorrect results, but really bad error
messages.
See: empty.lean.expected.out
2014-10-04 10:40:53 -07:00
Leonardo de Moura
bf081ed431
refactor(kernel): rename var_decl to constant_assumption
...
Motivation: it matches the notation used to declare it.
2014-10-02 17:55:34 -07:00
Leonardo de Moura
ead827d6b7
feat(frontends/lean): add !
operator the "dual" of @
, closes #220
2014-10-01 17:13:41 -07:00
Leonardo de Moura
2730e5163e
feat(frontends/lean): allow 'sorry' implicit argument to access the whole context, and avoid cryptic error message
...
See new test for explanation.
2014-09-30 18:04:04 -07:00
Leonardo de Moura
486839881c
feat(*): use environment fingerprint to detect when the cache cannot be used because the configuration changed, closes #75
...
We are not taking into the account the options object yet.
2014-09-29 18:30:00 -07:00
Leonardo de Moura
19dec32844
feat(library): add environment fingerprint
2014-09-29 18:30:00 -07:00
Leonardo de Moura
530997638a
feat(library/definition_cache): store the hashcode of direct dependencies
...
Actually we store the has code of their types.
2014-09-29 18:30:00 -07:00
Leonardo de Moura
a0c37b231f
feat(kernel/expr): add hash_bi function that takes binder information into account
2014-09-29 16:44:55 -07:00
Leonardo de Moura
0d6d746d98
feat(frontends/lean): check modification time of imported files
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-29 15:17:27 -07:00
Leonardo de Moura
9f6a8827e0
refactor(*): use name_map
2014-09-28 10:23:11 -07:00
Leonardo de Moura
22e47430b5
feat(library/unifier): add 'on-demand' choice constraints, they are processed as soon as their type does not contain meta-variables anymore
2014-09-27 21:50:39 -07:00
Leonardo de Moura
8e7aac1eb4
fix(frontends/lean): add 'eval' command
2014-09-26 20:16:03 -07:00
Leonardo de Moura
9928390605
fix(library/match): memory leak that only happens with compiling with clang++
2014-09-26 10:24:38 -07:00
Leonardo de Moura
cd87539de5
fix(library/unifier): bug in the new next_delta_unfold_case_split
2014-09-25 09:56:32 -07:00
Leonardo de Moura
0488ee4ee2
perf(library/unifier): process delta expansion case split lazily
2014-09-24 19:16:12 -07:00
Leonardo de Moura
516c0c73b9
refactor(*): remove dependency to thread_local C++11 keyword, the
...
current compilers have several bugs associated with it
We use the simpler __thread (gcc and clang) and
__declspec(thread) (visual studio).
2014-09-24 12:51:04 -07:00
Leonardo de Moura
358074ae3d
refactor(kernel/record): remove kernel extension for records, we will
...
implement it outside of the kernel on top of the inductive datatypes
2014-09-24 10:12:28 -07:00
Leonardo de Moura
da481c3274
refactor(kernel): explicit initialization/finalization
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-24 10:12:28 -07:00
Leonardo de Moura
4dd7abb14e
refactor(library): explicit initialization/finalization
2014-09-23 10:45:14 -07:00
Leonardo de Moura
27ff42d2e0
refactor(library): remove dead files
2014-09-23 10:28:20 -07:00
Leonardo de Moura
83b22823a6
refactor(library/tactic): explicit initialization/finalization
2014-09-23 10:06:15 -07:00
Leonardo de Moura
531046626a
refactor(*): explicit initialization/finalization for environment extensions
2014-09-22 17:30:29 -07:00
Leonardo de Moura
b6781711b1
refactor(*): explicit initialization/finalization for serialization
...
modules, expression annotations, and tactics
2014-09-22 15:26:41 -07:00
Leonardo de Moura
b1ee888aae
refactor(*): start move to explicit initialization/finalization,
...
explicitly initialize/finalize options
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-22 10:41:07 -07:00
Leonardo de Moura
fd5daa8fda
feat(frontends/lean): use coercions to function-class and sort-class in
...
function arguments, closes #203
2014-09-20 09:00:10 -07:00
Leonardo de Moura
08ccd58eb6
feat(frontends/lean): add 'reducible' modifier for controlling which
...
definitions are unfolded during elaboration
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-19 15:54:32 -07:00
Leonardo de Moura
baf4c01de8
feat(frontends/lean): definitions are opaque by default
2014-09-19 15:54:32 -07:00
Leonardo de Moura
93c2c30310
feat(frontends/lean): allow transient coercions, i.e., coercions that
...
are not saved in .olean files
2014-09-19 15:54:32 -07:00
Leonardo de Moura
cbafa0dbf9
feat(library/scoped_ext): allow extensions to mark whether an entry is
...
persistent or not
2014-09-19 15:54:32 -07:00
Leonardo de Moura
49d5af473d
refactor(kernel): remove support for proof irrelevant classes
...
Motivation: we can use Prop
2014-09-19 07:32:07 -07:00
Leonardo de Moura
87592cdb43
refactor(library): remove dead code
2014-09-18 22:45:53 -07:00
Leonardo de Moura
dd31ed60b0
refactor(library): remove unnecessary file hott_kernel, HoTT and
...
standard library have been merged
2014-09-18 20:30:37 -07:00
Leonardo de Moura
243f80231a
chore(kernel): fix style and lua bindings
2014-09-17 18:30:28 -07:00
Leonardo de Moura
ea1bae0143
refactor(kernel/converter): replace extra_opaque_set with predicate
...
It gives us more flexibility.
2014-09-17 17:05:13 -07:00
Leonardo de Moura
1fbb554a16
feat(library/module): provide predicate module::is_definition
2014-09-17 16:32:00 -07:00
Leonardo de Moura
e3e2370a38
feat(frontends/lean): split 'opaque_hint' command into 'opaque' and 'transparent'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-16 18:03:40 -07:00
Leonardo de Moura
841658ec37
feat(library/error_handling): generate valid line and column information
...
when in flycheck mode
2014-09-14 20:15:22 -07:00
Leonardo de Moura
edcbe6fe10
feat(frontends/lean): allow multiple coercions from class A to B, closes #187
...
See new tests (for examples)
tests/lean/run/coe10.lean
tests/lean/run/coe11.lean
tests/lean/run/coe9.lean
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-14 12:59:43 -07:00
Leonardo de Moura
1b6d4460e9
chore(library/coercion): cleanup
2014-09-14 12:59:43 -07:00
Leonardo de Moura
d647954f93
feat(frontends/lean/elaborator): constraints associated with 'proof-qed'
...
blocks are solved independently, closes #82
2014-09-13 10:21:10 -07:00
Leonardo de Moura
029acbd1df
feat(library/coercion): better support for coercions to function-class. closes #185
2014-09-12 13:17:20 -07:00
Leonardo de Moura
62585f1c56
fix(library/coercion): remove spurious '\n'
2014-09-12 13:08:47 -07:00
Leonardo de Moura
010ecebfea
feat(frontends/lean): add proof-qed expression
...
Remark: we still have to add support to it in the elaborator.
Right now, it is just an embellished parenthesis.
2014-09-11 18:14:49 -07:00
Leonardo de Moura
85f7132efe
feat(frontends/lean/placeholder_elaborator): perform class-instance resolution in a completely independent unifier object, it also triggers the resolution when expected type does not contain metavariables, closes #175 , closes #173 , closes #68
2014-09-11 14:49:35 -07:00
Leonardo de Moura
03902d4b45
refactor(library/unifier): add option m_discard too unifier, if m_discard == false, then unsolved flex-flex constraints are returned, the unifier also does not apply "last resource" techniques that may miss many solutions.
2014-09-11 14:49:35 -07:00
Leonardo de Moura
935ba35292
feat(library/unifier): keep normalization result when processing universe level unification constraints
2014-09-11 14:49:35 -07:00
Leonardo de Moura
c7c35becb2
feat(library/io_state): add default constructor to io_state
2014-09-11 14:49:35 -07:00
Leonardo de Moura
80fd14b39e
refactor(frontends/lean): replace collect_metavars with metavar_closure helper class
2014-09-11 14:49:35 -07:00
Leonardo de Moura
bd1bc336fb
feat(library/coercion): add simple trick for defining coercions to function-class in a convenient way, closes #31
2014-09-09 14:36:36 -07:00
Leonardo de Moura
65000fa653
feat(library/coercion): rename class to 'coercions'
2014-09-09 14:03:45 -07:00
Leonardo de Moura
ee196bbf1a
fix(frontends/lean/pp): pretty printing coercions to functions, fixes #151
2014-09-09 12:49:32 -07:00
Leonardo de Moura
187661aa6a
feat(library/unifier): consider whnf case-split on flex-rigid constraints whenever the rhs contains a local constant that is not in the lhs
2014-09-09 09:27:26 -07:00
Leonardo de Moura
a5698a55ec
fix(library/unifier): catch type error when checking is_def_eq of type incorrect expressions
2014-09-09 09:27:26 -07:00
Leonardo de Moura
fd85d4702e
refactor(library/unifier): move all_local outside of the class
2014-09-09 09:27:26 -07:00
Leonardo de Moura
ebde1bcfad
feat(library/unifier): option 'unifier.computation true' will force elaborator to always consider an extra case-split when the right-hand-side of a flex-rigid constraint is not in weak-head-normal-form
2014-09-09 09:27:26 -07:00
Leonardo de Moura
b4793df653
feat(frontends/lean): rename '[fact]' to '[visible]'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-08 07:47:42 -07:00
Leonardo de Moura
2631979f5c
fix(library/scoped_ext): section/context should not affect namespace
2014-09-07 19:59:34 -07:00
Leonardo de Moura
bbff564a1c
feat(frontends/lean): persistent notation in sections
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-06 11:14:20 -07:00
Leonardo de Moura
6632a50015
refactor(library): add namespaces 'or', 'and' and 'iff'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 21:25:21 -07:00
Leonardo de Moura
364bba2129
feat(frontends/lean/inductive_cmd): prefix introduction rules with the name of the inductive datatype
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 17:26:36 -07:00
Leonardo de Moura
d76218e9d1
fix(frontends/lean/elaborator): bug when elaborating expressions with multiple annotations
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 11:23:58 -07:00
Leonardo de Moura
c532dcfaac
feat(library/declaration_index): add 'a|abbreviation-name|declaration-name' entries in .ilean files
2014-09-04 09:30:25 -07:00
Leonardo de Moura
d3ec5ccac1
refactor(library/declaration_index): store declarations in a map
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 07:42:18 -07:00
Leonardo de Moura
f9a90b9920
feat(frontends/lean): add 'export' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 18:37:01 -07:00
Leonardo de Moura
5e18e6609c
feat(frontends/lean): add 'as' clause to 'open' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 17:37:02 -07:00
Leonardo de Moura
e14814d4bf
feat(frontends/lean): add '[protected]' modifier
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 15:01:13 -07:00
Leonardo de Moura
060093cbab
refactor(library): add type_util module, and move get_expect_num_args to it
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 08:40:03 -07:00
Leonardo de Moura
bbdb13172e
feat(frontends/lean/server): add 'FINDP' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 12:59:48 -07:00
Leonardo de Moura
9a4472cff5
fix(frontends/lean): wrong displayed type in proof with multiple sorry's, fixes #112
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 14:32:53 -07:00
Leonardo de Moura
b9489ce585
fix(frontends/let): let-expression pretty printer
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 10:58:27 -07:00
Leonardo de Moura
be56fcf0bd
fix(frontends/lean/pp): pretty print 'let-expressions', closes #87
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 18:20:58 -07:00
Leonardo de Moura
b9628842cf
feat(library/unifier): remove mk_macro_imitation, we instead expand the macro before solving flex-rigid constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 17:34:03 -07:00
Leonardo de Moura
1e80a9dfe9
feat(frontends/lean): avoid exponential blowup when processing let-expressions with a lot of sharing, cleanup show-expression
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 16:27:52 -07:00
Leonardo de Moura
641624a277
fix(library/unifier): bug in expand_rhs
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 14:35:11 -07:00
Leonardo de Moura
e303651dee
refactor(library/unifier): cleanup mk_macro_imitation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 13:19:19 -07:00
Leonardo de Moura
c7e9e238ec
fix(frontends/lean/server): ignore output produced by worker thread, fixes #98
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 10:46:49 -07:00
Leonardo de Moura
fab4eb0d69
feat(frontends/lean/server): add CLEAR_CACHE command, closes #100
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 10:31:01 -07:00
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
Leonardo de Moura
955d7d2659
fix(library/aliases): namespace and constant have the same name, and 'using' produces the 'empty' alias
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 08:32:21 -07:00
Leonardo de Moura
2c3737bcc6
feat(frontends/lean): add info_manager
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-06 15:25:28 -07:00
Leonardo de Moura
da616f69ea
perf(library/unifier): do not explore branches that will trigger type errors
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 20:16:16 -07:00
Leonardo de Moura
bbc4380a52
fix(library/unifier): bug exposed by recent changes
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 19:02:30 -07:00
Leonardo de Moura
9cc2015caa
feat(library/unifier): better error message for invalid local context
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 16:25:22 -07:00
Leonardo de Moura
d1924097d5
feat(library/match): add 'local' backtracking
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 10:09:00 -07:00
Leonardo de Moura
e6ffda0c51
feat(library/match): add basic match_plugin that just invokes whnf before failing
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 08:37:03 -07:00
Leonardo de Moura
f4031b620f
feat(library/match): extend match_plugin interface, and allow them to recursively invoke the matcher
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 18:30:30 -07:00
Leonardo de Moura
c34c2f4f5c
feat(library/match): match universe levels
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 18:30:30 -07:00
Leonardo de Moura
b0a5ff7f93
refactor(library): rename hop_match to match
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 18:30:30 -07:00
Leonardo de Moura
0d5e346143
fix(library/expr_lt): make sure the builtin order is AC-compatible
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 15:51:10 -07:00
Leonardo de Moura
d5bb7d45ec
fix(library/unifier): constraint priority in the unifier, and remove hack from if.lean
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 13:58:47 -07:00
Leonardo de Moura
552be37d48
feat(library/hop_match): port higher-order (pattern) matcher to Lean 0.2, we still have to implement support for universe levels
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-03 16:03:58 -07:00
Leonardo de Moura
2dca68e645
chore(util/list): add inline functions for commonly used patterns in list processing code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-03 13:51:38 -07:00
Leonardo de Moura
50b0c17092
feat(library/unifier): add more information in error messages due to type errors when assigning metavariables
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-03 09:49:30 -07:00
Leonardo de Moura
4b030c5d5f
feat(library/module): relative module path
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 19:47:55 -07:00
Leonardo de Moura
fbc4a7af3b
feat(library/unifier): when unifier.expensive == true, then use only restrict higher-order unification (a fragment slightly more general than higher-order pattern matching) for solving class-instance constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 14:30:25 -07:00
Leonardo de Moura
5e2185cfbe
feat(library/unifier): postpone as much as possible universe constraints of the form ?m1 =?= max(l1, l2) and ?m1 =?= imax(l1, l2) where ?m1 occurs in the right hand side. When there is nothing else to be done, try to solve them by reducing to ?m1 = l1 and ?m1 = l2.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 09:14:35 -07:00
Leonardo de Moura
52e3505599
feat(frontends/lean): display warning message when importing file that uses 'sorry'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 00:47:58 -07:00
Leonardo de Moura
53833c70e9
fix(library/coercion): spurious 'replacing coercion', fixes #22
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 21:45:37 -07:00
Leonardo de Moura
8bd36dabce
refactor(kernel/pos_info_provider): get_pos_info return none if position is not available
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 20:17:26 -07:00
Leonardo de Moura
f39b2eb70f
feat(frontends/lean): add --flyinfo option
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 19:54:21 -07:00
Leonardo de Moura
9cf93c8299
feat(library/error_handling): add helpers classes for creating WARNING and INFO annotations for flycheck
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 17:41:39 -07:00
Leonardo de Moura
de05c041c7
feat(library/unifier): add flag for enabling/disabling expensive extensions in the unifier
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 16:46:16 -07:00
Leonardo de Moura
f57fc33442
fix(library/unifier): bug that was making unifier miss solutions, and add a new case-split that tries to solve flex_rigid constraints by putting the rhs into whnf
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 16:46:16 -07:00
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