Skip to content

Commit

Permalink
Add more consistency checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dziegel committed Aug 7, 2024
1 parent 9d64009 commit 9485329
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions generator/src/generator/Transformations.egl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ operation Tuple transformState(statemachine : Tuple, region : Tuple, parent_stat

self.entry_pointer = "nullptr";
if (self.entry.isDefined()) {
if (self.entry == "") {
(sm.name + ": Empty entry function in state " + self.name).println();
}
self.entry_pointer = "&" + statemachine.name + "::" + "Impl::" + self.entry;
if (not statemachine.all_entry_exit.includes(self.entry)) {
statemachine.all_entry_exit.add(self.entry);
Expand All @@ -83,6 +86,9 @@ operation Tuple transformState(statemachine : Tuple, region : Tuple, parent_stat

self.exit_pointer = "nullptr";
if (self.exit.isDefined()) {
if (self.exit == "") {
(sm.name + ": Empty exit function in state " + self.name).println();
}
self.exit_pointer = "&" + statemachine.name + "::" + "Impl::" + self.exit;
if (not statemachine.all_entry_exit.includes(self.exit)) {
statemachine.all_entry_exit.add(self.exit);
Expand Down Expand Up @@ -127,6 +133,9 @@ operation Tuple transformTransition(statemachine : Tuple) {
for (action in self.actions) {
actions.add("&" + statemachine.name + "::" + statemachine.impl_type + "::" + action);
if (not statemachine.all_actions.includes(action)) {
if (action == "") {
(sm.name + ": Empty function behavior in transition starting from state " + self.start).println();
}
statemachine.all_actions.add(action);
}
}
Expand Down

0 comments on commit 9485329

Please sign in to comment.