Commit graph

4104 commits

Author SHA1 Message Date
Leonardo de Moura
e3e2370a38 feat(frontends/lean): split 'opaque_hint' command into 'opaque' and 'transparent'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-16 18:03:40 -07:00
Leonardo de Moura
4b51d50ad4 fix(frontends/lean/elaborator): coercion overloading 2014-09-16 15:12:20 -07:00
Leonardo de Moura
dffe9a6f17 fix(frontends/lean/elaborator): more robust support for coercions to
function-class that contains implicit arguments
2014-09-16 13:08:34 -07:00
Leonardo de Moura
d0d23eb525 fix(frontends/lean/inductive_cmd): improve name resolution in inductive
command

The new test demonstrates the problem being fixed by this commit
2014-09-16 09:48:51 -07:00
Soonho Kong
2a8ddf055b fix(emacs/lean-option): fix lean-get-options 2014-09-15 17:44:24 -07:00
Soonho Kong
aa9fe958a9 feat(emacs/lean-debug): add lean-debug minor-mode
close #177
2014-09-15 16:50:35 -07:00
Leonardo de Moura
af2c3b1815 fix(frontends/lean/info_manager): bug in save_environment_options,
server was displaying old results
2014-09-15 16:05:17 -07:00
Leonardo de Moura
93e83baa1b fix(frontends/lean/parser): commit_upto invocation after 'import' 2014-09-15 16:05:17 -07:00
Leonardo de Moura
feb4993f9c fix(frontends/lean/server): '[anonymous]' entry being displayed by FINDP
This could happen when there is a declaration (e.g., nat) whose type is
equal to an active namespace.
2014-09-15 16:05:17 -07:00
Soonho Kong
18e6481ce3 test(emacs/lean-option-test): add lean-test-update-string-alist-default 2014-09-15 13:04:53 -07:00
Soonho Kong
b650793b33 feat(lean-option): handle default pp.width option value 2014-09-15 13:04:53 -07:00
Soonho Kong
254d861970 feat(bin/linja): pass -D config option to lean
Close #196
2014-09-15 13:04:13 -07:00
Soonho Kong
2bdc415a34 fix(emacs/lean-option): handle lean-option-string when it's nil 2014-09-15 11:26:53 -07:00
Soonho Kong
11ff7b5d33 feat(lean-mode): enable mmm-parse-when-idle
Related issue: #74
2014-09-15 10:23:38 -07:00
Soonho Kong
f94e28ce39 fix(emacs/lean-mode): disable flycheck-lua inside of lean-mode
Related issue: #74
2014-09-15 10:23:31 -07:00
Soonho Kong
c3d39938ac test(emacs): add lean-option-test 2014-09-15 09:48:33 -07:00
Soonho Kong
4bbfe4ec79 feat(emacs/lean-tags): add lean-global-search
close #170
2014-09-15 09:48:33 -07:00
Soonho Kong
ff6862f587 fix(emacs/lean-mode): pass lean-options to lean-execute
Related issue: #196
2014-09-15 09:48:26 -07:00
Soonho Kong
75ab5e07d6 feat(emacs/lean-option): save lean-options to lean-global-option-alist 2014-09-15 09:46:06 -07:00
Soonho Kong
f25f9a8fab fix(emacs/lean-mmm-lua): add 'insert' for mmm-insert-region (C-c % l)
Related issue: #74, https://github.com/flycheck/flycheck/issues/349, https://github.com/purcell/mmm-mode/issues/32
2014-09-15 00:03:21 -07:00
Soonho Kong
1527efb108 fix(emacs/lean-mode): run company-lean--check-prefix before auto-complete
fix #191
2014-09-14 23:15:24 -07:00
Soonho Kong
27b20c5585 fix(emacs/lean-company): fix auto-complete behavior after tab
fix #192
2014-09-14 23:15:24 -07:00
Soonho Kong
81ecbb4c94 fix(emacs/lean-company): import auto complete bug
fix #189
2014-09-14 23:15:24 -07:00
Soonho Kong
d424cdd336 feat(emacs/lean-company): add custom-variable lean-company-type-foreground
Close #190
2014-09-14 23:15:24 -07:00
Soonho Kong
87ad568ae6 fix(emacs/CMakeLists.txt): add all *.el files when install 2014-09-14 23:15:24 -07:00
Soonho Kong
50213fc664 fix(emacs/Makefile): add missing Makefile 2014-09-14 23:14:42 -07:00
Soonho Kong
df588d6ba0 fix(lean-flycheck): make column optional when detecting error/messages
fix #194
2014-09-14 23:14:42 -07:00
Leonardo de Moura
d47412d201 fix(frontends/lean/parser): error line numbers for lua code, fixes #194 2014-09-14 21:03:09 -07:00
Leonardo de Moura
841658ec37 feat(library/error_handling): generate valid line and column information
when in flycheck mode
2014-09-14 20:15:22 -07:00
Leonardo de Moura
edcbe6fe10 feat(frontends/lean): allow multiple coercions from class A to B, closes #187
See new tests (for examples)
tests/lean/run/coe10.lean
tests/lean/run/coe11.lean
tests/lean/run/coe9.lean

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-14 12:59:43 -07:00
Leonardo de Moura
1b6d4460e9 chore(library/coercion): cleanup 2014-09-14 12:59:43 -07:00
Soonho Kong
765d9b032f feat(src/cmake/modules/CleanOlean.cmake): add CleanOlean.cmake
Instead of using 'find -delete', use CMAKE's FILE GLOB_RECURSE and FILE
REMOVE to implement clean-olean.

Related issue: #166
2014-09-14 01:40:21 -07:00
Soonho Kong
2d29d6d319 feat(emacs/lean-company): auto-completion for import
Close #126
2014-09-14 00:00:25 -07:00
Soonho Kong
bf9ff192ca chore(emacs/README.md): add 'f' as a required package for lean-mode 2014-09-13 23:35:38 -07:00
Leonardo de Moura
d647954f93 feat(frontends/lean/elaborator): constraints associated with 'proof-qed'
blocks are solved independently, closes #82
2014-09-13 10:21:10 -07:00
Leonardo de Moura
8c8c9d1c4a feat(frontends/lean/elaborator): cleanup and remove unnecessary code 2014-09-12 17:55:27 -07:00
Leonardo de Moura
0c50517058 refactor(frontends/lean/elaborator): do not save/restore cache 2014-09-12 17:39:11 -07:00
Leonardo de Moura
6db46e0505 fix(frontends/lean/server): std::unordered_map::insert does replace
existing entry, fixes #188
2014-09-12 16:50:06 -07:00
Leonardo de Moura
b7023ce1d8 fix(frontends/lean/placeholder_elaborator): do not truncate stream of
solutions during class-instance resolution, closes #183

For example, in theorem inverse_unique at category.lean, implicit
arguments are synthesized for inverse_compose. The first solution H' is
not good, and produces a type incorrect solution
2014-09-12 16:12:23 -07:00
Leonardo de Moura
b482f27543 fix(util/lazy_list): bug in filter operation 2014-09-12 16:12:23 -07:00
Leonardo de Moura
b7dcb8f833 fix(frontends/lean/elaborator): remove annotation left-over 2014-09-12 16:12:23 -07:00
Soonho Kong
563cfa73ec feat(emacs/lean-changes): handle before/after-revert 2014-09-12 14:25:08 -07:00
Soonho Kong
27ae03878c refactor(emacs/lean-server): rename flush-changed-lines to server-flush-changed-lines 2014-09-12 14:25:08 -07:00
Soonho Kong
c034c54f50 refactor(emacs/debug): rename lean-server-debug to lean-debug 2014-09-12 14:25:08 -07:00
Leonardo de Moura
029acbd1df feat(library/coercion): better support for coercions to function-class. closes #185 2014-09-12 13:17:20 -07:00
Leonardo de Moura
62585f1c56 fix(library/coercion): remove spurious '\n' 2014-09-12 13:08:47 -07:00
Leonardo de Moura
a2e36e97f2 fix(frontends/lean/builtin_cmds): allow coercion command inside section, fixes #186 2014-09-12 12:13:29 -07:00
Leonardo de Moura
010ecebfea feat(frontends/lean): add proof-qed expression
Remark: we still have to add support to it in the elaborator.
Right now, it is just an embellished parenthesis.
2014-09-11 18:14:49 -07:00
Leonardo de Moura
7ffe73b8ca fix(frontends/lean): name clash inside section, fixes #181 2014-09-11 16:37:23 -07:00
Leonardo de Moura
85f7132efe feat(frontends/lean/placeholder_elaborator): perform class-instance resolution in a completely independent unifier object, it also triggers the resolution when expected type does not contain metavariables, closes #175, closes #173, closes #68 2014-09-11 14:49:35 -07:00
Leonardo de Moura
03902d4b45 refactor(library/unifier): add option m_discard too unifier, if m_discard == false, then unsolved flex-flex constraints are returned, the unifier also does not apply "last resource" techniques that may miss many solutions. 2014-09-11 14:49:35 -07:00
Leonardo de Moura
935ba35292 feat(library/unifier): keep normalization result when processing universe level unification constraints 2014-09-11 14:49:35 -07:00
Leonardo de Moura
c7c35becb2 feat(library/io_state): add default constructor to io_state 2014-09-11 14:49:35 -07:00
Leonardo de Moura
80fd14b39e refactor(frontends/lean): replace collect_metavars with metavar_closure helper class 2014-09-11 14:49:35 -07:00
Soonho Kong
b31edb2cee fix(emacs/lean-company): pass dummy continuation for WAIT 2014-09-11 13:46:07 -07:00
Soonho Kong
0b507777f9 fix(emacs/lean-company): repaint background in the candidate only when required 2014-09-11 13:44:54 -07:00
Soonho Kong
389fe02597 fix(emacs/lean-server): handle modified buffer only when process start 2014-09-11 12:40:10 -07:00
Soonho Kong
733c0e4a77 chore(emacs/lean-server): make trace-mode and debug-mode non-local vars 2014-09-11 12:34:23 -07:00
Soonho Kong
89f38b3945 test(emacs/features): add ecukes template 2014-09-11 12:33:49 -07:00
Soonho Kong
2ba43f1432 refactor(emacs): move tests in *.el files to 'test' directory 2014-09-11 12:29:32 -07:00
Soonho Kong
45b7327d63 doc(emacs/README.md): add contribution section 2014-09-11 12:29:00 -07:00
Soonho Kong
c879b2ce6d chore(emacs/Cask): add ert-runner, ecukes 2014-09-11 11:12:05 -07:00
Soonho Kong
4b556a41ed feat(emacs/lean-server): async task queue holds type of cmds as well 2014-09-11 04:09:21 -07:00
Soonho Kong
565402f3d6 feat(lean-server): handle signals (error/quit) in continuations
Related with #158
2014-09-11 04:07:50 -07:00
Soonho Kong
5b28480809 chore(emacs/lean-server): send signal info to lean-server-trace 2014-09-11 04:04:20 -07:00
Soonho Kong
92f8a22ea1 fix(emacs/lean-company): send dummy continuation when send wait 2014-09-11 04:03:23 -07:00
Leonardo de Moura
1e5ba9bd75 refactor(frontends/lean/elaborator): move coercion_elaborator to its own module 2014-09-10 16:42:49 -07:00
Leonardo de Moura
6bc41f8dde refactor(frontends/lean/elaborator): move placeholder_elaborator to its own module 2014-09-10 16:42:49 -07:00
Leonardo de Moura
9ce356e515 refactor(frontends/lean/local_context): do not use references in the local context 2014-09-10 16:42:49 -07:00
Soonho Kong
63c0510a05 feat(emacs/lean-tags): detect and support multiple TAGS
Close #170
2014-09-10 16:38:36 -07:00
Soonho Kong
1ea8b66a39 fix(emacs/lean-company): enable auto-complete when prefix length >= 1
[skip ci]
2014-09-10 16:21:44 -07:00
Soonho Kong
1c5497e632 feat(emacs/lean-project): add lean-project-create to imenu
Related with #170
2014-09-10 15:19:11 -07:00
Soonho Kong
b05ca1db0f fix(emacs/lean-tags): handle exceptions from find-tag 2014-09-10 14:14:42 -07:00
Soonho Kong
b51e8dd1b9 fix(emacs/lean-server): respect order of messages in check-buffer-and-partition 2014-09-10 14:14:42 -07:00
Soonho Kong
7c4debd1d1 feat(emacs/lean-server): handle modified buffer when send VISIT cmd
Close #159
2014-09-10 14:14:42 -07:00
Leonardo de Moura
669b1bff45 refactor(frontends/lean/elaborator): rename choice_elaborator to choice_iterator and move to separate module 2014-09-10 11:20:16 -07:00
Leonardo de Moura
e128610711 chore(tests): use option -t 100000 to speedup tests 2014-09-10 11:20:16 -07:00
Leonardo de Moura
4a4de27a6c refactor(frontends/lean/elaborator): move local_context to separate file 2014-09-10 11:20:16 -07:00
Leonardo de Moura
4ea322febc chore(frontends/lean/elaborator): minor cleanup 2014-09-10 11:20:16 -07:00
Soonho Kong
cab1811927 feat(emacs/lean-server): print out signal event to debug buffer 2014-09-10 09:07:16 -07:00
Leonardo de Moura
b82092a123 fix(frontends/lean/parser): segmentation fault after REPLACE, fixes #172 2014-09-10 08:39:39 -07:00
Soonho Kong
8fd938e142 fix(util/lean_path.cpp): get_exe_location follows symbolic link in OSX
Previously, we had different behaviors on Linux and OSX when
get_exe_location finds a location of executable:

 - Linux: follow symbolic link
 - OSX: not follow symbolic link
2014-09-10 07:41:14 -07:00
Leonardo de Moura
570879b55f feat(frontends/lean): add declaration to namespace without opening it, closes #161 2014-09-09 18:02:14 -07:00
Leonardo de Moura
e856a268a2 fix(frontends/lean): OVERLOAD info for overloaded notation, fixes #132 2014-09-09 17:44:19 -07:00
Leonardo de Moura
c92a9b8808 fix(frontends/lean/class): take whnf into account in add_instance 2014-09-09 16:09:05 -07:00
Leonardo de Moura
38058450d4 fix(frontends/lean/elaborator): whnf may produce assertion violation if term contains free variables 2014-09-09 16:09:05 -07:00
Soonho Kong
27fa0d0ae3 doc(emacs/README.md): update required/optional packages 2014-09-09 15:11:58 -07:00
Soonho Kong
60d14b50ab feat(emacs/lean-require): check lean-mode dependencies in initialization
Close #91
2014-09-09 15:11:57 -07:00
Soonho Kong
961dccf279 feat(emacs/Cask): add Cask file
Close #92
2014-09-09 15:11:57 -07:00
Leonardo de Moura
47e02342bb feat(frontends/lean/elaborator): use whnf in class-instance resolution, closes #160 2014-09-09 15:04:44 -07:00
Leonardo de Moura
bd1bc336fb feat(library/coercion): add simple trick for defining coercions to function-class in a convenient way, closes #31 2014-09-09 14:36:36 -07:00
Leonardo de Moura
abdd784729 feat(shell): start 'lean --server' with 'pp.beta = true' 2014-09-09 14:13:35 -07:00
Leonardo de Moura
2d94584816 feat(frontends/lean/pp): add 'pp.beta' option, closes #154 2014-09-09 14:10:20 -07:00
Leonardo de Moura
65000fa653 feat(library/coercion): rename class to 'coercions' 2014-09-09 14:03:45 -07:00
Soonho Kong
ba6dc59d5f fix(emacs/lean-server): missing 'rx' at the beginning of regex 2014-09-09 13:47:09 -07:00
Soonho Kong
70dcc2e122 fix(emacs): use looking-at instead of char-after 2014-09-09 13:22:58 -07:00
Soonho Kong
85bd112a37 fix(emacs/lean-company): color problem when showing auto-complete candidates 2014-09-09 13:22:58 -07:00
Soonho Kong
c26f39b86e feat(emacs/lean-company): "c-u TAB" asks filter for FINDG 2014-09-09 13:22:58 -07:00
Leonardo de Moura
ee196bbf1a fix(frontends/lean/pp): pretty printing coercions to functions, fixes #151 2014-09-09 12:49:32 -07:00
Leonardo de Moura
d8caa294b5 fix(frontends/lean/parser): configuration options defined in a context are transient, fixes #162
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-09 11:02:54 -07:00
Leonardo de Moura
0505be2aca feat(frontends/lean/server): unifier maximum number of steps error in FINDG, closes #155
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-09 10:36:41 -07:00
Leonardo de Moura
53292d8297 feat(frontends/lean/server): add timebound to WAIT command, closes #156
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-09 10:28:47 -07:00
Leonardo de Moura
187661aa6a feat(library/unifier): consider whnf case-split on flex-rigid constraints whenever the rhs contains a local constant that is not in the lhs 2014-09-09 09:27:26 -07:00
Leonardo de Moura
a5698a55ec fix(library/unifier): catch type error when checking is_def_eq of type incorrect expressions 2014-09-09 09:27:26 -07:00
Leonardo de Moura
fd85d4702e refactor(library/unifier): move all_local outside of the class 2014-09-09 09:27:26 -07:00
Leonardo de Moura
ebde1bcfad feat(library/unifier): option 'unifier.computation true' will force elaborator to always consider an extra case-split when the right-hand-side of a flex-rigid constraint is not in weak-head-normal-form 2014-09-09 09:27:26 -07:00
Leonardo de Moura
d9afb3ca96 fix(frontends/lean/elaborator): missing constraint 2014-09-09 09:27:26 -07:00
Leonardo de Moura
4088cdc139 chore(frontend/lean/pp_options): use consistent name convention for pp option names 2014-09-09 09:27:26 -07:00
Soonho Kong
b460c02017 feat(emacs/lean-mode): add imenu support
Close #97
2014-09-09 09:04:31 -07:00
Soonho Kong
4eb8a9b192 feat(emacs/lean-flycheck): "real" .clean file instead of "flycheck_real.clean"
Fix #140
2014-09-08 23:49:02 -07:00
Soonho Kong
a9be084b1c feat(emacs/lean-settings): add lean-flycheck-pp-width and lean-flycheck-max-messages-to-display 2014-09-08 18:44:22 -07:00
Soonho Kong
3682ca32d2 feat(emacs/lean-company): call FINDG if cursor is at "_" 2014-09-08 16:04:20 -07:00
Soonho Kong
4f604544c4 feat(emacs/lean-cmd): add WAIT command 2014-09-08 16:04:19 -07:00
Soonho Kong
c88bfc0c02 chore(frontends/lean/server.cpp): add BEGIN/END for WAIT command 2014-09-08 16:04:19 -07:00
Soonho Kong
bc640510aa feat(emacs/lean-cmd): add FINDG cmd 2014-09-08 16:04:19 -07:00
Soonho Kong
0ac1ec1de3 feat(emacs/lean-settings): add lean-show-only-type-in-parens
Fix #135
2014-09-08 11:39:40 -07:00
Soonho Kong
a40894a712 fix(emacs/lean-tags): pass lean-flycheck-checker-options properly
Fix #153
2014-09-08 11:27:04 -07:00
Soonho Kong
c365f6b9ab fix(emacs/lean-company): only activate auto-completion when TAB is pressed 2014-09-08 10:52:22 -07:00
Soonho Kong
6c483467dd feat(emacs/lean-company): replace ?M in AC candidate with M and colorize
close #149
2014-09-08 09:47:51 -07:00
Leonardo de Moura
11addbb594 fix(frontend/lean/server): auto completion doesn't use prefix, fixes #147 2014-09-08 08:04:04 -07:00
Leonardo de Moura
b4793df653 feat(frontends/lean): rename '[fact]' to '[visible]'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-08 07:47:42 -07:00
Leonardo de Moura
cbdfb0dcdc feat(frontends/lean/elaborator): (Pi/forall) intro in class inference, closes #77 2014-09-07 19:59:34 -07:00
Leonardo de Moura
2631979f5c fix(library/scoped_ext): section/context should not affect namespace 2014-09-07 19:59:34 -07:00
Soonho Kong
5c89e70a23 fix(emacs/lean-server): use process-query-on-exit-flag to kill
lean-server automatically on exit

To fix a problem mentioned in #147
2014-09-07 22:29:09 -04:00
Leonardo de Moura
da701eb6de fix(frontends/lean/elaborator): bug in recent change 2014-09-07 19:08:31 -07:00
Soonho Kong
fc2fbc41bb chore(emacs/lean-info): fix a bug passing a wrong argument 2014-09-07 18:44:11 -07:00
Leonardo de Moura
fea516af24 feat(frontends/lean/elaborator): allow Pi/forall local instances 2014-09-07 18:16:33 -07:00
Leonardo de Moura
c378a58cc2 feat(frontends/lean): add [class] modifier for inductive datatypes as a shortcut for 'class' command. 2014-09-07 18:16:33 -07:00
Soonho Kong
ba35ca5300 feat(emacs/lean-company): add company-lean--need-autocomplete
This one partially addresses #150.
2014-09-07 17:32:06 -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
Soonho Kong
6b5e67e063 fix(emacs/lean-info): fix eldoc-error at end of buffer 2014-09-07 11:40:28 -07:00
Leonardo de Moura
6d2df80a17 feat(frontends/lean/server): use '?a' instead of '?M_i' for implicit arguments when displaying FINDP and FINDG matches
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-07 09:36:03 -07:00
Leonardo de Moura
1bc31d7df0 feat(frontends/lean/server): instantiate implicit arguments with metavariables when generating FINDP and FINDG output 2014-09-06 13:17:26 -07:00
Leonardo de Moura
87d7391d7a fix(frontends/lean/server): do not fail if file does not exist in 'VISIT file'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-06 12:34:20 -07:00
Leonardo de Moura
5549295c47 fix(frontends/lean/inductive_cmd): bug when elaborating inductive tyoe parameters
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-06 11:38:32 -07:00
Leonardo de Moura
bbff564a1c feat(frontends/lean): persistent notation in sections
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-06 11:14:20 -07:00
Leonardo de Moura
d6491399b9 fix(emacs/lean-syntax): weird syntax-hightlight problem" 2014-09-06 10:49:16 -07:00
Soonho Kong
6b5831d894 feat(emacs/lean-info): show extra-type info for expr in parens
Close #135
2014-09-06 09:26:11 -07:00
Soonho Kong
d793b09c0f feat(emacs/lean-cmd): extend info to have column-number 2014-09-06 09:26:11 -07:00
Leonardo de Moura
3bbbd43b03 chore(emacs): minor adjustments to synthax hightlight and input mode
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-06 08:32:05 -07:00
Soonho Kong
303b86e165 refactor(emacs/lean-flycheck): clean up unused code 2014-09-05 23:08:19 -07:00
Soonho Kong
0476591992 fix(emacs/lean-company): override company--window-width
Override 'company--window-width' to be 0.95 * window-body-width.
This partially solves the problem of issue #137.
2014-09-05 23:08:19 -07:00
Soonho Kong
bd17d07ebc fix(emacs/lean-server): limit the number of NAY retries
Also, only retry when there is no continuation other than the current
one.
2014-09-05 23:08:19 -07:00
Leonardo de Moura
bdb91f6783 feat(frontends/lean/server): give preference to prefix matches
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-05 21:57:35 -07:00
Leonardo de Moura
629feb77ef feat(frontends/lean/server): ingore keywords and commands in FINDP
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-05 20:59:14 -07:00
Leonardo de Moura
b5f595c432 fix(frontends/lean/inductive_cmd): bugs when declarating inductive datatypes in sections, fixes #141, fixes #142
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-05 19:17:09 -07:00
Soonho Kong
e4a687c5ea fix(emacs/lean-tags): use the same linja option for tags-gen and flycheck 2014-09-05 19:11:49 -07:00
Leonardo de Moura
8610330cc4 chore(emacs/lean-syntax): highlight 'import/section/end/namespace/open' arguments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-05 18:38:41 -07:00
Leonardo de Moura
d48dbccb00 fix(shell): allow multiple spaces after -D option
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-05 18:07:54 -07:00
Leonardo de Moura
a8361f128f feat(frontends/lean/server): sort fuzzy matches by number of errors
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-05 18:03:04 -07:00
Leonardo de Moura
f1436d78ca feat(frontends/lean/server): using fuzzy matching 2014-09-05 18:01:18 -07:00
Leonardo de Moura
a31a25798c feat(util): add fuzzy string search procedure 2014-09-05 18:01:09 -07:00
Soonho Kong
f958e534bd feat(emacs/lean-settings): pass 'pp.width' to lean via linja
Close #28
2014-09-05 16:35:01 -07:00
Soonho Kong
50f16ad591 feat(emacs/lean-flycheck): delete flycheck temporaries after check
Close #140
2014-09-05 16:09:45 -07:00
Soonho Kong
a1e00bb216 refactor(emacs/lean-server): restructure async queue handling routine 2014-09-05 16:09:45 -07:00
Soonho Kong
a72df90022 feat(emacs/lean-server): add debug-mode, trace-mode 2014-09-05 15:33:59 -07:00
Soonho Kong
70ac5ec15e feat(emacs/README.md): add instruction for unicode font 2014-09-05 15:33:59 -07:00
Soonho Kong
e77966932d feat(emacs/lean-server): scroll debug buffer 2014-09-05 15:33:59 -07:00
Soonho Kong
db60a56056 feat(emacs/lean-company): truncate string if it's longer than 90% of window-width
Also add "..." in the end

Close #137
2014-09-05 08:49:05 -07:00
Soonho Kong
3b574ef31d feat(emacs/lean-server): kill the server before emacs exit
Close #138
2014-09-05 07:49:19 -07:00
Soonho Kong
37e514e114 feat(emacs/lean-tags): block emacs until ltags finishes 2014-09-05 06:59:02 -07:00
Soonho Kong
fc364566bf feat(emacs/lean-company): truncate type info in auto-complete
Close #137
2014-09-05 06:59:02 -07:00
Soonho Kong
64bae94d3a fix(emacs/lean-company): enable auto-complete if prefix has '.' or '_' 2014-09-05 06:59:02 -07:00
Soonho Kong
3ba4e553fe refactor(emacs/lean-server): clean up 2014-09-05 06:59:01 -07:00
Leonardo de Moura
898021c1b8 fix(frontends/lean/server): cleanup info in modified line 2014-09-05 01:36:17 -07:00
Leonardo de Moura
613c035ff8 fix(frontends/lean): missing pre_info for type incorrect declarations
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-05 01:12:08 -07:00
Leonardo de Moura
5fa1c0a5fb feat(frontends/lean/server): take current namespace into account when processing FINDP command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-05 00:40:34 -07:00
Leonardo de Moura
6632a50015 refactor(library): add namespaces 'or', 'and' and 'iff'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 21:25:21 -07:00
Leonardo de Moura
364bba2129 feat(frontends/lean/inductive_cmd): prefix introduction rules with the name of the inductive datatype
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 17:26:36 -07:00
Soonho Kong
0652198eca feat(emacs/lean-server): add sync/async send-cmd 2014-09-04 16:32:08 -07:00
Soonho Kong
cc89cd051a feat(emacs/lean-company): add lean-company 2014-09-04 16:32:07 -07:00
Soonho Kong
e7f6228001 feat(emacs): use lean-server-send-cmd-async 2014-09-04 16:32:07 -07:00
Soonho Kong
677f4af801 feat(emacs/lean-server): add debug print 2014-09-04 16:32:07 -07:00
Soonho Kong
2fa8c1c709 chore(emacs/lean-info): fix indentation 2014-09-04 16:32:07 -07:00
Soonho Kong
cae2ab7dfb feat(emacs/lean-cmd): add FINDP cmd 2014-09-04 16:32:07 -07:00
Leonardo de Moura
8743394627 refactor(kernel/inductive): replace recursor name, use '.rec' instead of '_rec'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 15:04:57 -07:00
Leonardo de Moura
ffc871ea8c feat(frontends/lean/server): only display 'EXTRA_TYPE' info when the column number is provided to the 'INFO' command, closes #133
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 14:02:53 -07:00
Leonardo de Moura
37c36e8b4e feat(shell): add -D command line option for setting configuration options, closes #130
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 13:33:00 -07:00
Leonardo de Moura
d75a4739e4 refactor(util/name): move string_to_name to name module 2014-09-04 13:09:42 -07:00
Leonardo de Moura
b5b68613b1 feat(shell): remove '--server' command line option when compiling with -DMULTI_THREAD=OFF
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 12:43:14 -07:00
Leonardo de Moura
de8a71bc5b perf(frontends/lean): do not create extra_info annotation when we are not collecting info
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 11:25:41 -07:00
Leonardo de Moura
d76218e9d1 fix(frontends/lean/elaborator): bug when elaborating expressions with multiple annotations
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 11:23:58 -07:00
Leonardo de Moura
9876d07094 chore(frontends/lean): use consistent filename convention
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 09:59:24 -07:00
Leonardo de Moura
b94ec07b29 feat(frontends/lean): associate type information with left '('
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 09:56:27 -07:00
Leonardo de Moura
c532dcfaac feat(library/declaration_index): add 'a|abbreviation-name|declaration-name' entries in .ilean files 2014-09-04 09:30:25 -07:00
Leonardo de Moura
d3ec5ccac1 refactor(library/declaration_index): store declarations in a map
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 07:42:18 -07:00
Leonardo de Moura
f9a90b9920 feat(frontends/lean): add 'export' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 18:37:01 -07:00
Leonardo de Moura
5e18e6609c feat(frontends/lean): add 'as' clause to 'open' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 17:37:02 -07:00
Leonardo de Moura
e51c4ad2e9 feat(frontends/lean): rename 'using' command to 'open'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 16:00:38 -07:00
Leonardo de Moura
6a6f6ed439 feat(emacs/lean-syntax): add syntax-highlight for declaration modifiers
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 15:26:21 -07:00
Leonardo de Moura
e14814d4bf feat(frontends/lean): add '[protected]' modifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 15:01:13 -07:00
Leonardo de Moura
5a203d1c75 feat(frontends/lean): add '?' for inspecting the type of any expression, it produces a EXTRA_TYPE info entry
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 11:54:42 -07:00
Leonardo de Moura
9702a66a29 feat(frontends/lean/server): use alias (if available) in FINDG command output
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 11:54:42 -07:00
Soonho Kong
327e3a58bf fix(emacs/lean-info): print stale when info is available
fix #127
2014-09-03 10:28:37 -07:00
Soonho Kong
25a48be470 feat(emacs/lean-info): improve coercion display
close #124
2014-09-03 10:12:18 -07:00
Soonho Kong
fdc20800ca chore(emacs/lean-server): clean up debugging message 2014-09-03 10:12:17 -07:00
Leonardo de Moura
ef1912eddf feat(frontends/lean): improve COERCION info
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 09:34:13 -07:00
Leonardo de Moura
8c3d839968 feat(frontends/lean/server): add FINDG command (find declarations that can be used to fill a placeholder)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 08:57:57 -07:00
Leonardo de Moura
060093cbab refactor(library): add type_util module, and move get_expect_num_args to it
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 08:40:03 -07:00
Soonho Kong
e802883b03 feat(emacs/lean-option): show the current value of an option
close #125
2014-09-03 08:09:41 -07:00
Soonho Kong
975841e53b feat(emacs): use lexical scope for lean-info and lean-server 2014-09-03 00:54:42 -07:00
Soonho Kong
b25288545e feat(emacs/lean-info): add coercion and stale in type info
Close #124
2014-09-03 00:50:31 -07:00
Soonho Kong
88410bf278 feat(emacs/lean-server): support SHOW and VALID
Implement lean-server-show and lean-server-valid functions.

Close #116
2014-09-03 00:50:31 -07:00
Soonho Kong
72e1dfa296 feat(emacs): implement non-blocking communication
The key idea is to pass a continuation function when we call
lean-server-send-cmd function. The passed continuation function is
called by lean-server-event-handler. Until the buffer is ready, the
event handler will be called in interval (lean-server-retry-time, 0.1
sec by default). When we have 'NAY' for INFO command, it will re-send
INFO commands to lean-server until we have one without 'NAY'.

Close #123
2014-09-03 00:50:31 -07:00
Soonho Kong
53390faebc chore(emacs/lean-mode): remove lean-tab function 2014-09-03 00:50:31 -07:00
Leonardo de Moura
36674eb8d9 feat(frontends/lean/server): add NAY and STALE status to --BEGININFO
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 19:04:01 -07:00
Leonardo de Moura
974a0a4217 feat(frontends/lean/elaborator): generate COERCION info
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 18:39:06 -07:00
Leonardo de Moura
24fc89ff70 refactor(frontends/lean/server): move option display_value to option_declarations
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 17:42:21 -07:00
Leonardo de Moura
b8c34eceed feat(frontends/lean/server): display current option value instead of default value
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 17:29:49 -07:00
Leonardo de Moura
40cd50b1ca fix(frontends/lean/pp): add necessary '@' when pp.implicit is true, otherwise produced output will not even type check
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 17:11:26 -07:00
Leonardo de Moura
fc0f12101c fix(frontends/lean/pp): bug when pretty printing arrows
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 15:55:14 -07:00
Soonho Kong
78437331c2 fix(emacs/lean-syntax.el): highlight "parameter (" properly
fix #122
2014-09-02 15:09:49 -07:00
Leonardo de Moura
0f9478d91e feat(frontends/lean): add 'class' command back
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 15:04:23 -07:00
Soonho Kong
b05aeb112b fix(emacs/lean-mode): Bind TAB with lean-tab-indent-or-compliete 2014-09-02 17:02:35 -04:00
Leonardo de Moura
bbdb13172e feat(frontends/lean/server): add 'FINDP' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 12:59:48 -07:00
Soonho Kong
b4a80f83af feat(emacs/lean-server): accept "BEGININFO .*" pattern 2014-09-02 10:37:03 -07:00
Soonho Kong
cec2f8e466 feat(emacs/lean-mmm-lua.el): add mmm-mode to syntax-highlight lua code
in lean-mode

Close #74
2014-09-02 10:37:03 -07:00
Soonho Kong
a08ad99dba feat(emacs/lean-cmd): add lean-clear-cache
Close #99
2014-09-01 22:58:52 -07:00
Leonardo de Moura
87926b774f fix(frontends/lean/info_manager): user provided options override saved options, fixes #119
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-01 18:44:43 -07:00
Soonho Kong
50465a2d06 feat(emacs/lean-option): provide candidates and validation for lean-set-option
Close #106
2014-09-01 18:31:12 -07:00
Soonho Kong
fc2cbbe216 chore(emacs/lean-mode): add package info 2014-09-01 18:28:15 -07:00
Soonho Kong
246d4224bc feat(emacs/lean-tags): call "linja TAGS" to make TAGS
fix #117
2014-08-30 14:58:48 -07:00
Soonho Kong
26d548a069 feat(emacs/lean-mode): add lean-tab-indent-or-complete
Close #105
2014-08-30 14:57:34 -07:00
Soonho Kong
d393771d8a feat(emacs/eri.el): add eri.el (from agda mode) 2014-08-30 14:57:34 -07:00
Leonardo de Moura
b7d7f12b8e fix(frontends/lean/info_manager): several bugs: invalid flag was not being reset for empty lines, merge with overwrite=false was adding 'poluting' state, --NAY generation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-30 10:35:36 -07:00
Leonardo de Moura
658e0780a6 feat(util/rb_tree): add max (element) method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-30 10:25:12 -07:00
Soonho Kong
a47dada27f feat(emacs/lean-server): add 'SLEEP ms' for trace 2014-08-30 07:51:53 -07:00
Soonho Kong
ad1111cb21 feat(emacs/lean-server): add *lean-server-trace* buffer
Fix #115.
2014-08-30 07:38:12 -07:00
Leonardo de Moura
231039ad26 chore(frontends/lean/inductive_cmd): add auxiliary assertion for debugging
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 22:28:22 -07:00
Soonho Kong
543fdf840e fix(emacs/lean-mode): add comment-start "--"
fix #113
2014-08-29 20:12:22 -07:00
Leonardo de Moura
373bda0c74 fix(frontends/lean/server): in valid line tracking, add 'VALID' command similar to show, but marks invalid lines with a '*'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 18:17:07 -07:00
Leonardo de Moura
cb27407fcb feat(frontends/lean): add SHOW and SLEEP debugging support commands, fixes worker interrupted bug, and LEAN_SERVER_DIAGNOSTIC compilation mode
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 18:17:07 -07:00
Soonho Kong
36c632f48d doc(emacs/README.md): clean up
[skip ci]
2014-08-29 15:22:06 -07:00
Leonardo de Moura
9a4472cff5 fix(frontends/lean): wrong displayed type in proof with multiple sorry's, fixes #112
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 14:32:53 -07:00
Leonardo de Moura
5ebebb30a8 feat(shell): remove --permissive option, closes #107
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 13:26:07 -07:00
Leonardo de Moura
eeffb498b8 feat(frontends/lean/dependencies): send all missing files to standard error, closes #111
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 13:20:25 -07:00
Leonardo de Moura
d7da307f85 feat(frontends/lean/server): add 'OPTIONS' command to 'lean --server'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 12:59:22 -07:00
Leonardo de Moura
bd3fb3489b feat(frontends/lean/dependencies): do not stop computing dependencies at error, compute as many as possible, and sign error in the end
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 12:34:37 -07:00
Leonardo de Moura
3f50fd3ddd feat(build): invoke linja from lean build
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 12:15:07 -07:00
Leonardo de Moura
b9489ce585 fix(frontends/let): let-expression pretty printer
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 10:58:27 -07:00
Soonho Kong
e966aa3145 feat(emacs/lean-settings): use linja for flycheck 2014-08-29 10:31:16 -07:00
Leonardo de Moura
d8548369e7 feat(frontends/lean/pp): improve let-expr pretty printer
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 07:46:58 -07:00
Leonardo de Moura
2ce92feae1 fix(frontends/lean/pp): remove unreachable code: elaborator eliminates typed_expr macros
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 18:30:33 -07:00
Leonardo de Moura
be56fcf0bd fix(frontends/lean/pp): pretty print 'let-expressions', closes #87
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 18:20:58 -07:00
Leonardo de Moura
662345e2af fix(frontends/lean/elaborator): missing '\n' in error message
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 18:17:00 -07:00
Leonardo de Moura
b9628842cf feat(library/unifier): remove mk_macro_imitation, we instead expand the macro before solving flex-rigid constraints
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 17:34:03 -07:00
Leonardo de Moura
1e80a9dfe9 feat(frontends/lean): avoid exponential blowup when processing let-expressions with a lot of sharing, cleanup show-expression
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 16:27:52 -07:00
Leonardo de Moura
79acd3e1b7 fix(kernel/converter): missing case
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 15:21:57 -07:00
Leonardo de Moura
641624a277 fix(library/unifier): bug in expand_rhs
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 14:35:11 -07:00
Leonardo de Moura
e303651dee refactor(library/unifier): cleanup mk_macro_imitation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 13:19:19 -07:00
Leonardo de Moura
d9fa9f1039 feat(src/emacs/lean-syntax.el): add commonly used operators
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 13:03:22 -07:00
Leonardo de Moura
f98ab2a8ff fix(src/emacs/lean-syntax.el): remove obsolete command set_opaque
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 11:16:29 -07:00
Leonardo de Moura
b3615d5c8b fix(src/emacs): add 'begin' reserved keyword
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 09:33:09 -07:00
Leonardo de Moura
823a3a7c56 feat(frontends/lean/server): add ECHO command for debugging purposes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 07:40:02 -07:00
Leonardo de Moura
1a8eb9799e feat(frontends/lean/server): preserve info that occurs in columns before first changed column
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 21:09:52 -07:00
Leonardo de Moura
8df5fc0623 fix(frontends/lean/server): compilation warning
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 17:53:00 -07:00
Leonardo de Moura
8719dff361 fix(frontends/lean): distribute '@' over choice
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 16:31:18 -07:00
Leonardo de Moura
19c14fcca7 refactor(frontends/lean/server): refactor lean info server, closes #90, closes #69
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 14:53:16 -07:00
Leonardo de Moura
c7e9e238ec fix(frontends/lean/server): ignore output produced by worker thread, fixes #98
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 10:46:49 -07:00
Leonardo de Moura
fab4eb0d69 feat(frontends/lean/server): add CLEAR_CACHE command, closes #100
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 10:31:01 -07:00
Leonardo de Moura
f4c7154825 feat(util/lean_path): throws an exception if there is an ambiguity when importing a module
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 10:18:35 -07:00
Leonardo de Moura
9484ab6a04 fix(util/lean_path): if directory 'foo' does not contain 'default.lean', then we should also check whether the file 'foo.lean' exists or not, fixes #102
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 09:04:03 -07:00
Soonho Kong
f8d2ed7936 feat(emacs/lean-type): maintain nay-retry timer 2014-08-27 00:48:55 -07:00
Soonho Kong
224a4feba2 fix(emacs/lean-type): problem with lean-eldoc-nay-retry-time
If (current-idle-time) is non-zero, we need to set a timer to run
eldoc-documentation-function again when idle-time = (current-idle-time)
+ retry-delay.
2014-08-26 23:58:02 -07:00
Soonho Kong
a1a14cf425 fix(emacs/lean-info): handle when both identifier and symbol info exist
Example: library/data/int/basic.lean file (398, 22)

The '+' symbol is attached with both of identifier info and symbol info

-- SYMBOL|398|22
+
-- ACK
-- IDENTIFIER|398|22
int.add
-- ACK
2014-08-26 22:32:57 -07:00
Soonho Kong
b9c1b1e186 fix(emacs/lean-info): type of a symbol at the end of buffer 2014-08-26 22:32:57 -07:00
Leonardo de Moura
dd99e60a00 refactor(frontends/lean/info_manager): store environment+options in the info_manager, fixes #96
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 18:07:09 -07:00
Soonho Kong
1de515f693 feat(emacs/lean-mode): clean up old generic-mode 2014-08-26 17:16:16 -07:00
Soonho Kong
665a8f3ecb feat(emacs/lean-server): handle signal 2014-08-26 17:16:16 -07:00
Soonho Kong
0426d04cb9 feat(emacs/README.md): add elisp which installs required packages 2014-08-26 17:16:16 -07:00
Soonho Kong
83f05e104a fix(emacs/lean-server): fix ERROR regex pattern 2014-08-26 16:22:32 -07:00
Soonho Kong
682b13a906 feat(emacs/lean-mode): run eldoc-documentation-function at openning 2014-08-26 16:22:32 -07:00
Soonho Kong
c77e5c6b34 feat(emacs/lean-tags): try to find TAGS file upward and use it without asking 2014-08-26 16:22:32 -07:00
Soonho Kong
dfab827d22 feat(emacs/lean-tags): attach advice to tag functions to run ltags 2014-08-26 16:22:32 -07:00
Soonho Kong
1f0bfb67b0 feat(emacs/lean-tags): use full-name to look up tags 2014-08-26 16:22:32 -07:00
Soonho Kong
3d3669e45e feat(emacs/lean-mode): add key-bindings, deps 2014-08-26 16:22:32 -07:00
Soonho Kong
dd5231d6a7 fix(emacs/lean-server): check current-file before send EVAL 2014-08-26 16:22:32 -07:00
Soonho Kong
f7ff5ec3d6 fix(emacs/lean-server): when handle dead lean-server 2014-08-26 16:22:32 -07:00
Soonho Kong
5965bcc10b refactor(emacs/lean-server): lean-server-check-current-file takes file-name 2014-08-26 16:22:31 -07:00
Soonho Kong
cc1d44e541 feat(emacs/lean-type): implement lean-set-option and lean-eval-cmd
close #55
2014-08-26 16:22:31 -07:00
Soonho Kong
50063b659b refactor(lean-variable): init server-buffer and current-file-name with nil 2014-08-26 16:22:31 -07:00
Soonho Kong
f82f0377ff feat(emacs/lean-cmd): add cmd-to-string for SET/EVAL 2014-08-26 16:22:31 -07:00
Soonho Kong
292750c4c9 feat(emacs/lean-type): add SET/EVAL commands 2014-08-26 16:22:31 -07:00
Soonho Kong
679a034277 feat(emacs/lean-mode): use define-derived-mode 2014-08-26 16:22:31 -07:00
Soonho Kong
c1ed9b1293 refactor(emacs/lean-type): clean up eldoc-function and fill-placeholder 2014-08-26 16:22:31 -07:00
Soonho Kong
7ea5c9541d feat(emacs/lean-info): use cl-struct lean-info-record 2014-08-26 16:22:31 -07:00
Soonho Kong
ccc1f89f61 refactor(emacs/lean-server): use global-server-message-to-process
We are using asynchronous process mechanism to communicate between
lean-server and emacs. A sender function like
lean-eldoc-documentation-function sends a command and waits until
lean-global-server-message-to-process is non-nil. When a message is
received from lean-server, a filter function lean-server-output-filter
is triggered. This filter function concatenates a received message to
the buffer until it sees the end of message markers (--
END[INFO|SET|EVAL]). When it sees a marker, it splits the buffer
messages into pre, body, and post parts. Then it assembles a message to
process and attaches the message to
lean-global-server-message-to-process variable. A sender function which
is watching for the variable will recognize it, exit the polling, and
process the message.
2014-08-26 16:22:31 -07:00
Soonho Kong
fc44c7242c feat(emacs/lean-settings): add eldoc-use and eldoc-nay-retry-time
close #51
2014-08-26 16:22:31 -07:00
Soonho Kong
10fb60e4dd refactor(emacs/lean-util): remove unused functions
- take-first-n/last-n => use -take, -drop (from dash.el)
 - string-join => use one in flycheck
 - remove other unused functions
2014-08-26 16:22:31 -07:00
Soonho Kong
812934f31f refactor(emacs/lean-flycheck): remove lean-flycheck-initialized 2014-08-26 16:22:31 -07:00
Soonho Kong
495809d86d feat(emacs/lean-syntax): support multi-line comments /- ... -/ 2014-08-26 16:22:30 -07:00
Soonho Kong
c0762333bd feat(emacs/lean-cmd): add set and eval cmds 2014-08-26 16:22:30 -07:00
Leonardo de Moura
b8b5a59117 fix(frontends/lean/info_manager): do not rely on typeid::before, the behavior is a platform specific
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 14:23:12 -07:00
Leonardo de Moura
11711a2409 fix(util/rb_tree): do not use thread local storage in template when compiling on OSX with clang++ without Boost
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 12:46:24 -07:00
Leonardo de Moura
4c9723e5ed fix(library/unifier): assertion violation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 09:07:34 -07:00
Leonardo de Moura
44c597724b fix(frontends/lean): fail if theorem type has metavariables after type elaboration (and before proof elaboration)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 09:01:17 -07:00
Leonardo de Moura
02b7f980b0 fix(library/num): bug in to_pos_num, missing test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 08:18:07 -07:00
Leonardo de Moura
3903be34a4 feat(frontends/lean): process theorem statement independently of proof, thus we have the same behavior in sequential and parallel compilation modes, closes #84
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-25 21:26:17 -07:00
Leonardo de Moura
04d9eb17d1 feat(kernel/conveter): improve support for proof irrelevant in the converter
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-25 11:19:18 -07:00
Leonardo de Moura
82a7de83cc feat(frontends/lean/pp_options): use a more effective get_distinguishing_pp_options
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-25 10:23:28 -07:00
Leonardo de Moura
fbf13994d8 refactor(*): use + for concatenating format objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-24 09:35:25 -07:00
Leonardo de Moura
eb794f7491 refactor(shell): remove obsolete tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 18:12:19 -07:00
Leonardo de Moura
dbaf81e16d refactor(library): remove unnecessary 'standard' subdirectory
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 18:08:09 -07:00
Leonardo de Moura
df60ab4ada fix(frontends/lean/calc): allow calc_subst to be defined for multiple operators, allow calc cmds to be organized into namespaces, fixes #65
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 16:45:04 -07:00
Leonardo de Moura
2f699fa53a feat(*): make sections 'permanent', and add 'transient' contexts, closes #88
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 15:45:15 -07:00
Leonardo de Moura
b13851ba13 feat(frontends/lean): add kind and type to index, closes #89
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 12:39:59 -07:00
Leonardo de Moura
01736bf82a feat(util/sexpr/format): expose flatten
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 12:00:32 -07:00
Leonardo de Moura
e602c4ba49 feat(frontends/lean): change multicomment to /- ... -/
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 17:55:13 -07:00
Leonardo de Moura
c5a44aca44 fix(frontends/lean/elaborator): do not expose type information produced when synthesizing class instances
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 17:07:12 -07:00
Leonardo de Moura
2ada3af405 fix(frontends/lean/info_manager): add instantiate method to synth_info_data, fixes #94
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 15:55:15 -07:00
Leonardo de Moura
a5f0593df1 feat(*): change inductive datatype syntax
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 15:46:10 -07:00
Leonardo de Moura
01000ff7df feat(library): add typed_expr macro
We use it to enforce that a let-variable has the expected type

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 11:26:06 -07:00
Leonardo de Moura
d4ac482d76 refactor(kernel): move annotation to library
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 10:38:10 -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
937c465685 fix(library/unifier): too much reduction
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 21:37:51 -07:00
Leonardo de Moura
07bc0727e2 feat(frontends/lean): 'let [inline]' is the default
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 18:24:22 -07:00
Leonardo de Moura
6cf73b51e2 fix(library/unifier): bug in occurs_check, the dependency may be eliminated by reducing term
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 17:56:18 -07:00
Leonardo de Moura
3498d7ad61 fix(frontends/lean/parser): missing identifier information, fixes #83
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 16:58:25 -07:00
Leonardo de Moura
2071a5986f fix(frontends/lean/server): crash: uninitialized memory
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 16:58:25 -07:00
Leonardo de Moura
bb6dbe0e6f fix(library/unifier): we should preprocess choice constraints before we start solving any constraint, fixes #85
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 16:58:25 -07:00
Leonardo de Moura
725f5ba0a0 feat(frontends/lean): use 'begin-end' instead of 'proof-qed' for blocks of tactics, closes #81
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 16:58:25 -07:00
Soonho Kong
f4dfec548d fix(emacs/lean-mode): add missing flycheck-init 2014-08-21 10:05:14 -07:00
Soonho Kong
39f9826dca fix(emacs/lean-mode): enable company-etags in lean-mode 2014-08-21 10:05:14 -07:00
Soonho Kong
272c463182 fix(emacs/lean-info): temporary fix for NAY problem 2014-08-21 10:05:14 -07:00
Soonho Kong
09b6fb4f7c fix(emacs): roll back to generic mode 2014-08-21 10:05:14 -07:00
Leonardo de Moura
359c72b02f fix(frontends/lean/pp): bug when pretty printing binder information, fixes #73
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-21 09:28:07 -07:00
Soonho Kong
42c2fef0f2 fix(tests/util/sequence.cpp): clang build error 2014-08-20 21:20:17 -07:00
Leonardo de Moura
e5057ed155 fix(library/unifier): remove incorrect assertion, a local constant may occur in the type of a metavariable that was not instantiated yet
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 18:22:43 -07:00
Jeremy Avigad
6264fb52d6 fix(lean/library/standard): fix tests, more cleanup 2014-08-20 18:04:31 -07:00
Leonardo de Moura
f5987b7bda refactor(library/unifier): make it easier to add new options to the unifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 17:30:08 -07:00
Leonardo de Moura
0450e81392 feat(library/unifier): allow computation when solving flex-rigid constraints
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:20 -07:00
Leonardo de Moura
fa342c8ea7 fix(library/unifier): missing set_conflict
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:19 -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
4cf3d32e0c chore(*): create alias for std::pair
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:19 -07:00
Leonardo de Moura
fcf1778ee0 feat(util): add sequence object with O(1) concatenation operation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:19 -07:00
Soonho Kong
51b86b219b feat(emacs/lean): add multi-line comments
This is related with issue #63.

There are two known issues:

 - Emacs behaves as if the multi-line comment start/end symols are "(-"
   and "-)" instead of "(--" and "--)". As a result, it shows all the
   correct lean comments as it is. However, it will show some examples
   such as "(-5)" as a part of comment even if Lean doesn't interpret it
   as it is. Technically, it's because we are using a syntax-table based
   method to define comments. For more information read a documentation
   of 'modify-syntax-entry' function.

 - Somehow, the matching parens are broken. When we type "--)" to close
   a multi-line comment. Emacs warns "Mismatched Parentheses".
2014-08-19 15:03:51 -07:00
Soonho Kong
c27a379f28 feat(emacs): add company mode (via etags) 2014-08-19 15:03:51 -07:00
Leonardo de Moura
f0d50e0d33 feat(frontends/lean): change the name resolution rules: when in a namespace N that defines C, then C always refers to N.C (i.e., it overrides any alias)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-18 18:58:50 -07:00
Leonardo de Moura
08ae17650b feat(frontends/lean): try overloaded notation and declarations in the order they were defined
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-18 18:58:50 -07:00
Leonardo de Moura
919f02983e feat(frontends/lean/elaborator): case-split on coercions that cannot be resolved by postponing
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-18 18:58:50 -07:00
Leonardo de Moura
4a96fefd96 fix(library/unifier): bug in unifier priority queue
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-18 18:58:50 -07:00
Soonho Kong
608b66c323 fix(emacs/lean-server): check buffer-modified-p before create a process
fix #57
2014-08-18 14:18:11 -07:00
Soonho Kong
7a8796a4ca feat(emacs/lean-info): add identifier/symbol/nay 2014-08-18 14:17:44 -07:00
Soonho Kong
ea4cfe5e7d refactor(emacs/lean-type): clean up 2014-08-18 13:34:13 -07:00
Soonho Kong
46013b6ad2 feat(emacs): define lean-mode as a derived-mode of prog-mode
Fix #52
2014-08-18 13:32:58 -07:00
Soonho Kong
5fa2b9c057 fix(emacs/lean-util): add missing 'cl-' prefix 2014-08-17 18:09:01 -07:00
Leonardo de Moura
05b0f24cb5 fix(frontends/lean/decl_cmds): improve error message for invalid end of theorem
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 17:03:54 -07:00
Leonardo de Moura
92ab2dac83 chore(frontends/lean/server): remove leftover
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 16:12:31 -07:00
Leonardo de Moura
3d8477f7de fix(library/module): ignore multiple declarations of 'sorry', fixes #59
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 15:55:58 -07:00
Leonardo de Moura
dcc8f4e4fc feat(frontends/lean/elaborator): generate identifier information for overloaded identifiers
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 15:18:51 -07:00
Leonardo de Moura
0073ddf583 feat(frontends/lean): add 'SYMBOL' and 'IDENTIFIER' information to info_manager
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 15:06:46 -07:00
Leonardo de Moura
55b0a03e3d refactor(frontends/lean/info_manager): to allow cache to be used when producing info data, fixes #37, closes #45
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 12:16:32 -07:00
Leonardo de Moura
c6600bdaf4 refactor(frontends/lean/info_manager): intrusive smart pointer for info_data
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 08:28:02 -07:00
Leonardo de Moura
5bc62f0ba9 fix(library/coercion): error message
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-17 06:59:52 -07:00
Leonardo de Moura
1436212a34 fix(library/unifier): use depth-first search strategy for solving class-instance constraints
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-16 13:51:24 -07:00
Soonho Kong
030eec1d06 feat(emacs): add lean-complete-tag (tab) 2014-08-15 21:30:47 -07:00
Soonho Kong
483bae0b97 feat(emacs): add lean-find-tag (M-.) 2014-08-15 21:24:34 -07:00
Leonardo de Moura
008b43d92a refactor(frontends/lean/info_manager): add method info_data::compare
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 18:09:31 -07:00
Leonardo de Moura
14d6b6d043 fix(frontends/lean/inductive_cmd): generate index for inductive decls, introduction rules, and recursor/eliminator
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 18:02:41 -07:00
Leonardo de Moura
8d4e27461c feat(frontends/lean/server): use separate thread for processing requests in server mode, interrupt whole parser when on interruption (when collecting information)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 17:24:37 -07:00
Leonardo de Moura
56a81eda6e fix(frontends/lean/elaborator): uninit variable
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 16:39:21 -07:00
Leonardo de Moura
dc1613f535 feat(frontends/lean): annotate 'notation' subterms with 'noinfo' annotation (goal: improve typeinfo generation); fix initialization problem (with annotations)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 15:07:14 -07:00
Leonardo de Moura
670bfe24f5 chore(build): remove hott library directory, and move hott tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 13:30:56 -07:00
Leonardo de Moura
6a6c9f472e feat(frontends/lean): add synthesis information only for 'explicit' placeholder
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 12:48:36 -07:00
Soonho Kong
05b2f93d14 fix(emacs/lean-flycheck): fix eval-after-load to use library name 2014-08-15 09:07:50 -07:00
Leonardo de Moura
3bb2fb2176 fix(frontends/lean/parser): uninit variable
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-15 09:06:34 -07:00
Soonho Kong
74b665ea06 fix(CMakeLists.txt): use bin/lean to build library
close #49
2014-08-14 18:21:58 -07:00
Soonho Kong
b18124e1a2 feat(emacs): replace metavar '?M_n' with '_' in synthed expr 2014-08-14 18:21:58 -07:00
Leonardo de Moura
2edb53397f fix(library/declaration_index): style
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 18:19:17 -07:00
Leonardo de Moura
dc3e9a15d2 refactor(library/definitions_cache): rename to definition_cache
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 18:12:12 -07:00
Leonardo de Moura
29a7d6d05a fix(library/hott): remove hott_lib from build, it will be integrated in the standard library
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 18:05:48 -07:00
Leonardo de Moura
343407b1b6 feat(shell/lean): add --index option
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 18:05:48 -07:00
Soonho Kong
a4e8389695 feat(emacs): add lean-fill-placeholder (C-c C-f) 2014-08-14 17:12:23 -07:00
Leonardo de Moura
b4775eb017 feat(frontends/lean/server): add EVAL command, closes #40
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 16:08:43 -07:00
Leonardo de Moura
40f7ef5097 feat(shell/lean): display src file name when printing 'file not found in the LEAN_PATH' error, closes #47
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 15:48:31 -07:00
Soonho Kong
74dafe76bb feat(emacs): use --permissive lmake option for flycheck
close #42
2014-08-14 15:06:30 -07:00
Leonardo de Moura
9f3f42f6a5 feat(frontends/lean/server): add SET command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 14:40:46 -07:00
Leonardo de Moura
4bbabfe6d4 feat(shell/lean): add --permissive command line option
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 14:01:59 -07:00
Soonho Kong
24220a5f9e feat(emacs): show synth information 2014-08-14 13:22:24 -07:00
Leonardo de Moura
8afd433f34 feat(frontends/lean/parser): allow parser to continue even if there are errors importing files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 11:28:44 -07:00
Leonardo de Moura
0d97fff280 feat(library/module): include name of corrupted .olean file
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 11:28:44 -07:00
Leonardo de Moura
d1c645977d fix(frontends/lean/info_manager): add missing method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 11:28:44 -07:00
Soonho Kong
99e77db8ad feat(emacs/lean-flycheck): override flycheck-try-parse-error-with-pattern
For lean-mode, we override flycheck-try-parse-error-with-pattern to
increase column number by 1. It uses defadvice.
2014-08-14 11:21:09 -07:00
Leonardo de Moura
be8ee8b3c0 feat(frontends/lean): add information about synthesized placeholders, closes #39
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 10:37:24 -07:00
Leonardo de Moura
28b7d87f1f feat(frontends/lean/pp): pretty print numerals
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 09:12:22 -07:00
Leonardo de Moura
ebbca0d613 perf(library/num): avoid exception
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 09:12:22 -07:00
Leonardo de Moura
19537b72ee feat(frontends/lean/elaborator): generate type information for placeholders
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 09:12:22 -07:00
Soonho Kong
a0a73463cc feat(emacs/lean-server.el): add lean-server-{kill,restart}-process
[skip ci]
2014-08-14 08:56:46 -07:00
Soonho Kong
c19bcad845 fix(emacs): add and use lean-string-join 2014-08-14 08:42:52 -07:00
Leonardo de Moura
ced0ed0eca fix(emacs): add missing 'require'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 08:21:42 -07:00
Soonho Kong
243cf2abb0 feat(emacs): show overload information 2014-08-14 07:23:15 -07:00
Leonardo de Moura
75be034d3d fix(frontends/lean/server): crash when INFO is invoked before VISIT/LOAD
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-13 18:31:47 -07:00
Leonardo de Moura
d30854829d refactor(frontends/lean): rename elaborator_env to elaborator_context
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-13 17:06:48 -07:00
Soonho Kong
28d23390a6 feat(emacs): implement lean-show-type 2014-08-13 17:02:49 -07:00
Soonho Kong
d2ef577a14 feat(emacs/lean-flycheck): customize checker name and options 2014-08-13 15:07:12 -07:00
Soonho Kong
3cd381b0f7 fix(emacs): remove lean-get-this-if-true-or-that 2014-08-13 15:07:12 -07:00
Leonardo de Moura
e5a36467dd fix(frontends/lean/scanner): wrong column information produced by scanner
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-13 12:32:37 -07:00
Leonardo de Moura
631e2395a3 refactor(frontends/lean/elaborator): add elaborator_env class
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-12 18:43:56 -07:00
Leonardo de Moura
2f48552f06 fix(frontends/lean/server): disable cache, when a definition is reused from the cache, we loose type information, fixes #35
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-12 17:40:30 -07:00
Leonardo de Moura
2869d9059f feat(frontends/lean): change 'proof-qed' semantics: no backtracking
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-12 17:40:30 -07:00
Leonardo de Moura
b32d801116 refactor(frontends/lean/elaborator): remove unnecessary field: m_subst
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-12 17:40:30 -07:00
Leonardo de Moura
c5aea3eba7 refactor(frontends/lean/elaborator): remove m_accumulated and eager metavariable instantiation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-12 17:40:30 -07:00
Leonardo de Moura
60ab6d3bd8 feat(frontends/lean): remove feature that in declarations such as (A B : Type), forced A and B to be in the same universe
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-12 17:40:30 -07:00
Leonardo de Moura
562926e7ad refactor(kernel/instantiate): add functions instantiate_value_univ_params and instantiate_type_univ_params
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-12 17:40:30 -07:00
Soonho Kong
0ca0ccb77d feat(frontend/lean/server.cpp): add "-- BEGININFO" header 2014-08-12 17:29:58 -07:00
Leonardo de Moura
d47d326cef fix(library/unifier): bug in mk_imitiation_arg
Remove bogus constraint
     cs.push_back(mk_eq_cnstr(mk_app(maux_type, locals), type, j, relax));
This constraint is incorrect because 'type' may contain local constants that are not in 'locals'.

We just rely on
   cs.push_back(mk_eq_cnstr(mk_app(maux, margs), arg, j, relax));
When maux is assigned, the system will inforce that its type (which is based on maux_type) must be type correct

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-11 15:44:23 -07:00
Leonardo de Moura
cb8185f016 feat(frontends/lean): add '#erase_cache' command (for debugging purposes)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-11 13:55:29 -07:00
Leonardo de Moura
faf2795a7b feat(frontends/lean/server): add VISIT and CHECK commands
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-11 10:40:18 -07:00
Leonardo de Moura
71583ba9c8 feat(frontends/lean/server): use definitions_cache in the server object
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-10 20:02:50 -07:00
Leonardo de Moura
34f0dedf46 feat(frontends/lean/server): add 'INSERT' and 'REMOVE' commands to lean 'server', make sure all commands use the same convention for numbering lines, update server.org
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-10 19:57:24 -07:00
Leonardo de Moura
f319d084d4 feat(library/Makefile.common): use new --cache/-c option at Makefile.common
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-10 11:20:08 -07:00
Leonardo de Moura
f896771987 refactor(library/tactic/expr_to_tactic): use annotations for implementing 'by'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-10 11:16:46 -07:00
Leonardo de Moura
9d4c073618 feat(frontends/lean): add option --cache
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-10 11:04:16 -07:00
Leonardo de Moura
21b151bc98 chore(shell/lean): rename shortname for --luahook option
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-10 10:00:04 -07:00
Leonardo de Moura
dc503e6e3d feat(library): add definitions_cache datastructure for implementing .clean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-10 09:53:13 -07:00
Leonardo de Moura
19daefaec5 fix(util/script_state): weird crash with Lua 5.1
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-09 23:13:30 -07:00
Leonardo de Moura
8ad0949269 fix(kernel/environment): initialization problem on OSX
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-09 16:14:35 -07:00
Leonardo de Moura
ee9be2837b refactor(library/unifier): remove redundant code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-09 15:04:34 -07:00
Leonardo de Moura
4bcde576b8 perf(kernel/abstract): improve mk_binding performance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-09 14:14:14 -07:00
Leonardo de Moura
4986226e41 fix(kernel/converter): missing delay_check case
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-09 08:07:41 -07:00
Leonardo de Moura
0af55beb56 perf(library/unifier): improve flex_rigid performance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-09 08:07:15 -07:00
Leonardo de Moura
9d13f634f3 refactor(library/unifier): group flex_rigid case related methods in a functional object
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-08 16:44:59 -07:00
Leonardo de Moura
49070895d1 perf(library/unifier): improve 'assign' method, keep old version
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 22:29:56 -07:00
Leonardo de Moura
24e8dca014 feat(library/explicit): allow 'as-is', 'explicit' and 'implicit' annotations to be saved in .olean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 19:13:48 -07:00
Leonardo de Moura
969afa8245 perf(library/unifier): improve check_imitation performance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 18:28:23 -07:00
Leonardo de Moura
70c0eda9fc feat(frontends/lean): make sure all scopes are closed in the end of the module
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 17:08:59 -07:00
Leonardo de Moura
1a67e69678 feat(library/scoped_ext): force user to end a scope with an identifier matching the one used in beginning of scope, closes #30
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 16:59:08 -07:00
Leonardo de Moura
2486c483cf chore(kernel/error_msgs): change type mismatch error messages, closes #33
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 16:18:40 -07:00
Leonardo de Moura
9e6c5695be fix(library/unifier): make sure the imitation step is type correct, fix ensure_sufficient_args
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 16:09:45 -07:00
Soonho Kong
88ef5d68f9 feat(emacs): add lean-flycheck-turn-on/off/toggle 2014-08-07 14:03:08 -07:00
Soonho Kong
b684af5cdb feat(emacs): provide an option to disable lean-flycheck 2014-08-07 14:03:08 -07:00
Soonho Kong
209ecfd792 feat(emacs/lean-setting.el): add lean-rule-color custom-var 2014-08-07 14:03:08 -07:00
Soonho Kong
b6b40bb4ab feat(emacs): use optional package when required 2014-08-07 11:59:59 -07:00
Soonho Kong
5ecc872278 fix(emacs): use cl-case, require cl-lib 2014-08-07 11:59:59 -07:00
Soonho Kong
07e188acdb feat(emacs/README.md): add instr. for MELPA; add whitespace-cleanup-mode 2014-08-07 11:59:59 -07:00
Soonho Kong
a2867b3d06 feat(emacs/README.md): add README.md 2014-08-07 09:59:15 -07:00
Soonho Kong
f523c25c52 feat(emacs/lean-mode.el): use whitespace-cleanup-mode to fci-mode 2014-08-07 09:59:15 -07:00
Soonho Kong
f9f8c09143 refactor(emacs/lean-mode.el): clean up, add license 2014-08-07 09:59:15 -07:00
Soonho Kong
61f3897b0d feat(emacs/lean-util.el): add lean-util.el 2014-08-07 09:59:15 -07:00
Soonho Kong
164eab5574 feat(emacs/lean-settings.el): add customization-settings file 2014-08-07 09:59:15 -07:00
Soonho Kong
977ccc4631 feat(emacs/lean-flycheck.el): add lean-flycheck.el 2014-08-07 09:59:15 -07:00
Leonardo de Moura
9a6df02683 fix(util/name): avoid assertion violation when reading numeric names
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 08:32:43 -07:00
Leonardo de Moura
6d6c62461f chore(library/kernel_serializer): add assertions for invalid uses of anonymous names
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 08:32:32 -07:00
Leonardo de Moura
955d7d2659 fix(library/aliases): namespace and constant have the same name, and 'using' produces the 'empty' alias
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 08:32:21 -07:00
Leonardo de Moura
4ad7e709aa feat(frontends/lean): default for inductive types, closes #32
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 07:52:37 -07:00
Leonardo de Moura
b56233cbe3 fix(frontends/lean): make sure typing information is sorted, make sure the error messages contains line file name
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-06 23:15:05 -07:00
Leonardo de Moura
c6f3232f81 feat(frontends/lean): provide 'partial' type information even when there are type errors
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-06 21:56:57 -07:00
Leonardo de Moura
1cbf40a5d2 fix(frontends/lean): remove duplicate info entries, fix bug in save_overload
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-06 21:23:37 -07:00
Leonardo de Moura
0af4a67881 feat(frontends/lean): save type information after elaboration, remove --flyinfo option
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-06 19:35:26 -07:00
Leonardo de Moura
0276f4c1c0 feat(frontends/lean): store 'overload' information, remove #setline
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-06 19:13:09 -07:00
Leonardo de Moura
1ba9a92df2 feat(frontends/lean/parser): save snapshots
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-06 18:31:53 -07:00
Leonardo de Moura
9b765a2a06 chore(frontends/lean): fix style
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-06 18:10:33 -07:00
Leonardo de Moura
1a725574b1 refactor(frontends/lean): add 'server' module as a replacement for 'interactive'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-06 18:07:04 -07:00
Leonardo de Moura
2c3737bcc6 feat(frontends/lean): add info_manager
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-06 15:25:28 -07:00
Leonardo de Moura
da616f69ea perf(library/unifier): do not explore branches that will trigger type errors
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 20:16:16 -07:00
Leonardo de Moura
bbc4380a52 fix(library/unifier): bug exposed by recent changes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 19:02:30 -07:00
Leonardo de Moura
069f217215 fix(frontends/lean/elaborator): use full local context for metavariables due to coercions and overloads
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 17:21:21 -07:00
Leonardo de Moura
d14cbfd7e9 refactor(frontends/lean/elaborator): local context
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 16:25:54 -07:00
Leonardo de Moura
9cc2015caa feat(library/unifier): better error message for invalid local context
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 16:25:22 -07:00
Leonardo de Moura
d1924097d5 feat(library/match): add 'local' backtracking
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-05 10:09:00 -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
56d151ef7f feat(frontends/lean): 'partial' aliases. closes #24
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 22:08:10 -07:00
Leonardo de Moura
f4031b620f feat(library/match): extend match_plugin interface, and allow them to recursively invoke the matcher
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 18:30:30 -07:00
Leonardo de Moura
c34c2f4f5c feat(library/match): match universe levels
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-04 18:30:30 -07:00
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
Leonardo de Moura
0c668a31fe fix(frontends/lean/pp): display private 'internal' names in a human readable way
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 10:58:13 -07:00
Leonardo de Moura
cd522ff670 feat(emacs): improve font highlighting in emacs mode
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 10:54:06 -07:00
Leonardo de Moura
a59eec39b8 feat(frontends/lean): improve 'type mismatch' error position, and annotate 'have'-expressions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 09:44:40 -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
736b219e65 fix(frontends/lean/elaborator): pretty print placeholders as '_'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 08:46:03 -07:00
Leonardo de Moura
e7c7d5718a fix(frontends/lean/pp): fix bug in the pretty printer
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 08:30:30 -07:00
Leonardo de Moura
15c1e39f88 feat(frontends/lean/elaborator): distribute application over choice, this feature improves the support for overloaded aliases
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-24 23:43:40 -07:00
Leonardo de Moura
48b902dc37 feat(library/unifier): solve constraints of the form '(max l1 l2) =?= 0' and '(imax l1 l2) =?= 0'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-24 20:30:51 -07:00
Leonardo de Moura
a533bf29da fix(library/unifier): broken optimization was missing solution
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-24 17:41:22 -07:00
Leonardo de Moura
77c0456be4 fix(kernel/metavar): make sure instantiate_metavars_fn does not loop on 'fake' recursive dependencies, we say they are fake because they disappear after applying beta-reduction
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-24 12:04:33 -07:00
Leonardo de Moura
2eb84c5f74 fix(library/unifier): make sure we do not miss dependency
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-24 11:38:43 -07:00
Leonardo de Moura
2fae6ebc3a feat(emacs): add missing keywords
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-24 08:50:18 -07:00
Leonardo de Moura
1f2099e298 perf(kernel/for_each_fn): use cache stack trick at for_each_fn
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 19:32:11 -07:00
Leonardo de Moura
7d25158254 fix(kernel/replace_fn): bug in the cache
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 18:33:15 -07:00
Leonardo de Moura
61df118339 refactor(kernel/for_each_fn): simplify module interface
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 18:16:41 -07:00
Leonardo de Moura
42867d6fcd refactor(kernel/find_fn): simplify find_fn module
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 18:09:58 -07:00
Leonardo de Moura
314c0822de fix(library/unifier): bugs exposed by recent changes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 17:31:07 -07:00
Leonardo de Moura
71afb83fcd feat(shell/lean): rename multi-threading option to -j
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 14:35:02 -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
69d9c8b95d fix(tests): to reflect recent changes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 13:20:24 -07:00
Leonardo de Moura
adddf06e44 perf(kernel/metavar): avoid destructive update in occurs method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 13:12:29 -07:00
Leonardo de Moura
4286f5dd36 perf(kernel/justification): make sure depends_on doesn't get 'lost' in justification objects with a lot of shared objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 11:56:17 -07:00
Leonardo de Moura
35481cb045 fix(library/unifier): potentially changing flag from l_false ==> l_undef
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 10:59:53 -07:00
Leonardo de Moura
301c395e59 perf(kernel/metavar): performance problem with occurs method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 10:35:27 -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
caf3e5a449 fix(kernel/metavar): missing justification bug
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 08:41:09 -07:00
Leonardo de Moura
75005765d6 perf(library/unifier): add small performance improvement
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 17:58:40 -07:00
Leonardo de Moura
90189f8eb6 chore(frontends/lean/elaborator): fix outdated comment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 17:50:13 -07:00
Leonardo de Moura
35e7302d8a perf(frontends/lean/elaborator): fix performance bottleneck
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 17:45:45 -07:00
Leonardo de Moura
697bcf4b4f perf(library/unifier): improve performance of instantiate_meta method
It provides a significant performance boost in some files.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 16:24:07 -07:00
Leonardo de Moura
5ad6d5cbc4 feat(kernel/converter): add eta-expansion to converter, this is important when terms contains metavariables
For example, consider the unification constrains

    fun (x : A), f (?m x)  =?=  f

Eta-reduction is not applicable since (?m x) is not a variable.
However, if we eta-expand the left-hand-side, we get

   fun (x : A), f (?m x)  =?=  fun (x : A), f x

which is reduced to

      (?m x) =?= x

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 16:24:02 -07:00
Leonardo de Moura
e81d96ffc1 feat(build): add build option for jemalloc
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 13:44:47 -07:00
Leonardo de Moura
368c94ccc5 feat(util/rb_tree): use memory_pool at rb_tree, 5% performance improvement when using multiple threads
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 10:53:07 -07:00
Leonardo de Moura
fd7e20f11c fix(util/thread): thread_specific_ptr finalization
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 10:50:44 -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
b522ea6f2d refactor(library/standard): rename bit to bool
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:49:54 -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
725f370e59 fix(build): number of core detection on OSX
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 20:07:11 -07:00
Leonardo de Moura
77537d43a3 fix(util): add missing file
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 18:58:24 -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
e3d4b2490d perf(kernel/type_checker): improve infer_app peformance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 17:11:47 -07:00
Leonardo de Moura
ad87c0b3e1 fix(frontends/lean): race condition
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 09:32:13 -07:00
Leonardo de Moura
de657e8df0 fix(util/rc): reference counter memory_order flags
See discussion at
http://www.chaoticmind.net/~hcb/projects/boost.atomic/doc/atomic/usage_examples.html#boost_atomic.usage_examples.example_reference_counters
http://stackoverflow.com/questions/10268737/c11-atomics-and-intrusive-shared-pointer-reference-count

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 08:23:01 -07:00
Leonardo de Moura
c02629c76d feat(util/lean_path): allow 'import dirname' as shorthand for 'import dirname.default'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 19:59:13 -07:00
Leonardo de Moura
9c499e723f perf(build): use make -j option when invoking external makefile for compiling Lean libraries
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 19:38:46 -07:00
Leonardo de Moura
cff6bf8c6d fix(library/module): sign error is circular module dependency is detected
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 19:21:54 -07:00
Leonardo de Moura
ba9dd8b686 fix(library/choice): style
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 01:36:53 +01:00
Leonardo de Moura
9ef4d44a86 chore(frontends/lean): add 'replace' auxiliary funcs
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 01:10:49 +01:00
Leonardo de Moura
438a42d010 feat(library/unifier): improve error message when metavar assignment is type incorrect
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:32 +01:00
Leonardo de Moura
e39a6e732a refactor(kernel/error_msgs): move pp_type_mismatch to error_msgs module
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
55db3aaaa1 fix(library/module): module index assignment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
bef64305cf feat(kernel/constraint): add 'print' function for debugging purposes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
c1b7d7bf7e fix(library/choice): we should be able to store 'choice' operators in .olean files, this can happen because of notation decls
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
d69db172a1 chore(kernel/replace_fn): add syntax sugar for replace function
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-19 12:53:37 +01:00
Leonardo de Moura
6b60db7b93 fix(frontends/lean/elaborator): bug when mixing implicit arguments and sections
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-19 09:55:34 +01:00
Leonardo de Moura
66ba3c8a0b fix(frontends/lean/elaborator): bug in the elaborator reported by Jeremy
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-18 23:48:27 +01:00
Soonho Kong
5118ee7a83 chore(CMakeLists.txt): mark gmp and mpfr as required packages 2014-07-18 08:29:51 -04:00
Leonardo de Moura
4c98686d4f fix(emacs): syntax highlight bug
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-17 20:48:06 +01:00
Leonardo de Moura
661e681ac9 feat(frontends/lean/decl_cmds): allow parameters with different types to be declared using the same 'parameters' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-17 20:47:33 +01:00
Leonardo de Moura
120d3b5c1a fix(kernel/type_checker): error message
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-17 19:38:20 +01: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
9fcb31bd5e perf(kernel/instantiate): add custom instantiate for 'easy' cases
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-17 08:29:04 +01:00
Leonardo de Moura
a78fb8f013 perf(library/unifier): minimize the number of constraints generated in the flex_rigid 'imitation' step
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-17 06:32:21 +01:00
Leonardo de Moura
8798fa4419 fix(kernel/replace): make sure 'replace' is reentrant
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-17 04:37:27 +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
a748e8f858 perf(kernel/type_checker): improve infer_lambda performance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-16 07:52:53 +01:00
Leonardo de Moura
c97b4c7725 perf(kernel/converter): improve is_def_eq_binding
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-16 07:33:45 +01:00
Leonardo de Moura
6ddba9c276 fix(library/unifier): bug in process_delta
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-16 04:55:09 +01:00
Leonardo de Moura
c8849d42e9 fix(library/unifier): tolerate exceptions in the type_checker::infer method. This can happen since when we try projections we don't check whether they are type correct
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-16 03:05:19 +01:00
Leonardo de Moura
f7317a7139 feat(build): compile HoTT library when building
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 21:56:36 +01:00
Leonardo de Moura
359bfe93d5 feat(library/hott): add basic HoTT definitions and theorems
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 21:46:33 +01:00
Leonardo de Moura
999782d89d refactor(kernel/replace_fn): use thread local cache
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 05:34:45 +01:00
Leonardo de Moura
bd0cc5c365 fix(library/expr_pair): typo
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 04:11:27 +01:00
Leonardo de Moura
a18cf94d09 perf(library/unifier): minimize the use of instantiate_metavars
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 03:55:27 +01:00
Leonardo de Moura
29c7eeaa99 refactor(library/unifier): improve occurs_context_check
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 02:08:16 +01:00
Leonardo de Moura
46005b4ffe perf(kernel/metavar): improve occurs_expr method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 01:57:17 +01:00
Leonardo de Moura
0f44e3c9f4 fix(frontends/lean): calc configuration commands, add check_constant_next auxiliary method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 01:19:47 +01:00
Leonardo de Moura
ffdb43da02 perf(kernel/type_checker): improve infer_pi performance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 22:56:38 +01:00
Leonardo de Moura
b72105efff perf(kernel/type_checker): improve infer_lambda performance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 22:39:45 +01:00
Leonardo de Moura
eac38d43c2 refactor(kernel/type_checker): break infer_type_core into smaller methods
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 22:15:52 +01:00
Leonardo de Moura
7ed373811d perf(frontends/lean/elaborator): improve visit_binding performance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 17:08:32 +01:00
Leonardo de Moura
91e8f0b8fa chore(frontends/lean/elaborator): replace ... withe exception
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 16:37:55 +01:00
Leonardo de Moura
2e6184a721 fix(frontends/lean): more bugs in section management
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 06:27:36 +01:00
Leonardo de Moura
b53e6eda58 refactor(frontends/lean): eliminate the abstract method 'family' from parser
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 05:44:06 +01:00
Leonardo de Moura
8167ad329f fix(frontends/lean): bug in section management
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 05:04:01 +01:00
Leonardo de Moura
195429611b refactor(frontends/lean/builtin_cmds): cleanup 'check' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 04:25:53 +01:00
Leonardo de Moura
5c51be4585 refactor(frontends/lean): use expr_struct_set when collecting locals
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 04:12:58 +01:00
Leonardo de Moura
6c442b250c refactor(frontends/lean): minor code reorg
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 03:47:49 +01:00
Leonardo de Moura
43fa75f7a9 fix(frontends/lean/decl_cmds): typo
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 03:36:06 +01:00
Leonardo de Moura
fab7934265 refactor(frontends/lean/elaborator): modify when tactic_hints are invoked, add the notion of strict placeholder
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-14 02:53:02 +01:00
Leonardo de Moura
bdfd219246 feat(frontends/lean): improve error message for placeholder that can't be synthesized
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-13 22:35:57 +01:00
Leonardo de Moura
943092eaf0 refactor(frontends/lean/elaborator): reorg class elaborator
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-13 14:50:52 +01:00
Leonardo de Moura
c03ae24d22 fix(frontends/lean/elaborator): option name
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-13 14:03:47 +01:00
Leonardo de Moura
1d16b5d2ad fix(frontends/lean/elaborator): propagate tags for getting better error messages
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-13 11:10:26 +01:00
Leonardo de Moura
8da44f1cd5 feat(frontends/lean/parser): disable quasie-hash consing in new threads
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-13 04:11:17 +01:00
Leonardo de Moura
614d8a768b fix(library/unifier): flex_rigid case (?M ...) =?= (f ...), where f is not a constant nor a local
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-13 02:46:04 +01:00
Leonardo de Moura
a31457efde fix(frontends/lean/parser): copy rec and initial fields when processing Exprs and ScopedExpr
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-13 01:24:55 +01:00
Leonardo de Moura
585127ef66 fix(util/worker_queue): bug in join method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 23:25:43 +01:00
Leonardo de Moura
7ccb9a389c feat(frontends/lean): process theorems in parallel
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 22:50:57 +01:00
Leonardo de Moura
0a556c4a91 feat(util): add worker queue
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 21:59:22 +01:00
Leonardo de Moura
6d95250d4b fix(library/kernel_serializer): make sure temporary (internal) binder names do not leak into .olean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 20:23:38 +01:00
Leonardo de Moura
cb93d194ed perf(frontends/lean/elaborator): improve performance of pi_abstract_context
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 17:49:14 +01:00
Leonardo de Moura
03bbec08e5 perf(frontends/lean/elaborator): replace abstract with abstract_local
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 09:54:22 +01:00
Leonardo de Moura
1d273fcfdd chore(frontends/lean): rename 'obtains' to 'obtain'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 06:35:24 +01:00
Leonardo de Moura
a38dc76b37 feat(kernel/metavar): add option to instantiate only expr metavars
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 05:54:05 +01:00
Leonardo de Moura
80d1a6b993 perf(kernel/converter): do not cache easy cases
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 05:39:14 +01:00
Leonardo de Moura
391e5e2bc2 perf(library/unifier): use d_instantiate_metavars
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 05:12:09 +01:00
Leonardo de Moura
9517f31a71 refactor(kernel/metavar): remove unnecessary functionality
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 04:45:50 +01:00
Leonardo de Moura
50f76fd138 perf(library/unifier): improve m_mvar_occs management
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-12 04:23:02 +01:00
Leonardo de Moura
c3e8e83e50 perf(library/unifier): simple optimization
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-11 20:21:41 +01:00
Leonardo de Moura
1230e942aa feat(library/unifier): handle 'first-order' flex-flex constraints
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-11 04:51:28 +01:00
Leonardo de Moura
024299f56b fix(frontends/lean): name of auxiliary hypothesis in 'obtains' expression, and also marked them as non-contextual
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-11 04:50:53 +01:00
Leonardo de Moura
cf34f75ab5 feat(frontends/lean): add 'obtains' expression
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-11 04:08:51 +01:00
Leonardo de Moura
9a3227344e fix(library/tactic): compilation warning
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 23:23:48 +01:00
Leonardo de Moura
eeedb6fb18 fix(kernel/expr_eq_fn): typo
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 23:21:24 +01:00
Leonardo de Moura
b62abf0f06 refactor(library/tactic/goal): remove redundance, goal pp method was duplicating some of the functionality provided by the pretty printer
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 18:59:03 +01:00
Leonardo de Moura
6af7e7f794 fix(kernel/expr_eq_fn): take local pp name into account when annotations are considered in the equality test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 18:56:50 +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
c13c75b93e feat(frontends/lean/pp): add option for displaying fully qualified names
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 15:55:19 +01:00
Leonardo de Moura
49bc3fffbd fix(frontends/lean/pp): purify procedure for local names
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 14:13:51 +01:00
Leonardo de Moura
fc8ddcb0ce feat(frontends/lean): improve 'check' command when used inside sections
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 14:07:41 +01:00
Leonardo de Moura
1a6d0784f2 feat(kernel/level): improve universe level normalization procedure
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 13:49:41 +01:00
Leonardo de Moura
313c7066e7 feat(frontends/lean): add Type' as notation for Type.{_+1}
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 13:28:36 +01:00
Leonardo de Moura
d9b2801eeb feat(frontends/lean): use the same universe in declarations such as (A B : Type)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 13:18:52 +01:00
Leonardo de Moura
12d89ea0b9 fix(kernel/level): is_geq predicate
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 13:18:41 +01:00
Leonardo de Moura
0ec6fa02de feat(frontends/lean/pp_options): remove the 'lean.' prefix
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-09 19:19:35 -07:00
Leonardo de Moura
aff766430d fix(frontends/lean/pp): universe pretty printer
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-09 19:17:28 -07:00
Leonardo de Moura
43eba857cb feat(frontends/lean): add let-expr pretty printer, reduce default indentation to 2
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-09 18:47:10 -07:00
Leonardo de Moura
d31cde473e fix(util/sexpr): nested Lua objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-09 11:13:17 -07:00
Leonardo de Moura
2ef7b9be2f feat(frontends/lean): add basic pretty printer
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-09 01:12:36 -07:00
Leonardo de Moura
91b0dcad0f fix(library/tactic): avoid 'unknown' message in trace_tac when position information is not available
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 17:48:41 -07:00
Leonardo de Moura
a1601e7a5f feat(library/tactic/apply_tactic): add option for 'refreshing' universe metavariables in the 'apply' tactic
The new test ../../tests/lean/run/tactic27.lean demonstrates why we need this feature. The tactic 'apply @refl' is actually 'apply @refl.{?l}'. It is used inside of a repeat tactical. Each iteration of the 'repeat' may need to use a different value for ?l. Before this commit, there was not way to say we want a fresh ?l each iteration.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 16:55:23 -07:00
Leonardo de Moura
547ca9b3c4 fix(library/inductive_unifier_plugin): missing test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 16:39:39 -07:00
Leonardo de Moura
4505016154 feat(frontends/lean): allow tactic_hints to be applied when class-instance mechanism fails
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 15:08:13 -07:00
Leonardo de Moura
5e836092cc feat(frontends/lean): allow user to suppress proofs in theorems, and let them be inferred automatically using tactic_hints
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 15:08:13 -07:00
Leonardo de Moura
a3be63af73 feat(frontends/lean): add tactic_hint command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 15:08:13 -07:00
Leonardo de Moura
33cb2db5b5 feat(library/head_map): a simple indexing datastructure
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 15:08:13 -07:00
Leonardo de Moura
2fa2589220 feat(frontends/lean): add pretty printer configuration options
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-08 15:08:13 -07:00
Leonardo de Moura
da4c1922e3 feat(frontends/lean): add '_root_' prefix for referencing names in the root namespace
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 19:15:46 -07:00
Leonardo de Moura
b43fb7448c feat(frontends/lean): search for identifiers in the stack of namespaces; reject non-atomic names as local names
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 19:00:06 -07:00
Leonardo de Moura
e6d4c01b88 feat(frontends/lean): check whether namespace exists or not in the 'using' command, add to_valid_namespace_name helper function
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 18:17:10 -07:00
Leonardo de Moura
bd1873f6b1 feat(frontends/lean): add coercion modifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 17:48:20 -07:00
Leonardo de Moura
08465f049a feat(frontends/lean): remove [class] annotation and 'class' command, they are redundant, we only need [instance] and 'instance'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 16:09:30 -07:00
Leonardo de Moura
112353861c feat(frontends/lean): rename command 'reset_proof_qed' to 'set_proof_qed'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 15:48:16 -07:00
Leonardo de Moura
c16951aba6 fix(library/aliases): aliasing behavior
The new test '../../tests/lean/run/alias3.lean' demonstrates the issue being fixed.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 15:40:55 -07:00
Leonardo de Moura
b9d08ff28c feat(frontends/lean/builtin_cmds): allow many namespaces in the same 'using' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 14:53:06 -07:00
Leonardo de Moura
10b0dfeb37 feat(frontends/lean/class): allow many instances to provided with a single 'instance' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 14:41:14 -07:00
Leonardo de Moura
6ceecf6a15 feat(library/aliases): remove duplicates from aliasing tables
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 12:59:57 -07:00
Leonardo de Moura
a84107db3d fix(util/sexpr): Lua 5.1 incompatibility
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 12:55:00 -07: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
fe448d47be feat(library/unifier): improve failure report
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 12:03:37 -07:00
Leonardo de Moura
ce14ced08e feat(util/sexpr): allow Lua objects to be embedded in Lean s-expressions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 10:45:19 -07:00
Leonardo de Moura
c47d9c01ee fix(util/sexpr): crash in the sexpr Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 09:41:14 -07:00
Leonardo de Moura
831de22bcd fix(frontends/lean): bugs in notation management
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-07 09:31:42 -07:00
Leonardo de Moura
e8bd267a00 fet(frontends/lean): allow coercions to sort-class in the types of variable and definitions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-06 21:54:16 -07:00
Leonardo de Moura
67363c893e chore(frontends/lean/elaborator): remove dead code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-06 21:41:19 -07:00
Leonardo de Moura
48b28ad75c fix(library/unifier): missing test in flex_rigid
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-06 21:36:23 -07:00
Leonardo de Moura
dcf7cf00ff fix(*): bugs in the type checker, inductive datatypes, and unifier
The bugs were indentified when performing the tiny change in the file
tests/lean/run/group.lean
2014-07-06 18:44:56 -07:00
Leonardo de Moura
9a13bef4f3 fix(frontends/lean): fix (and simplify) parameter universe inference
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-06 16:56:54 -07:00
Leonardo de Moura
9be1a4ab46 fix(library/module): module index assignment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 23:32:18 -07:00
Leonardo de Moura
29981322b9 fix(kernel/type_checker): missing check
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 21:50:32 -07:00
Leonardo de Moura
b3de4bb061 fix(frontends/lean/decl_cmds): modifiers should be after universe parameters
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 21:49:32 -07:00
Leonardo de Moura
55894f01e3 feat(frontends/lean): add 'opaque_hint' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 18:58:20 -07:00
Leonardo de Moura
32a605e793 fix(frontends/lean/builtin_cmds): allow 'check' command to unfold the current module opaque definitions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 17:39:49 -07:00
Leonardo de Moura
59755289e4 feat(library/unifier): case split on constraints of the form (f ...) =?= (f ...), where f can be unfolded, and there are metavariables in the arguments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 15:52:40 -07: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
e366aadad0 refactor(library/converter): expose is_opaque predicate in the converter interface
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 12:05:23 -07:00
Leonardo de Moura
8aa217ea76 chore(library/unifier): update comments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 11:06:13 -07:00
Leonardo de Moura
72bce91c18 refactor(library/unifier): move inductive datatype support to inductive_unifier_plugin
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 11:00:35 -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
ab929d7201 refactor(library/unifier): store the unifier_plugin in the environment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 10:25:58 -07:00
Leonardo de Moura
a52c9f4e2b feat(library/unifier): add option 'unifier.unfold_opaque', remove option 'unifier.use_exceptions' (the user should not be able to change this)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 09:43:16 -07:00
Leonardo de Moura
efabd2280c feat(library/unifier): allow unifier to unfold opaque definitions of the current module
It is not clear whether this is a good idea or not. In some cases, it seems to do more harm than good.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 00:46:03 -07:00
Leonardo de Moura
ac1585fd1a feat(library/unifier): divide constraints in clear groups
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-05 00:04:38 -07:00
Leonardo de Moura
f242971b55 feat(library/unifier): delay constraints where the lhs or rhs are of the form (?m ... (intro ...))
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 23:36:31 -07:00
Leonardo de Moura
1e40525a0c fix(library/unifier): simple bug
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 21:15:32 -07:00
Leonardo de Moura
4af474010a fix(frontends/lean/elaborator): unintended use of local instances
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 18:49:05 -07:00
Leonardo de Moura
99fb6431a6 fix(frontends/lean/elaborator): support for local instances
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 18:38:08 -07:00
Leonardo de Moura
6ea7bb3ea4 feat(frontends/lean/builtin_exprs): add 'including' expression
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 18:37:09 -07:00
Leonardo de Moura
8ab0b5bee3 feat(frontends/lean/elaborator): use local declarations as class instances
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 18:18:25 -07:00
Leonardo de Moura
00e1a7db23 feat(frontends/lean/elaborator): add class instance elaboration
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 15:45:50 -07:00
Leonardo de Moura
079672f6f9 feat(frontends/lean): add 'class' and 'instances' infrastructure
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 14:28:09 -07:00
Leonardo de Moura
f1884ee5f9 chore(frontends/lean): remove dead code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 13:22:32 -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
b94ce412ae fix(library/unifier): non-termination
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 10:32:01 -07:00
Leonardo de Moura
e0501104e2 feat(library/tactic): add 'fixpoint' tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-04 01:30:28 -07:00
Leonardo de Moura
7fb2b0f6d8 feat(kernel): add method 'may_reduce_later' to normalizer_extension, and improve unifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 22:31:05 -07:00
Leonardo de Moura
ce282a549a feat(frontends/lean): add 'prefix' notation declaration command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 21:37:56 -07:00
Leonardo de Moura
110b622b83 feat(library/unifier): add support for unification constraints of the form "(elim ... (?m ...)) =?= t", where elim is an eliminator
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 20:41:51 -07:00
Leonardo de Moura
c854ad3d65 refactor(library/unifier): add is_def_eq alias
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 18:01:59 -07:00
Leonardo de Moura
b5f63e78ca feat(frontends/lean/notation_cmd): reuse existing precedence to increase compatibility with existing notation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 17:23:29 -07:00
Leonardo de Moura
fa1857e6a9 fix(frontends/lean/notation_cmd): fix default, add 'prev' action
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 16:44:44 -07:00
Leonardo de Moura
aba4534acb feat(library/unifier): 'forget' justifications after finding a solution, the justifications are only needed inside the unifier (for implementing nonchronological backtracking)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 14:14:07 -07:00
Leonardo de Moura
a009225435 feat(kernel/metavar): expose destructive assign
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 14:07:47 -07:00
Leonardo de Moura
b49902807c refactor(kernel/metavar): separate substitution from their justifications
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 14:01:22 -07:00
Leonardo de Moura
abbd054b51 feat(library/tactic): add eassumption tactic, and remove redundant 'subgoals' from apply tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 13:04:46 -07:00
Leonardo de Moura
079592c446 feat(library/unifier): eagerly apply substitution to improve quick failure
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 12:58:30 -07:00
Leonardo de Moura
db0ef64c04 feat(util/lazy_list_fn): handle the 'is_nil' case more efficiently
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 11:29:04 -07:00
Leonardo de Moura
c9cfb844f1 feat(library/unifier): add 'quick' failure
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 11:28:21 -07:00
Leonardo de Moura
dd96bb151b refactor(library/unifier): reduce the number unify procedure 'flavors'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 11:15:43 -07:00
Leonardo de Moura
d63ccbcf94 fix(library/unifier): missing case
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 10:51:59 -07:00
Leonardo de Moura
0ff145e59b feat(library/tactic): add apply tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 09:20:01 -07:00
Leonardo de Moura
c9994ca00c feat(library/unifier): when projecting give preference to most recent locals
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 09:01:29 -07:00
Leonardo de Moura
e3ab0a1d10 feat(frontends/lean): improve error messages when users forget to import 'tactic'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 08:33:29 -07:00
Leonardo de Moura
6b8b5f3dd8 feat(library/tactic): expose more builtin tactics, cleanup expr_to_tactic procedure
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 08:06:28 -07:00
Leonardo de Moura
a7d660f875 feat(frontends/lean): add command for customizing the behavior of proof-qed blocks: we can automatically register tactics to be automatically applied before each component
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 20:45:10 -07:00
Leonardo de Moura
5527955ba8 feat(frontends/lean): add 'proof-qed' notation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 19:30:48 -07:00
Leonardo de Moura
138267b53a feat(frontends/lean/elaborator) add trick for improving error messages when mixing tactics, elaboration and exact tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 18:58:32 -07:00
Leonardo de Moura
c3abf81382 chore(emacs): update emacs mode
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 18:37:53 -07:00
Leonardo de Moura
60c637fb9d feat(library/tactic): add 'exact' tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 18:37:32 -07:00
Leonardo de Moura
37b5b7c4c2 feat(library/tactic): rename 'exact' to 'assumption', 'exact' is a different tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 18:10:42 -07:00
Leonardo de Moura
04b2a620f8 fix(frontends/lean/elaborator): instantiate metavariables before displaying error message
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 18:07:11 -07:00
Leonardo de Moura
3809a3cc2c chore(frontends/lean): code cleanup
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 17:32:13 -07:00
Leonardo de Moura
181a739a5e feat(frontends/lean/elaborator): report unassigned metavariables as goals
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 16:26:06 -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
d46ade94a7 refactor(frontends/lean): remove unnecessary code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 14:47:41 -07:00
Leonardo de Moura
3e1bb96935 feat(library/tactic/goal): propagate tag (for position information) from goal to subgoal
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 14:47:18 -07:00
Leonardo de Moura
ee531ec0e2 feat(frontends/parser): improve error message when an apply tactic refers a local constant that is not marked as [fact]
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 14:09:01 -07:00
Leonardo de Moura
0f27856e4a feat(library/tactic): new apply tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 13:14:50 -07:00
Leonardo de Moura
cc3fb0c51f feat(util/name_generator): allow name generator to be created without providing any argument in the Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 12:39:41 -07:00
Leonardo de Moura
6ab46396d8 feat(library/tactic): expose 'trace' tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 10:52:45 -07:00
Leonardo de Moura
e1d909455c refactor(library/tactic): add namespace 'tactic', improve expr_to_tactic failure error message
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 10:45:09 -07:00
Leonardo de Moura
a66a08c89e feat(frontends/lean): parse strings as expressions of type 'string.string'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 10:00:55 -07:00
Leonardo de Moura
8b8881deae fix(util/hash): relax pre-condition
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 09:56:50 -07:00
Leonardo de Moura
f464775af6 fix(frontends/lean/parser): bug when parsing identifiers
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 08:36:25 -07:00
Leonardo de Moura
0198dfc7c5 feat(frontends/lean): parse numerals as expressions of type 'num.num'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 08:09:33 -07:00
Leonardo de Moura
7593ee1468 refactor(library/standard): remove parameter from 'tactic' inductive type
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 08:09:24 -07:00
Leonardo de Moura
b2b76b078f feat(frontends/lean): remove build_tactic_cmds, and use expressions for representing tactics
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 20:43:53 -07:00
Leonardo de Moura
cbac21ec7f feat(library/tactic): add trick for 'embedding' tactics inside Lean expressions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 19:05:22 -07:00
Leonardo de Moura
2df92b0701 refactor(library/tactic): simplify proof_state
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 18:02:17 -07:00
Leonardo de Moura
7abe2e7242 fix(frontends/lean/token_table): precedence for '@'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 17:06:09 -07:00
Leonardo de Moura
5b69f88664 feat(frontends/lean/notation_cmd): make the notation for setting precedence uniform
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 16:55:41 -07:00
Leonardo de Moura
ec3743dede fix(frontends/lean/parser): avoid nontermination
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 16:46:58 -07:00
Leonardo de Moura
8cdf44b87b feat(frontends/lean/notation_cmd): allow 'max' to use as a precedence level
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 16:46:32 -07:00
Leonardo de Moura
4cb5f97038 refactor(library/tactic): simplify tactic framework, no more proof builders
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 16:11:19 -07:00
Leonardo de Moura
ad12abcdb4 fix(library/unifier): bug in process_eq_constraint
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 18:22:05 -07:00
Leonardo de Moura
abe12b0631 fix(shell/lean): only save .olean file if there are no errors
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 18:04:18 -07:00
Leonardo de Moura
c84218e24a chore(frontends/lean/inductive_cmd): cleanup
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 17:16:10 -07:00
Leonardo de Moura
3e299a1d5a refactor(frontends/lean/parser): move parser Lua bindings to a separate file
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 17:00:10 -07:00
Leonardo de Moura
bccc3df1aa chore(frontends/lean): reduce code duplication
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 16:52:20 -07:00
Leonardo de Moura
e3f9b21c30 fix(kernel/inductive): bug in inductive datatype computational rule, we *must* first instantiate universe variables, *and then* the arguments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 14:15:16 -07:00
Leonardo de Moura
6e6f778ecf fix(kernel/converter): missing case for local constants
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 12:57: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
c2ab31113f refactor(library/tactic): remove cex_builder and 'precision' for proof_state's
These two features make sense for solvers, but not in a general purpose tactic framework for building proofs like the one in Lean.

In most cases, we cannot build a counterexample anyway. These two features should be added in a custom framework for combining preprocessing techniques like in Z3.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 08:48:07 -07:00
Leonardo de Moura
8d584e54da feat(frontends/lean): add exact_apply
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 00:51:11 -07:00
Leonardo de Moura
ccdb96775f feat(frontends/lean/parser): allow 'assume'/'take'/'fun' as notation for apply tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 23:00:41 -07:00
Leonardo de Moura
33cb9382aa feat(frontends/lean): add beta-reduction tactic command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 19:41:54 -07:00
Leonardo de Moura
360e9b9486 feat(library/tactic): add apply tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 18:33:53 -07:00
Leonardo de Moura
6645fdeae0 feat(frontends/lean): add repeat tactic command, refactor tactic sequence notation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:24:13 -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
2510d5722a feat(frontends/lean): add unfold tactic command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:05:45 -07:00
Leonardo de Moura
937d7b2813 fix(library/tactic): unfold tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:04:58 -07:00
Leonardo de Moura
6d09d82a7c feat(frontends/lean): add notation for orelse tactic, add show and now tactics
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 11:39:18 -07:00
Leonardo de Moura
a1bbb09de4 feat(frontends/lean): add notation for then tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 11:24:56 -07:00
Leonardo de Moura
15f270d9f3 fix(library/tactic): memory leak that only happens when compiling with clang++
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 11:07:06 -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
e59889d84f fix(build): do not build libraries when cross compiling
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 10:00:08 -07:00
Leonardo de Moura
1f0171cd57 fix(frontends/lean/dependencies): compilation warning
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:55:30 -07:00
Leonardo de Moura
ffa175009b feat(frontends/lean): use tactics for solving unassigned metavariables
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:50:16 -07:00
Leonardo de Moura
1e39a21823 feat(frontends/lean): add basic tactics
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:03:51 -07:00
Leonardo de Moura
cf28981f45 feat(tests/lean/run): add test_single script that sets the LEAN_PATH
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 07:47:46 -07:00
Leonardo de Moura
ec18bd93f9 feat(frontends/lean): send tactic hint table to elaborator
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 07:03:25 -07:00
Leonardo de Moura
5a7e198583 feat(build): add Makefile for libraries
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 18:41:53 -07:00
Leonardo de Moura
65c63e146f feat(frontends/lean): add display_deps function, and --deps command line option
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 18:35:18 -07:00
Leonardo de Moura
193ce35419 refactor(frontends/lean/inductive_cmd): redesign inductive datatype elaboration, use the new elaborator, and use simpler algorithm to infer the resulting universe
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 15:33:56 -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
0e015974ca fix(library/unifier): bug in process_flex_rigid, also cleanup the code and break it into different cases
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 11:19:56 -07:00
Leonardo de Moura
7075f6e94a fix(library/module): make sure decls from imported modules have module_idx > 0
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 08:36:54 -07:00
Leonardo de Moura
58b6169e8b fix(library/max_sharing): take binder annotations into account
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 08:31:09 -07:00
Leonardo de Moura
47ff300d1a fix(frontends/lean): '@' explicit mark
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 07:30:36 -07:00
Leonardo de Moura
cf9b486179 feat(frontends/lean): automatically import lua modules imported by imported lean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 23:23:51 -07:00
Leonardo de Moura
2673a33bf3 fix(util/thread_script_state): new state was being added twice to g_states, use import_explicit
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 19:58:28 -07:00
Leonardo de Moura
e408998e06 fix(library/tactic): name convention
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 18:42:59 -07:00
Leonardo de Moura
fa72e7b874 refactor(library/tactic): simplify tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 18:35:59 -07:00
Leonardo de Moura
5524c6c3d8 refactor(library/tactic/proof_state): simplify proof state
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 14:49:48 -07:00
Leonardo de Moura
c6ac89d967 refactor(library/tactic/proof_builder): simplify proof builder
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 12:25:04 -07:00
Leonardo de Moura
aaa7960b75 refactor(library/tactic/goal): use local names for hypotheses
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 11:11:12 -07:00
Leonardo de Moura
d84b745241 refactor(library/tactic/cex_builder): simplify cex_builder
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:14:33 -07:00
Leonardo de Moura
b4e4c4d610 chore(library/tactic): remove unnecessary file
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:02:13 -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
ad70044ae1 chore(library/tactic): remove dead code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:00:12 -07:00
Leonardo de Moura
e55b4bf86d fix(library/unifier): bug in flex_rigid case: binding imitation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 20:43:49 -07:00
Leonardo de Moura
50e21586b0 feat(library/unifier): do not create a case-split for choice constraints that produce only one alternative
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 18:52:13 -07:00