Browse Source

Rename a few visitor classes

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4502 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 14 years ago
parent
commit
be53bceb72
  1. 10
      prism/src/parser/ast/ASTElement.java
  2. 2
      prism/src/parser/ast/ModulesFile.java
  3. 4
      prism/src/parser/ast/PropertiesFile.java
  4. 6
      prism/src/parser/visitor/FindAllPropRefs.java
  5. 4
      prism/src/parser/visitor/GetAllPropRefs.java
  6. 1
      prism/src/userinterface/properties/GUIProperty.java

10
prism/src/parser/ast/ASTElement.java

@ -349,21 +349,21 @@ public abstract class ASTElement
}
/**
* Find all references to properties (by name), replace the ExpressionLabels with ExpressionProps.
* Find all references to properties (by name), replace the ExpressionLabels with ExpressionProp objects.
*/
public ASTElement findAllProps(ModulesFile mf, PropertiesFile pf) throws PrismLangException
public ASTElement findAllPropRefs(ModulesFile mf, PropertiesFile pf) throws PrismLangException
{
FindAllProps visitor = new FindAllProps(mf, pf);
FindAllPropRefs visitor = new FindAllPropRefs(mf, pf);
return (ASTElement) accept(visitor);
}
/**
* Get all references to properties (by name) (i.e. ExpressionProp objects), store names in set.
*/
public Vector<String> getAllProps() throws PrismLangException
public Vector<String> getAllPropRefs() throws PrismLangException
{
Vector<String> v = new Vector<String>();
GetAllProps visitor = new GetAllProps(v);
GetAllPropRefs visitor = new GetAllPropRefs(v);
accept(visitor);
return v;
}

2
prism/src/parser/ast/ModulesFile.java

@ -497,7 +497,7 @@ public class ModulesFile extends ASTElement
findAllVars(varNames, varTypes);
// Find all instances of property refs
findAllProps(this, null);
findAllPropRefs(this, null);
// Check reward structure names
checkRewardStructNames();

4
prism/src/parser/ast/PropertiesFile.java

@ -279,7 +279,7 @@ public class PropertiesFile extends ASTElement
findAllVars(modulesFile.getVarNames(), modulesFile.getVarTypes());
// Find all instances of property refs
findAllProps(null, this);
findAllPropRefs(null, this);
// Check property references for cyclic dependencies
findCyclesInPropertyReferences();
@ -437,7 +437,7 @@ public class PropertiesFile extends ASTElement
// and store this info in boolean matrix
for (i = 0; i < n; i++) {
e = properties.get(i).getExpression();
v = e.getAllProps();
v = e.getAllPropRefs();
for (j = 0; j < v.size(); j++) {
k = getPropertyIndexByName(v.elementAt(j));
if (k != -1) {

6
prism/src/parser/visitor/FindAllProps.java → prism/src/parser/visitor/FindAllPropRefs.java

@ -30,14 +30,14 @@ import parser.ast.*;
import prism.PrismLangException;
/**
* Find all references to properties (by name), replace the ExpressionLabels with ExpressionProps.
* Find all references to properties (by name), replace the ExpressionLabels with ExpressionProp objects.
*/
public class FindAllProps extends ASTTraverseModify
public class FindAllPropRefs extends ASTTraverseModify
{
private ModulesFile mf;
private PropertiesFile pf;
public FindAllProps(ModulesFile mf, PropertiesFile pf)
public FindAllPropRefs(ModulesFile mf, PropertiesFile pf)
{
this.mf = mf;
this.pf = pf;

4
prism/src/parser/visitor/GetAllProps.java → prism/src/parser/visitor/GetAllPropRefs.java

@ -34,11 +34,11 @@ import prism.PrismLangException;
/**
* Get all references to properties (by name) (i.e. ExpressionProp objects), store names in set.
*/
public class GetAllProps extends ASTTraverse
public class GetAllPropRefs extends ASTTraverse
{
private Vector<String> v;
public GetAllProps(Vector<String> v)
public GetAllPropRefs(Vector<String> v)
{
this.v = v;
}

1
prism/src/userinterface/properties/GUIProperty.java

@ -35,7 +35,6 @@ import javax.swing.*;
import userinterface.GUIPrism;
import parser.*;
import parser.ast.*;
import parser.visitor.FindAllProps;
import parser.visitor.GetAllReferencedProperties;
import prism.*;

Loading…
Cancel
Save