ForkJoin
Types
Functions
def pool (workers : Int | workers > 0 && workers ≤ 64) : {p : Pool | pool_workers p = workers}
def shutdown (1 p : Pool) : Unit
def fork (1 p : Pool) (task : (_ : Unit) → a) : {f : (Forked a) | forked_workers f = pool_workers p}
def forked_pool (1 f : (Forked a)) : {p : Pool | pool_workers p = forked_workers f}
def forked_future (1 f : (Forked a)) : (Future a)
def fork2 (1 p : Pool) (left : (_ : Unit) → a) (right : (_ : Unit) → b) : {f : (Forked2 a b) | forked2_workers f = pool_workers p}
def forked2_pool (1 f : (Forked2 a b)) : {p : Pool | pool_workers p = forked2_workers f}
def forked2_left (1 f : (Forked2 a b)) : (Future a)
def forked2_right (1 f : (Forked2 a b)) : (Future b)
def invoke (1 p : Pool) (task : (_ : Unit) → a) : {i : (Invoked a) | invoked_workers i = pool_workers p}
def invoked_pool (1 i : (Invoked a)) : {p : Pool | pool_workers p = invoked_workers i}
def invoked_value (1 i : (Invoked a)) : a
def join (1 future : (Future a)) : a
def join_timeout (seconds : Float | seconds > 0.0) (1 future : (Future a)) : a
def join2 (1 left : (Future a)) (1 right : (Future b)) : (Joined2 a b)
def joined_fst (1 j : (Joined2 a b)) : a
def joined_snd (1 j : (Joined2 a b)) : b
def parallel2 (workers : Int | workers > 0 && workers ≤ 64) (left : (_ : Unit) → a) (right : (_ : Unit) → b) : (Joined2 a b)
def par_map (_inst2330 : (Copy a)) (workers : Int | workers > 0 && workers ≤ 64) (f : (x : a | p x) → {w : b | q w}) (1 xs : (Array a)) : {ys : (Array b) | size ys = size xs}
def halves (1 xs : (Array a) | size xs ≥ 2) : {h : (Halves a) | half_left_size h + half_right_size h = size xs && half_left_size h ≥ 1 && half_right_size h ≥ 1}
def half_left (1 h : (Halves a)) : {xs : (Array a) | size xs = half_left_size h && size xs ≥ 1}
def half_right (1 h : (Halves a)) : {xs : (Array a) | size xs = half_right_size h && size xs ≥ 1}
def with_forked (1 token : (Forked a)) (1 consume : (1 pool : Pool | pool_workers pool = forked_workers token) → (1 future : (Future a)) → c) : c
def with_forked2 (1 token : (Forked2 a b)) (
1 consume : (1 pool : Pool | pool_workers pool = forked2_workers token) →
(1 left : (Future a)) → (1 right : (Future b)) → c
) : c
def with_invoked (_inst2331 : (Copy a)) (1 token : (Invoked a)) (1 consume : (1 pool : Pool | pool_workers pool = invoked_workers token) → (value : a) → c) : c
def with_invoked_owned (1 token : (Invoked a)) (1 consume : (1 pool : Pool | pool_workers pool = invoked_workers token) → (1 value : a) → c) : c
def with_joined (_inst2332 : (Copy a)) (_inst2333 : (Copy b)) (1 token : (Joined2 a b)) (1 consume : (left : a) → (right : b) → c) : c
def with_joined_owned (1 token : (Joined2 a b)) (1 consume : (1 left : a) → (1 right : b) → c) : c
def with_halves (1 token : (Halves a)) (
1 consume : (1 left : (Array a) | size left = half_left_size token && size left ≥ 1) →
(1 right : (Array a) | size right = half_right_size token && size right ≥ 1) → c
) : c
Uninterpreted
Functions declared as def f ... = uninterpreted: only their signature is known to the verifier; they have no body.
def pool_workers : (p : Pool) → Int
def forked_workers : (f : (Forked a)) → Int
def forked2_workers : (f : (Forked2 a b)) → Int
def invoked_workers : (i : (Invoked a)) → Int
def half_left_size : (h : (Halves a)) → Int
def half_right_size : (h : (Halves a)) → Int