Commit graph

5186 commits

Author SHA1 Message Date
Leonardo de Moura
14afe50384 chore: fix extern Level primitive names 2019-10-24 19:09:37 -07:00
Leonardo de Moura
025e9d32ef feat: update functions for universe levels, use C version of Level.hasParam and Level.hasMVar 2019-10-24 19:04:01 -07:00
Leonardo de Moura
da4c6a8b72 feat: helper functions 2019-10-24 17:43:27 -07:00
Leonardo de Moura
cb210b0adc feat: expose Expr.hasExprMVar and Expr.hasLevelMVar 2019-10-24 17:32:47 -07:00
Leonardo de Moura
f9572174c9 feat: TypeContext skeleton 2019-10-24 16:45:33 -07:00
Leonardo de Moura
d1c9a440d8 feat: add missing Expr.update* functions 2019-10-24 15:10:03 -07:00
Leonardo de Moura
ccfa57d657 chore: rename constructors
Before we start writing a lot of Expr code.

- `Expr.pi` does not make sense anymore.
- `Expr.elet` is weird. `«let»` is too inconvenient to write. So, I
   used `letE` short for `letExpr`. GHC avoids this issue because
   keywords are lowercase and constructors are capitalized.
2019-10-24 13:53:33 -07:00
Leonardo de Moura
012d48f35b chore: remove unnecessary annotations
We have a new and better "arity guesser"
2019-10-23 17:30:59 -07:00
Leonardo de Moura
a56297203f chore: style 2019-10-23 17:10:39 -07:00
Leonardo de Moura
b9480d6ae2 chore: remove unnecessary c inline 2019-10-23 16:58:07 -07:00
Leonardo de Moura
aa77c0a651 chore: remove unnecessary inline 2019-10-23 15:26:22 -07:00
Leonardo de Moura
93c6ab8eee feat: add Expr.updateApp test of concept 2019-10-23 15:19:34 -07:00
Leonardo de Moura
0941ea284f feat: suppress irrelevant arguments in extern calls 2019-10-23 15:06:44 -07:00
Leonardo de Moura
74d8caf57a feat: add Level mappings 2019-10-23 12:47:37 -07:00
Leonardo de Moura
0032c02247 feat: expose Expr.equal (structural equality) and adding Expr mappings aliases 2019-10-23 10:49:51 -07:00
Leonardo de Moura
c330600197 chore: add example to demonstrate that messages are computed lazily 2019-10-22 17:12:42 -07:00
Leonardo de Moura
c3e4bc0d55 fix: enableTracing 2019-10-22 16:45:23 -07:00
Leonardo de Moura
d51c291f2a refactor: simplify traceCtx 2019-10-22 16:36:18 -07:00
Leonardo de Moura
6498055656 chore: helper instances 2019-10-22 16:18:28 -07:00
Leonardo de Moura
45e21168d2 feat: hierarchical trace kinds 2019-10-22 15:13:57 -07:00
Leonardo de Moura
0a0bc0b7b9 fix: remove unused parameter and add missing disableTracing 2019-10-22 15:04:44 -07:00
Leonardo de Moura
16099189f2 chore: minor adjustments 2019-10-22 14:57:26 -07:00
Leonardo de Moura
13faf9fdf6 feat: add trace prefix to options 2019-10-22 14:43:02 -07:00
Leonardo de Moura
3cd8dc6366 fix: minor issues and add MonadTracer test 2019-10-22 14:33:07 -07:00
Leonardo de Moura
f74195fd50 refactor: new MonadTracer and helper classes/instances 2019-10-22 10:18:18 -07:00
Leonardo de Moura
17a3c51c54 feat: structured messages
Current "plan":
structure messages => tracing infrastructure => unifier => elaborator

cc @kha @dselsam
2019-10-22 08:43:32 -07:00
Leonardo de Moura
1418f12248 fix: reject [class] at declarations that are not inductive datatypes or structures
closes #42
2019-10-21 22:52:13 -07:00
Leonardo de Moura
4794902f42 chore: ensure dummy functions are inlined 2019-10-21 18:47:24 -07:00
Leonardo de Moura
870db93c8e feat: add EState.Backtrackable class
@dselsam @kha: The new class allows us to use `EState` even when part of
the state must be backtrackable. The default instance ensures that
there is no backtrackable state. The new test shows how to use it.
2019-10-21 18:39:59 -07:00
Leonardo de Moura
5d1f104b8d fix: EState.set 2019-10-21 17:34:41 -07:00
Leonardo de Moura
d8dd61ae5a chore: remove optimization
We will add support for returning values on the stack, and will not
need to rely on the trick used in this module.
2019-10-21 16:56:07 -07:00
Leonardo de Moura
5902ef30d6 refactor: prepare to change EState 2019-10-21 16:51:48 -07:00
Leonardo de Moura
b5d7f9a763 chore: cleanup Trace
- State was not used linearly.
- `TraceState` must be non-backtrackable. That is, we should never use `TraceT (ExceptT E m A)`.
  Thus, we add a new instance for lifting MonadTracer.
- Avoid `Thunk`.

Pending issues:

- API is too expensive.
  a) We need to create closure.
  b) We eagerly create `Message`s even when tracing is disabled.

- `Message` collides with structure defined at `Messages.lean`

- Need convenient way of writing new `MonadTracer` instances.

- `traceRoot` requires a `Position` and a class.
  Thus, only modules that have access to `Position` may turn on
  tracing. The module `TypeContext` will not have access to position
  information, but we want to generate trace messages.
2019-10-21 14:56:36 -07:00
Leonardo de Moura
5529266cdf chore: missing instance 2019-10-21 14:40:47 -07:00
Leonardo de Moura
9baf91e641 feat: add Level.isEquiv 2019-10-21 10:56:59 -07:00
Leonardo de Moura
c30e9ca551 chore: add TypeContext.lean file 2019-10-21 10:51:55 -07:00
Leonardo de Moura
d18305297d feat: add Expr.getAppRevArgs 2019-10-21 10:49:01 -07:00
Leonardo de Moura
447482e489 refactor: use Array instead of List at mkApp and getAppArgs
Preparation for new unifier.

@dselsam: I had to make minor changes at `Synth.Lean`, and add messy
code to `Context.lean`. `Context.lean` will be deleted in the future.
So, it is not a big deal.
2019-10-21 09:12:36 -07:00
Daniel Selsam
8c8d47562d perf: do not recompute anormSubgoal 2019-10-19 18:07:37 -07:00
Daniel Selsam
c45547a14c perf: check for mvar in uAlphaNormalizeCore 2019-10-19 18:07:37 -07:00
Daniel Selsam
7e19b5999a perf: check for MVar in eAlphaNormalizeCore 2019-10-19 18:07:37 -07:00
Sebastian Ullrich
ba8b3a1733 feat: allow ':' as search path operator on Windows
This reimplements 704e203.
2019-10-19 18:03:55 -07:00
Leonardo de Moura
7a11f3b0a9 test: add getCtorLayout test 2019-10-11 15:11:24 -07:00
Leonardo de Moura
7adf00666b feat: expose getCtorLayout 2019-10-11 14:34:30 -07:00
Leonardo de Moura
e5a55e16cf chore: rename files 2019-10-11 11:19:58 -07:00
Leonardo de Moura
604cb3dd81 feat: check struct/union projs 2019-10-11 11:13:44 -07:00
Leonardo de Moura
97373b5a20 feat: add struct/union constructors to IRType 2019-10-11 10:57:36 -07:00
Leonardo de Moura
dd69b3b46e feat: remove unnecessary normalizeIds steps 2019-10-09 15:24:07 -07:00
Leonardo de Moura
2b3218d35a fix: ensure expandResetReuse does not produce decl with duplicate indices 2019-10-09 15:18:01 -07:00
Leonardo de Moura
04c0c0c159 feat: ensure duplicate indices are not used 2019-10-09 15:02:43 -07:00