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
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
8c8c9d1c4a
feat(frontends/lean/elaborator): cleanup and remove unnecessary code
2014-09-12 17:55:27 -07:00
Leonardo de Moura
0c50517058
refactor(frontends/lean/elaborator): do not save/restore cache
2014-09-12 17:39:11 -07:00
Leonardo de Moura
b7dcb8f833
fix(frontends/lean/elaborator): remove annotation left-over
2014-09-12 16:12:23 -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
7ffe73b8ca
fix(frontends/lean): name clash inside section, fixes #181
2014-09-11 16:37:23 -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
80fd14b39e
refactor(frontends/lean): replace collect_metavars with metavar_closure helper class
2014-09-11 14:49:35 -07:00
Leonardo de Moura
1e5ba9bd75
refactor(frontends/lean/elaborator): move coercion_elaborator to its own module
2014-09-10 16:42:49 -07:00
Leonardo de Moura
6bc41f8dde
refactor(frontends/lean/elaborator): move placeholder_elaborator to its own module
2014-09-10 16:42:49 -07:00
Leonardo de Moura
9ce356e515
refactor(frontends/lean/local_context): do not use references in the local context
2014-09-10 16:42:49 -07:00
Leonardo de Moura
669b1bff45
refactor(frontends/lean/elaborator): rename choice_elaborator to choice_iterator and move to separate module
2014-09-10 11:20:16 -07:00
Leonardo de Moura
4a4de27a6c
refactor(frontends/lean/elaborator): move local_context to separate file
2014-09-10 11:20:16 -07:00
Leonardo de Moura
4ea322febc
chore(frontends/lean/elaborator): minor cleanup
2014-09-10 11:20:16 -07:00
Leonardo de Moura
38058450d4
fix(frontends/lean/elaborator): whnf may produce assertion violation if term contains free variables
2014-09-09 16:09:05 -07:00
Leonardo de Moura
47e02342bb
feat(frontends/lean/elaborator): use whnf in class-instance resolution, closes #160
2014-09-09 15:04:44 -07:00
Leonardo de Moura
d9afb3ca96
fix(frontends/lean/elaborator): missing constraint
2014-09-09 09:27:26 -07:00
Leonardo de Moura
cbdfb0dcdc
feat(frontends/lean/elaborator): (Pi/forall) intro in class inference, closes #77
2014-09-07 19:59:34 -07:00
Leonardo de Moura
da701eb6de
fix(frontends/lean/elaborator): bug in recent change
2014-09-07 19:08:31 -07:00
Leonardo de Moura
fea516af24
feat(frontends/lean/elaborator): allow Pi/forall local instances
2014-09-07 18:16:33 -07:00
Leonardo de Moura
3310eb3dfc
feat(frontends/lean): remove restriction on implict arguments, add new test that demonstrates the new feature
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-07 12:29:32 -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
9876d07094
chore(frontends/lean): use consistent filename convention
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 09:59:24 -07:00
Leonardo de Moura
b94ec07b29
feat(frontends/lean): associate type information with left '('
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 09:56:27 -07:00
Leonardo de Moura
5a203d1c75
feat(frontends/lean): add '?' for inspecting the type of any expression, it produces a EXTRA_TYPE info entry
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 11:54:42 -07:00
Leonardo de Moura
ef1912eddf
feat(frontends/lean): improve COERCION info
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 09:34:13 -07:00
Leonardo de Moura
974a0a4217
feat(frontends/lean/elaborator): generate COERCION info
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 18:39:06 -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
d8548369e7
feat(frontends/lean/pp): improve let-expr pretty printer
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 07:46:58 -07:00
Leonardo de Moura
662345e2af
fix(frontends/lean/elaborator): missing '\n' in error message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 18:17:00 -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
dd99e60a00
refactor(frontends/lean/info_manager): store environment+options in the info_manager, fixes #96
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 18:07:09 -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
c5a44aca44
fix(frontends/lean/elaborator): do not expose type information produced when synthesizing class instances
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 17:07:12 -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
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
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
08ae17650b
feat(frontends/lean): try overloaded notation and declarations in the order they were defined
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-18 18:58:50 -07:00
Leonardo de Moura
919f02983e
feat(frontends/lean/elaborator): case-split on coercions that cannot be resolved by postponing
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-18 18:58:50 -07:00
Leonardo de Moura
dcc8f4e4fc
feat(frontends/lean/elaborator): generate identifier information for overloaded identifiers
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 15:18:51 -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
c6600bdaf4
refactor(frontends/lean/info_manager): intrusive smart pointer for info_data
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 08:28:02 -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
56a81eda6e
fix(frontends/lean/elaborator): uninit variable
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 16:39:21 -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
be8ee8b3c0
feat(frontends/lean): add information about synthesized placeholders, closes #39
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 10:37:24 -07:00