Commit graph

26011 commits

Author SHA1 Message Date
Leonardo de Moura
74a94e3162 chore: update-stage0 2019-12-22 19:21:38 -08:00
Leonardo de Moura
7148fc1078 fix: Borrow.lean
The following bugs have been fixed
- The implementation for the `Expr.proj` rule did not match our paper nor `RC.lean`.
The correct rule is:
```
| Expr.proj _ x       => whenM (isOwned x) $ ownVar z
```

- We take the OwnsetSet (`O` in our paper) into account when computing
the fixpoint.

- `applyParamMap` and `mkInitParamMap` were not visiting the alternatives of `case` statements.
2019-12-22 19:20:42 -08:00
Leonardo de Moura
f5741af39d test: minimal repro for Borrow.lean bug 2019-12-22 19:16:23 -08:00
Sebastian Ullrich
a2d668ec99 fix: leaks 2019-12-22 17:24:57 -08:00
Sebastian Ullrich
f171404530 fix: "superficial" leaks to shut up lsan 2019-12-22 17:23:51 -08:00
Leonardo de Moura
61191f9921 chore: use b_obj_arg annotation 2019-12-22 15:14:36 -08:00
Sebastian Ullrich
3b37737c8a fix: leaks 2019-12-22 15:09:19 -08:00
Leonardo de Moura
bceb02951c feat: better postpone messages 2019-12-22 10:24:22 -08:00
Leonardo de Moura
ef8e63a47c refactor: trace directly to MessageLog at Elab monads
Motivation: better position information, and it is simpler (e.g., no `tracingAt`)
2019-12-22 09:58:31 -08:00
Leonardo de Moura
ec892c905a fix: missing tracingAt 2019-12-22 09:34:35 -08:00
Leonardo de Moura
64227b8134 feat: position information for mkHole 2019-12-22 09:34:17 -08:00
Leonardo de Moura
a4e3cc5fb3 fix: trace Elab.step 2019-12-22 09:27:19 -08:00
Leonardo de Moura
9d53fa701c chore: combine MessageData.context + MessageData.withOptions into MessageData.context 2019-12-22 09:15:04 -08:00
Leonardo de Moura
6a3f06642c feat: add option for controlling sytax max depth in trace messages 2019-12-22 08:56:13 -08:00
Leonardo de Moura
0880332761 feat: add maxDepth option to formatStx 2019-12-22 08:48:08 -08:00
Leonardo de Moura
d53c5a31cb refactor: use PersistentArray to implement MessageLog
Motivation: consistency. Now, Traces and MessageLog use the same datastructure.
2019-12-22 08:11:20 -08:00
Leonardo de Moura
050008cb84 refactor: use PersistentArray instead of Array for default [MonadTracer] implementation
Motivation: flexibility. Now, the default implementation is better
suited for code that uses traces nonlinearly (e.g., `TermElabM`).
2019-12-22 07:36:26 -08:00
Leonardo de Moura
80165d24a1 chore: style 2019-12-22 07:25:27 -08:00
Leonardo de Moura
7490c34b54 chore: fix tests
- Delayed assignments do not become regular assignments anymore.
- We can instantiate mvas more aggressively in the new design.
2019-12-21 16:03:44 -08:00
Leonardo de Moura
b69fec3ce3 chore: improve · input method 2019-12-21 15:55:14 -08:00
Leonardo de Moura
a32fd2e693 feat: implement design documented at 868a217202 2019-12-21 15:53:36 -08:00
Leonardo de Moura
c14192670f feat: add PersistentHashMap.forM 2019-12-21 09:22:10 -08:00
Leonardo de Moura
fdfff29bb1 feat: expose liftLooseBVars and lowerLooseBVars 2019-12-21 08:57:11 -08:00
Leonardo de Moura
a7e33a85a6 chore: remove reverse and add comment 2019-12-21 07:55:58 -08:00
Leonardo de Moura
868a217202 doc: revise design for creating let-expressions of terms containing metavariables
TODO: implement :)

The goal is to fix accidental zeta-expansions occurring when creating
let-declarations where the body of the expression contains
syntheticOpaque metavariables.
2019-12-20 10:04:37 -08:00
Leonardo de Moura
b621b9fbde chore: more cleanup 2019-12-20 07:50:06 -08:00
Sebastian Ullrich
1361d5cefe chore: elaborator comments and minor changes 2019-12-20 07:42:08 -08:00
Sebastian Ullrich
dedb6c2e13 refactor: simplify MacroHygiene implementations
The stack of macro scopes is already implied by the stack of withFreshMacroScope
calls, there is no need for an explicit stack.

/cc @leodemoura
2019-12-20 14:19:09 +01:00
Leonardo de Moura
5adadc3158 test: document let issue
TODO: fix issue at `Meta.mkLambda` when some of the free variables are let-declarations.
2019-12-19 17:29:26 -08:00
Leonardo de Moura
d2d6e85719 feat: add forRevM 2019-12-19 17:24:29 -08:00
Leonardo de Moura
93f4184125 feat: elaborate let 2019-12-19 17:00:19 -08:00
Leonardo de Moura
a97b3cf5a1 chore: simplify withMVarContext
cc @kha
2019-12-19 15:16:19 -08:00
Leonardo de Moura
30a5f19f30 feat: simplify code using filterRevM
cc @kha
2019-12-19 15:09:20 -08:00
Leonardo de Moura
40f7caca0b feat: add tailrec filterM and filterRevM 2019-12-19 15:06:16 -08:00
Leonardo de Moura
78f9606c8c feat: simplify code using filterM
cc @kha
2019-12-19 14:53:05 -08:00
Leonardo de Moura
8431303999 test: new test 2019-12-19 14:45:17 -08:00
Leonardo de Moura
757419ffa9 feat: rename fold functions initial value parameter to init 2019-12-19 14:44:51 -08:00
Leonardo de Moura
f7562ce94d fix: bug at addLValArg 2019-12-19 14:44:35 -08:00
Leonardo de Moura
bfca7e32e0 fix: try to postpone if function type is not known 2019-12-19 14:20:56 -08:00
Leonardo de Moura
8d81e89e53 feat: elaborate $. 2019-12-19 14:16:28 -08:00
Leonardo de Moura
edb1ffadb4 chore: update stage0 2019-12-19 14:07:10 -08:00
Leonardo de Moura
e221a239f8 feat: $. notation 2019-12-19 14:03:27 -08:00
Leonardo de Moura
f04f51a295 test: pattern confusion example
cc @dselsam
2019-12-19 13:36:22 -08:00
Leonardo de Moura
57f6881c6c feat: restore state when catching Exception.postpone
cc @Kha
2019-12-19 13:21:11 -08:00
Leonardo de Moura
24506b50b4 chore: update stage0 2019-12-19 12:11:46 -08:00
Leonardo de Moura
3e5527219f test: add foldl test 2019-12-19 12:06:47 -08:00
Leonardo de Moura
ea2cebaf74 fix: typo 2019-12-19 12:03:13 -08:00
Leonardo de Moura
eb24ec56dc feat: add array literal notation 2019-12-19 11:42:39 -08:00
Leonardo de Moura
76e75a1b53 feat: avoid unnecessary metavars 2019-12-19 11:26:47 -08:00
Leonardo de Moura
fc5fb07fc3 fix: mkFreshExprMVar 2019-12-19 11:13:22 -08:00