Skip to content
Snippets Groups Projects
Commit ed91754d authored by Jaime Arias's avatar Jaime Arias
Browse files

fixing location name

parent 757b57ff
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ mod MODEL is
ops cdone idle preparing sugar : -> Location [ctor] .
ops coffee cup press sleep : -> Action [ctor] .
ops machine : -> Agent [ctor] .
op machine : -> Agent [ctor] .
ops x y : -> Clock [ctor] .
ops p1 p2 p3 : -> Parameter [ctor] .
......@@ -17,7 +17,7 @@ mod MODEL is
(when x >= p1 local press do { x := 0 } goto sugar ,
when y = p2 local cup goto preparing)),
(@ preparing inv y <= p3 :
(when y = p3 local coffee do { x := 0 } goto cdone)) ,
(when y = p3 local coffee do { x := 0 } goto cdone)),
(@ cdone inv x <= 10 :
(when true local press do { x := 0 ; y := 0 } goto sugar ,
when x = 10 local sleep goto idle)) >
......
......@@ -9,7 +9,7 @@ mod MODEL is
vars x y : Real .
vars p1 p2 p3 : Real .
ops idle sugar coffee cdone : -> Location .
ops idle sugar preparing cdone : -> Location .
op <_;_;_> <_;_;_> : Location Real Real Real Real Real -> State .
op [_;_;_] <_;_;_> : Location Real Real Real Real Real -> State .
......@@ -18,11 +18,11 @@ mod MODEL is
crl [tick-idle] : [ idle ; x ; y ] < p1 ; p2 ; p3 > => < idle ; x + T ; y + T > < p1 ; p2 ; p3 > if (T >= 0/1) = true [nonexec] .
crl [sugar-sugar] : < sugar ; x ; y > < p1 ; p2 ; p3 > => [ sugar ; 0/1 ; y ] < p1 ; p2 ; p3 > if (y <= p2 and x >= p1) = true .
crl [sugar-coffee] : < sugar ; x ; y > < p1 ; p2 ; p3 > => [ coffee ; x ; y ] < p1 ; p2 ; p3 > if (y <= p3 and y === p2) = true .
crl [sugar-preparing] : < sugar ; x ; y > < p1 ; p2 ; p3 > => [ preparing ; x ; y ] < p1 ; p2 ; p3 > if (y <= p3 and y === p2) = true .
crl [tick-sugar] : [ sugar ; x ; y ] < p1 ; p2 ; p3 > => < sugar ; x + T ; y + T > < p1 ; p2 ; p3 > if (T >= 0/1 and y + T <= p2) = true [nonexec] .
crl [coffee-cdone] : < coffee ; x ; y > < p1 ; p2 ; p3 > => [ cdone ; 0/1 ; y ] < p1 ; p2 ; p3 > if (0/1 <= 10/1 and y === p3) = true .
crl [tick-coffee] : [ coffee ; x ; y ] < p1 ; p2 ; p3 > => < coffee ; x + T ; y + T > < p1 ; p2 ; p3 > if (T >= 0/1 and y + T <= p3) = true [nonexec] .
crl [preparing-cdone] : < preparing ; x ; y > < p1 ; p2 ; p3 > => [ cdone ; 0/1 ; y ] < p1 ; p2 ; p3 > if (0/1 <= 10/1 and y === p3) = true .
crl [tick-preparing] : [ preparing ; x ; y ] < p1 ; p2 ; p3 > => < preparing ; x + T ; y + T > < p1 ; p2 ; p3 > if (T >= 0/1 and y + T <= p3) = true [nonexec] .
crl [cdone-sugar] : < cdone ; x ; y > < p1 ; p2 ; p3 > => [ sugar ; 0/1 ; 0/1 ] < p1 ; p2 ; p3 > if (0/1 <= p2) = true .
crl [cdone-idle] : < cdone ; x ; y > < p1 ; p2 ; p3 > => [ idle ; x ; y ] < p1 ; p2 ; p3 > if (x === 10/1) = true .
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment