-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a type checking rule for the Main Machine
- Loading branch information
Christine Zhou
committed
Oct 9, 2024
1 parent
8c4c600
commit cbd553f
Showing
3 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
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
19 changes: 9 additions & 10 deletions
19
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 |
---|---|---|
@@ -1,21 +1,20 @@ | ||
|
||
/* PSrc/FrontDesk.p */ | ||
type tRoomInfo = (roomNumber: int, isAvailable: bool); | ||
|
||
|
||
machine Main { | ||
var rooms: map[int, tRoomInfo]; | ||
start state Init { | ||
entry { | ||
new m1(default(map[int, tRoomInfo])); | ||
} | ||
} | ||
} | ||
|
||
machine m1 { | ||
start state Init { | ||
entry Init_Entry; | ||
exit { | ||
assert true; | ||
} | ||
} | ||
|
||
fun Init_Entry(initialRooms: map[int, tRoomInfo]) { | ||
new Main(default(map[int, tRoomInfo])); | ||
assert true; | ||
} | ||
} | ||
|
||
|
||
} |
8 changes: 8 additions & 0 deletions
8
...ssionTests/Feature1SMLevelDecls/StaticError/StartMachineNullParam/StartMachineNullParam.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,8 @@ | ||
machine Main { | ||
start state Init { | ||
entry (payload: int) {}; | ||
exit { | ||
assert true; | ||
} | ||
} | ||
} |