-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into cleanup/Simplify_PChecker
- Loading branch information
Showing
15 changed files
with
200 additions
and
141 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Tst/RegressionTests/Feature1SMLevelDecls/Correct/EntryNamedFunction/EntryNamedFunction.p
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
/* PSrc/FrontDesk.p */ | ||
type tRoomInfo = (roomNumber: int, isAvailable: bool); | ||
|
||
|
||
machine Main { | ||
var rooms: map[int, tRoomInfo]; | ||
|
||
start state Init { | ||
entry Init_Entry; | ||
exit { | ||
assert true; | ||
} | ||
} | ||
|
||
fun Init_Entry(initialRooms: map[int, tRoomInfo]) { | ||
new Main(default(map[int, tRoomInfo])); | ||
} | ||
} | ||
|
||
|
51 changes: 51 additions & 0 deletions
51
Tst/RegressionTests/Feature1SMLevelDecls/Correct/EntryNamedFunction1/EntryNamedFunction1.p
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
machine Main { | ||
var m1_machine: machine; | ||
var m2_machine: machine; | ||
var m3_machine: machine; | ||
var m4_machine: machine; | ||
|
||
var msg_map : map[int, seq[string]]; | ||
var seqOfMsgs: seq[string]; | ||
var msg_tuple: (int, bool, string); | ||
|
||
start state S { | ||
entry{ | ||
m1_machine = new m1(4); | ||
msg_tuple = (1,true,"msg1"); | ||
m2_machine = new m2(msg_tuple); | ||
seqOfMsgs += (0,"Hello"); | ||
seqOfMsgs += (1,"World"); | ||
msg_map += (1,seqOfMsgs); | ||
m3_machine = new m3(msg_map); | ||
} | ||
} | ||
} | ||
|
||
machine m1 { | ||
start state S{ | ||
entry foo1; | ||
} | ||
fun foo1 (payload: int){ | ||
assert payload == 4; | ||
} | ||
} | ||
|
||
machine m2 { | ||
start state S{ | ||
entry foo3; | ||
} | ||
fun foo3 (payload: (int, bool, string)){ | ||
assert payload == (1,true,"msg1"); | ||
} | ||
} | ||
|
||
|
||
machine m3 { | ||
start state S{ | ||
entry foo4; | ||
} | ||
fun foo4 (payload: map[int, seq[string]]){ | ||
assert payload[1][0] == "Hello"; | ||
} | ||
} | ||
|
37 changes: 37 additions & 0 deletions
37
...RegressionTests/Feature1SMLevelDecls/DynamicError/EntryNamedFunction/EntryNamedFunction.p
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
event E0; | ||
|
||
machine Main { | ||
var m1_machine: machine; | ||
var m2_machine: machine; | ||
|
||
start state S { | ||
entry{ | ||
m1_machine = new m1(4); | ||
m2_machine = new m2(m1_machine); | ||
} | ||
} | ||
} | ||
|
||
machine m1 { | ||
start state S{ | ||
entry foo1; | ||
|
||
on E0 do { | ||
assert false; | ||
} | ||
} | ||
fun foo1 (payload: int){ | ||
assert payload != 4; | ||
} | ||
|
||
} | ||
|
||
|
||
machine m2 { | ||
start state S{ | ||
entry foo2; | ||
} | ||
fun foo2 (payload: machine){ | ||
send payload,E0; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...egressionTests/Feature1SMLevelDecls/StaticError/EntryNamedFunction1/EntryNamedFunction1.p
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
machine Main { | ||
var m1_machine: machine; | ||
var m2_machine: machine; | ||
|
||
start state S { | ||
entry{ | ||
m1_machine = new m1("four"); | ||
m2_machine = new m2((1,2,3)) | ||
} | ||
} | ||
} | ||
|
||
machine m1 { | ||
start state S{ | ||
entry foo; | ||
} | ||
fun foo (payload: int){ | ||
assert payload == 4; | ||
} | ||
} | ||
|
||
machine m2 { | ||
start state S{ | ||
entry foo; | ||
} | ||
fun foo (payload: map){ | ||
assert payload == (1,2,3); | ||
} | ||
} | ||
|
Oops, something went wrong.