Commit graph

267 commits

Author SHA1 Message Date
Gabriel Ebner
e2fa363423 feat(library/system/io,shell/lean): add --run switch 2017-04-11 16:41:30 -07:00
Leonardo de Moura
6c68aeee01 feat(library/system/io): add io.iterate primitive 2017-03-31 11:34:09 -07:00
Sebastian Ullrich
4a33045b84 chore(tests/lean,shell/lean): run leantests and leanruntests in parallel 2017-03-30 06:04:00 +02:00
Jared Roesch
dc4086d0ed feat(library/vm/process): add basic process support 2017-03-28 18:08:06 -07:00
Leonardo de Moura
70e6c380ed fix(library/vm/vm_io): fix io_monad
see #1485
2017-03-27 13:42:08 -07:00
Sebastian Ullrich
c7b47c7b7f fix(system/io): try to fix io monad 2017-03-27 13:42:08 -07:00
Leonardo de Moura
7db44ce403 chore(library/vm/vm_io): style 2017-03-23 16:58:28 -07:00
Leonardo de Moura
fe3875a103 feat(library/system/io): add stdin, stdout and stderr 2017-03-23 16:49:39 -07:00
Leonardo de Moura
82748a61b7 feat(library/system/io): basic file system API 2017-03-23 16:30:16 -07:00
Leonardo de Moura
527c8851a8 refactor(library/system/io): use type classes 2017-03-23 14:29:07 -07:00
Gabriel Ebner
fa19b3c94d fix(library/vm/vm): prevent segfault in out-of-memory conditions 2017-03-23 09:00:59 +01:00
Gabriel Ebner
a6d2e11a91 refactor(util/task): remove needs_separate_thread option 2017-03-23 08:57:56 +01:00
Gabriel Ebner
3eba8d3ffc refactor(util/task): do not propagate errors 2017-03-23 08:57:56 +01:00
Gabriel Ebner
2edefdcc12 fix(library/vm/vm_task): fix trace messages 2017-03-23 08:57:56 +01:00
Gabriel Ebner
595cbb8fe9 refactor(*): task<T>, log_tree, cancellation_token 2017-03-23 08:57:52 +01:00
Leonardo de Moura
60dd85719c feat(library/system/io): system.io without axioms 2017-03-22 23:36:05 -07:00
Sebastian Ullrich
da7e21696e feat(init/meta/interactive): rw goal info on , 2017-03-22 07:54:12 -07:00
Leonardo de Moura
31b6dc222d feat(library/init/meta/expr): add expr.is_annotation 2017-03-18 13:40:11 -07:00
Sebastian Ullrich
e0856284b0 feat(frontends/lean,emacs): tactic info before elaboration, fix many edge cases 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
9137248707 fix(library/vm/vm_rb_map): assertion violation in destructor of vb_rb_map_ts_copy with nat keys or values 2017-03-17 18:05:11 -07:00
Leonardo de Moura
b0a33259ee fix(library/compiler/simp_inductive): array^.data should not be treated as a regular projection 2017-03-09 19:11:51 -08:00
Leonardo de Moura
839645c489 feat(library/system/io): replace io.monad with io.bind, io.return and io.map 2017-03-07 16:10:47 -08:00
Sebastian Ullrich
5d68938a9c feat(frontends/lean): expr literals ```(...) 2017-03-05 08:37:16 -08:00
Sebastian Ullrich
44b27a9a44 chore(library/vm/vm): fix comment 2017-02-23 01:52:13 +01:00
Leonardo de Moura
d9307413b9 feat(library/compiler): skip bytecode optimization for interactive tactics
This is just overhead for begin...end blocks.
Moreover, "live variable analysis" is currently a recursive
procedure, and Lean will run of stack space when processing big begin
end blocks (> 1000 tactics).
2017-02-21 21:23:58 -08:00
Leonardo de Moura
074574be0a feat(library/vm/vm_array): add native array.iterate and array.foreach 2017-02-21 16:22:25 -08:00
Leonardo de Moura
d9dcb4461e perf(library/vm/vm_array): minor optimization 2017-02-21 15:43:48 -08:00
Leonardo de Moura
3f87fd15eb feat(library/vm): add liveness analysis, and support destructive updates for lean arrays 2017-02-21 15:09:37 -08:00
Sebastian Ullrich
a053175714 refactor(init/meta,library/vm): use structure for position information 2017-02-21 11:06:39 -08:00
Leonardo de Moura
d1d5428808 feat(library): add check_constants.lean validation, cleanup unused names, minor stdlib fixes 2017-02-21 10:45:31 -08:00
Leonardo de Moura
04fd50e4e8 chore(*): fix tests and style 2017-02-20 23:53:44 -08:00
Leonardo de Moura
87eaedc580 feat(library/vm): shrink VM stack eagerly
TODO: liveness analysis objects on the VM stack
2017-02-20 23:10:50 -08:00
Leonardo de Moura
e9a98362d3 feat(library): functional arrays 2017-02-20 22:00:02 -08:00
Leonardo de Moura
0626835530 feat(library/init/meta): add native name_set 2017-02-18 19:07:50 -08:00
diakopter
554e6bad90 chore(library): fix warning 2017-02-17 21:09:23 -08:00
Johannes Hölzl
bb4920fcbc feat(library/vm/vm_expr): export instantiate_univ_params 2017-02-17 20:08:18 -08:00
Johannes Hölzl
3db0ebdcf0 feat(library/tactic/match_tactic): return also assignments for universe meta-variables 2017-02-17 20:08:09 -08:00
Sebastian Ullrich
69ed7b940f refactor(init/meta/interactive): query position information dynamically 2017-02-17 15:41:58 +01:00
Sebastian Ullrich
4d41b03168 chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
Sebastian Ullrich
e8fa54cc51 refactor(init/meta): move macro creation defs from expr to pexpr 2017-02-17 13:45:57 +01:00
Sebastian Ullrich
9d8c84713c refactor(*): reduce exception context info from expr to pos_info 2017-02-17 13:45:57 +01:00
Sebastian Ullrich
e14eab2db8 chore(test/lean/interactive): do not test for exact source information 2017-02-17 13:45:56 +01:00
Sebastian Ullrich
d15591a2d8 feat(library,frontends/lean): expose parser to Lean and use for parsing tactic parameters 2017-02-17 13:45:56 +01:00
Sebastian Ullrich
bdf12a525e fix(library/vm/vm_string): signed->unsigned cast 2017-02-17 13:03:47 +01:00
Leonardo de Moura
7886a78967 fix(library/vm/vm): incorrect lean_vm_check 2017-02-16 11:39:23 -08:00
Leonardo de Moura
ad713c81b4 perf(library/vm/vm_nat): use __builtin_expect to optimize nat operations
@gebner I used the __builtin_expect trick to optimize the vm_nat module.
Most of the time, we are processing small numbers.
In the following example, the runtime went from 7.27 secs to 6.6 secs
on my machine.

def mk (a : nat) : nat → list nat
| 0     := []
| (nat.succ n) := a :: mk n

def Sum : list nat → nat → nat
| []      r := r
| (n::ns) r := Sum ns (r + n)

def loop : nat → nat → nat
| s 0            := s
| s (nat.succ n) := loop (s + (Sum (mk (n % 2) 1000000) 0)) n

vm_eval timeit "time" $ loop 0 30
2017-02-15 23:25:26 -08:00
Leonardo de Moura
bff3e44656 fix(library/vm/vm): compilation error when multi threading is disabled 2017-02-15 22:50:44 -08:00
Leonardo de Moura
245b4be315 fix(library/vm/vm): compilation warning 2017-02-15 20:32:22 -08:00
Leonardo de Moura
c5287237ee fix(library/vm): race condition in the profiler initialization code 2017-02-15 15:35:41 -08:00
Gabriel Ebner
cbebedb53b feat(library/vm/vm): improve vm check error message 2017-02-15 13:39:10 -08:00