Commit graph

743 commits

Author SHA1 Message Date
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
5b69f88664 feat(frontends/lean/notation_cmd): make the notation for setting precedence uniform
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 16:55:41 -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
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
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
33cb9382aa feat(frontends/lean): add beta-reduction tactic command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 19:41:54 -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
6645fdeae0 feat(frontends/lean): add repeat tactic command, refactor tactic sequence notation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:24:13 -07:00
Leonardo de Moura
2510d5722a feat(frontends/lean): add unfold tactic command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:05:45 -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
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
1e39a21823 feat(frontends/lean): add basic tactics
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:03:51 -07:00
Leonardo de Moura
7d5522e36a chore(tests): add missing tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:03:51 -07:00
Leonardo de Moura
f5f3816596 chore(tests): cleanup test scripts
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:03:39 -07:00
Leonardo de Moura
cf28981f45 feat(tests/lean/run): add test_single script that sets the LEAN_PATH
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 07:47:46 -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
0adacb5191 feat(kernel): add infer implicit, and use it to infer implicit arguments of inductive datatype eliminators, and tag whether parameters should be implicit or not in introduction rules in the module inductive_cmd
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 13:57:36 -07:00
Leonardo de Moura
47ff300d1a fix(frontends/lean): '@' explicit mark
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 07:30:36 -07:00
Leonardo de Moura
9fb8fd0e7b test(tests/lua): add simple tactic framework test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 18:51:55 -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
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
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
ccce9d90a4 feat(frontends/lean/elaborator): add 'delayed coercions', add example demonstrating why the new feature is useful
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 18:39:23 -07:00
Leonardo de Moura
340dc622c6 fix(kernel/formatter): make sure simple formatter output is not sensitive to internal names
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 14:58:59 -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
a70f8dd98e feat(kernel/inductive): mark parameters, type formers and indices as implicit parameters in the elimination rule
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 11:05:14 -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
a7623845f9 test(tests/lean/run): add another example on how to deal with ambiguity
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 10:18:35 -07:00
Leonardo de Moura
930960c54d fix(frontends/lean/builtin_cmds): abstract section parameters in the 'check' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 10:06:50 -07:00
Leonardo de Moura
cc21bfd01d test(tests/lean/run): more tests on how to deal with ambiguity
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 09:32:26 -07:00
Leonardo de Moura
dc5553ea5c test(tests/lean/run): add test demonstrating how to control ambiguity
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 09:32:19 -07:00
Leonardo de Moura
da6e92787a test(tests/lean/run): add simple overloading test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 09:32:12 -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
1da4ed5d80 fix(tests/lua/test.sh): update old script
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 17:47:07 -07:00
Leonardo de Moura
d027c90bd0 fix(tests/lua/tc_bug1): update test to reflect recent changes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 16:50:30 -07:00
Leonardo de Moura
4bc1f3cf81 test(lean/run): add elaborator tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 16:15:01 -07:00
Leonardo de Moura
49a6048060 test(lean/run): add another test for new elaborator
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 13:18:32 -07:00
Leonardo de Moura
3e7dfa6212 fix(frontends/lean): infer type of definitions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 08:39:14 -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
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