Mozart Engine 1.4.0 (20080703) playing Oz 3 Testing Reducer... (1, {runnable((skip, {})|nil)}, {}) --> {by [skip]} (1, {runnable(nil)}, {}) (1, {runnable((skip skip, {})|nil)}, {}) --> {by [sequence]} (1, {runnable((skip, {})|(skip, {})|nil)}, {}) (1, {runnable((local X in X = 3 end, {})|nil)}, {}) --> {by [local]} (1, {runnable((X = 3, {X-->x0})|nil)}, {x0}) (1, {runnable((local X in if X then skip else skip end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((if X then skip else skip end, {X-->x0})|nil)}, {x0}) (1, {runnable((if X then skip else skip end, {X-->x0})|nil)}, {x0}) --> {by [if-suspend]} (1, {suspended((if X then skip else skip end, {X-->x0})|nil waitingOn:x0)}, {x0}) (1, {runnable((case X of _ then skip else skip end, {X-->x0})|nil)}, {x0}) --> {by [case-suspend]} (1, {suspended((case X of _ then skip else skip end, {X-->x0})|nil waitingOn:x0)}, {x0}) (1, {runnable(({X}, {X-->x0})|nil)}, {x0}) --> {by [application-suspend]} (1, {suspended(({X}, {X-->x0})|nil waitingOn:x0)}, {x0}) (1, {runnable(({Number.+ X X X}, {System.showInfo-->x1, Number.+-->x0, X-->x2})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2}) --> {by [apply-primitive-suspend]} (1, {suspended(({Number.+ X X X}, {System.showInfo-->x1, Number.+-->x0, X-->x2})|nil waitingOn:x2)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2}) (1, {runnable((local Y in local X in X = Y X = 3 end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((local X in X = Y X = 3 end, {Y-->x0})|nil)}, {x0}) (1, {runnable((local X in X = Y X = 3 end, {Y-->x0})|nil)}, {x0}) --> {by [local]} (1, {runnable((X = Y X = 3, {Y-->x0, X-->x1})|nil)}, {x0, x1}) (1, {runnable((X = Y X = 3, {Y-->x0, X-->x1})|nil)}, {x0, x1}) --> {by [sequence]} (1, {runnable((X = Y, {Y-->x0, X-->x1})|(X = 3, {Y-->x0, X-->x1})|nil)}, {x0, x1}) (1, {runnable((X = Y, {Y-->x0, X-->x1})|(X = 3, {Y-->x0, X-->x1})|nil)}, {x0, x1}) --> {by [var-var binding]} (1, {runnable((X = 3, {Y-->x0, X-->x1})|nil)}, {x1=x0}) (1, {runnable((X = 3, {Y-->x0, X-->x1})|nil)}, {x1=x0}) --> {by [value-creation]} (1, {runnable(nil)}, {x0 = 3, x1 = 3}) (1, {runnable((thread skip end skip, {})|nil)}, {}) --> {by [sequence]} (1, {runnable((thread skip end, {})|(skip, {})|nil)}, {}) (1, {runnable((thread skip end, {})|(skip, {})|nil)}, {}) --> {by [thread-creation]} (1, {runnable((skip, {})|nil), runnable((skip, {})|nil)}, {}) (1, {runnable((skip, {})|nil), runnable((skip, {})|nil)}, {}) --> {by [skip]} (1, {runnable(nil), runnable((skip, {})|nil)}, {}) (1, {runnable(nil), runnable((skip, {})|nil)}, {}) --> {by [thread-finish]} (1, {runnable((skip, {})|nil)}, {}) (1, {runnable((local Res in thread Res = 7 end thread skip end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((thread Res = 7 end thread skip end, {Res-->x0})|nil)}, {x0}) (1, {runnable((thread Res = 7 end thread skip end, {Res-->x0})|nil)}, {x0}) --> {by [sequence]} (1, {runnable((thread Res = 7 end, {Res-->x0})|(thread skip end, {Res-->x0})|nil)}, {x0}) (1, {runnable((thread Res = 7 end, {Res-->x0})|(thread skip end, {Res-->x0})|nil)}, {x0}) --> {by [thread-creation]} (1, {runnable((thread skip end, {Res-->x0})|nil), runnable((Res = 7, {Res-->x0})|nil)}, {x0}) (1, {runnable((thread skip end, {Res-->x0})|nil), runnable((Res = 7, {Res-->x0})|nil)}, {x0}) --> {by [thread-creation]} (1, {runnable(nil), runnable((Res = 7, {Res-->x0})|nil), runnable((skip, {Res-->x0})|nil)}, {x0}) (1, {runnable(nil), runnable((Res = 7, {Res-->x0})|nil), runnable((skip, {Res-->x0})|nil)}, {x0}) --> {by [thread-finish]} (1, {runnable((Res = 7, {Res-->x0})|nil), runnable((skip, {Res-->x0})|nil)}, {x0}) (1, {runnable((Res = 7, {Res-->x0})|nil), runnable((skip, {Res-->x0})|nil)}, {x0}) --> {by [value-creation]} (1, {runnable(nil), runnable((skip, {Res-->x0})|nil)}, {x0 = 7}) (1, {runnable(nil), runnable((skip, {Res-->x0})|nil)}, {x0 = 7}) --> {by [thread-finish]} (1, {runnable((skip, {Res-->x0})|nil)}, {x0 = 7}) (1, {runnable((skip, {Res-->x0})|nil)}, {x0 = 7}) --> {by [skip]} (1, {runnable(nil)}, {x0 = 7}) state(1 [runnable(,,,|,,,)] store(s0 ff(nil))) (1, {runnable((local Res in thread Res = 7 end thread skip end end, {})|nil)}, {}) (1, {runnable((local Res in local Rec in local Th in Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end end end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((local Rec in local Th in Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end end end, {Res-->x0})|nil)}, {x0}) (1, {runnable((local Rec in local Th in Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end end end, {Res-->x0})|nil)}, {x0}) --> {by [local]} (1, {runnable((local Th in Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end end, {Res-->x0, Rec-->x1})|nil)}, {x0, x1}) (1, {runnable((local Th in Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end end, {Res-->x0, Rec-->x1})|nil)}, {x0, x1}) --> {by [local]} (1, {runnable((Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1, x2}) (1, {runnable((Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1, x2}) --> {by [sequence]} (1, {runnable((Th = 3, {Res-->x0, Rec-->x1, Th-->x2})|(Rec = foo(val:Th), {Res-->x0, Rec-->x1, Th-->x2})|(case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1, x2}) (1, {runnable((Th = 3, {Res-->x0, Rec-->x1, Th-->x2})|(Rec = foo(val:Th), {Res-->x0, Rec-->x1, Th-->x2})|(case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1, x2}) --> {by [value-creation]} (1, {runnable((Rec = foo(val:Th), {Res-->x0, Rec-->x1, Th-->x2})|(case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1, x2 = 3}) (1, {runnable((Rec = foo(val:Th), {Res-->x0, Rec-->x1, Th-->x2})|(case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1, x2 = 3}) --> {by [value-creation]} (1, {runnable((case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1 = foo(val:2), x2 = 3}) (1, {runnable((case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1 = foo(val:2), x2 = 3}) --> {by [case-match]} (1, {runnable((Res = bar(baz:Z), {Res-->x0, Rec-->x1, Th-->x2, Z-->x2})|nil)}, {x0, x1 = foo(val:2), x2 = 3}) (1, {runnable((Res = bar(baz:Z), {Res-->x0, Rec-->x1, Th-->x2, Z-->x2})|nil)}, {x0, x1 = foo(val:2), x2 = 3}) --> {by [value-creation]} (1, {runnable(nil)}, {x0 = bar(baz:2), x1 = foo(val:2), x2 = 3}) (1, {runnable((case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1 = blech(val:2), x2 = 3}) --> {by [case-else]} (1, {runnable((Res = proc {$ A R} A = R end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1 = blech(val:2), x2 = 3}) (1, {runnable((Res = proc {$ A R} A = R end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1 = blech(val:2), x2 = 3}) --> {by [value-creation]} (1, {runnable(nil)}, {x0 = closure(proc {$ A R} A = R end {Res-->x0, Rec-->x1, Th-->x2}), x1 = blech(val:2), x2 = 3}) Same As Above (1, {runnable((local Res in local Rec in local Th in Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end end end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((local Rec in local Th in Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end end end, {Res-->x0})|nil)}, {x0}) --> {by [local]} (1, {runnable((local Th in Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end end, {Res-->x0, Rec-->x1})|nil)}, {x0, x1}) --> {by [local]} (1, {runnable((Th = 3 Rec = foo(val:Th) case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1, x2}) --> {by [sequence]} (1, {runnable((Th = 3, {Res-->x0, Rec-->x1, Th-->x2})|(Rec = foo(val:Th), {Res-->x0, Rec-->x1, Th-->x2})|(case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1, x2}) --> {by [value-creation]} (1, {runnable((Rec = foo(val:Th), {Res-->x0, Rec-->x1, Th-->x2})|(case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1, x2 = 3}) --> {by [value-creation]} (1, {runnable((case Rec of foo(val:Z) then Res = bar(baz:Z) else Res = proc {$ A R} A = R end end, {Res-->x0, Rec-->x1, Th-->x2})|nil)}, {x0, x1 = foo(val:2), x2 = 3}) --> {by [case-match]} (1, {runnable((Res = bar(baz:Z), {Res-->x0, Rec-->x1, Th-->x2, Z-->x2})|nil)}, {x0, x1 = foo(val:2), x2 = 3}) --> {by [value-creation]} (1, {runnable(nil)}, {x0 = bar(baz:2), x1 = foo(val:2), x2 = 3}) An Application (1, {runnable((local Res in local Id in local Th in Th = 3 Id = proc {$ X R} R = X end {Id Th Res} end end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((local Id in local Th in Th = 3 Id = proc {$ X R} R = X end {Id Th Res} end end, {Res-->x0})|nil)}, {x0}) --> {by [local]} (1, {runnable((local Th in Th = 3 Id = proc {$ X R} R = X end {Id Th Res} end, {Res-->x0, Id-->x1})|nil)}, {x0, x1}) --> {by [local]} (1, {runnable((Th = 3 Id = proc {$ X R} R = X end {Id Th Res}, {Res-->x0, Id-->x1, Th-->x2})|nil)}, {x0, x1, x2}) --> {by [sequence]} (1, {runnable((Th = 3, {Res-->x0, Id-->x1, Th-->x2})|(Id = proc {$ X R} R = X end, {Res-->x0, Id-->x1, Th-->x2})|({Id Th Res}, {Res-->x0, Id-->x1, Th-->x2})|nil)}, {x0, x1, x2}) --> {by [value-creation]} (1, {runnable((Id = proc {$ X R} R = X end, {Res-->x0, Id-->x1, Th-->x2})|({Id Th Res}, {Res-->x0, Id-->x1, Th-->x2})|nil)}, {x0, x1, x2 = 3}) --> {by [value-creation]} (1, {runnable(({Id Th Res}, {Res-->x0, Id-->x1, Th-->x2})|nil)}, {x0, x1 = closure(proc {$ X R} R = X end {Res-->x0, Id-->x1, Th-->x2}), x2 = 3}) --> {by [application]} (1, {runnable((R = X, {Res-->x0, Id-->x1, Th-->x2, R-->x0, X-->x2})|nil)}, {x0, x1 = closure(proc {$ X R} R = X end {Res-->x0, Id-->x1, Th-->x2}), x2 = 3}) --> {by [var-var binding]} (1, {runnable(nil)}, {x0 = 3, x1 = closure(proc {$ X R} R = X end {Res-->x0, Id-->x1, Th-->x2}), x2 = 3}) With If True (1, {runnable((local Res in local X in X = true if X then Res = 3 else Res = 4 end end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((local X in X = true if X then Res = 3 else Res = 4 end end, {Res-->x0})|nil)}, {x0}) --> {by [local]} (1, {runnable((X = true if X then Res = 3 else Res = 4 end, {Res-->x0, X-->x1})|nil)}, {x0, x1}) --> {by [sequence]} (1, {runnable((X = true, {Res-->x0, X-->x1})|(if X then Res = 3 else Res = 4 end, {Res-->x0, X-->x1})|nil)}, {x0, x1}) --> {by [value-creation]} (1, {runnable((if X then Res = 3 else Res = 4 end, {Res-->x0, X-->x1})|nil)}, {x0, x1 = true}) --> {by [if-true]} (1, {runnable((Res = 3, {Res-->x0, X-->x1})|nil)}, {x0, x1 = true}) --> {by [value-creation]} (1, {runnable(nil)}, {x0 = 3, x1 = true}) With If False (1, {runnable((local Res in local X in X = false if X then Res = 3 else Res = 4 end end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((local X in X = false if X then Res = 3 else Res = 4 end end, {Res-->x0})|nil)}, {x0}) --> {by [local]} (1, {runnable((X = false if X then Res = 3 else Res = 4 end, {Res-->x0, X-->x1})|nil)}, {x0, x1}) --> {by [sequence]} (1, {runnable((X = false, {Res-->x0, X-->x1})|(if X then Res = 3 else Res = 4 end, {Res-->x0, X-->x1})|nil)}, {x0, x1}) --> {by [value-creation]} (1, {runnable((if X then Res = 3 else Res = 4 end, {Res-->x0, X-->x1})|nil)}, {x0, x1 = false}) --> {by [if-false]} (1, {runnable((Res = 4, {Res-->x0, X-->x1})|nil)}, {x0, x1 = false}) --> {by [value-creation]} (1, {runnable(nil)}, {x0 = 4, x1 = false}) Locals and Assignments from Notes (1, {runnable((local R in local X in X = 2 R = X end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((local X in X = 2 R = X end, {R-->x0})|nil)}, {x0}) --> {by [local]} (1, {runnable((X = 2 R = X, {R-->x0, X-->x1})|nil)}, {x0, x1}) --> {by [sequence]} (1, {runnable((X = 2, {R-->x0, X-->x1})|(R = X, {R-->x0, X-->x1})|nil)}, {x0, x1}) --> {by [value-creation]} (1, {runnable((R = X, {R-->x0, X-->x1})|nil)}, {x0, x1 = 2}) --> {by [var-var binding]} (1, {runnable(nil)}, {x0 = 2, x1 = 2}) Procedure Application with If from Notes (1, {runnable((local X in local Y in Y = proc {$ R} R = X end X = true local X in X = false local Z in {Y Z} if Z then skip else Z = X end end end end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((local Y in Y = proc {$ R} R = X end X = true local X in X = false local Z in {Y Z} if Z then skip else Z = X end end end end, {X-->x0})|nil)}, {x0}) --> {by [local]} (1, {runnable((Y = proc {$ R} R = X end X = true local X in X = false local Z in {Y Z} if Z then skip else Z = X end end end, {X-->x0, Y-->x1})|nil)}, {x0, x1}) --> {by [sequence]} (1, {runnable((Y = proc {$ R} R = X end, {X-->x0, Y-->x1})|(X = true, {X-->x0, Y-->x1})|(local X in X = false local Z in {Y Z} if Z then skip else Z = X end end end, {X-->x0, Y-->x1})|nil)}, {x0, x1}) --> {by [value-creation]} (1, {runnable((X = true, {X-->x0, Y-->x1})|(local X in X = false local Z in {Y Z} if Z then skip else Z = X end end end, {X-->x0, Y-->x1})|nil)}, {x0, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1})}) --> {by [value-creation]} (1, {runnable((local X in X = false local Z in {Y Z} if Z then skip else Z = X end end end, {X-->x0, Y-->x1})|nil)}, {x0 = true, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1})}) --> {by [local]} (1, {runnable((X = false local Z in {Y Z} if Z then skip else Z = X end end, {X-->x2, Y-->x1})|nil)}, {x0 = true, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1}), x2}) --> {by [sequence]} (1, {runnable((X = false, {X-->x2, Y-->x1})|(local Z in {Y Z} if Z then skip else Z = X end end, {X-->x2, Y-->x1})|nil)}, {x0 = true, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1}), x2}) --> {by [value-creation]} (1, {runnable((local Z in {Y Z} if Z then skip else Z = X end end, {X-->x2, Y-->x1})|nil)}, {x0 = true, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1}), x2 = false}) --> {by [local]} (1, {runnable(({Y Z} if Z then skip else Z = X end, {X-->x2, Y-->x1, Z-->x3})|nil)}, {x0 = true, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1}), x2 = false, x3}) --> {by [sequence]} (1, {runnable(({Y Z}, {X-->x2, Y-->x1, Z-->x3})|(if Z then skip else Z = X end, {X-->x2, Y-->x1, Z-->x3})|nil)}, {x0 = true, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1}), x2 = false, x3}) --> {by [application]} (1, {runnable((R = X, {X-->x0, Y-->x1, R-->x3})|(if Z then skip else Z = X end, {X-->x2, Y-->x1, Z-->x3})|nil)}, {x0 = true, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1}), x2 = false, x3}) --> {by [var-var binding]} (1, {runnable((if Z then skip else Z = X end, {X-->x2, Y-->x1, Z-->x3})|nil)}, {x0 = true, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1}), x2 = false, x3 = true}) --> {by [if-true]} (1, {runnable((skip, {X-->x2, Y-->x1, Z-->x3})|nil)}, {x0 = true, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1}), x2 = false, x3 = true}) --> {by [skip]} (1, {runnable(nil)}, {x0 = true, x1 = closure(proc {$ R} R = X end {X-->x0, Y-->x1}), x2 = false, x3 = true}) Curried Function Application from Notes (1, {runnable((local Res in local K in K = proc {$ X R} R = proc {$ Y Z} Z = X end end local F in local Three in Three = 3 {K Three F} local Four in Four = 4 {F Four Res} end end end end end, {})|nil)}, {}) --> {by [local]} (1, {runnable((local K in K = proc {$ X R} R = proc {$ Y Z} Z = X end end local F in local Three in Three = 3 {K Three F} local Four in Four = 4 {F Four Res} end end end end, {Res-->x0})|nil)}, {x0}) --> {by [local]} (1, {runnable((K = proc {$ X R} R = proc {$ Y Z} Z = X end end local F in local Three in Three = 3 {K Three F} local Four in Four = 4 {F Four Res} end end end, {Res-->x0, K-->x1})|nil)}, {x0, x1}) --> {by [sequence]} (1, {runnable((K = proc {$ X R} R = proc {$ Y Z} Z = X end end, {Res-->x0, K-->x1})|(local F in local Three in Three = 3 {K Three F} local Four in Four = 4 {F Four Res} end end end, {Res-->x0, K-->x1})|nil)}, {x0, x1}) --> {by [value-creation]} (1, {runnable((local F in local Three in Three = 3 {K Three F} local Four in Four = 4 {F Four Res} end end end, {Res-->x0, K-->x1})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1})}) --> {by [local]} (1, {runnable((local Three in Three = 3 {K Three F} local Four in Four = 4 {F Four Res} end end, {Res-->x0, K-->x1, F-->x2})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2}) --> {by [local]} (1, {runnable((Three = 3 {K Three F} local Four in Four = 4 {F Four Res} end, {Res-->x0, K-->x1, F-->x2, Three-->x3})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2, x3}) --> {by [sequence]} (1, {runnable((Three = 3, {Res-->x0, K-->x1, F-->x2, Three-->x3})|({K Three F}, {Res-->x0, K-->x1, F-->x2, Three-->x3})|(local Four in Four = 4 {F Four Res} end, {Res-->x0, K-->x1, F-->x2, Three-->x3})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2, x3}) --> {by [value-creation]} (1, {runnable(({K Three F}, {Res-->x0, K-->x1, F-->x2, Three-->x3})|(local Four in Four = 4 {F Four Res} end, {Res-->x0, K-->x1, F-->x2, Three-->x3})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2, x3 = 3}) --> {by [application]} (1, {runnable((R = proc {$ Y Z} Z = X end, {Res-->x0, K-->x1, R-->x2, X-->x3})|(local Four in Four = 4 {F Four Res} end, {Res-->x0, K-->x1, F-->x2, Three-->x3})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2, x3 = 3}) --> {by [value-creation]} (1, {runnable((local Four in Four = 4 {F Four Res} end, {Res-->x0, K-->x1, F-->x2, Three-->x3})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2 = closure(proc {$ Y Z} Z = X end {Res-->x0, K-->x1, R-->x2, X-->x3}), x3 = 3}) --> {by [local]} (1, {runnable((Four = 4 {F Four Res}, {Res-->x0, K-->x1, F-->x2, Three-->x3, Four-->x4})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2 = closure(proc {$ Y Z} Z = X end {Res-->x0, K-->x1, R-->x2, X-->x3}), x3 = 3, x4}) --> {by [sequence]} (1, {runnable((Four = 4, {Res-->x0, K-->x1, F-->x2, Three-->x3, Four-->x4})|({F Four Res}, {Res-->x0, K-->x1, F-->x2, Three-->x3, Four-->x4})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2 = closure(proc {$ Y Z} Z = X end {Res-->x0, K-->x1, R-->x2, X-->x3}), x3 = 3, x4}) --> {by [value-creation]} (1, {runnable(({F Four Res}, {Res-->x0, K-->x1, F-->x2, Three-->x3, Four-->x4})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2 = closure(proc {$ Y Z} Z = X end {Res-->x0, K-->x1, R-->x2, X-->x3}), x3 = 3, x4 = 4}) --> {by [application]} (1, {runnable((Z = X, {Res-->x0, K-->x1, R-->x2, X-->x3, Z-->x0, Y-->x4})|nil)}, {x0, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2 = closure(proc {$ Y Z} Z = X end {Res-->x0, K-->x1, R-->x2, X-->x3}), x3 = 3, x4 = 4}) --> {by [var-var binding]} (1, {runnable(nil)}, {x0 = 3, x1 = closure(proc {$ X R} R = proc {$ Y Z} Z = X end end {Res-->x0, K-->x1}), x2 = closure(proc {$ Y Z} Z = X end {Res-->x0, K-->x1, R-->x2, X-->x3}), x3 = 3, x4 = 4}) Length Procedure, fully Recursive (1, {runnable((local Res in local Length in Length = proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end local Three in Three = 3 local Nil in Nil = nil local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end end end {System.showInfo Res} end end, {System.showInfo-->x1, Number.+-->x0})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo)}) --> {by [local]} (1, {runnable((local Length in Length = proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end local Three in Three = 3 local Nil in Nil = nil local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end end end {System.showInfo Res} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2}) --> {by [local]} (1, {runnable((Length = proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end local Three in Three = 3 local Nil in Nil = nil local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end end end {System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3}) --> {by [sequence]} (1, {runnable((Length = proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|(local Three in Three = 3 local Nil in Nil = nil local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3}) --> {by [value-creation]} (1, {runnable((local Three in Three = 3 local Nil in Nil = nil local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})}) --> {by [local]} (1, {runnable((Three = 3 local Nil in Nil = nil local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4}) --> {by [sequence]} (1, {runnable((Three = 3, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4})|(local Nil in Nil = nil local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4}) --> {by [value-creation]} (1, {runnable((local Nil in Nil = nil local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3}) --> {by [local]} (1, {runnable((Nil = nil local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5}) --> {by [sequence]} (1, {runnable((Nil = nil, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5})|(local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5}) --> {by [value-creation]} (1, {runnable((local List3 in List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil}) --> {by [local]} (1, {runnable((List3 = |(1:Three 2:Nil) local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5, List3-->x6})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6}) --> {by [sequence]} (1, {runnable((List3 = |(1:Three 2:Nil), {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5, List3-->x6})|(local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5, List3-->x6})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6}) --> {by [value-creation]} (1, {runnable((local MyList in MyList = |(1:Three 2:List3) {Length MyList Res} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5, List3-->x6})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5}) --> {by [local]} (1, {runnable((MyList = |(1:Three 2:List3) {Length MyList Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5, List3-->x6, MyList-->x7})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7}) --> {by [sequence]} (1, {runnable((MyList = |(1:Three 2:List3), {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5, List3-->x6, MyList-->x7})|({Length MyList Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5, List3-->x6, MyList-->x7})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7}) --> {by [value-creation]} (1, {runnable(({Length MyList Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, Three-->x4, Nil-->x5, List3-->x6, MyList-->x7})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6}) --> {by [application]} (1, {runnable((case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6}) --> {by [case-match]} (1, {runnable((local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6}) --> {by [local]} (1, {runnable(({Length T Temp} local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8}) --> {by [sequence]} (1, {runnable(({Length T Temp}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8}) --> {by [application]} (1, {runnable((case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8}) --> {by [case-match]} (1, {runnable((local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8}) --> {by [local]} (1, {runnable(({Length T Temp} local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4, Temp-->x9})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8, x9}) --> {by [sequence]} (1, {runnable(({Length T Temp}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4, Temp-->x9})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4, Temp-->x9})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8, x9}) --> {by [application]} (1, {runnable((case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x9, Lst-->x5})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4, Temp-->x9})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8, x9}) --> {by [case-else]} (1, {runnable((R = 0, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x9, Lst-->x5})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4, Temp-->x9})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8, x9}) --> {by [value-creation]} (1, {runnable((local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4, Temp-->x9})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8, x9 = 0}) --> {by [local]} (1, {runnable((One = 1 {Number.+ One Temp R}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4, Temp-->x9, One-->x10})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8, x9 = 0, x10}) --> {by [sequence]} (1, {runnable((One = 1, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4, Temp-->x9, One-->x10})|({Number.+ One Temp R}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4, Temp-->x9, One-->x10})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8, x9 = 0, x10}) --> {by [value-creation]} (1, {runnable(({Number.+ One Temp R}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x8, Lst-->x6, T-->x5, _-->x4, Temp-->x9, One-->x10})|(local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8, x9 = 0, x10 = 1}) --> {by [apply-primitive]} (1, {runnable((local One in One = 1 {Number.+ One Temp R} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8 = 1, x9 = 0, x10 = 1}) --> {by [local]} (1, {runnable((One = 1 {Number.+ One Temp R}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8, One-->x11})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8 = 1, x9 = 0, x10 = 1, x11}) --> {by [sequence]} (1, {runnable((One = 1, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8, One-->x11})|({Number.+ One Temp R}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8, One-->x11})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8 = 1, x9 = 0, x10 = 1, x11}) --> {by [value-creation]} (1, {runnable(({Number.+ One Temp R}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3, R-->x2, Lst-->x7, T-->x6, _-->x4, Temp-->x8, One-->x11})|({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8 = 1, x9 = 0, x10 = 1, x11 = 1}) 2 --> {by [apply-primitive]} (1, {runnable(({System.showInfo Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2 = 2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8 = 1, x9 = 0, x10 = 1, x11 = 1}) --> {by [apply-primitive]} (1, {runnable(nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2 = 2, x3 = closure(proc {$ Lst R} case Lst of |(1:_ 2:T) then local Temp in {Length T Temp} local One in One = 1 {Number.+ One Temp R} end end else R = 0 end end {System.showInfo-->x1, Number.+-->x0, Res-->x2, Length-->x3}), x4 = 3, x5 = nil, x6 = 4|5, x7 = 4|6, x8 = 1, x9 = 0, x10 = 1, x11 = 1}) some-threads-1 (1, {runnable((local Res in thread Res = 7 end thread skip end end, {System.showInfo-->x1, Number.+-->x0})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo)}) --> {by [local]} (1, {runnable((thread Res = 7 end thread skip end, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2}) --> {by [sequence]} (1, {runnable((thread Res = 7 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|(thread skip end, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2}) --> {by [thread-creation]} (1, {runnable((thread skip end, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil), runnable((Res = 7, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2}) --> {by [value-creation]} (2, {runnable((thread skip end, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil), runnable(nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2 = 7}) --> {by [thread-creation]} (1, {runnable(nil), runnable(nil), runnable((skip, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2 = 7}) --> {by [thread-finish]} (2, {runnable(nil), runnable((skip, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2 = 7}) --> {by [thread-finish]} (1, {runnable((skip, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2 = 7}) --> {by [skip]} (1, {runnable(nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2 = 7}) interacting-threads-1 (1, {runnable((local Res in local X in thread X = 7 end thread local One in One = 1 {Number.+ One X Res} end end end end, {System.showInfo-->x1, Number.+-->x0})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo)}) --> {by [local]} (1, {runnable((local X in thread X = 7 end thread local One in One = 1 {Number.+ One X Res} end end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2}) --> {by [local]} (1, {runnable((thread X = 7 end thread local One in One = 1 {Number.+ One X Res} end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3}) --> {by [sequence]} (1, {runnable((thread X = 7 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3})|(thread local One in One = 1 {Number.+ One X Res} end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3}) --> {by [thread-creation]} (1, {runnable((thread local One in One = 1 {Number.+ One X Res} end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3})|nil), runnable((X = 7, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3}) --> {by [value-creation]} (2, {runnable((thread local One in One = 1 {Number.+ One X Res} end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3})|nil), runnable(nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7}) --> {by [thread-creation]} (1, {runnable(nil), runnable(nil), runnable((local One in One = 1 {Number.+ One X Res} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7}) --> {by [thread-finish]} (2, {runnable(nil), runnable((local One in One = 1 {Number.+ One X Res} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7}) --> {by [thread-finish]} (1, {runnable((local One in One = 1 {Number.+ One X Res} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7}) --> {by [local]} (1, {runnable((One = 1 {Number.+ One X Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4}) --> {by [sequence]} (1, {runnable((One = 1, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|({Number.+ One X Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4}) --> {by [value-creation]} (1, {runnable(({Number.+ One X Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4 = 1}) --> {by [apply-primitive]} (1, {runnable(nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2 = 8, x3 = 7, x4 = 1}) interacting-threads-2 (1, {runnable((local Res in local X in local One in thread X = 7 end thread {Number.+ One X Res} end thread One = 1 end end end end, {System.showInfo-->x1, Number.+-->x0})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo)}) --> {by [local]} (1, {runnable((local X in local One in thread X = 7 end thread {Number.+ One X Res} end thread One = 1 end end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2}) --> {by [local]} (1, {runnable((local One in thread X = 7 end thread {Number.+ One X Res} end thread One = 1 end end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3}) --> {by [local]} (1, {runnable((thread X = 7 end thread {Number.+ One X Res} end thread One = 1 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3, x4}) --> {by [sequence]} (1, {runnable((thread X = 7 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|(thread {Number.+ One X Res} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|(thread One = 1 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3, x4}) --> {by [thread-creation]} (1, {runnable((thread {Number.+ One X Res} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|(thread One = 1 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil), runnable((X = 7, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3, x4}) --> {by [value-creation]} (2, {runnable((thread {Number.+ One X Res} end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|(thread One = 1 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil), runnable(nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4}) --> {by [thread-creation]} (1, {runnable((thread One = 1 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil), runnable(nil), runnable(({Number.+ One X Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4}) --> {by [thread-finish]} (2, {runnable((thread One = 1 end, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil), runnable(({Number.+ One X Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4}) --> {by [thread-creation]} (1, {runnable(nil), runnable(({Number.+ One X Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil), runnable((One = 1, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4}) --> {by [apply-primitive-suspend]} (2, {runnable(nil), suspended(({Number.+ One X Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil waitingOn:x4), runnable((One = 1, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4}) --> {by [value-creation]} (3, {runnable(nil), runnable(({Number.+ One X Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil), runnable(nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4 = 1}) --> {by [thread-finish]} (1, {runnable(({Number.+ One X Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil), runnable(nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4 = 1}) --> {by [thread-finish]} (1, {runnable(({Number.+ One X Res}, {System.showInfo-->x1, Number.+-->x0, Res-->x2, X-->x3, One-->x4})|nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2, x3 = 7, x4 = 1}) --> {by [apply-primitive]} (1, {runnable(nil)}, {x0 = primitive(numberPlus), x1 = primitive(showInfo), x2 = 8, x3 = 7, x4 = 1}) Testing done...