Leonardo de Moura
eebc722f57
feat(library/init/lean/expr): add abstractRange
2019-09-17 17:17:46 -07:00
Leonardo de Moura
75e5f5bfd8
feat(library/init/lean/expr): expose abstract
2019-09-16 18:34:45 -07:00
Leonardo de Moura
704f90d728
feat(library/init/lean/expr): expose instantiate and instantiateRev
2019-09-16 18:29:43 -07:00
Leonardo de Moura
51955bd945
chore(kernel/instantiate): remove obsolete optimization
...
I also tested its effectiveness in Lean3, and I did not observe any
performance impact when compiling stdlib without it.
2019-09-16 16:09:26 -07:00
Leonardo de Moura
3b762d4dc0
refactor(runtime): C backend
2019-08-24 07:40:38 -07:00
Leonardo de Moura
dcd15f3424
refactor(runtime): C backend
2019-08-24 07:40:38 -07:00
Leonardo de Moura
a5c97e21bf
chore(library/init/lean): export as C functions
2019-08-16 20:15:30 -07:00
Leonardo de Moura
19051d9a0d
chore(library/init/lean/localcontext): export as C functions
2019-08-16 19:49:17 -07:00
Leonardo de Moura
03e455d32d
feat(frontends/lean/elaborator): add oldElaborate
2019-08-13 19:23:29 -07:00
Leonardo de Moura
68a93a358c
fix(kernel/expr): initialization problem
2019-08-13 15:04:02 -07:00
Leonardo de Moura
73f96730bb
feat(library/init/lean,kernel): add KernelException, addDecl and compileDecl
...
This commit also refines the type of `addAndCompile`.
We also add `ElabException.kernel` constructor for kernel exceptions.
2019-08-07 17:15:40 -07:00
Leonardo de Moura
ae97cfdd68
feat(kernel/local_ctx): use LocalContext
2019-08-07 11:50:20 -07:00
Leonardo de Moura
bad3f8e77e
chore(kernel/local_ctx): use new representation defined at localcontext.lean
2019-08-06 10:47:50 -07:00
Leonardo de Moura
34024256ab
chore(library/init/lean/expr): simplify Expr.mvar constructor
2019-08-04 13:24:27 -07:00
Leonardo de Moura
1ef23950a4
chore(library/init/lean/expr): expose temporary legacy constructor
2019-08-04 08:03:09 -07:00
Leonardo de Moura
41d8cd9eb9
chore(kernel/expr): remove depth and weight fields
...
These fields were rarely used, but they were used in the hash code
calculation. So, we may see a negative performance impact.
There is also a positive performance impact since `Expr` consumes less
memory, and it is faster to allocate them.
2019-08-03 11:05:01 -07:00
Leonardo de Moura
7f142ac7e3
chore(kernel/expr): hide get_weight and get_depth
2019-08-03 10:57:30 -07:00
Sebastian Ullrich
d45cc4cb7b
fix(kernel): manually align unboxed fields
2019-07-26 12:39:35 -07:00
Leonardo de Moura
08cdb757b4
feat(library/init/lean/environment): add Environment.addAndCompile
...
To fix `BuiltinParserAttribute`, we need to be able to add auxiliary declarations programmatically.
2019-06-18 18:20:17 -07:00
Leonardo de Moura
d664486eca
chore(util): move format to src/util
2019-06-07 10:58:23 -07:00
Leonardo de Moura
3afa4f7ab0
chore(util/safe_arith): remove dead code
2019-06-07 09:52:31 -07:00
Leonardo de Moura
fd29b7e45d
feat(util/io): add helper functions for consuming IO results in C++
2019-06-05 13:53:38 -07:00
Leonardo de Moura
4a26f0028c
chore(library/init/lean/environment): remove unnecessary function
2019-06-03 15:17:40 -07:00
Leonardo de Moura
cd73105dff
refactor(kernel/environment,library/private,library/init/lean/environment): move main module name to header
2019-06-03 09:14:23 -07:00
Leonardo de Moura
aa138fe686
chore(*): get_obj_arg => to_obj_arg
2019-05-16 14:42:02 -07:00
Leonardo de Moura
9d9f546ad8
refactor(util/sexpr): move options and option_declarations to util
2019-05-16 14:37:24 -07:00
Leonardo de Moura
816e83970b
refactor(util/object_ref, kernel/environment): move to_optional
2019-05-15 15:16:29 -07:00
Leonardo de Moura
3193e91aff
feat(library/init/lean/environment): add Environment.displayStats and --stats command line argument
2019-05-15 11:01:25 -07:00
Leonardo de Moura
bc809643ec
feat(library/init/lean/expr): add Expr.quickLt, Expr.eqv
2019-05-15 11:01:25 -07:00
Leonardo de Moura
99e3cdc01b
chore(frontends/lean): delete lean_environment
2019-05-13 13:05:04 -07:00
Leonardo de Moura
edb4d76ecd
feat(kernel/environment): environment as a Lean object
2019-05-13 12:41:33 -07:00
Leonardo de Moura
8ca1b7b2cb
chore(kernel/environment): dead code
2019-05-11 14:13:40 -07:00
Leonardo de Moura
06727e9ca4
chore(kernel/environment): remove dead code
2019-05-10 16:37:13 -07:00
Leonardo de Moura
0d5ac5288a
feat(runtime): increase small nat size
...
In 64-bit machines, the max small nat value should now be (2^63 - 1), and on 32-bit
machines (2^32 - 1).
The main motivation for this modification are the array indexing
operations. With the new representation, if a Nat index is not small,
then it must not be a valid index. This was not true in 64-bit
machines. Example: an array of size 2^33 would fit in memory, and but
an index `i` > 2^32 - 1 would not be a small nat value.
2019-03-26 14:21:03 -07:00
Leonardo de Moura
ac27bd092b
chore(*): small fixes
2019-03-21 15:06:44 -07:00
Leonardo de Moura
e0b0ca4830
chore(*): adapt C++ code to camelCase
2019-03-21 15:06:43 -07:00
Leonardo de Moura
5f54b5887b
chore(kernel/declaration): fix compilation warnings
2019-03-19 11:25:55 -07:00
Leonardo de Moura
aa56578a29
fix(library/compiler/compiler): assertion violations
2019-03-19 11:25:55 -07:00
Leonardo de Moura
20ba4c4b04
feat(kernel): opaque constants
...
They are very similar to `theorems`, but they are never ever unfolded.
2019-03-15 15:45:06 -07:00
Leonardo de Moura
0888dee25e
chore(*): meta ==> unsafe
2019-03-15 15:04:40 -07:00
Leonardo de Moura
d3ba9ef7fa
feat(library/compiler/csimp): eliminate join points that are used only once
2019-03-14 10:43:35 -07:00
Leonardo de Moura
818f2f2d4a
chore(kernel): remove old #include
2019-03-06 06:56:16 -08:00
Leonardo de Moura
feea8ecccd
feat(library/compiler/llnf): avoid inc/dec operations on persistent objects
...
inc/dec operations are noop's for persistent objects.
2019-02-18 20:22:18 -08:00
Leonardo de Moura
ab45af5936
fix(library/compiler/csimp): avoid potential expensive reduction at csimp
...
`whnf_core(e)` uses `whnf` to reduce the major premise of recursors and
projections, and `whnf` unfolds arbitrary definitions.
This commit adds a new option (`cheap`) to `whnf_core`. When
`whnf_core(e, true)` is used, the type checker will not unfolding
definitions when reducing the major premises.
2019-02-15 17:43:21 -08:00
Sebastian Ullrich
a6ac98966a
refactor(library/attribute_manager): parse attribute data from pexpr instead of abstract_parser
2019-02-15 12:13:45 -08:00
Sebastian Ullrich
7cffe6935e
feat(frontends/lean/vm_elaborator): port to new runtime
2019-02-14 14:07:05 -08:00
Leonardo de Moura
9cb2005e8e
feat(library/init/lean): add hash functions and dbg_to_string
2019-02-13 16:19:25 -08:00
Leonardo de Moura
811a480d77
feat(kernel/expr): low level API for expr
2019-02-13 14:59:18 -08:00
Leonardo de Moura
71f5290567
feat(kernel): expose level primitives
2019-02-13 10:37:13 -08:00
Leonardo de Moura
4627929a83
refactor(boot,runtime,util): move name runtime implementation to util/name, and use "extern C" ABI
2019-02-13 08:27:23 -08:00