Commit graph

4531 commits

Author SHA1 Message Date
Leonardo de Moura
f1fe5c8d8b test(tests/playground/termparsertest1): new tests 2019-07-05 12:10:22 -07:00
Leonardo de Moura
e946f79e82 test(tests/playground/termparsertest1): add new tests 2019-07-05 10:46:37 -07:00
Sebastian Ullrich
3ee9371374 doc(tests/bench/README): update speedcenter URL 2019-07-05 16:23:07 +02:00
Sebastian Ullrich
a87591af40 chore(tests/bench/speedcenter.exec.yaml): stdlib: time imports 2019-07-05 15:54:35 +02:00
Sebastian Ullrich
2d60a4eb50 chore(tests/bench/speedcenter.exec.yaml): simplify 'stdlib' benchmark
@leodemoura This removes the need for `--output-sync` and cmake hackery. It
doesn't quite measure actual `make stdlib` times (no parallelization, no
.olean/.cpp/.o output), but all of these actually seem to be negligible.
2019-07-05 10:51:44 +02:00
Leonardo de Moura
ea6eee516b chore(frontends/lean): use => instead of := in match-expressions
Motivation: use same separator used in lambda expressions as in
other programming languages.
2019-07-04 11:38:38 -07:00
Sebastian Ullrich
99f2b356e9 chore(tests/bench/temci.yaml): move out of the way 2019-07-04 14:54:25 +02:00
Sebastian Ullrich
1539cf4505 chore(tests/bench/speedcenter.yaml): update temci config 2019-07-04 14:43:04 +02:00
Sebastian Ullrich
7472b4608d chore(tests/bench/speedcenter.yaml): reduce max_runs to 10 2019-07-04 14:34:28 +02:00
Leonardo de Moura
745cc9902b chore(tests/bench): fix tests 2019-07-03 08:37:40 -07:00
Sebastian Ullrich
928a47ee0e feat(tests/bench/speedcenter): temci-based speedcenter config 2019-07-03 08:30:32 -07:00
Leonardo de Moura
cf465ba085 chore(tests/lean/trust0/basic): fix test 2019-07-02 17:36:13 -07:00
Leonardo de Moura
0bee94886e feat(frontends/lean/builtin_exprs): , from ==> from, and cleanup suffices 2019-07-02 17:22:50 -07:00
Leonardo de Moura
9f24e77200 chore(library/init/lean/parser/term): add show and have parsers 2019-07-02 16:59:43 -07:00
Leonardo de Moura
44730314ff feat(library/init/lean/parser/term): add ifTerm 2019-07-02 16:32:09 -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
d4a5306d82 feat(library/init/lean/parser/term): explicit universe notation in the new parser 2019-07-02 09:00:58 -07:00
Leonardo de Moura
9d50b3ca47 feat(library/init/lean/parser/term): paren parser 2019-07-01 19:44:13 -07:00
Leonardo de Moura
13b5747713 fix(library/init/lean/parser/parser): prattParser 2019-07-01 16:00:58 -07:00
Leonardo de Moura
531ef5d700 feat(library/init/lean/parser): universe level parser and bug fixes 2019-06-30 09:02:06 -07:00
Sebastian Ullrich
247e3f4aa2 chore(tests/bench): fix benchmarks 2019-06-30 13:29:23 +02:00
Sebastian Ullrich
c299e6c0e6 chore(tests): fix do syntax in tests 2019-06-30 13:04:34 +02:00
Leonardo de Moura
5c4ec30820 chore(tests/bench/deriv): use new syntax 2019-06-29 15:29:19 -07:00
Leonardo de Moura
bc0c0ee9bc chore(tests): fix tests 2019-06-24 15:48:11 -07:00
Leonardo de Moura
da09ef4f66 feat(frontends/lean/builtin_exprs): minor improvement 2019-06-24 15:48:11 -07:00
Leonardo de Moura
24e3bff429 feat(frontends/lean): add simple parser! macro 2019-06-24 15:48:11 -07:00
Leonardo de Moura
2c4cec184a test(tests/bench): add C++ versions of rbmap benchmarks 2019-06-22 06:58:27 -07:00
Leonardo de Moura
8e98e4375f chore(tests/bench): match order we used in the paper 2019-06-22 06:29:47 -07:00
Leonardo de Moura
3c4c413c2c test(tests/bench/rbmap2): fix benchmark 2019-06-21 16:11:05 -07:00
Leonardo de Moura
82c90c7c96 test(tests/bench/unionfind_clean): add clean version 2019-06-21 16:10:53 -07:00
Leonardo de Moura
8f1345dc53 chore(library/init/lean/syntax): simplify SyntaxNodeKind 2019-06-21 14:24:44 -07:00
Leonardo de Moura
7f3543096a test(tests/playground/parser2): proof of concept 2019-06-20 16:48:17 -07:00
Leonardo de Moura
93e5746739 chore(library/init/lean/parser/parser): naming consistency 2019-06-20 16:47:55 -07:00
Leonardo de Moura
98879f1580 refactor(library/init/lean/parser/parser): simplify SyntaxNodeKind
The numeric `id` generation is works well for builtin parsers, but it
creates problems when defining dynamic ones.
2019-06-20 14:51:59 -07:00
Leonardo de Moura
8724a8cfd5 feat(library/init/lean/parser/parser): builtin parser attributes must be applied after compilation 2019-06-20 09:22:03 -07:00
Leonardo de Moura
f180b3f32e feat(library/init/lean/parser/parser): improve error messages on prattParser 2019-06-19 16:36:18 -07:00
Leonardo de Moura
cf9a29152d fix(library/init/lean/parser/parser): ParserInfo for ident, strLit, and numLit 2019-06-19 16:19:00 -07:00
Leonardo de Moura
86e1af2066 test(tests/playground/parser1): minor 2019-06-19 14:17:55 -07:00
Leonardo de Moura
5ccbb1ec1c test(tests/playground/parser1): add first test
We use `attribute [testParser] ...` instead of `@[testParser]` as a
workaround for the issue described at 697f69020f

I will write a more detailed report for the new parser in the Lean4
channel. I will try to cover the pending issues and TODO list.

cc @kha
2019-06-19 10:52:22 -07:00
Leonardo de Moura
f176a7963c feat(library/init/lean/compiler/ir/emitcpp): register arity 0 declarations 2019-06-07 17:15:16 -07:00
Leonardo de Moura
3651dc7618 feat(library/init/lean): add evalConst
The implementation is good enough for implementing extensible parsers,
elaborators and tactics, but there are a few TODOs

1- We should have a better story for standalone applications.
   Most of them don't need `evalConst`, and the global table is
   just initialization overhead.

2- The global table introduces a dependency on the `Lean.Name`
   implementation. So, all standalone applications will depend on it.

3- We are not storing arity 0 constants in the table.
   This one should be easy to fix in the future.
2019-06-07 16:31:28 -07:00
Leonardo de Moura
aadb07d5e4 chore(tests/lean): remove/fix tests 2019-06-07 09:56:11 -07:00
Leonardo de Moura
ff86159297 test(tests/playground/eval): proof of concept for a safe eval function 2019-06-06 17:06:32 -07:00
Leonardo de Moura
1658be20f1 feat(library/init/data/string): add String.isPrefixOf 2019-06-06 14:20:50 -07:00
Leonardo de Moura
e90a79f996 chore(tests/playground/parser/syntax): fix test 2019-06-05 14:19:24 -07:00
Leonardo de Moura
1cdadba4b2 fix(library/compiler/csimp): type error
@kha This is another instance of a problem we discussed last summer.
I guess there are many more instances like this one that we are not handling.
Recall that we want to preserve types at `csimp` because we eventually
want to allow users to use equational theorems as rewriting rules during
compilation.
However, some of the transformations that `csimp` perform do not
preserve typeability in CIC.
Moreover, some of the optimizations require type inference.

I see the possible long term solutions:

1- Erase types and proofs as soon as possible. The main drawback here is
that we would have to develop an approach for translating Lean theorems
into valid rewriting rules for lambda pure. For example, the following
theorem should not be used as a rewriting rule after we erase types.
```
forall (xs : List Unit) (f : Unit -> Unit), List.map f xs = List.map id xs
```
BTW, I don't want to abandon the idea of using lemmas as rewriting rules in
the compiler.

2- Go over `csimp` and other compiler steps and make sure they work
properly even when `type_checker::infer_type` fails.
2019-06-03 17:36:40 -07:00
Leonardo de Moura
ffbccf1ee9 fix(library/compiler): ByteArray bug 2019-06-03 15:01:16 -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
9d00a8d262 feat(tests/playground/radixtree): use bit shift and land instead instead of / and % 2019-06-01 11:06:45 -07:00
Leonardo de Moura
336761d787 feat(tests/playground/radixtree): add stats 2019-06-01 09:47:57 -07:00