Leonardo de Moura
06cf5bf3fe
chore: use dummy pretty printer for now
2019-11-21 08:39:07 -08:00
Leonardo de Moura
e197021946
feat: add helper functions for creating metavariables
2019-11-21 08:10:12 -08:00
Sebastian Ullrich
6df256a05e
feat: import runtime
...
A runtime-only import is not loaded into the compile-time environment, but is linked into and initialized in binaries
2019-11-21 15:52:01 +01: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
86a678f90e
chore: move clean-stdlib out of Makefile so that it can be executed even with broken .depend files
...
/cc @leodemoura
2019-11-21 15:46:15 +01:00
Leonardo de Moura
e51b958d12
fix: ensure Meta environment extensions are initialized by the Lean binary
2019-11-20 16:24:58 -08:00
Leonardo de Moura
f2bb86f45c
refactor: use an auxiliary environment extension to implement the mutual recursion between whnf, isDefEq and inferType
...
@Kha @dselsam I was experiencing an insane code explosion with the
previous approach. There were too many definitions marked with
`@[specialize]`. `Meta.c` was reaching 0.5 million lines of code.
We would need a more sophisticated code specializer cache to handle
this kind of code. The new approach is much simpler. I don't see any
major disadvantages.
2019-11-20 16:03:45 -08:00
Leonardo de Moura
da8f9806a8
feat: add isDefEqAux
...
`isDefEq` specialization is currently disabled because implementation
is producing 150k lines of code.
It seems the CPS trick I am using is producing a code explosion.
2019-11-20 13:20:09 -08:00
Leonardo de Moura
235ef740e4
feat: add CheckAssignmentQuick.check
2019-11-20 11:19:20 -08:00
Leonardo de Moura
0ae89c16b8
chore: move TODO
2019-11-20 10:45:19 -08:00
Leonardo de Moura
771fcdf006
feat: add isDefEqQuick
2019-11-20 10:27:38 -08:00
Sebastian Ullrich
44d5eddf16
chore: remove support for relative imports
2019-11-20 16:39:53 +01:00
Sebastian Ullrich
3dcd4febd9
feat: make LEAN_PATH a mapping from package names to root dirs, remove C++ impl
2019-11-20 16:39:53 +01:00
Leonardo de Moura
47d8861b72
chore: document unfoldComparingHeads join point
2019-11-19 17:50:33 -08:00
Leonardo de Moura
2bc6d8568b
feat: add trace messages
2019-11-19 17:41:27 -08:00
Leonardo de Moura
87e109aeba
feat: add isDefEqDelta
2019-11-19 17:11:20 -08:00
Leonardo de Moura
8173755251
feat: add support for unifying offset terms
2019-11-19 10:19:37 -08:00
Leonardo de Moura
5567de24e8
chore: improve Exception.functionExpected
2019-11-19 07:43:23 -08:00
Leonardo de Moura
201d8a97d2
feat: add Check.lean
2019-11-19 07:09:21 -08:00
Sebastian Ullrich
ab42cffad2
refactor: rename all Default.lean files except for Init/Default.lean
2019-11-19 13:52:21 +01:00
Leonardo de Moura
7c1cf9b6d3
chore: use extern lean_name_eq
...
It uses pointer equality to improve performance.
We will eventually be able to do it in Lean as soon as we re-activate
the tactic framework.
2019-11-18 20:02:55 -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
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
b09fb4348d
chore: rename Name constructors
2019-11-18 19:54:05 -08:00
Leonardo de Moura
d9ca07fca8
chore: replace DecidableEq Name with HasBeq Name
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
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
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
92a89a07ff
chore: Expr.CachedData => Expr.Data
2019-11-16 12:23:39 -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
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
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
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
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