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
Leonardo de Moura
524872d68a
chore: avoid Expr constructors in tests
2019-11-14 16:54:36 -08:00
Leonardo de Moura
c341486e28
refactor: avoid Expr constructors
...
Using `mk*` functions instead.
Reason: preparing to remove `src/kernel/expr.cpp` hack.
2019-11-14 16:32:45 -08:00
Leonardo de Moura
c768a24735
chore: mkApp => mkAppN
...
We are goint to use `mkApp` for creating unary applications
2019-11-14 15:44:17 -08:00
Leonardo de Moura
fd66963e85
chore: remove dead code
2019-11-14 15:24:18 -08:00
Leonardo de Moura
4989a7a7b6
chore: use camelCase, and add shift/casting operations for UInt64
2019-11-14 14:52:52 -08:00
Leonardo de Moura
223a251958
chore: remove legacy constructor
2019-11-14 14:47:56 -08:00
Leonardo de Moura
1f7c27672b
feat: add processAssignment
2019-11-14 12:14:46 -08:00
Leonardo de Moura
e7fc90877e
feat: add anyRange, allRange, anyRangeM, allRangeM, and modify anyFrom parameter order
2019-11-14 11:25:57 -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
6b94d3fba9
chore: use contains
2019-11-14 09:55:20 -08:00
Leonardo de Moura
238c2b3d17
chore: add helper method
2019-11-14 09:52:41 -08:00
Leonardo de Moura
83e2796e96
chore: valueOpt ==> value?
2019-11-14 09:52:16 -08:00
Leonardo de Moura
79c0833d06
feat: add contains for List and Array
2019-11-14 09:51:50 -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
ed43f4a901
doc: document problems with the variable and variables commands
2019-11-13 20:25:04 -08:00
Leonardo de Moura
a735778ae0
chore: update stage0
2019-11-13 15:46:55 -08:00
Leonardo de Moura
e8cee6c56f
chore: update stage0
2019-11-13 15:44:48 -08:00
Leonardo de Moura
af3b465760
feat: apply [specialize] before elaboration
...
This is a workaround. See new comment.
We need it for making aa9080e9e more effective.
2019-11-13 15:41:27 -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
92316dff89
chore: remove unnecessary inline
2019-11-13 14:28:56 -08:00
Leonardo de Moura
770e7fc350
chore: update stage0
2019-11-13 13:50:03 -08:00
Leonardo de Moura
aa079f06c6
chore: update stage0
2019-11-13 13:47:53 -08:00
Leonardo de Moura
aa9080e9e7
feat: do not specialize functions inside functions marked with @[specialize]
2019-11-13 13:32:52 -08:00
Leonardo de Moura
53b1128491
chore: minimize amount of inlined code
2019-11-13 12:54:56 -08:00
Leonardo de Moura
fb621af338
chore: move code after relevant comment
2019-11-13 12:46:10 -08:00
Leonardo de Moura
46d817135e
feat: save checkAssignment failures as trace messages
2019-11-13 12:42:01 -08:00