Skip to content

Commit

Permalink
Changed test samples to adapt to new default role of rules with
Browse files Browse the repository at this point in the history
parameters (viz., possibly condition)
  • Loading branch information
rensink committed Dec 4, 2024
1 parent 5a8dfb6 commit 3957e28
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 20 deletions.
7 changes: 5 additions & 2 deletions junit/control/abc.gps/a.gpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
<graph edgemode="directed" edgeids="false" role="rule" id="a">
<graph role="rule" edgeids="false" edgemode="directed" id="a">
<attr name="actionRole">
<string>transformer</string>
</attr>
<attr name="$version">
<string>curly</string>
</attr>
Expand All @@ -9,7 +12,7 @@
<string>125 59 19 19</string>
</attr>
</node>
<edge to="n0" from="n0">
<edge from="n0" to="n0">
<attr name="label">
<string>par:</string>
</attr>
Expand Down
7 changes: 5 additions & 2 deletions junit/control/abc.gps/b.gpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
<graph edgemode="directed" edgeids="false" role="rule" id="b">
<graph role="rule" edgeids="false" edgemode="directed" id="b">
<attr name="actionRole">
<string>transformer</string>
</attr>
<attr name="$version">
<string>curly</string>
</attr>
Expand All @@ -9,7 +12,7 @@
<string>85 82 19 19</string>
</attr>
</node>
<edge to="n0" from="n0">
<edge from="n0" to="n0">
<attr name="label">
<string>par:</string>
</attr>
Expand Down
7 changes: 5 additions & 2 deletions junit/control/abc.gps/c.gpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
<graph edgemode="directed" edgeids="false" role="rule" id="c">
<graph role="rule" edgeids="false" edgemode="directed" id="c">
<attr name="actionRole">
<string>transformer</string>
</attr>
<attr name="$version">
<string>curly</string>
</attr>
Expand All @@ -9,7 +12,7 @@
<string>135 89 19 19</string>
</attr>
</node>
<edge to="n0" from="n0">
<edge from="n0" to="n0">
<attr name="label">
<string>par:</string>
</attr>
Expand Down
7 changes: 5 additions & 2 deletions junit/control/abc.gps/d.gpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
<graph edgemode="directed" edgeids="false" role="rule" id="d">
<graph role="rule" edgeids="false" edgemode="directed" id="d">
<attr name="actionRole">
<string>transformer</string>
</attr>
<attr name="$version">
<string>curly</string>
</attr>
Expand All @@ -9,7 +12,7 @@
<string>148 88 19 19</string>
</attr>
</node>
<edge to="n0" from="n0">
<edge from="n0" to="n0">
<attr name="label">
<string>par:</string>
</attr>
Expand Down
7 changes: 5 additions & 2 deletions junit/control/emptyrules.gps/a.gpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
<graph edgemode="directed" edgeids="false" role="rule" id="a">
<graph role="rule" edgeids="false" edgemode="directed" id="a">
<attr name="actionRole">
<string>transformer</string>
</attr>
<attr name="$version">
<string>curly</string>
</attr>
Expand All @@ -9,7 +12,7 @@
<string>97 60 19 19</string>
</attr>
</node>
<edge to="n0" from="n0">
<edge from="n0" to="n0">
<attr name="label">
<string>par:</string>
</attr>
Expand Down
7 changes: 5 additions & 2 deletions junit/control/emptyrules.gps/b.gpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
<graph edgemode="directed" edgeids="false" role="rule" id="b">
<graph role="rule" edgeids="false" edgemode="directed" id="b">
<attr name="actionRole">
<string>transformer</string>
</attr>
<attr name="$version">
<string>curly</string>
</attr>
Expand All @@ -9,7 +12,7 @@
<string>90 53 19 19</string>
</attr>
</node>
<edge to="n0" from="n0">
<edge from="n0" to="n0">
<attr name="label">
<string>par:</string>
</attr>
Expand Down
7 changes: 5 additions & 2 deletions junit/control/emptyrules.gps/c.gpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
<graph edgemode="directed" edgeids="false" role="rule" id="c">
<graph role="rule" edgeids="false" edgemode="directed" id="c">
<attr name="actionRole">
<string>transformer</string>
</attr>
<attr name="$version">
<string>curly</string>
</attr>
Expand All @@ -9,7 +12,7 @@
<string>117 79 19 19</string>
</attr>
</node>
<edge to="n0" from="n0">
<edge from="n0" to="n0">
<attr name="label">
<string>par:</string>
</attr>
Expand Down
7 changes: 5 additions & 2 deletions junit/control/emptyrules.gps/d.gpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
<graph edgemode="directed" edgeids="false" role="rule" id="d">
<graph role="rule" edgeids="false" edgemode="directed" id="d">
<attr name="actionRole">
<string>transformer</string>
</attr>
<attr name="$version">
<string>curly</string>
</attr>
Expand All @@ -9,7 +12,7 @@
<string>121 81 19 19</string>
</attr>
</node>
<edge to="n0" from="n0">
<edge from="n0" to="n0">
<attr name="label">
<string>par:</string>
</attr>
Expand Down
7 changes: 5 additions & 2 deletions junit/control/emptyrules.gps/e.gpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
<graph edgemode="directed" edgeids="false" role="rule" id="e">
<graph role="rule" edgeids="false" edgemode="directed" id="e">
<attr name="actionRole">
<string>transformer</string>
</attr>
<attr name="$version">
<string>curly</string>
</attr>
Expand All @@ -9,7 +12,7 @@
<string>91 84 19 19</string>
</attr>
</node>
<edge to="n0" from="n0">
<edge from="n0" to="n0">
<attr name="label">
<string>par:</string>
</attr>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/nl/utwente/groove/grammar/Rule.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ public CheckPolicy getPolicy() {
* and has zero priority.
*/
private boolean isPropertyLike() {
boolean result = !isModifying() && getPriority() == 0 && getHiddenPars().isEmpty();
boolean result = !isModifying() && getPriority() == 0;
if (result) {
result = getSignature().stream().allMatch(v -> !v.isInOnly());
result = getSignature().stream().noneMatch(UnitPar::isInOnly);
}
return result;
}
Expand Down

0 comments on commit 3957e28

Please sign in to comment.