|
|
|
@ -46,11 +46,17 @@ public class CheckValid extends ASTTraverse |
|
|
|
|
|
|
|
public void visitPost(ExpressionTemporal e) throws PrismLangException |
|
|
|
{ |
|
|
|
if (e.getOperator() == ExpressionTemporal.R_S) { |
|
|
|
if (modelType == ModelType.MDP) { |
|
|
|
// R operator types restricted for some models |
|
|
|
if (modelType == ModelType.MDP) { |
|
|
|
if (e.getOperator() == ExpressionTemporal.R_S) { |
|
|
|
throw new PrismLangException("Steady-state reward properties cannot be used for MDPs"); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (modelType == ModelType.PTA) { |
|
|
|
if (e.getOperator() == ExpressionTemporal.R_C || e.getOperator() == ExpressionTemporal.R_I || e.getOperator() == ExpressionTemporal.R_S) { |
|
|
|
throw new PrismLangException("Only reachability (F) reward properties can be used for PTAs"); |
|
|
|
} |
|
|
|
} |
|
|
|
// Apart from CTMCs, we only support upper time bounds |
|
|
|
if (e.getLowerBound() != null) { |
|
|
|
if (modelType == ModelType.DTMC) { |
|
|
|
@ -85,8 +91,12 @@ public class CheckValid extends ASTTraverse |
|
|
|
|
|
|
|
public void visitPost(ExpressionSS e) throws PrismLangException |
|
|
|
{ |
|
|
|
// S operator only works for some models |
|
|
|
if (modelType == ModelType.MDP) { |
|
|
|
throw new PrismLangException("The S operator cannot be used for MDPs"); |
|
|
|
} |
|
|
|
if (modelType == ModelType.PTA) { |
|
|
|
throw new PrismLangException("The S operator cannot be used for PTAs"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |