Leonardo de Moura
516c0c73b9
refactor(*): remove dependency to thread_local C++11 keyword, the
...
current compilers have several bugs associated with it
We use the simpler __thread (gcc and clang) and
__declspec(thread) (visual studio).
2014-09-24 12:51:04 -07:00
Leonardo de Moura
ca1b8ca80f
refactor(util/memory_pool): simplify memory_pool, it is not a template anymore
2014-09-24 10:48:32 -07:00
Leonardo de Moura
da481c3274
refactor(kernel): explicit initialization/finalization
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-24 10:12:28 -07:00
Leonardo de Moura
3310eb3dfc
feat(frontends/lean): remove restriction on implict arguments, add new test that demonstrates the new feature
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-07 12:29:32 -07:00
Leonardo de Moura
0d5e346143
fix(library/expr_lt): make sure the builtin order is AC-compatible
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 15:51:10 -07:00
Leonardo de Moura
5c5dea7c8e
feat(kernel/expr): add has_expr_metavar_strict
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 19:54:04 -07:00
Leonardo de Moura
022a151cf7
feat(kernel): add general purpose 'annotations', they are just a generalization of the 'let'-annotations
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 09:33:31 -07:00
Leonardo de Moura
a7c6c3e840
fix(kernel/expr): memory corruption in dealloc method
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 10:16:44 -07:00
Leonardo de Moura
5eaf04518b
refactor(*): rename Bool to Prop
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:43:18 -07:00
Leonardo de Moura
4c6ebdeaf9
perf(util/memory_pool): use memory_pool for hierarchical names and justification objects we get a 8% performance improvement when using multiple threads
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:18:26 -07:00
Leonardo de Moura
c8b6f0c7fb
refactor(util): rename fixed_size_allocator to memory_pool
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 07:49:40 -07:00
Leonardo de Moura
79ea7c5910
perf(kernel/expr): minimize access to system memory allocator by recycling expr_cells
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 18:46:47 -07:00
Leonardo de Moura
9289717169
perf(kernel/expr): inline get_free_var_range, and cache its value for local and metavars
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-17 08:51:46 +01:00
Leonardo de Moura
aae40f07e2
perf(kernel/expr): use thread local deletion buffer
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-16 08:39:03 +01:00
Leonardo de Moura
405e57eb2d
refactor(kernel/formatter): add formatter_factory, and simplify formatter interface
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 18:32:00 +01:00
Leonardo de Moura
fc4df6a430
feat(kernel/expr): add O(1) predicates has_expr_metavar and has_univ_metavar
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 13:11:30 -07:00
Leonardo de Moura
cb000eda13
refactor(kernel): store binder_infor in local constants
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 11:37:46 -07:00
Leonardo de Moura
0adacb5191
feat(kernel): add infer implicit, and use it to infer implicit arguments of inductive datatype eliminators, and tag whether parameters should be implicit or not in introduction rules in the module inductive_cmd
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 13:57:36 -07:00
Leonardo de Moura
acf8c13619
feat(kernel): add strict implicit arguments
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 17:50:49 -07:00
Leonardo de Moura
c9133f33dd
feat(kernel/expr): add flat_app auxiliary function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 12:51:22 -07:00
Leonardo de Moura
603dafbaf7
refactor(kernel): remove 'let'-expressions
...
We simulate it in the following way:
1- An opaque 'let'-expressions (let x : t := v in b) is encoded as
((fun (x : t), b) v)
We also use a macro (let-macro) to mark this pattern.
Thus, the pretty-printer knows how to display it correctly.
2- Transparent 'let'-expressions are eagerly expanded by the parser.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-24 16:27:27 -07:00
Leonardo de Moura
d8a8300a4f
fix(kernel/expr): initialization problem
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 16:55:51 -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
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
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
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
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
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
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
2be9bcef78
feat(library/coercion): add coercion management implementation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-24 19:28:42 -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
edc8af7bb3
refactor(kernel): reduce code duplication
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-19 11:11:19 -07:00
Leonardo de Moura
5c7d3c79c4
feat(kernel/expr): improve get_app_args interface
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-17 19:19:10 -07:00
Leonardo de Moura
5ce134e24e
chore(kernel): binder => binding where appropriate
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-17 11:37:27 -07:00
Leonardo de Moura
33ae79cd9e
refactor(kernel): move shallow copy function to library
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-17 11:20:24 -07:00
Leonardo de Moura
d625c9a26c
refactor(kernel): move max_sharing to library
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-17 11:15:08 -07:00
Leonardo de Moura
e6c52d17a6
fix(kernel/expr): memory leak introduced today
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-16 16:21:31 -07:00
Leonardo de Moura
862c5e354d
feat(kernel/expr): attach auxiliary name (for pretty printing) into local constants
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-16 13:08:09 -07:00
Leonardo de Moura
40b3129e7b
refactor(kernel): improve names
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-16 11:28:05 -07:00
Leonardo de Moura
d6d72ba80e
refactor(kernel): add binder structure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-16 10:51:54 -07:00
Leonardo de Moura
660b9299ad
refactor(kernel): (de)serialization procedures don't need to be in the kernel
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-15 17:23:36 -07:00
Leonardo de Moura
606e6226c2
fix(kernel/type_checker): the type checker cache was not taking into account binder information
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-14 17:14:57 -07:00
Leonardo de Moura
5d61d23bf6
refactor(kernel): move mk_tele_pi to expr.h, and rename it mk_pi
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-14 16:24:55 -07:00
Leonardo de Moura
893e4d4ae2
fix(kernel/expr): bug in m_free_var_range let-expr field
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-14 14:28:47 -07:00
Leonardo de Moura
2593f65ce1
feat(kernel): add tag to kernel expressions
...
Frontends can used tags to associate expressions with line number information.
The update_* procedures automatically propagate tags.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-12 16:33:25 -07:00
Leonardo de Moura
65486b2dec
refactor(kernel/expr): add macro_definition smart pointer
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-01 18:05:46 -07:00
Leonardo de Moura
a5ae4b6570
feat(kernel): add binder annotations (implicit, cast)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-01 10:35:02 -07:00
Leonardo de Moura
b2518f873d
feat(kernel/type_checker): handle ensure_pi when whnf is a meta application
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-04-25 18:17:32 -07:00
Leonardo de Moura
63b6564b78
refactor(kernel): define extension_context API for normalizer_extesions and macro_definitions
...
A particular macro definition may use the extra information to retrieve information necessary to expand/type a given macro application. Example: it may need to invoke whnf.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-04-25 15:43:17 -07:00