parTw >> updateDB { } val parTw = >> (fun x => findUser(social, user)) { } val parFb = >> (fun x => findUserFb(social, user)) (based on ParT) When is it safe to kill computations? How to do it efficiently? Aliasing prevents killing unfinished computations
from type system 3. No manual introduction of killing points 4. Integrated in the actor-based Encore language Limitation: Computations must be free of side effects
} val parTw = >> (fun x => findUser(social, user)) { } val parFb = >> (fun x => findUserFb(social, user)) modes read ≊ shared lin ≊ affine fun findUser(social : lin Twitter, user : read User): read Info … end (parTw >> updateDB)
let !x = parInf in (!x >> λ) Sharing a linear reference parInf= parInf :: lin Par[read Info] !x :: read Par[read Info] !x = Leverage static information
let !x = parInf in (!x >> λ) Sharing a linear reference parInf= parInf :: lin Par[read Info] !x :: read Par[read Info] !x = read Leverage static information
let !x = parInf in (!x >> λ) Sharing a linear reference parInf= parInf :: lin Par[read Info] !x :: read Par[read Info] !x = read Leverage static information
let !x = parInf in (!x >> λ) Sharing a linear reference parInf= parInf :: lin Par[read Info] !x :: read Par[read Info] !x = read Leverage static information ParT is statically checked, but the actual behaviour depends on the dynamic labels, which themselves may change
let !x = parInf in (!x >> λ) Sharing a linear reference parInf= parInf :: lin Par[read Info] !x :: read Par[read Info] !x = read Leverage static information ParT is statically checked, but the actual behaviour depends on the dynamic labels, which themselves may change
linear subord active local Cannot escape its actor read Immutable No aliasing allowed Cannot escape its aggregate Actor, method calls return futures Restriction: A type has a single capability type
linear subord active local Cannot escape its actor read Immutable No aliasing allowed Cannot escape its aggregate Actor, method calls return futures Restriction: A type has a single capability type
linear subord active local Cannot escape its actor read Immutable No aliasing allowed Cannot escape its aggregate Actor, method calls return futures Restriction: A type has a single capability type
linear subord active local Cannot escape its actor read Immutable No aliasing allowed Cannot escape its aggregate Actor, method calls return futures Restriction: A type has a single capability type
soundness • Implementation • Guided by SAT solver and other benchmarks - Kill thread, actor or introduce well-defined stopping points - ParT internally relies on a task or actor running computations
(shared) references are nop • linear references can be killed • Thread-local reasoning when killing parallel computations • Leverage static information: e.g. polymorphic dispatch, in-place updates • Integration with Encore (status)