Leonardo de Moura
9d9f546ad8
refactor(util/sexpr): move options and option_declarations to util
2019-05-16 14:37:24 -07:00
Leonardo de Moura
50207e2c5a
chore(library/constants.txt): remove dead variables
2019-03-22 13:26:48 -07:00
Leonardo de Moura
930653f292
chore(library/init): Unit.star => Unit.unit
...
@kha Our stdlib is starting to match the names we used in our paper :)
2019-03-22 13:06:45 -07:00
Leonardo de Moura
870a0456c4
fix(frontends/lean/builtin_exprs): match name used at elaborator.lean
2019-03-21 15:06:46 -07:00
Leonardo de Moura
7ac847877f
chore(library/init/Lean/Parser): more fixes
2019-03-21 15:06:44 -07:00
Leonardo de Moura
300aae08b3
chore(*): more fixes
2019-03-21 15:06:44 -07:00
Sebastian Ullrich
430fb81f69
fix(library/init/lean/parser/term,frontends/lean/builtin_exprs): @& should have higher rbp than ->
2019-03-07 14:35:25 +01:00
Leonardo de Moura
348ccf533c
feat(library/compiler): borrowed annotations
2019-02-11 10:08:47 -08:00
Sebastian Ullrich
c8eaee74b4
feat(frontends/lean,library/init/lean/parser/combinators): add node_longest_choice! macro
2018-11-19 18:02:28 +01:00
Sebastian Ullrich
774d776133
feat(frontends/lean/builtin_exprs): pattern let with type
2018-11-19 14:15:25 +01:00
Sebastian Ullrich
da04491df1
fix(frontends/lean/builtin_exprs): trim view field names
2018-10-02 14:55:28 -07:00
Leonardo de Moura
a31f12d8cd
chore(library/init/core): revert ite+thunks modification
...
We don't need it since we marked `ite` as `[macro_inline]`
2018-09-23 19:27:06 -07:00
Leonardo de Moura
b07c718425
refactor(library/init/core): change ite signature
2018-09-17 14:27:28 -07:00
Sebastian Ullrich
b7c3f517a9
feat(frontends/lean/builtin_exprs): support for precedence annotations in node!/node_choice!
2018-09-13 16:38:40 -07:00
Leonardo de Moura
fabfe32ca5
chore(*): remove unnecessary scoped_ext dependencies
2018-09-08 15:42:48 -07:00
Leonardo de Moura
3e5f59d6df
chore(kernel): remove expr.quote constructor
...
In Lean4, we will reify expressions.
2018-09-07 22:08:08 -07:00
Leonardo de Moura
5d00936a8f
chore(*): remove some old_type_checker dependencies
2018-09-07 08:48:21 -07:00
Leonardo de Moura
130b419371
chore(frontends/lean): remove break_at_pos support
...
We have already removed auto-completion support.
This change allowed me to remove another old_type_checker dependency.
2018-09-07 08:34:19 -07:00
Leonardo de Moura
58e91559d0
feat(*): use new inductive datatype module
2018-09-06 18:09:22 -07:00
Sebastian Ullrich
df725c1f41
perf(frontends/lean/builtin_exprs): fix regression from position refactoring
...
Even atomic do patterns were compiled into match expressions
2018-09-05 09:58:49 -07:00
Sebastian Ullrich
39cdae50ee
feat(library,frontends/lean): use mdata instead of hacky cache for position information in preterms
2018-09-02 18:08:41 -07:00
Sebastian Ullrich
93d13ffea3
chore(library/init/lean): lean.parser.reader ~> lean.parser
2018-08-30 16:34:47 -07:00
Leonardo de Moura
7bf032d6fe
chore(frontends/lean): remove calc-expression
2018-08-27 12:20:54 -07:00
Leonardo de Moura
d334bb1fa7
chore(*): remove more stuff
2018-08-23 15:56:31 -07:00
Leonardo de Moura
e5c3f04937
chore(frontends/lean): remove tactic notation
2018-08-23 13:44:52 -07:00
Sebastian Ullrich
c69cc61292
feat(frontends/lean,library/init/lean/parser/reader/module): add node_choice! macro
...
Creates an inductive type from an ordered choice reader
2018-08-22 14:32:03 -07:00
Sebastian Ullrich
1b8e74123c
feat(frontends/lean/{builtin_exprs,elaborator}): special-case try inside of node!
2018-08-22 14:32:03 -07:00
Sebastian Ullrich
26d696a937
feat(frontends/lean,library/init/lean/parser/reader/module): basic node! macro
2018-08-22 14:32:03 -07:00
Leonardo de Moura
e9f843ddf6
refactor(kernel/expr): remove mlocal_* functions
...
The constructors `mvar` and `fvar` have different memory layouts.
2018-06-22 14:25:31 -07:00
Leonardo de Moura
3729c7ffb2
chore(kernel/expr): remove some old/legacy functions
2018-06-22 12:52:14 -07:00
Leonardo de Moura
01ea596aea
refactor(kernel/expr): implement expr using runtime/object
2018-06-21 16:05:33 -07:00
Leonardo de Moura
fd5bfc7dfe
refactor(kernel): simplify binder_info
...
Now, it is an enumeration type like its Lean counterpart.
2018-06-20 15:31:40 -07:00
Leonardo de Moura
3356c1d08d
refactor(library,frontends/lean): move choice to frontends/lean
...
Remark: `choice` will be a syntax object in Lean4
2018-06-18 13:43:42 -07:00
Leonardo de Moura
4c370e4558
refactor(kernel/expr): fix binder_info
2018-06-13 12:20:58 -07:00
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
818170d780
refactor(kernel): remove tag from kernel expressions
...
We are temporarily storing position information in a global table.
2018-06-08 10:29:22 -07:00
Leonardo de Moura
ddf1c89e76
chore(kernel/abstract): remove mk_binding cache
2018-06-07 16:28:54 -07:00
Leonardo de Moura
6333043adf
refactor(kernel): abstract_local(s) ==> abstract
2018-06-07 16:28:54 -07:00
Leonardo de Moura
de82517d80
refactor(kernel): remove abstract since we only use abstract_locals
2018-06-07 16:28:54 -07:00
Leonardo de Moura
c0e1d05199
chore(kernel): type_checker ==> old_type_checker
2018-06-06 16:10:40 -07:00
Leonardo de Moura
0556412f8d
refactor(*): add runtime folder
...
@kha The runtime folder includes what is needed to link a
standalone Lean program. It is still contains some unnecessary files.
We will be able to remove them after we release Lean4.
2018-05-14 14:23:56 -07:00
Leonardo de Moura
a2f0bf7c1b
chore(*): disable SMT tactic framework and backward chaining
2018-04-10 12:05:51 -07:00
Leonardo de Moura
c08a3bc557
refactor(library/typed_expr): move typed_expr to frontends/lean
2018-04-09 15:25:40 -07:00
Sebastian Ullrich
cf8dd9e75e
feat(fronteds/lean/builtin_exprs): do notation: use overloadable bind instead of has_bind.bind
2018-02-28 12:49:22 +01:00
Leonardo de Moura
902445c56f
chore(frontends/lean): remove parser_state object
...
This is dead code. We have decided to implement the new parser in Lean.
2018-02-27 14:05:02 -08:00
Leonardo de Moura
28d6326228
refactor(frontends/lean/parser): add name_generator
2018-02-21 15:04:19 -08:00
Leonardo de Moura
8621be6335
fix(frontends/lean): closes #1898
2018-01-02 12:33:00 -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
Leonardo de Moura
fabf7f6380
perf(library/equations_compiler, library/compiler): expand auxiliary _match_idx definitions when generating byte code
...
We use the auxiliary procedure pull_nested_rec_fn to pull recursive
application in nested match expressions. This is needed because the
nested match expression is compiled before we process the recursive
procedure that contains it. This transformation may produce
performance problems if the recursive application does not depend on
the data being matched. Here is an example from the new test:
```
def tst : tree → nat
| (tree.leaf v) := v
| (tree.node v l r) :=
match f v with
| tt := tst l
| ff := tst r
end
```
pull_nested_rec_fn will convert it into
```
def tst : tree → nat
| (tree.leaf v) := v
| (tree.node v l r) := tst._match_1 (f v) (tst l) (tst r)
```
Since our interpreter uses eager evaluation, both `(tst l)` and `(tst r)`
are executed. This commit fixes this issue by expanding `tst._match_1`
during code generation.
2017-11-09 11:14:57 -08:00
Leonardo de Moura
d428eca8a7
fix(library/equations_compiler,frontends/lean): private name support and alias generation for auxialiary declarations
...
fixes #1804
Remark: now, all auxiliary definitions in a private declaration share
the same "private" prefix.
2017-09-11 16:46:56 -07:00