Sebastian Ullrich
7718795178
fix: mark Lean objects in C++ globals reachable from the new frontend as persistent
...
sed -Ei 's/(g_\w+)\s*= new (name|expr|format|level|string_ref)\W.*;/\0\n mark_persistent(\1->raw());/' src/kernel/**/*.cpp src/util/**/*.cpp src/library/**/*.cpp
2020-10-11 17:43:28 +02:00
Leonardo de Moura
7c76a19885
chore: fix includes
2020-05-22 14:17:25 -07:00
Leonardo de Moura
8bdca35282
chore: use #include <lean/runtime/...> for runtime .h files
2020-05-18 11:30:07 -07:00
Leonardo de Moura
9009926e44
fix: nat_* primitives return objects that must be consumed
...
Remove bogus `wrap`.
2020-03-16 19:28:22 -07:00
Sebastian Ullrich
ed1ce9b59f
chore: make lock error message more precise
2020-03-04 19:09:14 -08:00
Leonardo de Moura
16d88b04ea
chore: avoid cnstr_set_scalar and cnstr_get_scalar
2020-02-25 13:27:30 -08:00
Leonardo de Moura
6ada62a3ee
feat: export helper functions
...
Motivation: prevent changes in the scalar fields layout from breaking
C++ code.
Ideally, we should do that for all constructors, and implement a tool
that creates the C++ functions automatically for us.
We don't do it because we will delete most of this code after we
finish the Lean4 transition.
2020-02-25 13:00:22 -08:00
Leonardo de Moura
e2ad834a2c
fix: weird bug that only occurs in debug mode
2020-01-09 16:11:33 -08:00
Sebastian Ullrich
3a2e63c040
fix: register_unsigned_option registered a bool option
2019-12-07 20:10:00 +01:00
Leonardo de Moura
4fe9179f19
feat: option declarations in Lean
2019-12-05 06:18:35 -08:00
Sebastian Ullrich
33ce758126
feat: assume A in --plugin A.so is package name and use it to synthesize initializer symbol name
2019-11-20 16:39:53 +01:00
Sebastian Ullrich
3dcd4febd9
feat: make LEAN_PATH a mapping from package names to root dirs, remove C++ impl
2019-11-20 16:39:53 +01:00
Leonardo de Moura
269f20efe8
fix: ensure C++ and Lean use the same hash for Name
2019-11-18 19:54:05 -08:00
Leonardo de Moura
46adfcfdb6
refactor: Name fully implemented in Lean
2019-11-18 19:54:05 -08:00
Sebastian Ullrich
ae3b3bb825
chore: remove cygwin support
2019-11-12 08:28:58 -08:00
Leonardo de Moura
423b0fed3a
refactor: use Array Expr at DelayedMVarAssignment
2019-10-25 12:03:09 -07:00
Leonardo de Moura
a2abbdbf9a
chore: fix imports using script
...
This is just a draft.
```
for f in `find . -name '*.lean'`; do echo $f; gsed "/^import/s/\b\(.\)/\u\1/g" $f > tmp; gsed "/^Import/s/Import/import/g" tmp > $f; done
```
2019-10-04 14:34:58 -07:00
Leonardo de Moura
cc18c0ef91
feat(library/init/lean/expr): add Expr.hasFVar and Expr.hasMVar
...
cc @dselsam
2019-10-02 10:07:26 -07:00
Leonardo de Moura
70a90ca73e
feat(library/init/lean/parser/identifier): allow ! and ? in the identifiers
2019-10-01 14:45:07 -07:00
Leonardo de Moura
097a127c69
feat(util/map_foreach): add phashmap_foreach, fix smap_foreach, update stage0
2019-09-20 14:22:03 -07:00
Leonardo de Moura
2abca22e00
fix(kernel/instantiate): compilation problem on Windows
2019-09-18 18:41:59 -07:00
Leonardo de Moura
8148136aa9
fix(util/nat): nat::get_small_value must return size_t since unbox now returns size_t
2019-09-18 17:13:46 -07:00
Sebastian Ullrich
2d04ecc704
refactor(util/object_ref): move and adjust cnstr_get_ref_t
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
5194f90afc
chore(util/kvmap): make constructors explicit
...
C++ decided to compare a `size_t` and a `nat` by converting them both to `data_value`...
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
9015fc1e34
chore(library/compiler/ir_interpreter): add step-level trace
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
9b8300657a
refactor(util/option_ref): match other wrapper classes
2019-09-12 18:22:02 +02:00
Sebastian Ullrich
4aa4a4d5f1
chore(runtime/object,util/object_ref): missing assertions
2019-09-12 18:22:02 +02:00
Leonardo de Moura
720c3ca3e4
fix(runtime): size_t issue OSX vs Linux
2019-08-24 09:30:12 -07:00
Leonardo de Moura
694800ce4f
chore(util): remove dead code
2019-08-24 07:40:38 -07:00
Leonardo de Moura
dcd15f3424
refactor(runtime): C backend
2019-08-24 07:40:38 -07:00
Leonardo de Moura
b2693962bd
chore(library/init/lean): export as C functions
2019-08-17 07:30:07 -07:00
Leonardo de Moura
a5c97e21bf
chore(library/init/lean): export as C functions
2019-08-16 20:15:30 -07:00
Leonardo de Moura
03e455d32d
feat(frontends/lean/elaborator): add oldElaborate
2019-08-13 19:23:29 -07:00
Sebastian Ullrich
53a26b94ff
chore(util/lean_path): remove leanpkg.path support
...
Because Lean 4 will not compile dependencies by itself, there is not much of a
point in it resolving them by itself either. The build tool that ensures that
all dependencies have been built should call `lean` with the `LEAN_PATH`
environment variable set accordingly.
2019-07-25 17:46:40 -07:00
Sebastian Ullrich
723e9cc430
chore(runtime/object): fix usize_to_nat name
2019-07-05 16:26:54 -07:00
Sebastian Ullrich
2c9dce6eed
fix(runtime/mpz): use size_t instead of unsigned long for Windows compatibility
2019-07-05 11:24:15 +02:00
Leonardo de Moura
a77c6f3917
chore(util/object_ref): style
2019-06-27 18:01:54 -07:00
Leonardo de Moura
4e444a283d
feat(library/class): switch to Lean implementation
2019-06-27 13:51:09 -07:00
Leonardo de Moura
8a1e2bf79b
chore(library/projection): preparing to port projection_info to Lean
2019-06-25 13:17:59 -07:00
Leonardo de Moura
6cb35bd8a1
chore(frontends/lean/elaborator): replace C++ elaborator attributes with new ones implemented in Lean
2019-06-25 08:37:19 -07:00
Leonardo de Moura
9ac18251f8
chore(src/sexpr): remove sexpr
2019-06-07 11:00:00 -07:00
Leonardo de Moura
d664486eca
chore(util): move format to src/util
2019-06-07 10:58:23 -07:00
Leonardo de Moura
12809945ba
chore(util/sexpr/format): use Lean implementation
2019-06-07 10:45:42 -07:00
Leonardo de Moura
5eaca0d89e
chore(util/sexpr/format): preparing to switch to Lean implementation
2019-06-07 10:18:23 -07:00
Leonardo de Moura
3afa4f7ab0
chore(util/safe_arith): remove dead code
2019-06-07 09:52:31 -07:00
Leonardo de Moura
f6b9a0fe9c
chore(util/sexpr/format): preparing to switch to Lean implementation
2019-06-07 09:46:34 -07:00
Leonardo de Moura
7beb74fb0f
chore(util/sexpr/format): remove dead code
2019-06-07 09:28:30 -07:00
Leonardo de Moura
2a557b1bbd
feat(frontends/lean/decl_attributes): connect old frontend to new attribute manager
2019-06-06 10:43:09 -07:00
Leonardo de Moura
fd29b7e45d
feat(util/io): add helper functions for consuming IO results in C++
2019-06-05 13:53:38 -07:00
Leonardo de Moura
9310c807e6
feat(library/private): use environment extension in Lean
...
Remark: we don't need the `m_inv_map` anymore.
2019-06-03 11:50:33 -07:00