Browse Source

prism.Model: move addUniqueLabelDD interface to Model

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12053 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 9 years ago
parent
commit
b7791bf416
  1. 19
      prism/src/prism/Model.java
  2. 18
      prism/src/prism/ProbModel.java

19
prism/src/prism/Model.java

@ -78,6 +78,25 @@ public interface Model
*/
Set<String> getLabels();
/**
* Add a label with corresponding state set, ensuring a unique, non-existing label.
* The label will be either "X" or "X_i" where X is the content of the {@code prefix} argument
* and i is a non-negative integer.
* <br>
* Optionally, a set of defined label names can be passed so that those labels
* can be avoided. This can be obtained from the model checker via {@code getDefinedLabelNames()}.
* <br>
* Note that a stored label takes precedence over the on-the-fly calculation
* of an ExpressionLabel, cf. {@link explicit.StateModelChecker#checkExpressionLabel}
* <br>[ STORES: labelDD, deref on later call to clear() ]
*
* @param prefix the prefix for the unique label
* @param labelDD the JDDNode with the state set for the label
* @param definedLabelNames set of names (optional, may be {@code null}) to check for existing labels
* @return the generated unique label
*/
public String addUniqueLabelDD(String prefix, JDDNode labelDD, Set<String> definedLabelNames);
String globalToLocal(long x);
int globalToLocal(long x, int l);
State convertBddToState(JDDNode dd);

18
prism/src/prism/ProbModel.java

@ -481,23 +481,7 @@ public class ProbModel implements Model
if (old != null) JDD.Deref(old);
}
/**
* Add a label with corresponding state set, ensuring a unique, non-existing label.
* The label will be either "X" or "X_i" where X is the content of the {@code prefix} argument
* and i is a non-negative integer.
* <br>
* Optionally, a set of defined label names can be passed so that those labels
* can be avoided. This can be obtained from the model checker via {@code getDefinedLabelNames()}.
* <br>
* Note that a stored label takes precedence over the on-the-fly calculation
* of an ExpressionLabel, cf. {@link explicit.StateModelChecker#checkExpressionLabel}
* <br>[ STORES: labelDD, deref on later call to clear() ]
*
* @param prefix the prefix for the unique label
* @param labelDD the JDDNode with the state set for the label
* @param definedLabelNames set of names (optional, may be {@code null}) to check for existing labels
* @return the generated unique label
*/
@Override
public String addUniqueLabelDD(String prefix, JDDNode labelDD, Set<String> definedLabelNames)
{
String label;

Loading…
Cancel
Save