Leonardo de Moura
db31cc37a1
refactor(kernel/free_vars): cleanup free_vars procedures
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:55 -07:00
Leonardo de Moura
533f44e224
refactor(kernel/expr): for_each_fn, replace_fn, and find_fn without templates
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:55 -07:00
Leonardo de Moura
69b9f2dd37
refactor(kernel/expr): for_each and find functional objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
23988f528c
refactor(kernel/expr): add expr constructors, and expression equality test
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
02413d7c44
refactor(kernel/expr): adding suport for universe polymorphism, and simplify metavariable representation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
76b1ddb967
feat(kernel): add difference constraint solver with backtracking support, and justification generation, this solver will be used to check the satisfiability of universe level constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
1b6b33b3f5
refactor(kernel): start version 0.2, new kernel with universe polymorphism and better/cleaner support for metavariables
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
14c6218bdc
chore(kernel): file name convention
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 20:06:29 -08:00
Leonardo de Moura
b5a30855f8
feat(kernel/universe_constraints): add new class for managing universe constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-06 15:01:28 -08:00
Leonardo de Moura
92c7145d7f
feat(kernel/expr): maximize sharing before serializing
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-02 20:03:42 -08:00
Leonardo de Moura
ecc5d1bc3a
refactor(kernel): move printer to library, cleanup io_state interface
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-02 13:37:50 -08:00
Leonardo de Moura
72761f14e4
refactor(library/io_state): move to the kernel
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-30 11:20:23 -08:00
Leonardo de Moura
10f28c7bec
feat(kernel/replace_fn): non-recursive replace_fn
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-17 16:35:39 -08:00
Leonardo de Moura
0126fa0499
refactor(kernel): add find_fn, replace for_each_fn with find_fn when appropriate, remove unnecessary function has_cached_type
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-19 13:03:46 -08:00
Leonardo de Moura
7f088b7635
feat(kernel): add (optional) field m_type to expr_const, this field is useful for implementing the tactic framework
...
This field should not be visible in the external API.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-19 11:21:52 -08:00
Leonardo de Moura
c1e451151a
feat(replace_visitor): add an abstract class for applying transformations on expressions
...
I also removed replace_using_ctx since it is subsumed by the new class.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-23 15:01:37 -07:00
Leonardo de Moura
13531b7d3e
refactor(kernel): rename trace to justification
...
Motivations:
- We have been writing several comments of the form "... trace/justification..." and "this trace object justify ...".
- Avoid confusion with util/trace.h
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-23 13:42:17 -07:00
Leonardo de Moura
dc0e7a4472
feat(pos_info_provider): add position information provider for expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-22 08:15:36 -07:00
Leonardo de Moura
fc288929a2
feat(type_checker): add trace objects to justify constraints created by the type checker
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-22 08:15:36 -07:00
Leonardo de Moura
85bfa45e6a
refactor(kernel_exception): delete kernel_exception_formatter, and implement kernel_exception pretty printer as a virtual method
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-22 08:15:36 -07:00
Leonardo de Moura
d843d432d3
refactor(kernel): move printer and formatter objects to the kernel
...
The printer and formatter objects are not trusted code.
We moved them to the kernel to be able to provide them as an argument to the trace objects.
Another motivation is to eliminate the kernel_exception_formatter hack.
With the formatter in the kernel, we can implement the pretty printer for kernel exceptions as a virtual method.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-22 08:15:36 -07:00
Leonardo de Moura
ddb90d3038
feat(kernel): add unification_constraint and trace objects to the kernel
...
Trace objects will be used to justify steps performed by engines such as the elaborator. We use them to implement non-chronological backtracking in the elaborator. They are also use to justify to the user why something did not work.
The unification constraints are in the kernel because the type checker may create them when type checking a term containing metavariables.
Remark: a minimalistic kernel does not need to include metavariables, unification constraints, nor trace objects. We include these objects in our kernel to minimize code duplication.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-22 08:15:36 -07:00
Leonardo de Moura
63e102055e
Move metavariables to the kernel. This is the first step for implementing the new elaborator.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-15 12:09:01 -07:00
Leonardo de Moura
db88920f81
Rename normalize and type_check to normalizer and type_checker (using a consistent naming convention)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-02 08:43:38 -07:00
Leonardo de Moura
111cdd4e62
Remove pretty printer from kernel. Add basic printing capability to exprlib module.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-16 20:40:39 -07:00
Leonardo de Moura
c41b3dc4d8
Add kernel_exceptions. The idea is to avoid expression formatting in the kernel. It also allows different frontends to display the error messages is a different way.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-16 12:51:12 -07:00
Leonardo de Moura
790d4a4447
Move pretty printer to frontend. Add support for mixfix pretty printing
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-15 19:02:28 -07:00
Leonardo de Moura
d6d221b992
Move auxiliary files away from kernel
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-15 19:02:28 -07:00
Leonardo de Moura
338ce88ea0
Add occurs function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-14 18:17:17 -07:00
Leonardo de Moura
392b347f53
Add expr_formatter and expr_locator. Add better error messages. Improve simple printer.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-13 19:16:40 -07:00
Leonardo de Moura
11a9cac5d6
Refactor kernel objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-13 15:13:54 -07:00
Leonardo de Moura
f79c0d3546
Add support for cygwin
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-10 14:21:13 -07:00
Leonardo de Moura
2670e94398
Add pretty printer for Lean environment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-07 19:10:12 -07:00
Leonardo de Moura
58fef282c3
Refactor theorems. Add new theorems.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-07 01:16:37 -07:00
Leonardo de Moura
30513398bb
Add basic definitions and axioms
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-05 20:06:42 -07:00
Leonardo de Moura
3f789ce2b7
Add let and heterogeneous equality. Add bool_type and bool_value.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-04 09:37:52 -07:00
Leonardo de Moura
e220d7c525
Add type checker. Fix normalization with non-empty context
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-01 21:40:36 -07:00
Leonardo de Moura
a4f456c99e
Universe levels
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-28 22:34:39 -07:00
Leonardo de Moura
14c899e7ca
Add normalize
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-24 19:36:54 -07:00
Leonardo de Moura
59592ed36b
Add deep copy for kernel expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-24 14:56:32 -07:00
Leonardo de Moura
9b3c47a521
Refactor instantiate/abstract code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-24 14:56:32 -07:00
Leonardo de Moura
c7b12a2815
Add abstract/instantiate for kernel expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-24 14:56:32 -07:00
Leonardo de Moura
2c3fc09e3c
Add has_free_vars/closed function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-24 14:56:31 -07:00
Leonardo de Moura
79d00f4d78
Rename max_sharing files
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-23 09:01:54 -07:00
Leonardo de Moura
aed8a07c1b
Add sexpr test
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-22 19:02:11 -07:00
Leonardo de Moura
c32dfe22b6
Add expressions (dependent type theory)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-22 12:46:11 -07:00