Commit graph

5902 commits

Author SHA1 Message Date
Sebastian Ullrich
d7170df527 feat: interpreter: print stacktrace on stack overflow 2020-03-14 15:08:03 -07:00
Sebastian Ullrich
e30717a85a fix: interpreter::call_boxed on unboxed constants 2020-03-14 15:04:38 -07:00
Leonardo de Moura
88a62f9f7e fix: #121 in the old frontend
This is temporary hack. We will delete this module in the near future.
2020-03-06 13:43:19 -08:00
Leonardo de Moura
ee0fd6ab40 chore: add assertion 2020-03-05 18:44:33 -08:00
Leonardo de Moura
271b753f30 feat: optimization for Bool+Decidable code 2020-02-27 16:59:18 -08:00
Leonardo de Moura
021d906542 fix: remove filler fields (part 2) 2020-02-27 10:02:26 -08:00
Leonardo de Moura
966e5bc60d perf: remove "filler" fields
See previous commit.
2020-02-27 10:02:26 -08:00
Leonardo de Moura
cfd7fc8a87 fix: message::get_text
It was still using the old representation.
2020-02-25 14:20:55 -08:00
Leonardo de Moura
1fb7a3a208 fix: position of first Bool field 2020-02-25 14:05:53 -08:00
Leonardo de Moura
9095f3caa0 chore: update stage0 2020-02-25 13:53:08 -08:00
Leonardo de Moura
7496296c1e fix: "filler" fields 2020-02-25 13:49:18 -08:00
Leonardo de Moura
6a19069021 feat: add "filler" fields 2020-02-25 13:49:11 -08:00
Leonardo de Moura
1305824b03 chore: add get_bool_field helper function
Motivation: help us to adjust the code when we modify the position of
scalar fields.
2020-02-25 13:43:06 -08:00
Leonardo de Moura
16d88b04ea chore: avoid cnstr_set_scalar and cnstr_get_scalar 2020-02-25 13:27:30 -08:00
Leonardo de Moura
6ada62a3ee feat: export helper functions
Motivation: prevent changes in the scalar fields layout from breaking
C++ code.
Ideally, we should do that for all constructors, and implement a tool
that creates the C++ functions automatically for us.
We don't do it because we will delete most of this code after we
finish the Lean4 transition.
2020-02-25 13:00:22 -08:00
Leonardo de Moura
148c0324c4 fix: do not extract closed terms from join point applications 2020-02-15 15:43:24 -08:00
Leonardo de Moura
0cf226220c fix: remove incorrect assertion
Note that `get_cases_on_minors_range` is now parametric on `m_before_erasure`:
`get_cases_on_minors_range(env(), const_name(fn), m_before_erasure)`
2020-02-13 18:26:12 -08:00
Leonardo de Moura
6873400193 chore: remove silent | matchFailed support
Before this commit
```lean
pattern <- action
```
was being translated by the old frontend into
```lean
pattern <- action | matchFailed
```
This produced counterintuitive behavior, and performance problems when
tryin to synthesize `MonadFail` instances.
BTW, the new frontend does not implement this feature. I didn't even
remember the old frontend did this.
I will also remove the class `MonadFail` from stdlib.

cc @Kha @dselsam
2020-02-10 13:15:21 -08:00
Sebastian Ullrich
47f3d54acb fix: interpreter: do not consume values in explicit unbox instructions 2020-02-06 09:36:19 -08:00
Leonardo de Moura
38e6961003 feat: MutQuot by implementedBy 2020-02-04 16:51:08 -08:00
Leonardo de Moura
850b1c90a0 feat: mark as irrelevant functions that return types 2020-02-04 15:55:21 -08:00
Leonardo de Moura
bcfaeaceab feat: change ite and dite argument order
Motivation: make sure `propagateExpectedType` heuristic is applied in
the new frontend when processing them.
2020-02-03 14:11:29 -08:00
Leonardo de Moura
f0f522a6d6 chore: prepare to rename old coe primitives 2020-01-28 08:18:56 -08:00
Leonardo de Moura
c7d96a6522 fix: theorem values are tasks 2020-01-16 17:20:36 -08:00
Leonardo de Moura
654b464747 chore: improve old pretty printer on numeric literals 2020-01-09 13:48:15 -08:00
Leonardo de Moura
bccaaa7af0 fix: bug at lit_type binding
cc @kha
2020-01-06 15:44:38 -08:00
Leonardo de Moura
8628b52b21 feat: missing support for Empty.rec 2020-01-03 18:23:52 -08:00
Sebastian Ullrich
2791cdf326 fix: interpreter::call_boxed: support under-application
/cc @leodemoura
2020-01-01 21:15:05 +01:00
Leonardo de Moura
73e114c6a2 chore: remove unnecessary argument 2020-01-01 09:19:00 -08:00
Sebastian Ullrich
b439de68a5 feat: support nested interpreter executions and make sure closures are run in compatible environments
/cc @leodemoura
2019-12-31 00:07:45 +01:00
Leonardo de Moura
28a4859832 feat: expose evalConst
@Kha Could you please check `lean_eval_const`?
2019-12-30 11:41:36 -08:00
Sebastian Ullrich
a2d668ec99 fix: leaks 2019-12-22 17:24:57 -08:00
Sebastian Ullrich
3b37737c8a fix: leaks 2019-12-22 15:09:19 -08:00
Leonardo de Moura
4eb6f67e7a chore: style 2019-12-16 10:48:54 -08:00
Leonardo de Moura
7d736e63b1 fix: print for string literal 2019-12-16 10:28:28 -08:00
Leonardo de Moura
8feb40e9f7 fix: add new approximation flag
During TC, we don't want it. It allows us to find "solutions" that
trigger nontermination.
2019-12-13 18:15:47 -08:00
Leonardo de Moura
15c8b14aad fix: is_def_eq approximation 2019-12-13 10:29:30 -08:00
Leonardo de Moura
a124461dca chore: rename projection function major field to self
This is useful for projection function for classes + named arguments.
2019-12-12 08:55:55 -08:00
Leonardo de Moura
b773bb9ceb fix: make sure instances created by class command are stored in the new DiscrTree 2019-12-11 17:16:12 -08:00
Sebastian Ullrich
948b0bf1f1 fix: interpreter::call_boxed: support over-application
MetaHasEval instances were not fully eta-expanded
2019-12-05 13:21:08 +01:00
Sebastian Ullrich
1afd3b9d01 refactor: interpreter::run_main: use call_boxed 2019-12-05 13:21:08 +01:00
Sebastian Ullrich
44ce73ced9 refactor: call generated boxed wrapper instead of reinventing it in the interpreter 2019-12-05 13:21:08 +01:00
Sebastian Ullrich
e3e50b7940 chore: rename confusing interpreter function 2019-12-05 13:21:08 +01:00
Leonardo de Moura
1784b0ee67 chore: Heq ==> HEq 2019-12-04 11:20:38 -08:00
Leonardo de Moura
f8fb195719 feat: cache local instances at metavariable declarations 2019-11-28 05:57:46 -08:00
Leonardo de Moura
4a6d0a8082 feat: projections of classes should not be reducible 2019-11-23 09:25:49 -08:00
Leonardo de Moura
73859521e9 fix: proj print 2019-11-21 16:09:35 -08:00
Leonardo de Moura
21f37e7f6a fix: fvar vs local issue 2019-11-21 10:47:44 -08:00
Sebastian Ullrich
f6973be5e3 refactor: replace C++ import parser with Lean one
imports are now completely opaque to C++
2019-11-21 15:52:01 +01:00
Sebastian Ullrich
44d5eddf16 chore: remove support for relative imports 2019-11-20 16:39:53 +01:00