Commit graph

35 commits

Author SHA1 Message Date
Leonardo de Moura
51958df84b chore(frontends/lean/token_table): remove dead keywords 2017-03-07 14:00:49 -08:00
Sebastian Ullrich
a053175714 refactor(init/meta,library/vm): use structure for position information 2017-02-21 11:06:39 -08:00
Leonardo de Moura
50f4a28fc3 feat(library/init/meta/smt/interactive): rsimp for smt_tactic 2017-02-19 13:31:03 -08:00
Leonardo de Moura
296d4b0f09 refactor(library/tactic, library/init/meta): simplify_config => simp_config 2017-02-19 13:10:36 -08:00
Leonardo de Moura
0d22410e2e feat(library/tactic): add zeta option, refactor simplify config option, allow users to change simplify_config in interactive mode 2017-02-19 12:11:22 -08:00
Sebastian Ullrich
b9424975b3 refactor(init/meta): replace dynamically-checked quotes where possible 2017-02-17 19:59:57 -08:00
Sebastian Ullrich
84f3e2a492 refacotr(init/meta/interactive): clean up parameter gadgets 2017-02-17 15:41:58 +01:00
Sebastian Ullrich
d15591a2d8 feat(library,frontends/lean): expose parser to Lean and use for parsing tactic parameters 2017-02-17 13:45:56 +01:00
Leonardo de Moura
41d3d42dee feat(library/init/meta): add helper tactics 2017-02-11 18:30:38 -08:00
Leonardo de Moura
54f7bf9391 fix(frontends/lean, library/tactic): remove redundant error messages, and fix position of error messages
Summary:

We minimize the number of "'sorry' used warning messages".  We also
re-target the error to the main declaration. Example: foo._main ==> foo
We do not report for auxiliary declarations such as "_example" and
"foo.equations._eqn_1"

Get rid of the redundant error message "error : failed" for tactics.
We added "silent failures" in the tactic framework.

We do not store line/col information for tactics nested in notation
declarations.  Before this commit, we would have tactics such
as (tactic.save_info line col) nested inside of notation declarations.
2017-02-07 20:25:28 -08:00
Leonardo de Moura
797b26f402 fix(frontends/lean/tactic_notation): trace messages in nested blocks were not being displayed in the correct place 2017-02-05 18:20:10 -08:00
Leonardo de Moura
aff5a2dd37 fix(library/init/meta): bug introduced 9bee8ce36d 2017-02-03 17:01:46 -08:00
Leonardo de Moura
2640d3085b fix(library/init/meta/interactive): name resolution problems in parametric sections 2017-02-03 14:04:59 -08:00
Leonardo de Moura
bb9a0c79f4 feat(frontends/lean/builtin_exprs): better syntax for quoted terms with type ascription 2017-02-01 12:49:38 -08:00
Leonardo de Moura
6e7929252f feat(frontends/lean, library/init): add 'thunk' gadget
We can now write
   trace "hello" t
instead of
   trace "hello" (fun _, t)
2017-01-31 18:41:59 -08:00
Leonardo de Moura
b913ba3336 feat(library/init/meta): add type information for the arguments of the smt tactics: ematch_using and add_lemmas 2017-01-22 12:12:31 -08:00
Leonardo de Moura
cce88c6190 refactor(frontends/lean): interactive tactic support
After this commit, new interactice tactic classes can be added without
writing C++ code (see example: tests/lean/run/my_tac_class.lean).

The tactic_evaluator was simplified, and all the complexity has been
moved to tactic_notation, and lean code.

We can now inspect the intermediate states produced by the rewrite
tactic.

The function (@scope_trace _ line col thunk) can be used to position trace
messages produced by thunk. If line/col are not provided (i.e., we
just write (scope_trace thunk)), then line/col are filled with the
position of this term by the elaborator.

We can visualize the intermediate tactic states inside nested blocks
such as (try { ... })

The new infrastructure can be used to implement custom tactic_state
pretty printers.
2017-01-21 22:38:47 -08:00
Leonardo de Moura
7a6b9e193c feat(library/vm, frontends/lean/info_manager): add thread safe vm_obj wrapper, and use it to store arbitrary vm thunks in the info_manager 2017-01-21 22:38:33 -08:00
Leonardo de Moura
05d86e49ca feat(library/init/meta/smt): add intros variants for smt_tactic 2017-01-13 16:13:37 -08:00
Leonardo de Moura
69fd35f068 feat(library/init/meta/smt): add helper tactics and doc-strings 2017-01-13 11:21:20 -08:00
Leonardo de Moura
a43b856086 feat(library/init/meta/smt): add simp tactics to smt_tactic
We can simplify the target without affecting the smt state
2017-01-09 19:19:48 -08:00
Leonardo de Moura
5050e40aec feat(library/init/meta/smt): add slift smt tactic 2017-01-09 19:07:54 -08:00
Leonardo de Moura
0c4c41ae54 feat(library/init/meta): produce nicer error message for overloaded simp/ematch lemma 2017-01-07 14:13:46 -08:00
Leonardo de Moura
5e3f26ec95 feat(library/tactic/smt/congruence_closure): propagate not_exists 2017-01-06 14:00:36 -08:00
Leonardo de Moura
15eaf30192 feat(library/tactic/smt/smt_state): allow user to provide a function ("to be unfolded") in the ematch_using tactic 2017-01-06 00:33:58 -08:00
Leonardo de Moura
7e4b79b221 feat(library/tactic/smt/smt_state): add ematch_using tactic 2017-01-06 00:24:25 -08:00
Leonardo de Moura
7ba889b5cf feat(frontends/lean/tactic_notation): try/repeat for smt_tactic in interactive mode 2017-01-05 18:31:57 -08:00
Leonardo de Moura
b18b49dd6b feat(library/tactic/smt/smt_state): add tactic for adding equational lemmas for a definition 2017-01-05 15:47:58 -08:00
Leonardo de Moura
8eadaf51d8 feat(library/init/meta/smt): add helper tactics: get_facts, proof_for, refutation_for, add_lemmas_from_facts, ... 2017-01-05 12:59:11 -08:00
Leonardo de Moura
52c1a15313 feat(library/tactic/smt): add tactics for adding new lemmas to ematch state 2017-01-05 11:44:25 -08:00
Leonardo de Moura
0969997c64 feat(library/tactic/smt): add ematch smt_tactic 2017-01-04 22:41:36 -08:00
Leonardo de Moura
5f2b247af9 feat(frontends/lean/tactic_evaluator): step-by-step evaluation for 'begin [smt] ... end' blocks 2017-01-04 14:06:44 -08:00
Leonardo de Moura
d53215a2fb feat(frontends/lean/tactic_notation, library/init/meta/smt): add by_cases and by_contradiction smt_tactics, support for classical reasoning, add support for 'begin [smt] with config, ... end' 2017-01-04 12:03:45 -08:00
Leonardo de Moura
59f3c9775a feat(frontends/lean/tactic_notation): add support for begin [smt] ... end blocks
TODO: add support for inspecting intermediate states.
2017-01-04 11:13:00 -08:00
Leonardo de Moura
3a62ca0581 refactor(library/init/meta): move smt tactics to library/init/meta/smt, and add interactive definitions 2017-01-04 09:36:50 -08:00