Leonardo de Moura
dcd15f3424
refactor(runtime): C backend
2019-08-24 07:40:38 -07:00
Leonardo de Moura
12809945ba
chore(util/sexpr/format): use Lean implementation
2019-06-07 10:45:42 -07:00
Leonardo de Moura
3afa4f7ab0
chore(util/safe_arith): remove dead code
2019-06-07 09:52:31 -07:00
Leonardo de Moura
7beb74fb0f
chore(util/sexpr/format): remove dead code
2019-06-07 09:28:30 -07:00
Leonardo de Moura
30a6a2ade8
feat(library/init/data, runtime): remove parray support from runtime, and implement them in Lean using Scala/Clojure Radix trees
...
The Scala/Clojure approach for persistent arrays works great with our
`reset/reuse`. We seem to be much more efficient than their
implementations because of `reset/reuse`. The new approach also seems
better than the old one implemented in the runtime, and has a few
advantages:
1- The reroot procedure used in the old approach required
synchronization for multi-threaded code, or we would need to perform
deep copies when sending `parray` objects between threads.
2- We don't need any runtime extension for the new approach.
3- The old approach used "trail lists" for undoing array updates.
This works well for bactracking search use cases, but it is bad
in use cases where we are simultaneously updating the persistent
arrays that have shared nodes.
2019-06-02 09:18:19 -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
367b3ec4a3
chore(tests/util): remove old test
2019-05-16 14:29:26 -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
8aeff535fc
chore(tests): remove old tests
2019-05-13 12:43:11 -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
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
3d52298c69
chore(util/sexpr): preparing to port options to Lean
2019-03-22 13:58:16 -07:00
Sebastian Ullrich
ee15a70098
fix(*/CMakeLists): build all binaries via (staged) leanstatic
2019-03-18 16:09:20 +01:00
Leonardo de Moura
3444a295e7
feat(library/compiler,runtime): builtin support for lean.name
2019-02-05 12:57:46 -08: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
23202bada1
chore(runtime/object): allow shared objects at string_append and string_push
2018-11-14 16:30:23 -08:00
Leonardo de Moura
a368ed2185
test(tests/util/object): add map test
2018-10-27 20:50:09 -07:00
Leonardo de Moura
46d6f7bfb5
chore(runtime/object): store function pointer as void * inside closure
2018-09-11 14:27:45 -07:00
Leonardo de Moura
7c7eccf6ad
test(tests/util/object): add perf test
2018-09-11 08:27:25 -07:00
Leonardo de Moura
0573d7e1d5
fix(runtime/object): parray RC bugs
2018-09-09 12:04:27 -07:00
Leonardo de Moura
36423e4389
fix(runtime): parray memory leaks
2018-09-09 10:33:15 -07:00
Leonardo de Moura
2a24f4a09b
test(tests/util/object): add parray test
2018-09-09 10:21:55 -07:00
Leonardo de Moura
4863ca071a
chore(runtime): make sure we use the same naming convention for getters and setters
2018-09-09 10:07:00 -07:00
Leonardo de Moura
8f195515a6
feat(runtime): add persistent arrays to runtime
2018-09-09 09:44:38 -07:00
Sebastian Ullrich
a7b1de8bf7
chore(tests/shell/test): remove
2018-09-08 18:37:58 -07:00
Sebastian Ullrich
b3c44ec56e
chore(shell/{server,lean_js}): remove
2018-09-08 18:37:58 -07:00
Leonardo de Moura
58e91559d0
feat(*): use new inductive datatype module
2018-09-06 18:09:22 -07:00
Leonardo de Moura
00032a7d37
chore(tests/shell/shell_test): fix output
...
BTW, we should probably temporarily delete this test.
2018-09-04 17:22:16 -07:00
Leonardo de Moura
805e45bba5
chore(tests/shell): fix test
2018-08-27 17:54:43 -07:00
Leonardo de Moura
3ab1ebcb3f
feat(init/core): add task
2018-08-21 16:10:07 -07:00
Leonardo de Moura
0b349f1abf
chore(*): fix style
2018-08-21 09:32:01 -07:00
Leonardo de Moura
dc1f5c0aa6
feat(runtime/object): task API functions can take thunks as arguments
2018-08-20 09:13:35 -07:00
Leonardo de Moura
db98397cc0
feat(runtime): object compactor
...
We need more testing and performance testing.
We also need to compare serializer and compacted_region.
2018-08-19 17:10:18 -07:00
Leonardo de Moura
684085d93f
refactor(runtime/object): delete data needed to execute task after it finishes
2018-08-18 14:33:27 -07:00
Leonardo de Moura
a0b5502821
fix(runtime/object): memory leak and simplify task_object
...
We remove per task condition_variable and use m_task_finished_cv.
The same condition_variable used to implement `wait_any`.
2018-08-18 10:29:12 -07:00
Leonardo de Moura
4bc8414d2b
feat(runtime/object): use "weak pointers" in the task manager, and interrupt tasks at GC time
2018-08-17 15:35:00 -07:00
Leonardo de Moura
24444d65c4
refactor(runtime/object): do not use Lean runtime lists to implement the reverse dependency list in task objects
2018-08-17 14:42:43 -07:00
Leonardo de Moura
1d5411f455
feat(runtime/object): add support for io.wait_any
2018-08-17 13:04:06 -07:00
Leonardo de Moura
5f78087b08
feat(runtime/object): add support for io.has_finished
2018-08-17 12:36:48 -07:00
Leonardo de Moura
ae9eac6781
feat(runtime/object): simplify and more tests
2018-08-17 09:41:22 -07:00
Leonardo de Moura
c863e86429
feat(runtime/object): primitives for interrupting threads
2018-08-17 09:25:40 -07:00
Leonardo de Moura
7a7d443ad5
test(tests/util/object): improve tests
2018-08-17 09:04:08 -07:00
Leonardo de Moura
510a5ffeaa
chore(tests/util/object): adjust test
2018-08-17 08:48:11 -07:00
Leonardo de Moura
018542e2e1
fix(runtime/object): task bugs
2018-08-16 21:28:58 -07:00
Leonardo de Moura
67ab1ec8f2
chore(util/worker_queue): remove dead code
2018-08-16 14:14:57 -07:00
Leonardo de Moura
c322ef0cab
fix(tests/util/object): use new calling convention for apply
2018-08-15 21:17:50 -07:00
Leonardo de Moura
f9bad161c9
chore(tests/util/object): fix "unused" variables warnings in release mode
2018-08-14 15:19:07 -07:00
Leonardo de Moura
bcb37ef862
feat(runtime): thunk serialization
2018-08-14 15:15:12 -07:00
Leonardo de Moura
f036a7ad16
chore(runtime/object): mk_thunk(c) should not modify c's RC
...
This is useful when we are generating a function that does not use the
"borrow semantics" for an argument `c` which is used in `mk_thunk(c)`.
2018-08-10 18:11:29 -07:00