Commit graph

35 commits

Author SHA1 Message Date
Leonardo de Moura
62788a9ca3 refactor(kernel): fix terminology: "free_var" is actually a loose bound variable
We represent free variables uisng local constants.
We will fix this terminology too.
2018-06-08 13:25:36 -07:00
Leonardo de Moura
e90585737f refactor(*): use C++11 std::current_exception and std::rethrow_exception
With these new C++11 APIs, we can delete the `clone` and `rethrow`
methods from our exception classes.
2018-06-07 16:28:54 -07:00
Leonardo de Moura
3a7229add3 chore(library/init): pexpr is now an opaque constant 2018-06-06 09:36:22 -07:00
Leonardo de Moura
de48d49b53 feat(kernel): preparing for adding new inductive datatype module 2018-06-01 14:47:49 -07:00
Leonardo de Moura
8ee2f4fea1 feat(*): basic runtime string support 2018-05-14 16:52:55 -07:00
Leonardo de Moura
c427fb4086 refactor(*): create library/init/lean folder
The new folder will contain the new parser, macro expander and compiler.
This commit also renames the namespace for the old parser `lean3.parser`
2018-04-27 08:02:40 -07:00
Leonardo de Moura
db4b00c7d8 chore(util,library): remove small_object_allocator
We use small_object_allocator to allocate vm_obj's.
However small_object_allocator is not thread safe. So, we need to copy
vm_obj's between threads. Moreover, in our experiments, we observed that
JEMALLOC is actually faster than the small_object_allocator.

Here are numbers for the reduced corelib.

small_object_allocator:  15.62 secs
gcc 4.9 allocator:       16.19 secs
jemalloc:                13.83 secs
2018-04-12 16:43:10 -07:00
Leonardo de Moura
bdea7d420d chore(*): type_context ==> type_context_old 2018-03-05 12:38:24 -08:00
Sebastian Ullrich
48147646bc refactor(library): mk_result/get_result_* ~> mk_success/get_success_* 2018-03-01 14:56:01 +01:00
Leonardo de Moura
b72d465835 refactor(library/init/meta): remove tactic_state.mk_empty
The tactic_state object will contain a name_generator for creating fresh
names. `tactic_state.mk_empty` is bad because it does not have sufficient
information to create this name_generator.
Moreover `tactic_state.mk_empty` was only being used to convert
`tactic A` into a `parser A`.
We implement this primitive now in C++. In C++, we will be able
to use the parser name generator to initialize a fresh `tactic_state`.
2018-02-27 14:45:47 -08:00
Leonardo de Moura
8de8771ee0 chore(library/vm/vm_parser): remove leftover comment 2017-12-17 09:52:44 -08:00
Leonardo de Moura
8b835f9ab6 fix(frontends/lean): fixes #1890
It fixes the issue by propagating the correct information to the
equation compiler.

The fix may be a little bit hackish, but it is comapatible with
the approach we are already using: store `m_is_meta` flag in the equation
macro.

Disclaimer: we may still have other instances of this bug, since
the information may still be propagated incorrectly in other places.

I will not refactor this code right now nor accept any PR that
changes the current design. I am busy in other parts of the code
base and do not have time to do the context switch required for
implementing this kind of change and/or review the PR and make sure I'm
happy with it.
2017-12-17 09:42:06 -08:00
Gabriel Ebner
867bc46d99 feat(library/vm/vm_parser): expose parse_command_like to the vm 2017-08-14 11:41:48 +02:00
Sebastian Ullrich
ad97607307 fix(frontends/lean/tactic_notation): always use quote_scope for parsing interactive parameters
Replace now redundant `qexpr` parser with `parser.pexpr`
2017-07-04 12:20:38 -07:00
Leonardo de Moura
36cc27fa0f feat(library/init/meta/converter/interactive): add for tactic to conv mode 2017-06-30 21:27:17 -07:00
Sebastian Ullrich
9033cba7d3 feat(frontends/lean,init/meta/interactive): assume and suppose tactics 2017-06-27 18:50:10 -07:00
Sebastian Ullrich
018ebdd115 feat(frontends/lean/user_command): add user-defined commands 2017-06-19 11:27:12 -07:00
Sebastian Ullrich
492cb20438 feat(init/meta/{interactive_base,parser}): decl_attributes, decl_meta_info, parser.set_env 2017-06-19 11:27:12 -07:00
Sebastian Ullrich
b60899138e fix(library/vm/vm_parser): header worries after rebase 2017-06-07 10:09:38 -07:00
Sebastian Ullrich
dd91630a83 feat(frontends/lean/user_notation): more error checking 2017-06-07 10:09:38 -07:00
Sebastian Ullrich
56995348d3 hack(frontends/lean/parser): allow input to be substituted and use it to implement interpolating format macro 2017-06-07 10:09:38 -07:00
Sebastian Ullrich
2bb93aa4f9 feat(init/meta): tactic -> parser coercion 2017-06-07 10:09:38 -07:00
Sebastian Ullrich
20ab8feeae feat(init/meta/lean/parser): pexpr parser that does not use quoted mode 2017-06-07 10:09:38 -07:00
Sebastian Ullrich
18063fa9ba feat(frontends/lean): user-defined notation parsers 2017-06-07 10:09:38 -07:00
Leonardo de Moura
92a72b238b feat(library/tactic): add tactic::ref
They can be used to store user state in the tactic_state object.

@Armael @jroesch: The new file tests/lean/run/tactic_ref.lean contains a few examples.
2017-06-02 15:19:03 -07:00
Leonardo de Moura
603bbe5987 fix(*): gcc 7 linking errors 2017-05-31 16:35:09 -07:00
Gabriel Ebner
345cd1bc2a feat(frontends/lean/parser): error recovery in interactive tactics 2017-05-23 11:14:30 -07:00
Gabriel Ebner
1468461c47 feat(frontends/lean): recover from many parser errors 2017-05-23 11:14:30 -07:00
Gabriel Ebner
595cbb8fe9 refactor(*): task<T>, log_tree, cancellation_token 2017-03-23 08:57:52 +01:00
Sebastian Ullrich
da7e21696e feat(init/meta/interactive): rw goal info on , 2017-03-22 07:54:12 -07:00
Sebastian Ullrich
e0856284b0 feat(frontends/lean,emacs): tactic info before elaboration, fix many edge cases 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
a053175714 refactor(init/meta,library/vm): use structure for position information 2017-02-21 11:06:39 -08:00
diakopter
554e6bad90 chore(library): fix warning 2017-02-17 21:09:23 -08:00
Sebastian Ullrich
4d41b03168 chore(frontends/lean,library/tactic): remove old tactic_state functions 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