Commit graph

19 commits

Author SHA1 Message Date
Leonardo de Moura
fdab3b90b9 refactor(library/init/data/array): new name convention for Array functions 2019-10-01 16:46:05 -07:00
Leonardo de Moura
52b86c3b4b chore(library/init/data/persistentarray/basic): missing "reset" 2019-08-14 16:22:35 -07:00
Leonardo de Moura
8e37fc512b fix(library/init/data/persistentarray/basic): bug at pop
fixes #28
2019-08-14 16:14:20 -07:00
Leonardo de Moura
d00019f57e chore(library/init): fix whitspaces before => 2019-08-09 09:13:49 -07:00
Leonardo de Moura
4d913370a7 chore(library/init): eliminate whitespaces using another patch script 2019-08-09 09:01:39 -07:00
Sebastian Ullrich
3ed67138d5 chore(*): update equation syntax in files and old parser
for f in ../../**/*.lean; do echo $f; ./patch.lean.out $f > tmp && cat tmp > $f; done
2019-08-09 11:11:34 +02:00
Leonardo de Moura
d5707bb256 fear(library/init/data/persistentarray/basic): add PersistentArray.mfor 2019-08-07 11:33:44 -07:00
Leonardo de Moura
3ecf8ac8ec feat(library/init/data/persistentarray/basic): add mfoldlFrom and foldlFrom 2019-08-05 07:41:41 -07:00
Leonardo de Moura
af46e36266 fix(library/init/data/persistentarray/basic): universes 2019-08-04 13:00:32 -07:00
Leonardo de Moura
2a58e58480 feat(library/init/data/persistentarray/basic): add mfind and mfindRev 2019-08-04 12:30:12 -07:00
Leonardo de Moura
4bd347de3a feat(library/init/data/persistentarray/basic): PersistentArray.pop 2019-08-04 11:50:05 -07:00
Leonardo de Moura
f55a00a022 feat(library/init/lean): add LocalContext 2019-08-04 09:29:05 -07:00
Rob Dockins
a9ebf23fab fix(libraray/init/data): generalize universe variables in array and persistent array operations
This change allows the monadic traversal operations on arrays to use monads that
are defined to raise universe levels.  This happens, for example, when defining
monads using certain continuation-passing idioms.
2019-07-11 17:52:04 -07:00
Leonardo de Moura
a02443d23d chore(frontends/lean): fun x, e ==> fun x => e 2019-07-02 13:22:11 -07:00
Leonardo de Moura
91e1d30cf8 feat(frontends/lean/builtin_exprs): use ; in do-notation 2019-06-27 18:00:43 -07:00
Leonardo de Moura
ab487ea4ac feat(frontends/lean): allow ; instead of in in let-decls 2019-06-27 17:12:03 -07:00
Leonardo de Moura
af2d6dbd45 chore(library/init): avoid local attribute 2019-06-24 15:48:11 -07:00
Leonardo de Moura
83e4c63d27 feat(library/init/data/persistentarray/basic): add PersistentArray.modify 2019-06-04 10:40:46 -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