Leonardo de Moura
b0a5ff7f93
refactor(library): rename hop_match to match
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 18:30:30 -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
b9fadeb86e
fix(util/realpath): realpath on cygwin
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 15:06:08 -07:00
Leonardo de Moura
5755ce4bfc
fix(util/lean_path): use unix style paths when using cygwin
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 14:45:23 -07:00
Leonardo de Moura
53c7124c2b
fix(util/realpath): rename realpath to lrealpath
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 14:42:44 -07:00
Leonardo de Moura
bc4cef9ecb
feat(build): clean-olean target deletes .olean and .d files
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 14:01:13 -07:00
Leonardo de Moura
59f6cb5962
fix(build): delete incorrect/old .d and .olean files, detect errors when generating .d files.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 13:58:48 -07:00
Leonardo de Moura
d5bb7d45ec
fix(library/unifier): constraint priority in the unifier, and remove hack from if.lean
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 13:58:47 -07:00
Leonardo de Moura
552be37d48
feat(library/hop_match): port higher-order (pattern) matcher to Lean 0.2, we still have to implement support for universe levels
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-03 16:03:58 -07:00
Leonardo de Moura
2dca68e645
chore(util/list): add inline functions for commonly used patterns in list processing code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-03 13:51:38 -07:00
Leonardo de Moura
5611c6a0a0
chore(util/lean_path): workaround 'spurious' warning produced by g++ in release mode
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-03 13:28:05 -07:00
Leonardo de Moura
50b0c17092
feat(library/unifier): add more information in error messages due to type errors when assigning metavariables
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-03 09:49:30 -07:00
Leonardo de Moura
bae9700260
fix(frontends/lean/dependencies): take relative paths into account when computing dependencies
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 20:03:51 -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
8768197c24
feat(util/lean_path): add dirname and path_append aux functions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 18:12:28 -07:00
Leonardo de Moura
8c37a95164
fix(frontends/lean/scanner): typo reported by clang++
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 15:24:04 -07:00
Leonardo de Moura
249c878597
fix(frontends/lean/elaborator): warning message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 15:21:23 -07:00
Leonardo de Moura
fbc4a7af3b
feat(library/unifier): when unifier.expensive == true, then use only restrict higher-order unification (a fragment slightly more general than higher-order pattern matching) for solving class-instance constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 14:30:25 -07:00
Leonardo de Moura
5e2185cfbe
feat(library/unifier): postpone as much as possible universe constraints of the form ?m1 =?= max(l1, l2) and ?m1 =?= imax(l1, l2) where ?m1 occurs in the right hand side. When there is nothing else to be done, try to solve them by reducing to ?m1 = l1 and ?m1 = l2.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 09:14:35 -07:00
Leonardo de Moura
a62e6f84e3
feat(frontends/lean/scanner): allow letter-like unicode characters and sub/super-scripts in identifiers
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 00:47:58 -07:00
Leonardo de Moura
52e3505599
feat(frontends/lean): display warning message when importing file that uses 'sorry'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-02 00:47:58 -07:00
Leonardo de Moura
53833c70e9
fix(library/coercion): spurious 'replacing coercion', fixes #22
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 21:45:37 -07:00
Leonardo de Moura
428d5cfb99
chore(util/sexpr/options): typos
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 21:20:01 -07:00
Leonardo de Moura
0465c6ef53
fix(frontends/lean): flyinfo for identifiers defined in sections
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 21:15:02 -07:00
Leonardo de Moura
3795d466c1
fix(frontends/lean/elaborator): provide type information for expressions using '@' operator, and strict function applications
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 20:57:24 -07:00
Leonardo de Moura
0c9317b167
feat(frontends/lean/elaborator): add flyinfo for placeholders
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 20:25:06 -07:00
Leonardo de Moura
8bd36dabce
refactor(kernel/pos_info_provider): get_pos_info return none if position is not available
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 20:17:26 -07:00
Leonardo de Moura
df57043861
fix(frontends/lean/scanner): decode utf8
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 19:58:02 -07:00
Leonardo de Moura
4b604521a0
fix(frontends/lean): add hack for flycheck
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 16:26:04 -07:00
Leonardo de Moura
288831dc66
fix(kernel/formatter): fixes #21
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 15:07:01 -07:00
Leonardo de Moura
bd766d8b0e
fix(frontends/lean/elaborator): remove duplicate entries in flyinfo data
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 14:40:26 -07:00
Leonardo de Moura
4cb8fb20fe
fix(frontends/lean/elaborator): bug when mixing string and non-strict implict arguments
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 10:58:20 -07:00
Leonardo de Moura
d27c85e30c
fix(library/Makefile.common): avoid error message when .d files do not exist
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-01 10:11:01 -07:00
Leonardo de Moura
466dd11d1b
fix(frontends/lean/dependencies): warning message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 19:59:05 -07:00
Leonardo de Moura
f39b2eb70f
feat(frontends/lean): add --flyinfo option
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 19:54:21 -07:00
Leonardo de Moura
c01b4bd636
fix(frontends/lean/parser): generate flycheck-friendly import error
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 19:03:54 -07:00
Leonardo de Moura
6ca80b5000
feat(frontends/lean): add 'sorry'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 18:35:57 -07:00
Leonardo de Moura
9cf93c8299
feat(library/error_handling): add helpers classes for creating WARNING and INFO annotations for flycheck
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 17:41:39 -07:00
Leonardo de Moura
d5d2c1d069
fix(emacs): syntax highlight issues reported by Jeremy
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 16:49:19 -07:00
Leonardo de Moura
ba98634a7a
feat(frontends/lean/pp): do not display metavariable arguments by default, add option pp.metavar_args to control whether they are displayed or not
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 16:46:16 -07:00
Leonardo de Moura
de05c041c7
feat(library/unifier): add flag for enabling/disabling expensive extensions in the unifier
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 16:46:16 -07:00
Leonardo de Moura
f57fc33442
fix(library/unifier): bug that was making unifier miss solutions, and add a new case-split that tries to solve flex_rigid constraints by putting the rhs into whnf
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 16:46:16 -07:00
Soonho Kong
9dfa1b6c1d
chore(CMakeLists.txt): replace "lib1;lib2" with "lib1" "lib2"
2014-07-31 14:31:19 -07:00
Soonho Kong
b4c2234e10
chore(shell/CMakeLists.txt): put EXECUTABLE_SUFFIX to lean
2014-07-31 14:11:59 -07:00
Leonardo de Moura
92e90fbd07
feat(library/error_handling): add flycheck_scope helper class
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 12:45:54 -07:00
Leonardo de Moura
1a8a2b0811
refactor(library/unifier): process_flex_rigid method before adding yet another case split
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 12:25:35 -07:00
Leonardo de Moura
8e222e6244
fix(kernel/converter): missing constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 12:25:35 -07:00
Soonho Kong
14a406d4d7
feat: add "--flycheck" option to print out error msgs for flycheck
2014-07-31 11:18:51 -07:00
Soonho Kong
82afcfac9c
fix(frontends/lean/parser.cpp): fix typo
2014-07-31 10:15:45 -07:00
Leonardo de Moura
8834563a7f
feat(build): add 'clean-olean' custom-target
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-30 15:12:37 -07:00
Leonardo de Moura
1d62a614e7
fix(frontends/lean): remove keywords 'class' and '[class]'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-30 15:05:44 -07:00
Leonardo de Moura
9637ceb86e
feat(frontends/lean): allow user to provide a terminator for 'foldr' and 'foldl'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-30 15:04:44 -07:00
Leonardo de Moura
5238da9ac7
refactor(frontends/lean): rename action::is_compatible to action::is_equal
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-30 12:37:35 -07:00
Leonardo de Moura
450131692a
fix(library/converter): missing constraint on eta expansion
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-30 10:43:47 -07:00
Leonardo de Moura
b4700e4eed
chore(build): eliminate artificial dependencies
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 18:25:57 -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
6e135832d8
feat(frontends/lean/pp): pretty print '@' explict operator
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 14:26:27 -07:00
Leonardo de Moura
320bc55e85
fix(frontends/lean/elaborator): use preprocessed expression when displaying errors
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 14:25:50 -07:00
Leonardo de Moura
634363c5ec
fix(frontends/lean/dependencies): dependency generation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 14:13:31 -07:00
Leonardo de Moura
b15f1bb8c7
fix(frontends/lean/elaborator): apply coercions in definitions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 13:55:39 -07:00
Leonardo de Moura
501cae37e5
fix(frontends/lean/parser): bug in check_constant_next (when invoked inside of a section)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 13:04:58 -07:00
Leonardo de Moura
c0039735f4
feat(emacs): add shortcut for using --hott option
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 10:57:52 -07:00
Leonardo de Moura
793b2817ec
fix(util/lean_path): clear g_lean_path_vector before (re-)initializing it
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 10:57:20 -07:00
Leonardo de Moura
8278700b47
feat(build): copy lean executable to bin directory
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 10:25:55 -07:00
Leonardo de Moura
f8eba36b0a
fix(build): set LEAN_PATH before make standard and hott libraries
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 10:06:39 -07:00
Leonardo de Moura
7df78ea503
feat(kernel): add combinator for combining normalizer_extensions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 10:00:40 -07:00
Leonardo de Moura
33c77afc29
feat(frontends/lean/structure): add 'structure' command skeleton
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-28 19:59:38 -07:00
Leonardo de Moura
105c29b51e
refactor(library/standard): use new coding style, rename bool.b0 and bool.b1 to bool.ff and bool.tt
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-28 19:59:38 -07:00
Leonardo de Moura
2b4bd66081
feat(build): generate tests for all code blocks in org-files, and examples at ./examples/standard
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-28 12:06:11 -07:00
Leonardo de Moura
5f360cd8ec
feat(kernel/error_msgs): improve application type mismatch error messages
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-28 07:08:12 -07:00
Leonardo de Moura
555425539d
refactor(kernel/error_msgs): remove dead code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-28 06:52:59 -07:00
Leonardo de Moura
864fdd37da
refactor(library/aliases): aliases are from name to names
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-27 21:01:59 -07:00
Leonardo de Moura
d1fe1286c0
fix(library/unifier): bug introduced today in consume_tc_cnstrs
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-27 17:16:30 -07:00
Leonardo de Moura
bc0a8b8da4
feat(emacs): make lean-mode org-mode friendly
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-27 17:03:06 -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
83d38674c9
feat(kernel/error_msgs): improve cryptic type mismatch error messages where the types may seem identical because key information is being suppressed
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-27 09:41:25 -07:00
Leonardo de Moura
0cdd4a267c
feat(frontends/lean/pp): pretty print 'show' expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 21:56:35 -07:00
Leonardo de Moura
60cc9ac8e2
feat(frontends/lean/pp): pretty print 'have' expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 21:35:26 -07:00
Leonardo de Moura
cf35c07786
fix(frontends/lean): fix 'let' annotation placement and pretty printer
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 21:00:22 -07:00
Leonardo de Moura
206206060f
test(tests/lean/hott): add some of Vladimir's definitions as tests
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 20:50:37 -07:00
Leonardo de Moura
8e402ae862
fix(kernel/type_checker): error message position information
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 20:33:44 -07:00
Leonardo de Moura
cb232f2a9b
fix(kernel/inductive): use has_expr_metavar_strict instead of has_expr_metavar
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 19:57:54 -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
5bf3197306
refactor(frontends/lean): create theorem_queue class
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 15:00:51 -07:00
Leonardo de Moura
78a1670905
refactor(frontends/lean): cleanup add_delayed_theorem method
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 14:01:20 -07:00
Leonardo de Moura
70ef92cd5e
feat(build): add tests/lean/slow test directory, and add nat_wo_hints.lean file that elaborates nat.lean without using any hint
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 10:53:44 -07:00
Leonardo de Moura
23af5ab217
fix(library/unifier): eager whnf application
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 10:37:02 -07:00
Leonardo de Moura
556861c8d6
fix(library/unifier): remove incorrect assertion
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 07:52:10 -07:00
Leonardo de Moura
c1b523d642
feat(util/worker_queue): allow main thread to process tasks while waiting
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 23:24:04 -07:00
Leonardo de Moura
3ec30bf537
feat(frontends/lean): add parallel_import option
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 22:46:49 -07:00
Leonardo de Moura
709b5ce90f
fix(kernel/justification): duplicate position
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 21:16:49 -07:00
Leonardo de Moura
70c887a0bd
fix(library/unifier): fix cryptic error message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 21:10:32 -07:00
Leonardo de Moura
01cec1e1f1
fix(library/unifier): more bugs in the unifier
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 20:05:37 -07:00
Leonardo de Moura
cf44c80ffb
fix(library/inductive_unifier_plugin): do not try to solve type incorrect constraints
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 16:00:38 -07:00
Leonardo de Moura
7b84503133
fix(library/unifier): do not let a unification plugin to 'prioritize' a flex-flex constraint, and add missing case
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 15:03:57 -07:00
Leonardo de Moura
1c191c1ec7
fix(frontends/lean/elaborator): instantiate assigned metavariables before collecting unassigned ones
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 15:02:33 -07:00
Leonardo de Moura
0f12e5a35b
fix(library/inductive_unifier_plugin): unification problem failure on problems with inductive datatypes
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 13:49:45 -07:00
Leonardo de Moura
a450ad5a95
feat(frontends/lean/inductive_cmd): improve notation for declaring 'empty' inductive datatypes
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 11:24:01 -07:00
Leonardo de Moura
a5b9a7b296
fix(frontends/lean/decl_cmds): support for section declarations with implicit parameters, they must be tagged with '@' when creating aliases
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 11:10:45 -07:00
Leonardo de Moura
811f46e97b
feat(frontends/lean/pp): add option for displaying internal names associated with private declarations
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 11:03:54 -07:00