Sebastian Ullrich
948b0bf1f1
fix: interpreter::call_boxed: support over-application
...
MetaHasEval instances were not fully eta-expanded
2019-12-05 13:21:08 +01:00
Sebastian Ullrich
1afd3b9d01
refactor: interpreter::run_main: use call_boxed
2019-12-05 13:21:08 +01:00
Sebastian Ullrich
44ce73ced9
refactor: call generated boxed wrapper instead of reinventing it in the interpreter
2019-12-05 13:21:08 +01:00
Sebastian Ullrich
e3e50b7940
chore: rename confusing interpreter function
2019-12-05 13:21:08 +01:00
Leonardo de Moura
1784b0ee67
chore: Heq ==> HEq
2019-12-04 11:20:38 -08:00
Leonardo de Moura
f8fb195719
feat: cache local instances at metavariable declarations
2019-11-28 05:57:46 -08:00
Leonardo de Moura
4a6d0a8082
feat: projections of classes should not be reducible
2019-11-23 09:25:49 -08:00
Leonardo de Moura
73859521e9
fix: proj print
2019-11-21 16:09:35 -08:00
Leonardo de Moura
21f37e7f6a
fix: fvar vs local issue
2019-11-21 10:47:44 -08:00
Sebastian Ullrich
f6973be5e3
refactor: replace C++ import parser with Lean one
...
imports are now completely opaque to C++
2019-11-21 15:52:01 +01:00
Sebastian Ullrich
44d5eddf16
chore: remove support for relative imports
2019-11-20 16:39:53 +01:00
Sebastian Ullrich
3dcd4febd9
feat: make LEAN_PATH a mapping from package names to root dirs, remove C++ impl
2019-11-20 16:39:53 +01:00
Sebastian Ullrich
c93fb5c4b2
chore: interpreter: rename misleading accessor
2019-11-19 09:36:59 +01:00
Leonardo de Moura
46adfcfdb6
refactor: Name fully implemented in Lean
2019-11-18 19:54:05 -08:00
Leonardo de Moura
b09fb4348d
chore: rename Name constructors
2019-11-18 19:54:05 -08:00
Leonardo de Moura
043e011b72
fix: bug at USet
...
@Kha: I found the bug. The issue was at `USet`. The argument is a
usize scalar. So, we should use `var` instead of `eval_arg`.
2019-11-18 19:51:53 -08:00
Leonardo de Moura
3bc61e7ee9
chore: remove special support for Name in the equation compiler
2019-11-18 12:45:53 -08:00
Leonardo de Moura
85a1994bbb
chore: use mkNameStr and mkNameNum for building quoted names
2019-11-18 12:45:53 -08:00
Leonardo de Moura
5e42b1df09
chore: remove dead constants
2019-11-17 09:46:56 -08:00
Leonardo de Moura
b78ac59523
refactor: Level fully implemented in Lean
2019-11-17 08:24:09 -08:00
Leonardo de Moura
a3ccbe66cf
refactor: Expr fully implemented in Lean
...
No hidden fields.
2019-11-16 12:10:49 -08:00
Leonardo de Moura
85092412c7
refactor: remove Expr.FVar hack
...
@Kha @dselsam:
This hack was preventing us from making `Expr` a "real" Lean type.
This was bad for a few reasons:
- It was hard to extend/modify `Expr` in Lean since we would also have
to modify the C++ code that creates the `Expr` objects with the hidden
fields.
- `Expr.lam` and `Expr.forallE` were not following the Lean layout
standard where we sort fields by size. @Kha: recall we used that to
avoid a UB. The issue with `Expr.lam` and `Expr.forallE` is that they
have a "visible" field (`BinderInfo`), which is smaller than
hidden fields such as hash code.
- `Expr.fvar` had only one field at `Expr.lean,` but four behind the
scenes.
I added a new constructor `Local` that is only accessible from C++.
It is only used in legacy code we inherited from Lean2.
We will eventually delete it.
This refactoring was quite painful since many parts of the codebase
were mixing the new `Expr.fvar` with the old `Expr.local`.
I doubt I would be able to do it without the new staging framework
@Kha built.
BTW, some of the patches are horrible. I didn't care much since we
are going to deleted the super ugly files. That being said,
you should expect new weird bevaior due to `Expr.fvar` vs `Expr.local`.
Next step: use the new `ExprCachedData` to make all `Expr` hidden visibles
accessible from Lean.
checkpoint
2019-11-15 14:04:26 -08:00
Leonardo de Moura
0926dee83b
chore: remove dead code
2019-11-15 11:53:09 -08:00
Leonardo de Moura
d9f3b4bf63
refactor: remove Expr.mvar hidden field
2019-11-15 10:04:42 -08:00
Leonardo de Moura
beac2a1af5
fix: treat panic as unreachable at ll_infer_type_fn
...
Motivation: ensure the correct type `IRType` is inferred for definitions
such as
```
def f (n : UInt32) : UInt32 :=
if n == 0 then panic! "foo"
else n+1
```
2019-11-14 21:56:09 -08:00
Leonardo de Moura
f31fcbba24
chore: remove unnecessary approximation that just complicates the code
2019-11-14 10:57:34 -08:00
Leonardo de Moura
aa9080e9e7
feat: do not specialize functions inside functions marked with @[specialize]
2019-11-13 13:32:52 -08:00
Sebastian Ullrich
ae3b3bb825
chore: remove cygwin support
2019-11-12 08:28:58 -08:00
Sebastian Ullrich
1f601708e4
fix: print messages to stderr
...
This ensures that errors during dependency resolution in the Makefile actually show up
2019-11-10 09:01:43 -08:00
Daniel Selsam
0bab51b66e
feat: solve typeclass subgoals in reverse order
...
Some instance arguments may still need to be reversed.
2019-11-09 15:47:50 -08:00
Leonardo de Moura
1ff782334b
chore: remove option for disabling zeta
2019-11-08 14:35:43 -08:00
Leonardo de Moura
791250fb9b
chore: remove unfold_lemmas option
...
We should use `transparency_mode::All` instead.
2019-11-08 10:07:27 -08:00
Leonardo de Moura
dce1de3905
chore: remove transparency_mode::None
2019-11-08 10:04:06 -08:00
Leonardo de Moura
975188cee1
fix: typo
2019-11-08 10:02:44 -08:00
Leonardo de Moura
086dd2c362
chore: remove transparency_mode::Instances
2019-11-08 09:54:03 -08:00
Daniel Selsam
7cddeaa0d3
doc: tc triggers nested tc, potentially with tmp metavar leak
2019-11-06 10:15:05 -08:00
Leonardo de Moura
1bf1290570
feat: use kernel projections in constructions
...
Motivation: auxiliary recursors such as `brecOn` do not depend on
user-facing projection definitions anymore.
Thus, we can simplify `whnfCore` at `TypeUtil`.
2019-11-04 03:38:57 -08:00
Leonardo de Moura
ba7f2849dc
chore: use aux recursor extension implemented in Lean
2019-11-02 11:48:02 -07:00
Leonardo de Moura
0c463e17f5
chore: update stage0
2019-10-26 16:37:56 -07:00
Leonardo de Moura
423b0fed3a
refactor: use Array Expr at DelayedMVarAssignment
2019-10-25 12:03:09 -07:00
Leonardo de Moura
34acf2003c
chore: rename assign delayed method
2019-10-25 10:44:42 -07:00
Leonardo de Moura
a50515e0d6
chore: use => instead of Lean3 ,
2019-10-24 15:10:19 -07:00
Leonardo de Moura
b709979102
feat: improve arity guesser for IO extern primitives
2019-10-23 17:29:41 -07:00
Leonardo de Moura
f88561ae68
feat: add trace! macro
2019-10-22 16:08:37 -07:00
Leonardo de Moura
30571f12d4
chore: adjust runtime to new EState
2019-10-21 17:05:16 -07:00
Leonardo de Moura
65e5247944
chore: mark dead code
2019-10-21 10:25:38 -07:00
Leonardo de Moura
eb9f361232
chore: remove dead code
2019-10-21 10:14:19 -07:00
Leonardo de Moura
39e8499c7b
fix: new offset at param_borrow
2019-10-11 16:27:29 -07:00
Leonardo de Moura
02ab51505c
fix: adjust ir_interpreter
...
IRType is not a scalar type anymore.
2019-10-11 15:00:26 -07:00
Leonardo de Moura
7adf00666b
feat: expose getCtorLayout
2019-10-11 14:34:30 -07:00