Commit graph

184 commits

Author SHA1 Message Date
Sebastian Ullrich
345ecd20c9
chore: tag prerelease builds with -pre (#5943) 2024-11-06 14:47:52 +00:00
Sebastian Ullrich
c723ae7f97 chore: CI: build 64-bit platforms consistently with GMP
fix

arm64?

try different fix

`uses_gmp` .olean bit, bump .olean version

add lean_version

make sure to use cache gmp on x86 Linux
2024-11-01 22:48:49 +11:00
Joachim Breitner
c4718a87ab
refactor: constructions: modify environment in lean world (#4474)
this is a first step towards porting the code `constructions.cpp` to
Lean: It leaves the construction of the `Declaration` untouched, but
moves adding the declarations to the environment, and setting various
attributes, to the Lean world.

This allows the remaining logic (the construction of the `Declaration`)
to be implemented in Lean separately and easily compared to the C++
implementation, before we replace that too.

To that end, `Declaraion` gains an `BEq` instance.

---------

Co-authored-by: Leonardo de Moura <leomoura@amazon.com>
Co-authored-by: Arthur Adjedj <arthur.adjedj@ens-paris-saclay.fr>
2024-06-19 08:58:53 +00:00
Sebastian Ullrich
2beb948a3b
feat: System.Platform.target (#3207)
Makes the LLVM triple of the current platform available to Lean code
towards a solution for #2754.

Defaults to the empty string if the compiler is not clang, which can
introduce some divergence between CI and local builds but should not be
noticeable in most cases and is not really possible to avoid.
2024-01-24 12:11:00 +00:00
Sebastian Ullrich
79251f5fa2
feat: embed and check githash in .olean (#2766)
This is an additional safety net on top of #2749: it protects users that
circumvent the build system (e.g. with `lake env`) as well as obviates
the need for TOCTOU-like race condition checks in the build system.

The check is activated by `CHECK_OLEAN_VERSION=ON`, which now defaults
to `OFF` as the sensible default for local development. When activated,
`USE_GITHASH=ON` is also force-enabled for stage 0 in order to make sure
that stage 1 can load its own core library.
2023-11-27 10:24:43 +00:00
Leonardo de Moura
50ac21d0a6 refactor: move is_constructor_app to inductive.cpp 2021-11-25 11:31:00 -08:00
Sebastian Ullrich
5a65189894 chore: use empty string for --githash instead of weird "GITDIR-NOTFOUND" when not building from commit 2021-11-04 15:29:48 -07:00
Leonardo de Moura
80a73dd903 feat: basic support for definitions at inductive declarations 2021-10-25 12:44:35 -07:00
Leonardo de Moura
c8406a301d chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
Leonardo de Moura
14b611af96 refactor: move buffer.h and *_ref.h files to runtime 2021-08-16 15:39:38 -07:00
Sebastian Ullrich
a3a8d76e96 chore: move pp_options.cpp to Lean 2021-01-27 14:16:12 +01:00
Sebastian Ullrich
74c2d1dca9 chore: remove io_state & abstract_type_context 2021-01-12 09:51:14 -08:00
Sebastian Ullrich
34cf4bc3ff chore: fix LEAN_SPECIAL_VERSION_DESC 2021-01-04 15:44:03 +01:00
Sebastian Ullrich
6e33020da4 feat: version information API 2020-12-29 14:42:48 -08:00
Leonardo de Moura
de568b1268 chore: remove dead code 2020-10-28 09:33:19 -07:00
Leonardo de Moura
c2b2f62bc4 chore: remove dead code 2020-10-28 09:33:19 -07:00
Leonardo de Moura
270f6df5cb chore: remove aux_match module
This is not needed anymore since the old equation compiler was removed.
2020-10-27 09:51:55 -07:00
Leonardo de Moura
7d8c079d71 chore: remove abstract_context_cache 2020-10-27 09:37:21 -07:00
Leonardo de Moura
503504e962 chore: cleanup 2020-10-27 09:37:21 -07:00
Leonardo de Moura
7a24fe73ca chore: remove dead code 2020-10-25 20:49:30 -07:00
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
4e7ca37204 chore: use Lean version 2020-09-05 08:15:53 -07:00
Leonardo de Moura
ea5eed7964 fix: do not assume the constructor name prefix is the inductive type name 2020-07-23 14:36:54 -07:00
Leonardo de Moura
e596820f2e chore: remove () modifier
cc @Kha
2020-05-12 15:02:02 -07:00
Leonardo de Moura
c7d96a6522 fix: theorem values are tasks 2020-01-16 17:20:36 -08:00
Leonardo de Moura
b09fb4348d chore: rename Name constructors 2019-11-18 19:54:05 -08:00
Leonardo de Moura
50207e2c5a chore(library/constants.txt): remove dead variables 2019-03-22 13:26:48 -07:00
Leonardo de Moura
2b76d79791 chore(library/init/core): remove more nonsense 2019-03-22 13:14:20 -07:00
Leonardo de Moura
930653f292 chore(library/init): Unit.star => Unit.unit
@kha Our stdlib is starting to match the names we used in our paper :)
2019-03-22 13:06:45 -07:00
Leonardo de Moura
2be87ecd92 chore(library/init): Bool.tt => Bool.true and Bool.ff => Bool.false 2019-03-21 15:06:44 -07:00
Leonardo de Moura
039e7fab48 refactor(library): add suffixes.h with commonly used suffixes such as brec_on 2019-03-21 15:06:43 -07:00
Leonardo de Moura
0888dee25e chore(*): meta ==> unsafe 2019-03-15 15:04:40 -07:00
Leonardo de Moura
0cb3ac683d feat(library/compiler): connect new const_folding module implemented in Lean with csimp 2019-02-15 14:37:48 -08:00
Leonardo de Moura
9675b7c952 fix(frontends/lean/elaborator): ignore mdata when processing field notation 2019-02-11 17:29:38 -08:00
Leonardo de Moura
097aa7ef14 chore(library/compiler): cleanup cce 2018-09-21 10:25:35 -07:00
Leonardo de Moura
2abe11ce63 chore(library): _meta_aux ==> _meta_rec 2018-09-17 09:08:12 -07:00
Leonardo de Moura
dacc4c9cd6 chore(kernel): move abstract_type_context to library 2018-09-08 08:29:51 -07:00
Leonardo de Moura
13fbd8304e chore(library,frontends/lean): use is_constructor, is_recursor, is_inductive helper functions
They do not throw exception if the constant is not declared in the environment.
2018-09-07 20:36:42 -07:00
Leonardo de Moura
5d00936a8f chore(*): remove some old_type_checker dependencies 2018-09-07 08:48:21 -07:00
Leonardo de Moura
58e91559d0 feat(*): use new inductive datatype module 2018-09-06 18:09:22 -07:00
Leonardo de Moura
f335623530 feat(library/constructions/brec_on): add below and ibelow for new inductive datatype module 2018-09-05 14:46:03 -07:00
Leonardo de Moura
92c4b2ee0d chore(library/util): minor 2018-09-05 14:46:03 -07:00
Leonardo de Moura
4964ad660f feat(library/constructions/no_confusion): add no_confusion for new inductive datatype module 2018-09-05 10:27:49 -07:00
Leonardo de Moura
4773a3be5f feat(library/constructions/no_confusion): add no_confusion_type for new inductive datatype module 2018-09-05 09:55:13 -07:00
Leonardo de Moura
dd03747d22 chore(kernel): univ_param vs lparam, level_param_names ==> names, and other inconsistencies 2018-09-03 13:05:42 -07:00
Leonardo de Moura
82095cc018 refactor(kernel): split declaration into declaration and constant_info
This is just another step towards the design described at commit 16598391a07d4a
2018-08-22 17:53:11 -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
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
bc57c66ae3 refactor(kernel/level): naming consistency 2018-06-22 10:29:56 -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