Sebastian Ullrich
d8122a7284
feat(src/frontends/lean/structure_cmd): allow default values in field parameters
2018-07-12 17:40:45 +02:00
Sebastian Ullrich
7cb90bedfe
fix(src/kernel/old_type_checker): literals in inductive defs
2018-07-12 10:55:28 +02:00
Sebastian Ullrich
f254a906b3
fix(src/library/vm/vm_io): get_cwd
2018-07-05 10:53:07 +02:00
Sebastian Ullrich
80745ba776
chore(library/init/data/string/basic): rename string.iterator's next_to_string to remaining_to_string
...
The old name implied that `curr` was not part of its result
2018-07-05 10:42:37 +02:00
Leonardo de Moura
bda46cc9ac
feat(kernel): add inductive_decl type on top of runtime/object, and ajust kernel/inductive.cpp
2018-06-26 12:16:33 -07:00
Leonardo de Moura
bb0b43798c
feat(kernel/declaration): add wrappers for accessing inductive/constructor/recursor declarations
2018-06-25 15:01:02 -07:00
Leonardo de Moura
7684860aec
feat(kernel): add C++ wrappers for creating inductive declarations
2018-06-25 14:24:48 -07:00
Leonardo de Moura
f62256853c
refactor(library/init/lean/declaration): use lean.declaration to implement init.meta.declaration
2018-06-25 13:08:13 -07:00
Leonardo de Moura
ec1aa2553c
refactor(kernel/declaration): implement definition/constant/axiom/theorem using runtime/object
...
TODO: inductive, constructor, recursor
2018-06-25 10:05:45 -07:00
Leonardo de Moura
9c6238e1ac
refactor(kernel/declaration): reducibility hints as runtime/object
2018-06-25 08:04:44 -07:00
Leonardo de Moura
fd0f142bae
chore(kernel/expr): comment
2018-06-22 14:48:42 -07:00
Leonardo de Moura
a18c508f5c
chore(kernel/old_type_checker): fix test
2018-06-22 14:39:46 -07:00
Leonardo de Moura
f809758dd3
refactor(kernel/expr): remove extra field
2018-06-22 14:35:32 -07:00
Leonardo de Moura
e9f843ddf6
refactor(kernel/expr): remove mlocal_* functions
...
The constructors `mvar` and `fvar` have different memory layouts.
2018-06-22 14:25:31 -07:00
Leonardo de Moura
1371c636e5
refactor(kernel/expr): remove pp_name from metavariables
2018-06-22 13:12:42 -07:00
Leonardo de Moura
3729c7ffb2
chore(kernel/expr): remove some old/legacy functions
2018-06-22 12:52:14 -07:00
Leonardo de Moura
1063905d07
chore(kernel/expr): reorder constructors and fix typo
2018-06-22 12:39:16 -07:00
Leonardo de Moura
d0a54aceb6
refactor(kernel): remove unnecessary expr_kind printer
2018-06-22 12:35:38 -07:00
Leonardo de Moura
91d2ad5925
chore(library/init/meta): remove level and expr unused functions
2018-06-22 10:54:43 -07:00
Leonardo de Moura
318530cf07
refactor(library/init/meta/expr): use lean.expr
...
`expr` is finally non-meta
2018-06-22 10:29:56 -07:00
Leonardo de Moura
bc57c66ae3
refactor(kernel/level): naming consistency
2018-06-22 10:29:56 -07:00
Leonardo de Moura
c30f40e4ac
feat(library/init/meta/level): use lean.level
2018-06-22 10:29:49 -07:00
Leonardo de Moura
ede1a51d60
refactor(kernel/declaration): remove self_opt flag from reducibility hints
...
This flag was used by the kernel to decide whether the following
heuristic should be used to avoid unfolding `f` at `is_def_eq`.
f a =?= f b
-----------
a =?= b
This heuristic was introduced at Lean1 after a discussion with
Georges Gontier. Since this discussion, we added support for
caching failures of this heuristic. This proved to be much more
effective to attack the performance problems.
Moreover, we do not even use this flag in the `type_context::is_def_eq`
used during elaboration.
The current codebase contains only one place where this flag was set to
`false`: coercions generated at structure_cmd. This change was
made at commit
1c70514231
in the Lean2 codebase when we were not caching failures and
the kernel type checker was also used during elaboration.
2018-06-22 09:02:50 -07:00
Leonardo de Moura
ee4e0d03d0
chore(frontends/lean/structure_cmd): fix bogus g++ 4.9 warning
2018-06-21 16:52:34 -07:00
Leonardo de Moura
b24ba6b93d
chore(library/compiler/simp_inductive): fix bogus g++ 4.9 warning
2018-06-21 16:52:27 -07:00
Leonardo de Moura
01ea596aea
refactor(kernel/expr): implement expr using runtime/object
2018-06-21 16:05:33 -07:00
Leonardo de Moura
9a46fb51cd
perf(runtime/object): use memcmp to implement string_lt
...
The encoding of unicode scalars into UTF8 byte stream is order
preserving. So, we can use `std::memcmp` to compare strings
2018-06-21 09:54:46 -07:00
Leonardo de Moura
c1de8e7ca7
chore(kernel/expr): make sure we can compile with g++ 4.9
2018-06-21 09:00:58 -07:00
Leonardo de Moura
96a9c7db78
feat(kernel/expr): add helper functions for computing scalar data offsets
2018-06-20 16:03:03 -07:00
Leonardo de Moura
bc82208591
chore(kernel/expr): move literal
2018-06-20 15:39:19 -07:00
Leonardo de Moura
fd5bfc7dfe
refactor(kernel): simplify binder_info
...
Now, it is an enumeration type like its Lean counterpart.
2018-06-20 15:31:40 -07:00
Leonardo de Moura
a2c2d1d9e7
feat(util/object_ref): add ternary mk_cnstr
2018-06-20 14:25:09 -07:00
Leonardo de Moura
735aa57522
chore(CMakeLists.txt): C++14
2018-06-20 14:24:33 -07:00
Leonardo de Moura
e14255e7ae
chore(util/sexpr): remove sexpr serializer
...
It was dead code.
Moreover, sexpr will not be part of Lean4
2018-06-20 11:27:29 -07:00
Leonardo de Moura
c5714c2fac
chore(kernel): remove expr.macro constructor
...
We are now ready to implement `expr` using `runtime/object`.
2018-06-19 17:54:43 -07:00
Leonardo de Moura
2b9eea3c86
chore(kernel/old_type_checker): copy&paste reduce_proj and infer_proj to old_type_checker
...
Remark: `old_type_checker` will be deleted in the future.
This commit is just to make sure we can compile legacy code.
2018-06-19 17:26:58 -07:00
Leonardo de Moura
eee4e00364
feat(library/constructions/projection): implement projections using expr.proj constructor
2018-06-19 17:26:31 -07:00
Leonardo de Moura
1a3dd6df43
feat(kernel): add reduce_proj and infer_proj
2018-06-19 16:40:00 -07:00
Leonardo de Moura
9e7e600ad7
feat(kernel): add expr.proj constructor
...
TODO: implement infer_proj and reduce_proj
2018-06-19 15:45:49 -07:00
Leonardo de Moura
d87dfbfb03
chore(library/equations_compiler): remove equations macro
2018-06-19 13:41:08 -07:00
Leonardo de Moura
f972fb2299
chore(library/equations_compiler): remove equations_result macro
2018-06-19 13:41:07 -07:00
Leonardo de Moura
140e906267
chore(library/equations_compiler): remove equation and no_equation macros
2018-06-19 13:41:07 -07:00
Leonardo de Moura
b4f4924be4
chore(library/equations_compiler): remove as_pattern macro
2018-06-19 13:41:07 -07:00
Leonardo de Moura
c0a9b0bb4b
chore(frontends/lean): remove field_notation macro
...
In the new parser, field_notation will be a syntax object.
2018-06-19 13:41:07 -07:00
Leonardo de Moura
970d14afa9
refactor(frontends/lean/structure_instance): implement structure instances using mdata
2018-06-18 15:57:42 -07:00
Leonardo de Moura
5fa357e887
chore(frontends/lean/choice): cleanup
2018-06-18 15:29:21 -07:00
Leonardo de Moura
f948892505
refactor(frontends/lean/choice): use mdata to implement choice
2018-06-18 14:21:11 -07:00
Leonardo de Moura
bf5bef2088
chore(frontends/lean/choice): remove dead code
2018-06-18 13:46:22 -07:00
Leonardo de Moura
3356c1d08d
refactor(library,frontends/lean): move choice to frontends/lean
...
Remark: `choice` will be a syntax object in Lean4
2018-06-18 13:43:42 -07:00
Leonardo de Moura
b84090aaca
feat(library/annotation): remove annonation macro
...
We now use the new `expr.mdata` constructor.
2018-06-18 13:39:02 -07:00