Commit graph

18017 commits

Author SHA1 Message Date
Leonardo de Moura
0f2172fab5 chore: fix tests 2019-11-18 20:02:41 -08:00
Leonardo de Moura
4f98ba1cf7 chore: update stage0 2019-11-18 19:54:06 -08: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
68bcb4bf96 chore: fix tests 2019-11-18 19:54:05 -08:00
Leonardo de Moura
a2c13733a7 chore: update stage0 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
1dad28af79 chore: remove temp hack 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
aa04175401 chore: update stage0 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
38d9a7c063 test: interpreter bug
@Kha Could you please take a look at this repro?
When I use the compiler,
```
./run.sh usizeBug.lean
```
I get the expected answer: `2`.
When I use the interpreter,
```
../../bin/lean --run usizeBug.lean
```
I get `1`. I found the problem today, and managed to isolate the
problem to this small repro.
2019-11-18 18:12:33 -08:00
Leonardo de Moura
352e568b15 doc: zmod example 2019-11-18 12:45:53 -08:00
Leonardo de Moura
d9ca07fca8 chore: replace DecidableEq Name with HasBeq Name 2019-11-18 12:45:53 -08:00
Leonardo de Moura
fbf4fd27cb chore: update stage0 2019-11-18 12:45: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
Sebastian Ullrich
353b511e9b chore: CI: close ctest's stdin
Apparently CMake reverted auto-closing stdin for ctest in a recent release because people relied on the old behavior...

Perhaps we should add this to all test scripts instead, but this CI fix is easier
2019-11-17 21:24:33 +01:00
Leonardo de Moura
5e42b1df09 chore: remove dead constants 2019-11-17 09:46:56 -08:00
Leonardo de Moura
3093b1264c chore: update stage0 2019-11-17 08:53:51 -08:00
Leonardo de Moura
033f781724 chore: fix tests 2019-11-17 08:53:18 -08:00
Leonardo de Moura
d88813feff fix: lean_level_depth export 2019-11-17 08:51:42 -08:00
Leonardo de Moura
66895b2c94 chore: mkLevelZero => levelZero, mkLevelOne => levelOne 2019-11-17 08:33:37 -08:00
Leonardo de Moura
5aa2b06bf4 chore: update stage0 2019-11-17 08:27:43 -08:00
Leonardo de Moura
b78ac59523 refactor: Level fully implemented in Lean 2019-11-17 08:24:09 -08:00
Leonardo de Moura
110438edd7 refactor: use mkLevel* instead of Level constructors 2019-11-17 07:17:58 -08:00
Leonardo de Moura
c40aed1628 chore: typo 2019-11-16 12:28:52 -08:00
Leonardo de Moura
587e4f199b chore: update stage0 2019-11-16 12:24:19 -08:00
Leonardo de Moura
92a89a07ff chore: Expr.CachedData => Expr.Data 2019-11-16 12:23:39 -08:00
Leonardo de Moura
1d9a76ae45 chore: fix tests
Remark: weird discrepancies in the new typeclass module.
Ignoring for now since it was not integrated yet.
2019-11-16 12:19:27 -08:00
Leonardo de Moura
2bf69c539e chore: update stage0 2019-11-16 12:14:34 -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
052c2c24dc chore: update stage0 2019-11-15 14:08:56 -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
356192aeb9 chore: update stage0 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
Sebastian Ullrich
aa380ff505 chore: update stage0 path in script/pre-push 2019-11-15 18:29:57 +01:00
Sebastian Ullrich
b8d5193ecc chore: update Azure and Nix configs 2019-11-15 18:22:49 +01:00
Sebastian Ullrich
5c286ca6fd chore: bench cross suite: move default.nix and update README 2019-11-15 16:39:14 +01:00
Sebastian Ullrich
425230abc4 chore: fix cross bench suite 2019-11-15 16:39:14 +01:00
Sebastian Ullrich
a961e1314a chore: cross bench suite: fix fatal laziness in rbmap_checkpoint.hs 2019-11-15 16:39:14 +01:00
Sebastian Ullrich
ef9150cacd chore: cross bench suite: add Strict Haskell category (disabled by default)
No change to slightly faster in general, except for a significant speedup in rbmap_10 that should be fixed in the lazy version
2019-11-15 16:39:00 +01:00
Leonardo de Moura
6978a88219 chore: update stage0 2019-11-14 22:26:24 -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
8697638031 feat: add ExprCachedData
We are preparing for removing the hack from expr.cpp
2019-11-14 18:50:53 -08:00
Leonardo de Moura
7775c7816d chore: add UInt* helper functions 2019-11-14 17:26:33 -08:00
Leonardo de Moura
eb52fbca10 chore: skip stdlib tests on Windows 2019-11-14 17:00:04 -08:00