Commit graph

13774 commits

Author SHA1 Message Date
Leonardo de Moura
39ef7aeee2 chore(util): remove memory_pool
memory_pool object introduces memory contention and unnecessary
complexity. Moreover, it actually reduces performance when we compile
Lean using JEMALLOC.

Here are the numbers for corelib

jemalloc with memory_pool:    13.83 secs
jemalloc without memory_pool: 13.60 secs
2018-04-12 16:43:10 -07:00
Leonardo de Moura
1dd7165694 chore(util): remove dead code 2018-04-12 16:43:10 -07:00
Leonardo de Moura
db4b00c7d8 chore(util,library): remove small_object_allocator
We use small_object_allocator to allocate vm_obj's.
However small_object_allocator is not thread safe. So, we need to copy
vm_obj's between threads. Moreover, in our experiments, we observed that
JEMALLOC is actually faster than the small_object_allocator.

Here are numbers for the reduced corelib.

small_object_allocator:  15.62 secs
gcc 4.9 allocator:       16.19 secs
jemalloc:                13.83 secs
2018-04-12 16:43:10 -07:00
Leonardo de Moura
4c14668bf0 chore(util/lru_cache): remove dead code 2018-04-12 16:43:10 -07:00
Leonardo de Moura
1465b58369 chore(library): remove arith_instance
It was used by norm_num. We don't need it anymore.
2018-04-12 16:43:10 -07:00
Leonardo de Moura
e3c1f6c7da chore(util/numerics): remove more leftovers from Lean1 2018-04-12 16:43:10 -07:00
Leonardo de Moura
d22ce2a335 chore(util/polynomial): remove leftover from Lean1 2018-04-12 16:43:10 -07:00
Leonardo de Moura
09baa982e6 chore(util/numerics): leftover from when we had Lua bindings 2018-04-12 16:43:10 -07:00
Leonardo de Moura
46b0fd35ec chore(util/numerics): remove Z/pZ field
This abstraction was added when we started Lean.
We wanted to focus on nonlinear arithmetic and support dReal.
The zpz module was going to be used to implement polynomial
factorization procedures similar to the ones in Z3 and computer algebra
systems.

This is not a goal for the Lean project anymore.
2018-04-12 16:43:10 -07:00
Leonardo de Moura
ee3589d99c chore(util/numerics): remove float/double
These two abstractions were added when we planned to have an efficient
Simplex module, written in C++, in Lean. We have moved this module to
Z3. So, we don't need these abstractions anymore.
2018-04-12 16:43:10 -07:00
Leonardo de Moura
e938a75361 chore(util/numerics): remove binary rationals
Binary rationals were added when we started the Lean project.
We wanted to use them to implement an algebraic number module similar to the
one we implemented in Z3.
If one day we implement algebraic numbers in Lean, we will do it in Lean
instead of C++.
2018-04-12 16:43:10 -07:00
Sebastian Ullrich
fb22ef0fb2 chore(.appveyor,.travis): disable leanpkg registry tests 2018-04-12 18:32:20 +02:00
Sebastian Ullrich
726a5547de fix(init/core): typed_expr should accept Props
Fixes #1954
2018-04-12 16:14:47 +02:00
Sebastian Ullrich
2b1e207e02 chore(shell/CMakeLists): disable leanpkg tests 2018-04-12 13:54:49 +02:00
Sebastian Ullrich
4e30aa9f83 chore(README): point CI links to lean4 branch
Note, Travis does not have a direct link to builds of a specific branch
2018-04-12 13:50:42 +02:00
Leonardo de Moura
429edd7a5e fix(frontends/lean/definition_cmds): fixes #1956 2018-04-11 16:48:04 -07:00
Leonardo de Moura
1ad1080f11 refactor(library): keep only basic nat theorems
All theorems are proved without using the tactic framework.
Thus, we can define `fin/uint32/uint64` types and their operations
before we define the tactic framework.
2018-04-11 16:47:54 -07:00
Leonardo de Moura
ee8a79a270 chore(*): remove C API 2018-04-10 16:48:02 -07:00
Leonardo de Moura
75f91df707 chore(library/init/data/fin/ops): remove unnecessary ops 2018-04-10 16:41:18 -07:00
Leonardo de Moura
e1322491c5 chore(*): remove discr_tree 2018-04-10 16:31:55 -07:00
Leonardo de Moura
ce0467638e chore(*): remove unification hints 2018-04-10 16:29:04 -07:00
Leonardo de Moura
10ddfdafbd chore(*): remove VM monitor 2018-04-10 16:08:47 -07:00
Leonardo de Moura
b74e05b262 chore(*): remove mk_*_instance tactics 2018-04-10 16:03:42 -07:00
Leonardo de Moura
1b1495aea4 chore(*): remove norm_num 2018-04-10 15:59:29 -07:00
Leonardo de Moura
0bcf5c8f5d chore(*): remove algebra 2018-04-10 15:53:14 -07:00
Leonardo de Moura
7aaac31e35 chore(library/init/data/nat): remove dependency 2018-04-10 15:48:13 -07:00
Leonardo de Moura
b0e49535fa chore(*): remove transfer and coinductive predicates 2018-04-10 13:38:18 -07:00
Leonardo de Moura
c03d351744 chore(library/init/data/int): keep only definitions 2018-04-10 13:29:06 -07:00
Leonardo de Moura
a023128738 chore(*): reduce corelib 2018-04-10 13:11:40 -07:00
Leonardo de Moura
6234c60aae chore(*): disable test suite 2018-04-10 12:56:55 -07:00
Leonardo de Moura
47cd2ee61a chore(leanpkg): delete 2018-04-10 12:43:17 -07:00
Leonardo de Moura
41d1293b38 chore(*): reduce corelib 2018-04-10 12:33:09 -07:00
Leonardo de Moura
b14d69b1d7 chore(*): remove converter, ac_tactics, hole_commands, rbtree/rbmap proofs, bitvec 2018-04-10 12:25:51 -07:00
Leonardo de Moura
a2f0bf7c1b chore(*): disable SMT tactic framework and backward chaining 2018-04-10 12:05:51 -07:00
Leonardo de Moura
d36b859c65 chore(library/delayed_abstraction): add missing 'virtual' 2018-04-09 17:07:57 -07:00
Leonardo de Moura
c08a3bc557 refactor(library/typed_expr): move typed_expr to frontends/lean 2018-04-09 15:25:40 -07:00
Leonardo de Moura
bcaa0b2ad3 refactor(library/typed_expr): do not use macros for implementing typed_expr
Remark: in Lean4, we will not have macro_defs.
2018-04-09 15:16:46 -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
Sebastian Ullrich
8f55ec4c50 fix(init/core): remove out_param from has_pow
With the current elaboration scheme, out_params and coercions do not mix well,
as evidenced by the following example by @digama:

```
variables {α : Type*} [group α]
def gpow : α → ℤ → α := sorry
instance group.has_pow : has_pow α ℤ := ⟨gpow⟩

example (a : α) : a ^ 0 = 1 := sorry -- failed to synth ⊢ has_pow α ℕ
example (a : α) : a ^ (0:ℕ) = 1 := sorry -- ok, coerces
example (a : α) : a ^ (0:ℤ) = 1 := sorry -- ok
```

The issue is that
* we first try to solve `has_pow ?α ?β`, which is postponed
* then infer `?α = nat` from `a`
* then at some point call `elaborator::synthesize()` and default `β` to `nat`
* then try to solve `has_pow nat nat`, which fails at `int =?= nat`
2018-04-04 13:05:59 +02:00
Sebastian Ullrich
3d692c53b5 chore(tests/lean/struct_class): make test less prone to breakage 2018-04-04 13:04:38 +02:00
Sebastian Ullrich
96c932ab21 fix(util/numeric/mpbq): remove unimplemented move constructor
Apparently g++ started preferring it over the copy constructor in more places
2018-04-02 23:29:39 +02:00
Sebastian Ullrich
17affbd45d chore(library/util): don't hide commit hash for nightlies 2018-04-02 10:44:43 +02:00
Leonardo de Moura
d387103aa2 fix(library/init/core): closes #1951
- Add has_pow type class
- Make `^` notation right associative
2018-03-29 16:25:47 -07:00
Leonardo de Moura
6e0bf8473b test(tests/lean/1952b): another test for issue #1952
This is an example used in one of the comments.
2018-03-29 16:01:26 -07:00
Leonardo de Moura
66e7873c22 fix(library/type_context): elim_delayed_abstraction must check whether metavariable is already assigned
fixes #1952
2018-03-29 15:53:17 -07:00
Leonardo de Moura
8e8232605a chore(library/compiler/inliner): fix weird include 2018-03-29 13:08:43 -07:00
Sebastian Ullrich
65cb5e2bea chore(script/deploy_nightly): show git log 2018-03-29 14:26:25 +02:00
Sebastian Ullrich
56f823b328 chore(script/setup_nightly): fix OS X and repeated nightly builds 2018-03-29 09:14:48 +02:00
Sebastian Ullrich
3fefe94757 refactor(library/init/core,library/init/unit): make unit an abbreviation of punit.{0} 2018-03-27 10:33:04 -07:00