Commit graph

1010 commits

Author SHA1 Message Date
Leonardo de Moura
9ac18251f8 chore(src/sexpr): remove sexpr 2019-06-07 11:00:00 -07:00
Leonardo de Moura
d664486eca chore(util): move format to src/util 2019-06-07 10:58:23 -07:00
Leonardo de Moura
12809945ba chore(util/sexpr/format): use Lean implementation 2019-06-07 10:45:42 -07:00
Leonardo de Moura
5eaca0d89e chore(util/sexpr/format): preparing to switch to Lean implementation 2019-06-07 10:18: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
f6b9a0fe9c chore(util/sexpr/format): preparing to switch to Lean implementation 2019-06-07 09:46:34 -07:00
Leonardo de Moura
7beb74fb0f chore(util/sexpr/format): remove dead code 2019-06-07 09:28:30 -07:00
Leonardo de Moura
2a557b1bbd feat(frontends/lean/decl_attributes): connect old frontend to new attribute manager 2019-06-06 10:43:09 -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
9310c807e6 feat(library/private): use environment extension in Lean
Remark: we don't need the `m_inv_map` anymore.
2019-06-03 11:50:33 -07:00
Leonardo de Moura
f852cd774f feat(library/init/lean/compiler/ir): expose C++ primitives for accessing export and extern attributes 2019-05-20 15:49:03 -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
9c4da289b2 refactor(util/sexpr/options): options as a Lean object 2019-05-16 14:27:44 -07:00
Leonardo de Moura
31d4fa9f71 chore(util/sexpr/options): shrink options API
Motivation: move to the Lean implementation
2019-05-16 14:08:11 -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
5844913102 feat(library/module, library/init/lean/environment): add primitives for reading/writing files as compacted regions 2019-05-13 17:26:28 -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
deb2310b6d feat(util/map_foreach): add helper functions for traversing Lean maps 2019-05-13 12:27:59 -07:00
Leonardo de Moura
0c9fa13763 feat(library/init/lean/compiler): convert LLNF into Lean IR 2019-04-30 17:55:43 -07:00
Leonardo de Moura
952eb0f515 feat(library/compiler): C++ API for Lean IR 2019-04-29 18:23:19 -07:00
Leonardo de Moura
a32fcf33c7 feat(util/array_ref): simple wrapper for creating Lean array objects in C++ 2019-04-29 17:10:35 -07:00
Leonardo de Moura
005d62185d feat(library/compiler/csimp): add "case merging" optimization 2019-04-02 09:41:53 -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
Sebastian Ullrich
082b217928 fix(util/kvmap): adjust to Lean definition 2019-03-24 20:46:40 +01:00
Leonardo de Moura
3d52298c69 chore(util/sexpr): preparing to port options to Lean 2019-03-22 13:58:16 -07:00
Leonardo de Moura
25414a1f8d fix(util/rb_tree.h): make sure it compiles with g++ 2019-03-21 15:06:46 -07:00
Sebastian Ullrich
fc40fbb93f chore(util/rb_tree): suppress warning from suppressing unknown warning 2019-03-21 15:06:45 -07:00
Sebastian Ullrich
97e5aa2411 chore(library): s/Punit/PUnit/g etc 2019-03-21 15:06:45 -07:00
Leonardo de Moura
53cbbd89b1 chore(util): remove dead code 2019-03-06 06:56:16 -08:00
Leonardo de Moura
af039f420a chore(util): remove dead code 2019-03-06 06:56:16 -08:00
Leonardo de Moura
0cb3ac683d feat(library/compiler): connect new const_folding module implemented in Lean with csimp 2019-02-15 14:37:48 -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
811a480d77 feat(kernel/expr): low level API for expr 2019-02-13 14:59:18 -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
Leonardo de Moura
1856a319e5 chore(util/path): valgrind was reporting a bug on OSX 2019-02-11 10:56:43 -08:00
Leonardo de Moura
7e8f9e6f66 feat(library/compiler): add [extern] attribute 2019-02-09 18:53:44 -08:00
Leonardo de Moura
2012dcfc7f chore(util/string_ref): add string_refs alias 2019-02-09 18:00:27 -08:00
Leonardo de Moura
2058d33d07 feat(runtime,library/compiler): add name.dec_eq builtin 2019-02-05 14:36:02 -08:00
Leonardo de Moura
eb57a904af chore(runtime): avoid overloads 2019-02-05 14:04:29 -08:00
Leonardo de Moura
3444a295e7 feat(library/compiler,runtime): builtin support for lean.name 2019-02-05 12:57:46 -08:00
Sebastian Ullrich
a29d33485c feat(util/list_ref): to_list_ref, which I didn't need in the end 2019-01-17 17:06:52 +01:00
Sebastian Ullrich
db6b1d6e85 feat(frontends/lean/vm_elaborator,library/init/lean/elaborator): pass parser_state between languages, create parser object on C++ side to existing functions (that don't actually parse anything) 2018-12-18 15:30:38 +01:00
Leonardo de Moura
efa703d2b5 feat(runtime): implement string.iterator primitives in the new runtime
Some of the primitives do not have optimal implementation.

@Kha Could you please check if everything we use in the parser has a
reasonable implementation?
2018-11-15 10:42:23 -08:00
Leonardo de Moura
bcc4956ca5 feat(library/compiler/llnf): reuse constructor memory cells
This commit also add two new instructions to the old VM: `updt` and
`updt_cidx`.
They allow us to test the new new memory reuse technique.

TODO: We need to reset fields after we project. Otherwise, we prevent
destructive updates on nested objects.
2018-10-29 18:46:26 -07:00
Leonardo de Moura
28a34e798a feat(library/compiler/csimp): projection to field
The new test demonstrations this transformation.
2018-10-28 09:38:45 -07:00
Leonardo de Moura
10b99a678c chore(util/list_ref): add objects a list of objects 2018-10-15 11:57:12 -07:00
Leonardo de Moura
d29e95af08 fix(util/list_ref): typo 2018-10-05 17:30:27 -07:00
Leonardo de Moura
be6324e183 chore(util/list_ref): missing include 2018-10-05 17:30:27 -07:00