|
|
|
@ -31,9 +31,10 @@ import parser.type.*; |
|
|
|
import prism.PrismLangException; |
|
|
|
|
|
|
|
/** |
|
|
|
* Expand property references and labels, return result. |
|
|
|
* Property expansion is done recursively. |
|
|
|
* Special labels "deadlock", "init" and any not in label list are left. |
|
|
|
* Expand property references and labels, return result. |
|
|
|
* Property expansion is done recursively. |
|
|
|
* Either properties file or label list can be omitted (set to null) |
|
|
|
* Special labels "deadlock", "init" and any not in label list are left. |
|
|
|
*/ |
|
|
|
public class ExpandPropRefsAndLabels extends ASTTraverseModify |
|
|
|
{ |
|
|
|
@ -54,6 +55,11 @@ public class ExpandPropRefsAndLabels extends ASTTraverseModify |
|
|
|
Type t; |
|
|
|
Expression expr; |
|
|
|
|
|
|
|
// Skip this if label list is missing |
|
|
|
if (labelList == null) { |
|
|
|
return e; |
|
|
|
} |
|
|
|
|
|
|
|
// See if identifier corresponds to a label |
|
|
|
i = labelList.getLabelIndex(e.getName()); |
|
|
|
if (i != -1) { |
|
|
|
@ -84,6 +90,11 @@ public class ExpandPropRefsAndLabels extends ASTTraverseModify |
|
|
|
Type t; |
|
|
|
Expression expr; |
|
|
|
|
|
|
|
// Skip this if label list is missing |
|
|
|
if (propertiesFile == null) { |
|
|
|
return e; |
|
|
|
} |
|
|
|
|
|
|
|
// See if name corresponds to a property |
|
|
|
prop = propertiesFile.lookUpPropertyObjectByName(e.getName()); |
|
|
|
if (prop != null) { |
|
|
|
|