Commit graph

34 commits

Author SHA1 Message Date
Leonardo de Moura
51200c916e chore: make explicit user and internal panics 2021-03-04 07:37:33 -08:00
Sebastian Ullrich
77cbaa752c fix: Task: make reference and -j0 semantics eager, simplify 2020-09-14 17:57:33 +02:00
Sebastian Ullrich
c88784ef9d refactor: consistent io_result_mk* naming
/cc @leodemoura
2020-08-31 11:08:57 +02:00
Leonardo de Moura
e3b1ae514b fix: nontermination
This issue was reported by Simon Winwood at Zulip.
Here is the message

The following code doesn't terminate (in a reasonable amount of time)
```
def large_nat : Nat := (9223372036854775807 : Nat)
```
$ time lean --o=large-nat.olean large-nat.lean
2020-08-18 18:45:28 -07:00
Sebastian Ullrich
c38f4fe837 feat: unsafe functions for freeing compacted regions 2020-07-10 07:42:26 -07:00
Leonardo de Moura
2f1ec93289 chore: move runtime implementation to src/runtime 2020-05-22 14:35:16 -07:00
Leonardo de Moura
1a77ee4f89 chore: delete old runtime directory 2020-05-18 11:33:18 -07:00
Leonardo de Moura
8bdca35282 chore: use #include <lean/runtime/...> for runtime .h files 2020-05-18 11:30:07 -07:00
Leonardo de Moura
a897f7e7f3 chore: style nonsense 2020-02-06 17:06:36 -08:00
Leonardo de Moura
224fe05d51 feat: reset memory 2020-02-06 16:56:25 -08:00
Leonardo de Moura
469562d524 feat: maximize sharing at compact 2020-02-06 16:39:20 -08:00
Leonardo de Moura
9eef6851be chore: track number of objects 2020-02-06 14:58:20 -08:00
Leonardo de Moura
a944d158a3 feat(CMakeLists.txt): add SMALL_RC cmake option
When used with `COMPRESSED_OBJECT_HEADER`, Lean uses a compressed
object header where only 32-bits are reserved for the RC.
The motivation is performance, in our experiments, it is faster to
access a 32-bit counter than a 45-bit one.
With a smaller RC, we can use 8-bits for the memory kind information,
and speedup its access.
2019-08-28 14:54:08 -03:00
Leonardo de Moura
88e44d9fdd fix(runtime/compact): memory leak 2019-08-24 11:21:19 -07:00
Leonardo de Moura
140708fe8d chore(runtime): style 2019-08-24 07:40:56 -07:00
Leonardo de Moura
70f3537a29 feat(runtime): add lean_panic and variants 2019-08-24 07:40:39 -07:00
Leonardo de Moura
6553c5531c fix(runtime): bugs at compact.cpp and object size calculation 2019-08-24 07:40:38 -07:00
Leonardo de Moura
1ba481fad5 chore(runtime/compact): minor 2019-08-24 07:40:38 -07:00
Leonardo de Moura
79f4eeea62 fix(runtime/lean): incorrect assertion 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
b0c84874ba chore(runtime/compact): add additional comments 2019-07-30 17:58:15 -07:00
Sebastian Ullrich
20b6502aaf fix(runtime/compact): badly aligned "field" in terminator 2019-07-30 17:52:43 -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
1da4782483 feat(runtime, library/init/io): add io.ref 2019-03-16 22:16:28 -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
Leonardo de Moura
4d6da3dd69 fix(runtime/compact): bug at read 2018-08-28 10:30:51 -07:00
Leonardo de Moura
030669ea4d feat(runtime): do not waste space with RC for region and stack allocated objects
The modification introduces an overhead of 1.5% on the
execution time. Here is the the time for compiling the corelib

Before: 8.61 secs (avg of 3 runs)
After:  8.74 secs (avg of 3 runs)

On the other hand, the size of the compacted region for the command
`#compact_tst 10` is smaller.

Before: 176687728
After:  153794704

The size before this change was 14.8% bigger.

For reference, using the old serializer we generate a buffer of size 105291117.

cc @kha
2018-08-28 07:41:55 -07:00
Leonardo de Moura
0b349f1abf chore(*): fix style 2018-08-21 09:32:01 -07:00
Leonardo de Moura
38b23431a3 chore(runtime/compact): add inline 2018-08-20 15:30:21 -07:00
Leonardo de Moura
7f9d131a1f chore(runtime/compact): one alloc per object 2018-08-20 14:46:06 -07:00
Leonardo de Moura
474a0c40c7 fix(runtime/compact): missing memcpy 2018-08-20 10:33:04 -07:00
Leonardo de Moura
a27aa53e88 refactor(runtime/compact): save task objects as thunks
TODO: modify task API and make sure all functions there can take thunks
instead of tasks as arguments.
2018-08-20 08:52: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