Commit graph

1885 commits

Author SHA1 Message Date
Leonardo de Moura
b1efdac07b feat(frontends/lean/parser): universe declarations
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-29 13:15:09 -08:00
Leonardo de Moura
f8b82d854e feat(builtin/basic): add TypeM alias
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-29 13:03:32 -08:00
Leonardo de Moura
1b300d3598 chore(kernel/builtin): remove unnecessary functions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-29 12:55:51 -08:00
Leonardo de Moura
f7889511f9 fix(build): cycle triggered by githash.h dependencies
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-29 12:47:25 -08:00
Leonardo de Moura
df3686634d refactor(kernel/builtin): remove unnecessary predicates
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-29 12:20:29 -08:00
Leonardo de Moura
ac9801c7d7 feat(builtin): add support for cross-compilation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-29 11:58:55 -08:00
Leonardo de Moura
5b7d254e52 feat(builtin): add pre-compiled .lean builtin files to repository
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-29 11:49:17 -08:00
Leonardo de Moura
ba592c845c fix(builtin): dependencies
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-29 11:19:17 -08:00
Leonardo de Moura
9fdf2a3f55 feat(kernel): add trust_imported flag, it skips type checking of 'pre-compiled' Lean modules
"Pre-compiled" .olean files were already type checked. The flag -t instructs to Lean to skip
type checking when importing these files.
TODO: add a check-sum.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-29 03:43:53 -08:00
Leonardo de Moura
411ebbc3c1 refactor(library/basic_thms): move the proof of all basic theorems to a .Lean file
This commit also adds several new theorems that are useful for implementing the simplifier.
TODO: perhaps we should remove the declarations at basic_thms.h?

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-29 03:04:49 -08:00
Leonardo de Moura
a05c815d31 chore(builtin): cleanup cmake file
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 22:27:36 -08:00
Leonardo de Moura
66178ae65a refactor(extra): move extra to builtin
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 22:06:11 -08:00
Leonardo de Moura
5e0b344871 fix(kernel/object): uninitialized variable
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 21:57:56 -08:00
Leonardo de Moura
41c1010043 feat(frontends/lean/parser): make Import command use binary Lean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 19:20:04 -08:00
Leonardo de Moura
aee1c6d3f3 feat(kernel): export/import (.olean) binary files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 17:31:35 -08:00
Leonardo de Moura
22bebbf242 feat(kernel/object): serializer for kernel objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 14:39:10 -08:00
Leonardo de Moura
1fd81dd3a1 feat(frontends/lean/parser): disable verbose messages when importing files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 12:24:13 -08:00
Leonardo de Moura
af5854ad39 doc(examples/lean): use new Import command in examples
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 12:08:08 -08:00
Leonardo de Moura
44a31dd8fb feat(frontends/lean/parser): improve Import command
- The extension does not have to be provided.
- It can also import Lua files.
- Hierachical names can be used instead of strings.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 12:05:01 -08:00
Leonardo de Moura
755e8b735f feat(kernel/expr): serializer for kernel expressions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 01:23:21 -08:00
Leonardo de Moura
0ef8ba2939 feat(kernel/level): serializer for level objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 23:30:13 -08:00
Leonardo de Moura
b94503ab20 chore(util/sexpr): remove unnecessary decls
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 23:24:31 -08:00
Leonardo de Moura
3715b10ce7 feat(util/sexpr/options): serialization for options
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 20:40:00 -08:00
Leonardo de Moura
dbebb4a4a1 feat(util/sexpr): serialization for sexpr
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 20:19:56 -08:00
Leonardo de Moura
9c6dc5d230 feat(util/serializer): add hackish write_double/read_double
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 19:46:45 -08:00
Leonardo de Moura
8e86d6578c fix(tests/lean): adjust tests to reflect modifications in the pp
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 18:38:45 -08:00
Leonardo de Moura
abc370a011 feat(util/numerics): serialization for mpz and mpq
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 18:32:01 -08:00
Leonardo de Moura
49df0c435d feat(util/serializer): make sure the read/write is portable
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 18:07:19 -08:00
Leonardo de Moura
d05695c331 feat(util/name): serialization for hierarchical names
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 17:47:20 -08:00
Leonardo de Moura
cbe0b8532a feat(util/serializer): add write_char and read_char
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 17:22:15 -08:00
Leonardo de Moura
b72937c02c feat(util/serializer): simple serialization infrastructure
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 16:50:06 -08:00
Leonardo de Moura
73cd48cb13 chore(.gitignore): ignore .md.lean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 16:50:06 -08:00
Leonardo de Moura
8b6421e4de feat(util/extensible_object): add template for creating 'extensible' objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 15:40:21 -08:00
Leonardo de Moura
8cf65f354b fix(frontends/lean/pp): forall and exists pretty printing when used as constants
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 12:50:41 -08:00
Leonardo de Moura
a02c6e70fa fix(frontends/lean/pp): missing parenthesis around nested forall/exists
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 12:13:36 -08:00
Leonardo de Moura
f18360a294 doc(examples/lean/set): prove antisymmetry for subset relation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 22:37:44 -08:00
Leonardo de Moura
3874e23a76 doc(doc/lean): expressions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 21:29:54 -08:00
Leonardo de Moura
3f0279b88c refactor(frontends/lua): replace lean.lua.h with util.lua
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 19:49:26 -08:00
Leonardo de Moura
40eca048e0 feat(extra): replace parse_lean_tpl with improved parse_template, that is based on macros
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 19:28:02 -08:00
Leonardo de Moura
a9ee92aa3f fix(frontends/lean/parser): macro precedence
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 19:17:43 -08:00
Leonardo de Moura
3abfad7a88 feat(frontends/lean/parser): add support for integer arguments in macros
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 18:51:37 -08:00
Leonardo de Moura
275f022d79 fix(tests/lean): ignore lines containing 'executing external script' in test scripts, these lines contain references to the path where Lean was built
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 18:41:01 -08:00
Leonardo de Moura
7eaade4ceb chore(examples/lean): rename examples
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 16:00:42 -08:00
Leonardo de Moura
f1b97b18b4 refactor(frontends/lean/parser): tactic macros, and tactic Lua bindings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 15:54:53 -08:00
Leonardo de Moura
ef18cc4a92 fix(frontends/lean/parser): add existing command macros when creating parser object
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 13:38:14 -08:00
Leonardo de Moura
8e4560a866 feat(frontends/lean/parser): protect imported modules from Lua definitions and macros in the file importing the module
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 13:21:36 -08:00
Leonardo de Moura
ba02132a90 feat(frontends/lean/parser): add command macros
The idea is to allow users to define their own commands using Lua.
The builtin command Find is now written in Lua.
This commit also fixes a bug in the get_formatter() Lua API.
It also adds String arguments to macros.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 13:00:28 -08:00
Leonardo de Moura
480781d13e feat(frontends/lean/parser): provide environment as an argument to macros, allow macros to parse tactics
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 11:15:45 -08:00
Leonardo de Moura
71a0f83143 feat(util/sexpr/format): turn off colors on Windows
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 09:54:29 -08:00
Soonho Kong
fa1f64e2d5 chore(travis): fix another typo 2013-12-26 02:57:13 -05:00