Leonardo de Moura
f6dc6e6504
feat(emacs): add new calc commands to lean emacs mode
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 13:36:35 -07:00
Leonardo de Moura
e178979061
feat(frontends/lean): add calc_subst, calc_refl, calc_trans commands for configuring calc-expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 13:35:31 -07:00
Leonardo de Moura
ddba6b222a
feat(frontends/lean): add calculational proof environment extension, it stores transitivity, reflexivity (and substitution) rules
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 13:13:13 -07:00
Leonardo de Moura
50806314d4
feat(util/name): add name_pair, and lex order
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 13:09:29 -07:00
Leonardo de Moura
f9d81c24d3
feat(library/expr_lt): add lex comparison for expression pairs
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 12:14:22 -07:00
Leonardo de Moura
28c904abea
feat(frontends/lean/parser): add 'flag' for disabling 'unknown identifier' errors
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 10:30:03 -07:00
Leonardo de Moura
4be05e1d8c
refactor(frontends/lean): expose notation_entry and token_entry structures, and add functions for parsing notation without affecting the environment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 10:12:04 -07:00
Leonardo de Moura
819c8276f2
feat(frontends/lean/builtin_cmds): add 'variables' command family
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 08:25:00 -07:00
Leonardo de Moura
ea49176043
feat(frontends/lean/builtin_cmds): add 'using' command, and 'hiding/renaming' directives
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 18:42:39 -07:00
Leonardo de Moura
639d58f4c7
feat(frontends/lean/builtin_cmds): add 'print options' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 17:31:28 -07:00
Leonardo de Moura
3e377a9732
feat(frontends/lean/builtin_cmds): add 'set_option' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 17:27:43 -07:00
Leonardo de Moura
0779db7ae9
fix(kernel): set module_idx on theorems, otherwise we are not able to import theorems that use opaque definitions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 16:56:11 -07:00
Leonardo de Moura
73b7a44c84
fix(shell/CMakeFiles): typo
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 16:55:16 -07:00
Leonardo de Moura
82e79d9c78
fix(frontends/lean/parser): style
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 16:54:44 -07:00
Leonardo de Moura
a964ceb0e2
feat(frontends/lean): add 'import' command, add command line option for setting number of threads
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 16:37:46 -07:00
Leonardo de Moura
79d32b768d
feat(shell): add '--hott' command line option
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 15:50:27 -07:00
Leonardo de Moura
4f3da90443
feat(frontends/lean/builtin_exprs): add 'have' and 'show' expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 15:04:29 -07:00
Leonardo de Moura
2c4175341c
feat(library/placeholder): allow types to be attached to placeholders
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 14:35:55 -07:00
Leonardo de Moura
07f2379dec
refactor(kernel): add mk_local function that has only two arguments
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 14:27:26 -07:00
Leonardo de Moura
21c54755a9
fix(kernel/converter): bug in is_def_eq
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 14:09:12 -07:00
Leonardo de Moura
f1e3449aae
fix(frontends/lean): propagate position information
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 13:20:10 -07:00
Leonardo de Moura
2312f43443
fix(kernel/abstract): propagate tags when abstracting
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 13:00:13 -07:00
Leonardo de Moura
f70b1b028a
feat(frontends/lean): provide position to parse_fn external function, add 'by' expression
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 12:28:58 -07:00
Leonardo de Moura
77b0e9d05d
feat(emacs): add 'abbreviation' in the list of keywords
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 10:54:04 -07:00
Leonardo de Moura
34dfacc10e
refactor(frontends/lean): Bool does not need to be a reserved keyword
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 10:52:12 -07:00
Leonardo de Moura
6db265e7ab
feat(frontends/lean/builtin_exprs): parse '_' placeholder
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 10:41:08 -07:00
Leonardo de Moura
249168ce0b
feat(emacs): add 'postfix' in the list of keywords
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 10:03:36 -07:00
Leonardo de Moura
5ce0502a36
feat(frontends/lean/builtin_exprs): add parser for 'let' expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 09:50:34 -07:00
Leonardo de Moura
775e10186d
refactor(parser): use 'scope objects' for creating local scopes and setting m_type_use_placeholder flag
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 09:24:41 -07:00
Leonardo de Moura
cb49e3719e
fix(util/optional): bug in emplace method
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-16 09:24:15 -07:00
Leonardo de Moura
27130c9499
feat(frontends/lean): local notation 'shadows' global one
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-15 11:50:41 -07:00
Leonardo de Moura
28047a33ae
feat(frontends/lean): add local notation support
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-15 11:30:52 -07:00
Leonardo de Moura
9931033554
feat(shell/lean): remove --olean option
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-15 10:50:35 -07:00
Leonardo de Moura
64cafd6875
feat(frontends/lean/notation_cmd): add 'notation' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-15 10:49:05 -07:00
Leonardo de Moura
961b0bfacf
feat(kernel/type_checker): use argument position when reporting application type mismatch errors
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-15 10:06:53 -07:00
Leonardo de Moura
9b389a96d5
feat(frontends/lean/notation_cmd): modify infixl/infixr/postfix command syntax
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-15 08:28:49 -07:00
Leonardo de Moura
e7019ec840
feat(frontends/lean): add infixl/infixr/postfix/precedence commands, add support for storing notation in .olean files, add support for organizing notation into namespaces
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-14 22:13:25 -07:00
Leonardo de Moura
891a3fb48b
feat(frontends/lean): add command block reader with snapshot and resume
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-14 14:13:32 -07:00
Leonardo de Moura
6b99a29c2c
refactor(frontends/lean): add local_decls template that is cheap to copy
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-14 09:56:05 -07:00
Leonardo de Moura
5fee6fd140
feat(shell/lean): add '-o' command line option
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-14 08:10:43 -07:00
Leonardo de Moura
282a35bd1b
feat(frontends/lean): add '#setline' directive
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-14 07:28:56 -07:00
Leonardo de Moura
48c58af9b5
feat(frontends/lean/parser): allow explicit universe level to be provided to aliases and locals
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 18:00:52 -07:00
Leonardo de Moura
a65c43c0db
feat(frontends/lean/builtin_cmds): add definition command family
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 17:30:35 -07:00
Leonardo de Moura
01cecb76db
feat(frontends/lean/builtin_cmds): add 'variable' command family
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 15:13:50 -07:00
Leonardo de Moura
ce259e6265
feat(frontends/lean/parser): add namespace/section/end commands, add support for explicit universe levels, fix Type notation'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 11:34:43 -07:00
Leonardo de Moura
378b691ea7
feat(emacs): update keywords
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 11:25:24 -07:00
Leonardo de Moura
b347117cf3
feat(util/scoped_map): add 'keep' method for closing a scope without undoing operations
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 11:25:14 -07:00
Leonardo de Moura
5aca452439
feat(library/aliases): add 'exceptions' and support for universes to add_aliases procedure, add for_each_universe method to environment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-13 08:26:05 -07:00
Leonardo de Moura
a914345d29
feat(library): new scoping framework
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-12 19:33:02 -07:00
Leonardo de Moura
d50376249f
feat(library/aliases): add level aliases
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-12 12:35:02 -07:00
Leonardo de Moura
3bde699fbe
feat(frontends/lean/parser): add parse_level
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-12 12:34:55 -07:00
Leonardo de Moura
cffbae3667
test(tests/lean/run): add new test group, where we just execute Lean (and don't check output)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 21:07:23 -07:00
Leonardo de Moura
5a008717a4
feat(frontends/lean/parser): add parse_notation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 21:00:34 -07:00
Leonardo de Moura
e7d7996fa9
feat(frontends/lean/parser): add parser_binder(s) and abstract methods
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 18:51:12 -07:00
Leonardo de Moura
959c3ffc68
feat(frontends/lean/parser): add parse_id method
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 15:09:16 -07:00
Leonardo de Moura
1a67cc7293
fix(kernel/for_each_fn): typo
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 15:06:11 -07:00
Leonardo de Moura
05edbe00ad
chore(shell): re-activate .lean tests
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 14:36:42 -07:00
Leonardo de Moura
1c5d3295cc
refactor(library/deep_copy): use replace to implement deep_copy
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 14:35:34 -07:00
Leonardo de Moura
4f83b1a50b
feat(library): add choice expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 14:35:34 -07:00
Leonardo de Moura
c8e272d20b
feat(util/lua): add check_atleast_num_args helper function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 14:35:34 -07:00
Leonardo de Moura
1972a09021
feat(frontends/lean/builtin_cmds): add simple 'print' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 14:35:34 -07:00
Leonardo de Moura
7fd502993b
refactor(frontends/lean/cmd_table): remove register_builtin_cmd procedures, they would cause initialization problems
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 14:35:34 -07:00
Leonardo de Moura
2e8ebb6d9e
feat(frontends/lean/parser): add 'parse_commands' and 'parse_script'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 14:32:07 -07:00
Leonardo de Moura
431b47377d
feat(library/kernel_bindings): add 'set_env/set_environment' commands for updating the global environment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 11:03:12 -07:00
Leonardo de Moura
8fcc25d55a
fix(frontends/lean/token_table): static initialization problem
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-11 10:56:04 -07:00
Leonardo de Moura
3dc26666b9
feat(frontends/lean): add parser interface
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-10 18:20:59 -07:00
Leonardo de Moura
d3e3301208
refactor(frontends/lean/scanner): use the parser configuration in the environment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-10 10:59:12 -07:00
Leonardo de Moura
e2adb101d5
feat(frontends/lean): add parser_config environment extension
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-10 10:39:22 -07:00
Leonardo de Moura
637eae40ad
feat(library/aliases): add support for alias overloading
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-10 10:05:51 -07:00
Leonardo de Moura
d81df2efe2
feat(frontends/lean/parse_table): add use_lambda_abstraction flag to scoped_expr_actions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-10 09:39:01 -07:00
Leonardo de Moura
546f9dc00b
chore(frontends/lean): use consistent name conventions, rename token_set to token_table
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-10 09:18:57 -07:00
Leonardo de Moura
00e0cc15ba
feat(frontends/lean/token_set): add token_set Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-09 16:49:22 -07:00
Leonardo de Moura
25640faaeb
fix(util/trie): bug in for_each method
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-09 16:43:01 -07:00
Leonardo de Moura
af0c93e0eb
feat(frontends/lean/parse_table): add typedef for notation::parse_table
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-09 15:54:56 -07:00
Leonardo de Moura
439b6c1e96
feat(frontends/lean/parse_table): add parse_table Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-09 15:33:39 -07:00
Leonardo de Moura
722ea7273e
feat(frontends/lean): add parse_table datastructure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-09 13:20:33 -07:00
Leonardo de Moura
fe6ab51c12
feat(kernel/inductive): add APIs for retrieving information about declared inductive datatypes, intro rules, and elimination rules
...
The new API is important for implementing environment transformation procedures, and export Lean environment to different systems (e.g., Coq).
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-08 17:15:21 -07:00
Leonardo de Moura
1c49b4d85f
chore(*): replace unique_lock with lock_guard when we do not need to use conditional variables
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 20:55:25 -07:00
Leonardo de Moura
fb5c7c8e92
fix(util/stackinfo): on OSX Boost does not seem to be based on pthread library
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 20:47:46 -07:00
Leonardo de Moura
7124866a4f
fix(library/module): potential deadlock when child thread threw an exception
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 20:34:18 -07:00
Leonardo de Moura
25b822b1c7
fix(tests/util/memory): remove reference to deleted function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 13:29:45 -07:00
Leonardo de Moura
a04af30d85
fix(CMakeLists): remove -pthread flag when compiling using Boost on OSX
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 13:21:00 -07:00
Leonardo de Moura
7847f8a0ca
fix(tests/util): disable some tests that do not compile on OSX + Boost + MULTI_THREAD
2014-06-07 13:14:17 -07:00
Leonardo de Moura
d827b56777
fix(util/memory): remove get_thread_allocated_memory, it used thread_local
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 13:05:03 -07:00
Leonardo de Moura
a42856c1d2
refactor(*): minimize dependency on thread local storage, simplify MK_THREAD_LOCAL_GET
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 12:16:01 -07:00
Leonardo de Moura
d9794d8ea4
feat(CMakeLists): hide compilation warnings due to Boost when using g++ on OSX
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 11:59:31 -07:00
Leonardo de Moura
482f5b01e9
feat(util/thread): add simpler MK_THREAD_LOCAL_GET macro for when BOOST=OFF and MULTI_THREAD=ON
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 11:34:50 -07:00
Leonardo de Moura
8d1ec69599
fix(CMakeLists): use Boost_LIBRARIES
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 11:31:56 -07:00
Leonardo de Moura
5bf4138a4f
feat(util/thread): add custom MK_THREAD_LOCAL_GET macros for when LEAN_MULTI_THREAD is not defined
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 10:41:17 -07:00
Leonardo de Moura
15f0899efb
refactor(*): replace LEAN_THREAD_LOCAL with MK_THREAD_LOCAL_GET, the new macro uses the Boost thread_local_ptr instead of 'thread_local' directive
...
Motivation: clang++ on OSX does not support 'thread_local'.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 10:18:36 -07:00
Leonardo de Moura
91df9a5550
feat(util/thread): add LEAN_THREAD_PTR macro, it uses boost::thread_specific_ptr instead of thread_local keyword when we compile with Boost
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 08:16:20 -07:00
Leonardo de Moura
6700cf1f73
fix(util/thread): add missing declaration when compiling with Boost
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-07 08:05:19 -07:00
Leonardo de Moura
af0b02f521
fix(util/thread_script_state): add a better workaround for clang++ bug
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-06 18:54:10 -07:00
Leonardo de Moura
89a7898054
fix(*): static variable initialization problems
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-06 18:44:12 -07:00
Leonardo de Moura
3562c76161
fix(util/sexpr/options): add workaround for clang++
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-06 18:14:39 -07:00
Leonardo de Moura
db36d465dc
chore(util/sexpr): cleanup
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-06 18:01:43 -07:00
Leonardo de Moura
4a43016735
fix(kernel/expr): expr_cache initialization
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-06 18:00:26 -07:00
Leonardo de Moura
8d4312d9d8
fix(util/thread): warning messages
2014-06-06 17:50:46 -07:00
Leonardo de Moura
06d2ff021b
feat(util/thread_script_state): add system_import procedure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-06 16:23:24 -07:00
Leonardo de Moura
e9ef59ab3e
feat(util): add global (thread local) script_state objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-06 15:46:16 -07:00
Leonardo de Moura
c1796d0ce4
chore(*): remove dead code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-06 10:35:17 -07:00
Leonardo de Moura
d10d70423a
feat(frontends/lean): add new scanner
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-05 18:57:26 -07:00
Leonardo de Moura
4cf1b05831
refactor(library/token_set): move to frontends/lean
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-05 13:10:50 -07:00
Leonardo de Moura
70c3ae8692
feat(library/token_set): register builtin commands
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-05 13:05:40 -07:00
Leonardo de Moura
5b898aa3ed
refactor(util/trie): modify interface to avoid the creation of many temporary optional values and inc/dec reference counters
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-05 12:40:51 -07:00
Leonardo de Moura
220f94d36e
feat(library/kernel_bindings): expose instantiate_levels
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-04 16:26:26 -07:00
Leonardo de Moura
1c96373c1a
feat(library/kernel_bindings): expose replace_fn in the Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-04 15:26:55 -07:00
Leonardo de Moura
bab430af43
chore(kernel/expr): cleanup
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-04 14:51:36 -07:00
Leonardo de Moura
3354832c21
perf(kernel/expr_eq_fn): delay cache allocation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 17:03:09 -07:00
Leonardo de Moura
4a25e7442a
feat(kernel/expr): add optional expression caching (aka "partial" hash-consing)
...
We do not enforce full hash-consing because we would need to synchronize
the access to the hashtable/cache.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 15:35:47 -07:00
Leonardo de Moura
45a3ab5141
refactor(library/aliases): it is bad design to instantiate parameter using the parameter name, the parameter names have no semantic value
...
Moreover, we could create type incorrect aliases by "accident".
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 15:20:14 -07:00
Leonardo de Moura
1f6cfce05c
refactor(library/placeholder): use different names for different placeholders, it is bad design to assume that two structurally identical expressions are different when they are allocated twice (this design is not compatible with any form of hash-consing
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 14:59:00 -07:00
Leonardo de Moura
fc4b6a92cc
fix(util/lru_cache): typo
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 14:59:00 -07:00
Leonardo de Moura
b81d536946
fix(util/stackinfo): make sure check_stack can be invoked before 'main' (i.e., during initialization)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 14:57:32 -07:00
Leonardo de Moura
df3280e86e
feat(util): add lru cache
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 13:26:02 -07:00
Leonardo de Moura
02df63b85e
fix(kernel/level): add workaround for clang++ bug: memory leak at thread_local
...
The fix has an advantage. There is only one copy of level Zero in the system even when multiple threads are used.
Moreover, it does no require any form of synchronization, and modules can be initialized in any order.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 10:37:50 -07:00
Leonardo de Moura
076414693a
feat(library/kernel_bindings): improve argument validation in the Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 10:17:12 -07:00
Leonardo de Moura
a9a38675cb
feat(util/lua): add helper functions for checking expected number of arguments in the Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 10:16:27 -07:00
Leonardo de Moura
7dba2c29d2
feat(library): add token set
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 02:34:12 -07:00
Leonardo de Moura
5a5d66edc8
feat(util/trie): add value() method
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 01:19:23 -07:00
Leonardo de Moura
ab5f570924
refactor(kernel/constraint): remove choice constraints from the kernel, the kernel does not use them, we will implement them in elaborator
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 00:46:28 -07:00
Leonardo de Moura
931ebf9637
chore(util/rb_tree): cleanup code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 00:40:52 -07:00
Leonardo de Moura
536b7539c6
chore(kernel/inductive): cleanup code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 00:38:45 -07:00
Leonardo de Moura
7b28419260
chore(*): disable multi thread support for OSX, remove the !defined(APPLE) directives
...
We should re-enable multi thread support for OSX as soon as the bug in clang is fixed.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 18:23:26 -07:00
Leonardo de Moura
f816487f4b
fix(kernel/level): add (trivial) case for is_geq predicate: l >= 0 for any l
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 18:13:50 -07:00
Leonardo de Moura
045fa911d1
fix(library/kernel_bindings): missing kind in lean_kind
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 18:12:02 -07:00
Leonardo de Moura
ab7469c175
fix(library/scope): warning message, and old comment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 18:08:46 -07:00
Leonardo de Moura
1467bb256e
chore(library): remove unnecessary code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 16:22:38 -07:00
Leonardo de Moura
33bbcd9526
chore(kernel/declaration): rename declaration::get_params to declaration::get_univ_params
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 16:20:34 -07:00
Leonardo de Moura
82e1f87e08
feat(kernel): add function param_names_to_levels
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 16:17:04 -07:00
Leonardo de Moura
96f639811c
chore(kernel/level): remove unnecessary code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 15:42:37 -07:00
Leonardo de Moura
712c10f818
fix(library/scope): make sure the local universe names do not conflict with universe parameter names when close a section, add declaration parameter name sanitizers
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 15:39:57 -07:00
Leonardo de Moura
f82658f213
feat(library): add helper functions for 'updating' declarations
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 15:13:38 -07:00
Leonardo de Moura
e155708dda
feat(util): add (functional) name_map
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 14:46:13 -07:00
Leonardo de Moura
dcacf6fbca
refactor(util): rename name_map to name_hash_map
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 14:34:22 -07:00
Leonardo de Moura
b6d2328c1d
fix(library/scope): make sure local levels are added in the beginning of the universe parameter list
...
The idea is to make sure it is consistent with the behavior used for regular local parameters.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 14:06:31 -07:00
Leonardo de Moura
e9664cb042
fix(kernel/type_checker): check if the declaration contains duplicate universe level parameters
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 13:57:43 -07:00
Leonardo de Moura
9b6b162a7c
fix(library/scope): bug when abstracting inductive declaration in the end of a section
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 13:46:16 -07:00
Leonardo de Moura
6ee272477a
fix(library/private): bug when preserving private names at end_section
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 11:32:14 -07:00
Leonardo de Moura
936ca80b9b
fix(library/scope): bug in add_definition
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 11:04:34 -07:00
Leonardo de Moura
e56307f006
fix(library/scope): bug in end_scope procedure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 10:43:28 -07:00
Leonardo de Moura
6e113206b6
feat(library/scope): add support for inductive datatypes in sections
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-02 10:28:07 -07:00
Leonardo de Moura
d36ef5dcbe
feat(library/private): preserve 'hidden/private name => user name' map when section is closed
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-01 18:09:11 -07:00
Leonardo de Moura
585f3adde1
feat(library/scope): add sections
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-01 17:55:11 -07:00
Leonardo de Moura
286d7f0e64
feat(library): add namespace management
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-31 15:41:01 -07:00
Leonardo de Moura
3145cee51f
refactor(library/aliases): move replace_prefix to util/name
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-31 15:11:22 -07:00
Leonardo de Moura
f7b3061a66
feat(library/module): improve 'import module' error messages
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-31 12:52:06 -07:00
Leonardo de Moura
75abcea83f
fix(library/kernel_bindings): Lua API consistency, environment:add method also register declaration in the export table
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-31 12:20:57 -07:00
Leonardo de Moura
7bd10c2d2d
feat(library/module): export global universe level declarations
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-31 12:12:41 -07:00
Leonardo de Moura
1b5366cfb7
feat(library): add module for implementing aliases and 'using' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-30 21:42:40 -07:00