Sebastian Ullrich
0571a1c913
chore: use paths instead of indices for stdlib tests
2019-11-20 08:07:28 -08:00
Leonardo de Moura
49f1f0dfe3
chore: apply required change after update-stage0
...
cc @Kha
2019-11-20 08:00:11 -08:00
Sebastian Ullrich
44d5eddf16
chore: remove support for relative imports
2019-11-20 16:39:53 +01:00
Sebastian Ullrich
33ce758126
feat: assume A in --plugin A.so is package name and use it to synthesize initializer symbol name
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
ab42cffad2
refactor: rename all Default.lean files except for Init/Default.lean
2019-11-19 13:52:21 +01:00
Sebastian Ullrich
3980194fbf
chore: more assertions and old code
2019-11-19 12:55:02 +01:00
Sebastian Ullrich
11809d23a9
chore: remove outdated assertion
...
/cc @leodemoura
2019-11-19 10:56:35 +01:00
Sebastian Ullrich
c93fb5c4b2
chore: interpreter: rename misleading accessor
2019-11-19 09:36:59 +01:00
Leonardo de Moura
269f20efe8
fix: ensure C++ and Lean use the same hash for Name
2019-11-18 19:54:05 -08:00
Leonardo de Moura
46adfcfdb6
refactor: Name fully implemented in Lean
2019-11-18 19:54:05 -08:00
Leonardo de Moura
cba3dabcec
chore: update stage0
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
3ae5c2f2e4
chore: remove old comment
2019-11-15 14:11:50 -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
aea02eb1f8
chore: fix MVar refactoring issues
2019-11-15 10:04:42 -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
eb52fbca10
chore: skip stdlib tests on Windows
2019-11-14 17:00:04 -08:00
Leonardo de Moura
fd66963e85
chore: remove dead code
2019-11-14 15:24:18 -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
bbe44a79f2
feat: add tests for compiling stdlib with stage1
...
@Kha It seems to work. Not sure how robust it is. CMake is still very
mysterious to me :D
It is a partial test since I don't try to compile the files into .c.
I am not touching the compiler right now. So, it should be fine for now.
The command `ctest -j8 -R stdlib` also works.
2019-11-13 20:55:08 -08:00
Leonardo de Moura
c4d974eb89
feat: allow attributes to be applied before elaboration
...
This is useful when the attribute may influence the elaboration of the declaration.
2019-11-13 15:40:19 -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
04d5501eb2
chore: use proper nested make calls by hard-coding make as the build system
2019-11-13 08:13:21 -08:00
Sebastian Ullrich
72fb123fad
chore: remove old src/stage0
2019-11-13 16:01:02 +01:00
Sebastian Ullrich
ae3b3bb825
chore: remove cygwin support
2019-11-12 08:28:58 -08:00
Sebastian Ullrich
60620360fc
fix: Windows build
2019-11-12 13:07:12 +01:00
Leonardo de Moura
017554fbb6
chore: minor optimization
2019-11-11 17:23:59 -08:00
Sebastian Ullrich
91b68d8fa4
feat: cleanly separate bootstrap stages
2019-11-11 15:05:25 -08:00
Leonardo de Moura
7dbb927144
chore: temporary hack
...
cc @kha
2019-11-11 11:30:22 -08:00
Sebastian Ullrich
17b8ac894a
fix: parser error recovery should be silent and be able to skip more than one token
2019-11-10 09:01:43 -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
Sebastian Ullrich
3e74159e01
fix: import errors using --json
2019-11-10 09:01:43 -08:00
Leonardo de Moura
5ee39220ac
chore: update stage0
2019-11-10 08:05:40 -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
Sebastian Ullrich
aa557a9d5a
test: trivial linter test
2019-11-09 15:43:37 -08:00
Sebastian Ullrich
1442c1b377
feat: call linters on non-mutual definitions
2019-11-09 15:43:37 -08:00
Sebastian Ullrich
dac6f273b5
feat: simplistic linter framework
2019-11-09 15:43:37 -08:00
Sebastian Ullrich
da69beac0a
feat: add --plugin for loading shared libraries
2019-11-09 15:41:13 -08:00
Sebastian Ullrich
80871ee394
chore: remove outdated macOS cmake setup
2019-11-09 15:41:13 -08:00
Leonardo de Moura
1e065d495b
feat: expose hasLooseBVar
2019-11-09 12:29:50 -08:00
Leonardo de Moura
c47dc18d63
chore: update stage0
2019-11-09 12:08:39 -08:00