Commit graph

28 commits

Author SHA1 Message Date
Leonardo de Moura
01ea596aea refactor(kernel/expr): implement expr using runtime/object 2018-06-21 16:05:33 -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
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
b84090aaca feat(library/annotation): remove annonation macro
We now use the new `expr.mdata` constructor.
2018-06-18 13:39:02 -07:00
Leonardo de Moura
0847571ea6 feat(kernel): add mdata constructor 2018-06-18 13:36:22 -07:00
Leonardo de Moura
78192972e9 chore(kernel): expr_kind::Meta ==> expr_kind::MVar 2018-06-14 15:13:45 -07:00
Leonardo de Moura
73e067d361 feat(kernel): add expression literals 2018-06-14 14:55:14 -07:00
Leonardo de Moura
335c58f8a7 feat(kernel): add expr_kind::Quote
This is a temporary expr constructor. We need it to be able to eliminate
expr_macro, and then define expr using runtime/object
2018-06-12 17:40:00 -07:00
Leonardo de Moura
1612aca0b2 chore(kernel): rename expr kinds 2018-06-09 06:50:14 -07:00
Leonardo de Moura
c0e1d05199 chore(kernel): type_checker ==> old_type_checker 2018-06-06 16:10:40 -07:00
Leonardo de Moura
3c1ccc9b74 refactor(kernel): use m_meta instead of m_trusted 2018-05-31 11:18:00 -07:00
Leonardo de Moura
1332fbabd6 feat(library,frontends): remove sorry macro
Lean4 will not have macros.
2018-05-24 14:00:30 -07:00
Leonardo de Moura
0556412f8d refactor(*): add runtime folder
@kha The runtime folder includes what is needed to link a
standalone Lean program. It is still contains some unnecessary files.
We will be able to remove them after we release Lean4.
2018-05-14 14:23:56 -07:00
Leonardo de Moura
008b7b2ac2 fix(library/noncomputable): bug at is_noncomputable
In Lean4, the check should be based on the compiler.
That is, a definition should be marked as noncomputable when we cannot
generate code for it.
2018-04-16 14:26:37 -07:00
Leonardo de Moura
8dd53cd94f chore(*): rename expr_struct_* to expr_*
We don't need to modifier `_struct` anymore since we don't use the
pointer equality based hashtables anymore.
2018-04-09 12:55:48 -07:00
Leonardo de Moura
faf8e025e7 chore(kernel): remove m_hash_alloc field from expressions
This field was originally added to create hashtables based on pointer
equality. We don't use them anymore, and the caches based on
m_hash_alloc can be implemented using m_hash without any performance
impact. This commit also fixes two places where `expr_set` was used
instead of `expr_struct_set`.

This commit is also important for the Lean4 plans where `expr` will
be implemented in Lean, and fields like `m_hash_alloc` would require us
to track state.
2018-04-09 10:05:56 -07:00
Leonardo de Moura
d54d759d56 refactor(library): do not use mk_fresh_name 2018-02-21 15:04:19 -08:00
Leonardo de Moura
ac13f8b0f9 feat(library/system/io): add random number generator support in the io monad
@aqjune @nunoplopes: See new tests at tests/lean/run/random.lean

We have two actions in `io`. By default, `io` uses the C++
random number generator, but we can force it to use a `std_gen` with
the action `set_rand_gen`.

def rand (lo : nat := std_range.1) (hi : nat := std_range.2) : io nat
def set_rand_gen : std_gen → io unit
2018-02-15 16:12:08 -08:00
Leonardo de Moura
0ad5497462 refactor(library/io): make io easier to extend and use 2018-01-23 15:03:31 -08:00
Leonardo de Moura
8b0cca57d1 fix(library/noncomputable): fixes #1631
This commit fixes issue #1631. However, it is not a perfect solution.
This commit improves the predicate that checks whether a definition is
noncomputable or not. This predicate was implemented before we had
a code generator.
We should refactor the code and use the code generator to check
whether a definition is noncomputable or not. Otherwise, we will
keep finding mismatches between the predicate at noncomputable.cpp
and what the code generator implements.
2017-05-31 23:16:37 -07:00
Leonardo de Moura
60dd85719c feat(library/system/io): system.io without axioms 2017-03-22 23:36:05 -07:00
Gabriel Ebner
a26e2c9108 feat(library/module): intermediary data structure for environment modifications 2016-12-20 10:15:19 -08:00
Gabriel Ebner
a8df381d20 feat(*): parallel compilation 2016-11-29 11:12:40 -08:00
Leonardo de Moura
d0d75c0923 refactor(kernel): reduce number of configurations supported in the kernel
Now, eta and impredicativity are assumed to be always true.

Motivation: the rest of the system assumes eta.
Regarding impredicativity, we decided to support only the standard library.
2016-09-27 17:07:01 -07:00
Leonardo de Moura
dcc314c109 feat(library/noncomputable): improve is_noncomputable 2016-09-08 14:02:23 -07:00
Leonardo de Moura
d8079aa16a refactor(library): create copy of the kernel type_checker in library
Motivation: it will allow us to simplify the kernel type_checker and
make sure it implements the same API provided by type_context
2016-03-18 14:34:10 -07:00
Leonardo de Moura
308af87b69 feat(library): add 'noncomputable' keyword for the standard library 2015-07-28 21:56:35 -07:00
Leonardo de Moura
a009db2902 feat(library): add module for tracking noncomputable definitions 2015-07-28 18:15:26 -07:00