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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
343407b1b6
feat(shell/lean): add --index option
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 18:05:48 -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
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
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
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
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
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
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
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
Soonho Kong
0ca0ccb77d
feat(frontend/lean/server.cpp): add "-- BEGININFO" header
2014-08-12 17:29:58 -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
13fe28dd1c
perf(library/unifier): delay the instantiation of metavariables occurring in the types of local constants
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 14:31:30 -07:00
Leonardo de Moura
61661478ad
refactor(kernel/metavar): simplify substitution class, and remove dead code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 10:03:03 -07:00
Leonardo de Moura
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
ccce9d90a4
feat(frontends/lean/elaborator): add 'delayed coercions', add example demonstrating why the new feature is useful
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 18:39:23 -07:00
Leonardo de Moura
e769121c2a
fix(frontends/lean/elaborator): memory leaks that only occur when compiling with clang++
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 16:02:54 -07:00
Leonardo de Moura
16bdc51fc4
refactor(kernel/type_checker): simplify type checker API, and remove add_cnstr_fn
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 13:36:31 -07:00
Leonardo de Moura
930960c54d
fix(frontends/lean/builtin_cmds): abstract section parameters in the 'check' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 10:06:50 -07:00
Leonardo de Moura
0480dab986
feat(frontends/lean/parse_table): avoid duplicates in the parse table
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 09:32:19 -07:00
Leonardo de Moura
2d2f23cda6
feat(library/lean/lean): improve overload error message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:52:40 -07:00
Leonardo de Moura
656bcd55ed
fix(frontends/lean): save 'choice' position
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:50:44 -07:00
Leonardo de Moura
52ff29a6f7
feat(frontends/lean): add 'coercion' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:08:39 -07:00
Leonardo de Moura
06f9e7bfdd
fix(build): add missing file
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 18:12:23 -07:00
Leonardo de Moura
acf8c13619
feat(kernel): add strict implicit arguments
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 17:50:49 -07:00
Leonardo de Moura
9f83ef8f6c
chore(frontends/lean/elaborator): cleanup
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 17:13:03 -07:00
Leonardo de Moura
543b1003a6
fix(frontends/lean/elaborator): typo
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 13:11:35 -07:00
Leonardo de Moura
f2b41312fb
feat(frontends/lean): add '@' explicit notation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 12:50:47 -07:00
Leonardo de Moura
905209df1c
fix(frontends/lean/elaborator): to cache values, we must push/pop whenever we update the m_ctx
...
Thus, we are disabling the cache for now.
It is also unclear whether it is useful or not.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 11:05:14 -07:00