Skip to content
Snippets Groups Projects
Commit fd312820 authored by dgelessus's avatar dgelessus
Browse files

Use Utils.isProBSpecialDefinitionName instead of hardcoding the names

parent 92b0d8f3
No related branches found
No related tags found
No related merge requests found
Pipeline #112174 passed
...@@ -81,12 +81,7 @@ public class DefinitionsEliminator extends DepthFirstAdapter { ...@@ -81,12 +81,7 @@ public class DefinitionsEliminator extends DepthFirstAdapter {
if (e instanceof AExpressionDefinitionDefinition) { if (e instanceof AExpressionDefinitionDefinition) {
String name = ((AExpressionDefinitionDefinition) e).getName() String name = ((AExpressionDefinitionDefinition) e).getName()
.getText().toString(); .getText().toString();
if (name.startsWith("ASSERT_LTL") if (Utils.isProBSpecialDefinitionName(name))
|| name.startsWith("scope_")
|| name.startsWith("SET_PREF_")
|| name.equals("VISB_JSON_FILE")
|| name.startsWith("ANIMATION_FUNCTION")
|| name.startsWith("ANIMATION_IMG"))
continue; continue;
} }
e.apply(this); e.apply(this);
...@@ -100,12 +95,7 @@ public class DefinitionsEliminator extends DepthFirstAdapter { ...@@ -100,12 +95,7 @@ public class DefinitionsEliminator extends DepthFirstAdapter {
String name = ((AExpressionDefinitionDefinition) e).getName() String name = ((AExpressionDefinitionDefinition) e).getName()
.getText().toString(); .getText().toString();
if (name.startsWith("ASSERT_LTL") if (Utils.isProBSpecialDefinitionName(name)
|| name.startsWith("scope_")
|| name.startsWith("SET_PREF_")
|| name.equals("VISB_JSON_FILE")
|| name.startsWith("ANIMATION_FUNCTION")
|| name.startsWith("ANIMATION_IMG")
|| StandardMadules || StandardMadules
.isKeywordInModuleExternalFunctions(name)) { .isKeywordInModuleExternalFunctions(name)) {
...@@ -114,7 +104,7 @@ public class DefinitionsEliminator extends DepthFirstAdapter { ...@@ -114,7 +104,7 @@ public class DefinitionsEliminator extends DepthFirstAdapter {
} else if (e instanceof APredicateDefinitionDefinition) { } else if (e instanceof APredicateDefinitionDefinition) {
String name = ((APredicateDefinitionDefinition) e).getName() String name = ((APredicateDefinitionDefinition) e).getName()
.getText().toString(); .getText().toString();
if (name.equals("GOAL") if (Utils.isProBSpecialDefinitionName(name)
|| StandardMadules || StandardMadules
.isKeywordInModuleExternalFunctions(name)) { .isKeywordInModuleExternalFunctions(name)) {
newDefinitionsList.add(e); newDefinitionsList.add(e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment