Commit graph

105 commits

Author SHA1 Message Date
Leonardo de Moura
2a1d9a0285 test: simple demo mixing C/C++ and Lean
@dselsam @kha
I did not have to create a new shared library.
The main limitation of this approach is that the new `extern`
functions are only available in compile code. That is, we cannot use
them with `#eval`.
2020-04-06 16:16:49 -07:00
Leonardo de Moura
705530b62b fix: remove DecidableEq for Float
We cannot implement `DecidableEq Float` using C equality for
`double`. Reason: the C implementation is not even reflexive.
If we need `DecidableEq Float`, we will need to provide our own
implementation (i.e., a wrapper around the one provided by the
hardware). In this commit, we implement `HasBeq Float` instead.

cc @dselsam
2020-04-06 14:10:18 -07:00
Leonardo de Moura
582fe3ac8a test: add test that exposed unboxing issue 2020-04-03 18:24:48 -07:00
Leonardo de Moura
51f1893a8c test: add basic float tests 2020-04-03 17:39:47 -07:00
Leonardo de Moura
41949ee801 refactor: String.toNat ==> String.toNat? and String.toNat! 2020-03-23 14:29:48 -07:00
Sebastian Ullrich
ed14375dad feat: sort and deduplicate "expected" tokens in parser error messages 2020-03-19 17:17:08 -07:00
Leonardo de Moura
ee8a4d16a2 chore: fix test 2020-02-09 19:33:45 -08:00
Leonardo de Moura
2138a11480 feat: use custom error messages at checkRBPGreater 2020-02-03 18:30:22 -08:00
Sebastian Ullrich
b76be34119 chore: fix test 2020-02-03 16:36:37 +01:00
Leonardo de Moura
d0d3e24975 chore: fix tests 2020-01-25 20:14:50 -08:00
Leonardo de Moura
7e61315e6d chore: fix tests 2020-01-20 22:26:07 -08:00
Leonardo de Moura
0caa11e242 chore: adjust frontend to new app representation, and fix tests 2020-01-17 17:34:48 -08:00
Leonardo de Moura
c98e3290e4 refactor: parser attributes 2020-01-08 21:09:11 -08:00
Leonardo de Moura
5629870ab0 test: news tests 2019-12-19 05:51:04 -08:00
Leonardo de Moura
9838a6a8b1 chore: fix tests 2019-12-16 10:31:51 -08:00
Leonardo de Moura
a1aac9a98d chore: fix tests 2019-12-15 18:34:13 -08:00
Leonardo de Moura
7da9793c0a chore: fix tests 2019-12-09 16:58:21 -08:00
Sebastian Ullrich
9482976345 test: speed up some tests for the debug interpreter 2019-12-07 21:51:59 +01:00
Leonardo de Moura
021fda2d80 chore: fix tests 2019-12-04 17:02:56 -08:00
Leonardo de Moura
a5cf1ac5ae chore: fix tests 2019-11-26 18:07:13 -08:00
Leonardo de Moura
cff6a1d117 chore: fix tests 2019-11-22 08:03:22 -08:00
Leonardo de Moura
167549de59 chore: fix tests 2019-11-22 07:56:06 -08:00
Sebastian Ullrich
3dcd4febd9 feat: make LEAN_PATH a mapping from package names to root dirs, remove C++ impl 2019-11-20 16:39:53 +01:00
Leonardo de Moura
68bcb4bf96 chore: fix tests 2019-11-18 19:54:05 -08:00
Leonardo de Moura
1d9a76ae45 chore: fix tests
Remark: weird discrepancies in the new typeclass module.
Ignoring for now since it was not integrated yet.
2019-11-16 12:19:27 -08:00
Leonardo de Moura
524872d68a chore: avoid Expr constructors in tests 2019-11-14 16:54:36 -08:00
Leonardo de Moura
41e574d6cc chore: fix tests 2019-11-05 14:44:05 -08:00
Leonardo de Moura
57cdda5821 chore: trying fix 2019-10-29 13:37:38 -07:00
Sebastian Ullrich
5ce9ca81da chore: revert "test: capture stderr as well"
This reverts commit 2866824b51.
2019-10-29 19:55:48 +01:00
Leonardo de Moura
ed3c95f892 chore: fix tests 2019-10-27 18:29:51 -07:00
Leonardo de Moura
447482e489 refactor: use Array instead of List at mkApp and getAppArgs
Preparation for new unifier.

@dselsam: I had to make minor changes at `Synth.Lean`, and add messy
code to `Context.lean`. `Context.lean` will be deleted in the future.
So, it is not a big deal.
2019-10-21 09:12:36 -07:00
Sebastian Ullrich
2866824b51 test: capture stderr as well
This might or might not give more information on randomly failing tests on CI
/cc @leodemoura
2019-10-15 17:36:28 +02:00
Leonardo de Moura
38f66c580b chore: fix tests 2019-10-07 15:57:02 -07:00
Leonardo de Moura
0714716477 fix: file and import names, tests and stage0
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2019-10-04 17:04:02 -07:00
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
411f397654 refactor(library/init/data/list): new name convention for List functions
cc @dselsam @kha
2019-10-01 15:15:02 -07:00
Leonardo de Moura
864b9c730c feat(library/init/lean/expr): helper functions
cc @dselsam

Notes:
- x.isAppOrConst => x.isApp || x.isConst
- x.isPi => x.isForall
2019-09-30 15:16:40 -07:00
Sebastian Ullrich
2227873dc6 chore(tests/compiler/binomial): further reduce input size for debug build of interpreter... 2019-09-12 18:26:15 +02:00
Sebastian Ullrich
9f88c949f1 chore(tests/compiler): reduce some test sizes for the interpreter 2019-09-12 18:26:15 +02:00
Sebastian Ullrich
3d53aaf5a7 chore(tests/compiler): ignore some tests for the interpreter 2019-09-12 18:26:15 +02:00
Sebastian Ullrich
d5737d0713 test(shell/CMakeLists.txt): add compiler tests as interpreter tests 2019-09-12 18:22:02 +02:00
Sebastian Ullrich
7b7f1d2cac test(tests/bench): add benchmarks as regular ctests with lowered inputs 2019-09-02 10:52:24 +02:00
Sebastian Ullrich
572926f5ce perf(shell/CMakeLists.txt, tests/): define NDEBUG in leanc release builds
`assert` is now being used by the C runtime
2019-08-27 16:54:29 +02:00
Leonardo de Moura
597562e5dd fix(tests/compiler/lazylist): extern cpp ==> extern c 2019-08-24 07:40:56 -07:00
Leonardo de Moura
4b49aa4b50 chore(tests/compiler): fix test 2019-08-13 15:27:44 -07:00
Leonardo de Moura
7195244b04 feat(library/init/data/array/qsort): ensure qsort terminates even for bad lt relations 2019-08-10 22:10:14 -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
d889230211 chore(tests/compiler/termparsertest1): fix test 2019-08-08 21:02:23 -07:00
Leonardo de Moura
f1eaebba31 fix(library/compiler/csimp): bug at float_cases_on
The scope of the expr2ctor cache updates was incorrect.
This bug affects code of the form
```
let x := C.cases_on y ...; K[x]
```
when we try to float the `cases_on` application, and the continuation
`K[x]` contains another `cases_on` application with major `y`.
The new test exposes the bug.
This commit also fixes the case where the continuation `K[x]` projects `y`.

Fixes #26
2019-08-05 13:23:27 -07:00
Leonardo de Moura
bb8b13d240 chore(tests/compiler/expr): fix test output 2019-08-04 13:30:11 -07:00