Commit graph

6525 commits

Author SHA1 Message Date
Leonardo de Moura
49b2bb209d refactor(kernel/formatter): formatter_cell object should not perform destructive updates
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-24 13:51:39 -07:00
Leonardo de Moura
4398f3ec04 chore(.gitignore): add .olean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-24 13:51:39 -07:00
Leonardo de Moura
69e5156034 test(lua): add import 'diamond' tst
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 16:49:43 -07:00
Leonardo de Moura
f8255ddac6 fix(library/module): deadlock
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 16:46:53 -07:00
Leonardo de Moura
d30c600eb2 fix(library/module): bug in module import
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 16:23:47 -07:00
Leonardo de Moura
879572ee7e fix(kernel/module): non-termination
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 15:12:47 -07:00
Leonardo de Moura
e4f09335ce test(lua): new module system test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 14:54:20 -07:00
Leonardo de Moura
902b6160fa fix(kernel/module): deadlock
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 14:43:03 -07:00
Leonardo de Moura
2344fb9476 feat(kernel/expr): use the expression depth in the hash code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 14:16:51 -07:00
Leonardo de Moura
a3b0200d32 feat(library/module): do not use threads when lean is not compiled with LEAN_MULTI_THREAD
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 11:32:24 -07:00
Leonardo de Moura
46c292be71 test(lua): add simple module export/import test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 11:26:28 -07:00
Leonardo de Moura
69f6930bd7 test(lua): add Acc datatype declaration test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 11:26:02 -07:00
Leonardo de Moura
b68b9ccc05 fix(kernel/environment): bug in extension id checking
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 11:24:00 -07:00
Leonardo de Moura
be96dc2ddf fix(library/module): bug in next_task method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 11:13:38 -07:00
Leonardo de Moura
c593247fcc fix(library/kernel_serializer): bug in declaration serialization
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 11:11:16 -07:00
Leonardo de Moura
61b662151e fix(library/module): bug in export_module procedure
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 10:57:11 -07:00
Leonardo de Moura
6bbb9d3667 feat(library/kernel_bindings): declarations added with the function add_decl are automatically registered in the to-export list
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 10:52:47 -07:00
Leonardo de Moura
1a663afda4 feat(library/module): add extra function for adding uncertified declarations when trust_lvl > LEAN_BELIEVER_TRUST_LEVEL
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 10:50:34 -07:00
Leonardo de Moura
a0a70bcea7 feat(library/kernel_bindings): expose import/export functions in the Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-23 09:35:32 -07:00
Leonardo de Moura
21905289fa feat(library/module): add module import procedure
The modules are processed in parallel.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-22 18:15:44 -07:00
Leonardo de Moura
ce634d4459 test(lua): well-founded induction
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-22 14:10:25 -07:00
Leonardo de Moura
76177d7765 feat(library/kernel_bindings): improve type_checker:check Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-22 14:10:25 -07:00
Leonardo de Moura
1447d7e765 test(lua): add another inductive datatype example
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-22 14:10:25 -07:00
Leonardo de Moura
6246fae32c fix(kernel/inductive): inductive datatype declaration validation bug pointed out by Cody Roux
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 16:29:25 -07:00
Leonardo de Moura
a45dc0bb86 chore(kernel): remove dead code, we don't have level constraints anymore
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 15:46:17 -07:00
Leonardo de Moura
b9d7f8e867 test(lua): make sure bug reported by Floris does not happen in Lean 0.2
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 13:34:04 -07:00
Leonardo de Moura
f375ed5f7a test(tests/kernel/environment): add more tests for environment objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 12:42:29 -07:00
Leonardo de Moura
203a59b682 test(lua): add more tests for the environment Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 12:36:04 -07:00
Leonardo de Moura
e39feabb72 feat(library/module): add declaration reader
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 11:54:29 -07:00
Leonardo de Moura
9f4bae6856 feat(library/kernel_bindings): add hott_environment Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 11:49:30 -07:00
Leonardo de Moura
45d473d44e feat(kernel): add mk_hott_environment function for creating HoTT compatible environments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 11:31:34 -07:00
Leonardo de Moura
4d1fecb21d refactor(library/kernel_bindings): rename empty_environment ==> bare_environment in the Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 11:24:24 -07:00
Leonardo de Moura
f08a852da8 feat(library/kernel_bindings): expose environment::add(declaration) method in the Lua API, and add example to demonstrate its usage
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 11:12:55 -07:00
Leonardo de Moura
9b9041fa2e feat(kernel/environment): add method for adding declarations that were not type checked (if trust_lvl() > LEAN_BELIEVER_TRUST_LEVEL)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-21 11:12:26 -07:00
Leonardo de Moura
8ffe66dc4f feat(library): add module system API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 18:35:59 -07:00
Leonardo de Moura
dd3edcb19f feat(library): add shared environment object
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 15:42:52 -07:00
Leonardo de Moura
3726688711 test(lua): add test to demonstrate the different between list(A) where A is a parameter, and where A is an index
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 12:17:16 -07:00
Leonardo de Moura
11fc917102 test(lua): add tests for improving kernel_bindings coverage
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 12:16:12 -07:00
Leonardo de Moura
c5e8c10c9d fix(library/normalize): bug in normalize
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 11:53:58 -07:00
Leonardo de Moura
fae07771ec test(lua): add more universe level expression tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 11:41:17 -07:00
Leonardo de Moura
8872d4a531 refactor(kernel): rename definition class to declaration
The name was misleading since not every declaration is a definition.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 10:41:38 -07:00
Leonardo de Moura
00b1a84051 feat(library/kernel_bindings): expose environment::for_each method in the Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 10:16:19 -07:00
Leonardo de Moura
34a9c8304a feat(kernel/environment): add for_each method for traversing environment declarations
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 10:15:28 -07:00
Leonardo de Moura
9e55c8766f test(lua): add normalize and type_check tests for terms containing metavariables
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 09:56:27 -07:00
Leonardo de Moura
ddccca529a test(lua): add test for mutually recursive inductive type recursor/eliminator
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 09:41:50 -07:00
Leonardo de Moura
8a8c5a2b84 feat(library/kernel_bindings): add normalize, whnf, type_check, infer_type methods to environment object Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 09:40:50 -07:00
Leonardo de Moura
11793e7998 feat(library): add simple normalization procedure
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 09:40:30 -07:00
Leonardo de Moura
4103c85ce3 feat(library/kernel_bindings): improve Fun/Pi Lua APIs
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 09:00:19 -07:00
Leonardo de Moura
eb6807e1d3 test(lua): add another add_inductive example
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-19 17:48:35 -07:00
Leonardo de Moura
4f15240a71 test(lua): add tests for new Pi/Fun notation in Lua
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-19 17:17:15 -07:00