Browse Source

ExpressionQuant: mode -> modifier.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10033 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 11 years ago
parent
commit
adba5a090c
  1. 2
      prism/src/parser/ast/ExpressionProb.java
  2. 22
      prism/src/parser/ast/ExpressionQuant.java
  3. 2
      prism/src/parser/ast/ExpressionReward.java
  4. 2
      prism/src/parser/ast/ExpressionSS.java

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

@ -155,7 +155,7 @@ public class ExpressionProb extends ExpressionQuant
{ {
String s = ""; String s = "";
s += "P" + getModeString() + getRelOp();
s += "P" + getModifierString() + getRelOp();
s += (getBound() == null) ? "?" : getBound().toString(); s += (getBound() == null) ? "?" : getBound().toString();
s += " [ " + getExpression(); s += " [ " + getExpression();
if (getFilter() != null) if (getFilter() != null)

22
prism/src/parser/ast/ExpressionQuant.java

@ -36,8 +36,8 @@ import prism.PrismException;
*/ */
public abstract class ExpressionQuant extends Expression public abstract class ExpressionQuant extends Expression
{ {
/** Optional "mode" to specify variants of the P/R/S operator */
protected String mode = null;
/** Optional "modifier" to specify variants of the P/R/S operator */
protected String modifier = null;
/** The attached relational operator (e.g. "<" in "P<0.1"). */ /** The attached relational operator (e.g. "<" in "P<0.1"). */
protected RelOp relOp = null; protected RelOp relOp = null;
/** The attached (probability/reward) bound, as an expression (e.g. "p" in "P<p"). Null if absent (e.g. "P=?"). */ /** The attached (probability/reward) bound, as an expression (e.g. "p" in "P<p"). Null if absent (e.g. "P=?"). */
@ -51,11 +51,11 @@ public abstract class ExpressionQuant extends Expression
// Set methods // Set methods
/** /**
* Set the (optional) "mode" for this operator.
* Set the (optional) "modifier" for this operator.
*/ */
public void setMode(String mode)
public void setMode(String modifier)
{ {
this.mode = mode;
this.modifier = modifier;
} }
/** /**
@ -104,19 +104,19 @@ public abstract class ExpressionQuant extends Expression
// Get methods // Get methods
/** /**
* Get the (optional) "mode" for this operator.
* Get the (optional) "modifier" for this operator.
*/ */
public String getMode()
public String getModifier()
{ {
return mode;
return modifier;
} }
/** /**
* Get a string representing the model as a suffix for the operator.
* Get a string representing the modifier as a suffix for the operator.
*/ */
public String getModeString()
public String getModifierString()
{ {
return mode == null ? "" : "(" + mode + ")";
return modifier == null ? "" : "(" + modifier + ")";
} }
/** /**

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

@ -241,7 +241,7 @@ public class ExpressionReward extends ExpressionQuant
{ {
String s = ""; String s = "";
s += "R" + getModeString();
s += "R" + getModifierString();
if (rewardStructIndex != null) { if (rewardStructIndex != null) {
if (rewardStructIndex instanceof Expression) s += "{"+rewardStructIndex+"}"; if (rewardStructIndex instanceof Expression) s += "{"+rewardStructIndex+"}";
else if (rewardStructIndex instanceof String) s += "{\""+rewardStructIndex+"\"}"; else if (rewardStructIndex instanceof String) s += "{\""+rewardStructIndex+"\"}";

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

@ -141,7 +141,7 @@ public class ExpressionSS extends ExpressionQuant
{ {
String s = ""; String s = "";
s += "S" + getModeString() + getRelOp();
s += "S" + getModifierString() + getRelOp();
s += (getBound()==null) ? "?" : getBound().toString(); s += (getBound()==null) ? "?" : getBound().toString();
s += " [ " + getExpression(); s += " [ " + getExpression();
if (getFilter() != null) s += " "+getFilter(); if (getFilter() != null) s += " "+getFilter();

Loading…
Cancel
Save