diff --git a/models/Adapter.model b/models/Adapter.model index 3bb6134..b78e32f 100644 --- a/models/Adapter.model +++ b/models/Adapter.model @@ -2,17 +2,17 @@ fishingBoat := "TheFishingBoatIsSailing" } -channel CIO1 { - out fishingBoat(fb:Str, sail(message:Str)) == message +channel CIO{ + out captain(cp:Str, row(s:Str)) == s } channel C1{ - in fishingBoat(fb2:Str, sail(s2)) == s2 + in captain(cp1:Str, row(s2)) == s2 out fishingBoatAdapter(fa:Str, sail(s2)) == s2 } channel C2{ - in fishingBoatAdapter(fa2:Str, row(s3)) == s3 - out captain(cp1:Str, row(s3)) == s3 + in fishingBoatAdapter(fa2:Str, sail(s3)) == s3 + out fishingBoat(fb2:Str, sail(s3)) == s3 } diff --git a/models/Observer.model b/models/Observer.model index 20a9fd7..573ec04 100644 --- a/models/Observer.model +++ b/models/Observer.model @@ -1,35 +1,20 @@ init{ weather := 0 - orcs := nil - hobbits := nil logger := "not_started" } channel CIO1{ - out weather(time:Int, timePasses(nil)) == mod(time + 1,2) + out weather(time:Int, timePasses(nil)) == mod(time + 1,4) } channel CIO2{ - out orcs(o:Tuple, update(id:Int, type:Str))==tuple(id,type) - out hobbits(h:Tuple, update(id:Int, type:Str))==tuple(id,type) + out orcs(o:Int, update(weather)) == weather + out hobbits(h:Int, update(weather)) == weather } channel C1{ - in weather(w:Int, update(w)) == w%2 - out orcs(o2:Tuple, update(w)) == if(eq(w,fst(o2)), o2, nil) + in weather(w:Int, update(weather)) == weather + out orcs(o2:Int, update(weather)) == weather + out hobbits(h2:Int, update(weather)) == weather } -channel C2{ - in weather(w:Int, update(w)) == w%2 - out hobbits(h2:Tuple, update(w)) == if(eq(w, fst(h2)), h2, nil) -} - -channel C3{ - in orcs(o:Tuple, setLog(o)) == o - out logger(l:Str, setLog(o)) == snd(o) -} - -channel C4{ - in hobbits(h:Tuple, setLog(h))== h - out logger(l, setLog(h)) == snd(h) -}