Commit graph

25 commits

Author SHA1 Message Date
Leonardo de Moura
dc6c1e329f refactor(library/init/data/rbmap): use Bool instead of Prop 2019-04-03 02:54:34 -07:00
Leonardo de Moura
5e14a5f561 refactor(library/init/lean/parser/trie): use String.Pos instead of OldIterator
Renamed the old `matchPrefix` to `oldMatchPrefix`.
2019-03-29 18:17:27 -07:00
Leonardo de Moura
e1ea2b3948 chore(library/init): fix names and add HasEmptyc instances 2019-03-22 12:38:22 -07:00
Leonardo de Moura
3befc219c9 chore(library/init): Empty => empty when it is a function 2019-03-21 17:03:15 -07:00
Sebastian Ullrich
97e5aa2411 chore(library): s/Punit/PUnit/g etc 2019-03-21 15:06:45 -07:00
Leonardo de Moura
79a8d9aa65 chore(*): decidablePred/decidableRel => DecidablePred/DecidableRel 2019-03-21 15:06:44 -07:00
Leonardo de Moura
2be87ecd92 chore(library/init): Bool.tt => Bool.true and Bool.ff => Bool.false 2019-03-21 15:06:44 -07:00
Leonardo de Moura
2ea0baeb99 chore(library): use lowercase in imports 2019-03-21 15:06:44 -07:00
Sebastian Ullrich
beda5f5f43 chore(library): capitalize types and namespaces 2019-03-21 15:06:43 -07:00
Sebastian Ullrich
b939162168 chore(library): switch from snake_case to camelCase 2019-03-21 15:06:43 -07:00
Leonardo de Moura
778e7e41f9 refactor(library/init/data/rbmap/basic): pass ins node-cell to balance1 and balance2.
The idea is to reuse the cell. The trick is like the one we used for
improving state_t. It seems to work pretty well. Now, the Lean
version is 29% slower than the C++ one.

cc @kha
2019-02-20 18:27:58 -08:00
Leonardo de Moura
835718955f refactor(library/init/data/rbmap/basic): store color in the node
@kha Now the Lean version is approx. 50% slower than the C++ version.
2019-02-20 17:52:03 -08:00
Sebastian Ullrich
f7a395d035 feat(library/init/data/rbmap/basic): implement rbmap.lower_bound 2018-12-20 15:32:46 +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
cc3767e6a5 refactor(library/init/data): avoid indirection at rbmap
Now, the nodes in a `rbmap` contain the key and value, and we avoid
one level of indirection. `rbmap`s are more common than `rbtree`.
We implement `rbtree A` as `rbmap A unit`.
2018-10-26 17:14:09 -07:00
Leonardo de Moura
12d8b0e7ef feat(library/init/data): annotate rbtree and rbmap functions 2018-10-19 14:57:31 -07:00
Leonardo de Moura
afd54039ab chore(library): remove >>, we should use *> 2018-09-12 17:31:21 -07:00
Leonardo de Moura
9e305a5f26 chore(library): remove return, we should use pure 2018-09-12 16:51:11 -07:00
Leonardo de Moura
4e6748b55b feat(library/init/data/rbmap/basic): add rbmap_core low level functions 2018-09-09 18:18:40 -07:00
Sebastian Ullrich
732c823646 feat(library/init/lean/parser): remove syntax_id, use De Bruijn indices instead 2018-06-06 15:36:28 +02:00
Leonardo de Moura
63bddd56d6 feat(library/init/data/rbmap,library/init/data/rbtree): add mfold and mfor for rbtree/rbmap 2018-05-09 15:38:57 -07:00
Leonardo de Moura
d5fe509c36 chore(*): remove end after each match-expression
`end` is not optional anymore
2018-05-04 11:30:06 -07:00
Leonardo de Moura
4fa43f18dd chore(library/init/data/rbtree,library/init/data/rbmap): remove auto_param dependency
The problem is that `auto_param` is defined in the old `init/meta/name` module,
and we don't want to have `init/meta` dependencies in the `init/lean` modules.
2018-04-30 13:24:13 -07:00
Leonardo de Moura
1033836953 feat(library/data/rbmap): add rbmap lemmas 2017-11-19 19:49:36 -08:00
Leonardo de Moura
2354338287 feat(library/init/data/rbmap): add rbmap module 2017-11-19 19:49:36 -08:00