diff --git a/AlgebraicDataflowArchitectureModel/models/JumpGame.model b/AlgebraicDataflowArchitectureModel/models/JumpGame.model index c4b525d..756ea7e 100644 --- a/AlgebraicDataflowArchitectureModel/models/JumpGame.model +++ b/AlgebraicDataflowArchitectureModel/models/JumpGame.model @@ -29,29 +29,29 @@ } channel C2 { - ref position(p, update2(p, g2)) - in ground(g, update2(p, g2)) == g2 - out onground(o:Bool, update2(p, g2)) == and(eq(g2, true), le(snd(p), 0.0)) + in position(p, update2(p2, g2)) == p2 + in ground(g, update2(p2, g2)) == g2 + out onground(o:Bool, update2(p2, g2)) == and(eq(g2, true), le(snd(p), 0.0)) } channel C3 { - in acceleration(a, update3(a2, o2)) == a2 - in onground(o, update3(a2, o2)) == o2 - out velocity(v:Tuple, update3(a2, o2)) == if(and(o2, lt(snd(v), 0.0)), tuple(fst(v) + 0.01 * fst(a2), 0.0), - tuple(fst(v) + 0.01 * fst(a2), snd(v) + 0.01 * snd(a2))) + ref onground(o, update3(a2, o)) + in acceleration(a, update3(a2, o)) == a2 + out velocity(v:Tuple, update3(a2, o)) == if(and(o, lt(snd(v), 0.0)), tuple(fst(v) + 0.01 * fst(a2), 0.0), + tuple(fst(v) + 0.01 * fst(a2), snd(v) + 0.01 * snd(a2))) } channel C4 { - in move(m, update4(m2, o2)) == m2 - in onground(o, update4(m2, o2)) == o2 - out velocity(v:Tuple, update4(m2, o2)) == if(o2, m2, v) + ref onground(o, update4(m2, o)) + in move(m, update4(m2, o)) == m2 + out velocity(v:Tuple, update4(m2, o)) == if(o, m2, v) } channel C5 { - in velocity(v, update5(v2, o2)) == v2 - in onground(o, update5(v2, o2)) == o2 - out position(p:Tuple, update5(v2, o2)) == if(and(o2, lt(snd(p), 0.0)), tuple(fst(p) + 0.01 * fst(v2), 0.0), - tuple(fst(p) + 0.01 * fst(v2), snd(p) + 0.01 * snd(v2))) + ref onground(o, update5(v2, o)) + in velocity(v, update5(v2, o)) == v2 + out position(p:Tuple, update5(v2, o)) == if(and(o, lt(snd(p), 0.0)), tuple(fst(p) + 0.01 * fst(v2), 0.0), + tuple(fst(p) + 0.01 * fst(v2), snd(p) + 0.01 * snd(v2))) } channel C6 {