Leonardo de Moura
3e4d849a4a
refactor(kernel/metavar.h): simplify API
2015-03-12 12:50:53 -07:00
Leonardo de Moura
f018fdabb9
refactor(library/kernel_bindings): remove unnecessary procedure
2015-02-07 18:57:46 -08:00
Leonardo de Moura
7945b8adab
refactor(kernel/type_checker): remove useless procedures
2015-02-07 14:55:36 -08:00
Leonardo de Moura
752b54085b
refactor(kernel/type_checker): type checker should not unfold macros, but sign an error if a untrusted macro is used
...
Now, we unfold untrusted macros outside of the Lean kernel.
2015-01-20 12:36:56 -08:00
Leonardo de Moura
c4f02bd16a
refactor(kernel/expr): remove dead code
2014-10-16 13:09:26 -07:00
Leonardo de Moura
a26618e0f2
feat(frontends/lean): add '[]' notation for marking arguments where class-instance resolution should be applied
2014-10-12 13:06:00 -07:00
Leonardo de Moura
bf081ed431
refactor(kernel): rename var_decl to constant_assumption
...
Motivation: it matches the notation used to declare it.
2014-10-02 17:55:34 -07:00
Leonardo de Moura
a0c37b231f
feat(kernel/expr): add hash_bi function that takes binder information into account
2014-09-29 16:44:55 -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
4dd7abb14e
refactor(library): explicit initialization/finalization
2014-09-23 10:45:14 -07:00
Leonardo de Moura
08ccd58eb6
feat(frontends/lean): add 'reducible' modifier for controlling which
...
definitions are unfolded during elaboration
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-19 15:54:32 -07:00
Leonardo de Moura
49d5af473d
refactor(kernel): remove support for proof irrelevant classes
...
Motivation: we can use Prop
2014-09-19 07:32:07 -07:00
Leonardo de Moura
dd31ed60b0
refactor(library): remove unnecessary file hott_kernel, HoTT and
...
standard library have been merged
2014-09-18 20:30:37 -07:00
Leonardo de Moura
243f80231a
chore(kernel): fix style and lua bindings
2014-09-17 18:30:28 -07:00
Leonardo de Moura
ea1bae0143
refactor(kernel/converter): replace extra_opaque_set with predicate
...
It gives us more flexibility.
2014-09-17 17:05:13 -07:00
Leonardo de Moura
b746492ac8
refactor(library/simple_formatter): rename simple_formatter to print
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 10:32:08 -07:00
Leonardo de Moura
7d987df429
refactor(kernel/formatter): move simple_formatter to library
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 10:26:45 -07:00
Leonardo de Moura
9588336c15
refactor(kernel/type_checker): remove "global" constraint buffer from type_checker, and use constraint_seq instead
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:19 -07:00
Leonardo de Moura
e6ffda0c51
feat(library/match): add basic match_plugin that just invokes whnf before failing
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 08:37:03 -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
4b030c5d5f
feat(library/module): relative module path
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 19:47:55 -07:00
Leonardo de Moura
936bb2744b
fix(library/unifier): add a flag to sign that a choice constraint owns a metavariable ?m, that is, it has the right to assign ?m, and the unifier should postpone any other constraint that tries to assign ?m
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 17:32:55 -07:00
Leonardo de Moura
faee08591f
fix(*): make sure elaborator and type_checker use the same "rules" for treating opaque definitions
...
This is a big change because we have to store in constraints whether we can use the "relaxed" rules or not.
The "relaxed" case says that when type checking the value of an opaque definition we can treat other opaque definitions in the same module as transparent.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-27 12:12:54 -07:00
Leonardo de Moura
13fe28dd1c
perf(library/unifier): delay the instantiation of metavariables occurring in the types of local constants
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 14:31:30 -07:00
Leonardo de Moura
61661478ad
refactor(kernel/metavar): simplify substitution class, and remove dead code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 10:03:03 -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
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
b956ce68d2
feat(frontends/lean/elaborator): keep postponing delayed coercions until the type can be inferred
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 12:50:43 -07:00
Leonardo de Moura
e445515f2b
refactor(kernel): move standard and hott kernel instantiations to library
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 10:31:27 -07:00
Leonardo de Moura
d7cb1952ae
feat(kernel): simplify choice_fn, and make its interface closer to the unifier_plugin interface
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 12:47:33 -07:00
Leonardo de Moura
6a6ebd5c2d
refactor(kernel/metavar): add method instantiate as alias for instantiate_metavars_wo_jst
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 15:39:25 -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
a8f9594046
refactor(kernel/instantiate): rename instantiate_params to instantiate_univ_params
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:09:55 -07:00
Leonardo de Moura
6891f48c67
fix(library/module): do not store full path of imported modules
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 10:48:57 -07:00
Leonardo de Moura
f1d8d8dcf9
chore(library/tactic): update goal objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:00:12 -07:00
Leonardo de Moura
16bdc51fc4
refactor(kernel/type_checker): simplify type checker API, and remove add_cnstr_fn
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 13:36:31 -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
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
a0e4dccdac
refactor(kernel/constraint): rename choice constraint fields
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 13:52:03 -07:00
Leonardo de Moura
60c60c6cf5
feat(library/kernel_bindings): add mk_choice_cnstr to Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-23 13:39:21 -07:00
Leonardo de Moura
644c387cfe
refactor(kernel/constraint): rename: level constraints are also equality constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 10:50:47 -07:00
Leonardo de Moura
3953d4d122
feat(kernel/type_checker): add push/pop methods to type_checker, they control the cache, and allow the type checker to reuse results even when it is used inside of a backtracking search
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-22 09:58:05 -07:00
Leonardo de Moura
37bee8c852
refactor(kernel/type_checker): simplify replace constraint_handler with closure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-21 12:25:54 -07:00
Leonardo de Moura
86a56fbd2d
feat(library/kernel_bindings): expose methods substitution::for_each_expr and substitution::for_each_level in the Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-21 12:25:54 -07:00
Leonardo de Moura
67088b130e
refactor(kernel/constraint): simplify constraint interface, and add choice constraint
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-21 12:25:54 -07:00
Leonardo de Moura
05d1832425
refactor(kernel/type_checker): improve ensure_pi and ensure_sort APIs
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-19 22:33:58 -07:00
Leonardo de Moura
77c5319c4a
chore(*): remove Lua 'migrate'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-18 07:01:34 -07:00
Leonardo de Moura
3ea24c0f32
fix(library/kernel_bindings): set_environment and set_io_state objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 22:36:47 -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
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