From be53bceb7228cb8b66f9552bcb5ffc60887702d5 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Fri, 27 Jan 2012 12:08:52 +0000 Subject: [PATCH] Rename a few visitor classes git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4502 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/parser/ast/ASTElement.java | 10 +++++----- prism/src/parser/ast/ModulesFile.java | 2 +- prism/src/parser/ast/PropertiesFile.java | 4 ++-- .../{FindAllProps.java => FindAllPropRefs.java} | 6 +++--- .../visitor/{GetAllProps.java => GetAllPropRefs.java} | 4 ++-- prism/src/userinterface/properties/GUIProperty.java | 1 - 6 files changed, 13 insertions(+), 14 deletions(-) rename prism/src/parser/visitor/{FindAllProps.java => FindAllPropRefs.java} (92%) rename prism/src/parser/visitor/{GetAllProps.java => GetAllPropRefs.java} (94%) diff --git a/prism/src/parser/ast/ASTElement.java b/prism/src/parser/ast/ASTElement.java index 4198306f..1f57d819 100644 --- a/prism/src/parser/ast/ASTElement.java +++ b/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 getAllProps() throws PrismLangException + public Vector getAllPropRefs() throws PrismLangException { Vector v = new Vector(); - GetAllProps visitor = new GetAllProps(v); + GetAllPropRefs visitor = new GetAllPropRefs(v); accept(visitor); return v; } diff --git a/prism/src/parser/ast/ModulesFile.java b/prism/src/parser/ast/ModulesFile.java index 37c46381..3eb2c7f7 100644 --- a/prism/src/parser/ast/ModulesFile.java +++ b/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(); diff --git a/prism/src/parser/ast/PropertiesFile.java b/prism/src/parser/ast/PropertiesFile.java index 1da798e3..93c49f18 100644 --- a/prism/src/parser/ast/PropertiesFile.java +++ b/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) { diff --git a/prism/src/parser/visitor/FindAllProps.java b/prism/src/parser/visitor/FindAllPropRefs.java similarity index 92% rename from prism/src/parser/visitor/FindAllProps.java rename to prism/src/parser/visitor/FindAllPropRefs.java index b1ef4aa4..2d62b98f 100644 --- a/prism/src/parser/visitor/FindAllProps.java +++ b/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; diff --git a/prism/src/parser/visitor/GetAllProps.java b/prism/src/parser/visitor/GetAllPropRefs.java similarity index 94% rename from prism/src/parser/visitor/GetAllProps.java rename to prism/src/parser/visitor/GetAllPropRefs.java index fcba8599..07d8029c 100644 --- a/prism/src/parser/visitor/GetAllProps.java +++ b/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 v; - public GetAllProps(Vector v) + public GetAllPropRefs(Vector v) { this.v = v; } diff --git a/prism/src/userinterface/properties/GUIProperty.java b/prism/src/userinterface/properties/GUIProperty.java index e265c3ad..c9daed94 100644 --- a/prism/src/userinterface/properties/GUIProperty.java +++ b/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.*;