Browse Source

PTA bug fixes: model labels, multiple properties.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1895 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 16 years ago
parent
commit
d48e088cdb
  1. 5
      prism/src/pta/Modules2PTA.java
  2. 11
      prism/src/pta/PTAModelChecker.java

5
prism/src/pta/Modules2PTA.java

@ -83,7 +83,10 @@ public class Modules2PTA
// Clone the model file, replace any constants with values, // Clone the model file, replace any constants with values,
// and simplify any expressions as much as possible. // and simplify any expressions as much as possible.
modulesFile = (ModulesFile) modulesFile.replaceConstants(constantValues).simplify();
modulesFile = (ModulesFile) modulesFile.deepCopy().replaceConstants(constantValues).simplify();
// Remove labels from (cloned) model - these are not translated.
modulesFile.setLabelList(new LabelList());
// Go through list of modules // Go through list of modules
numModules = modulesFile.getNumModules(); numModules = modulesFile.getNumModules();

11
prism/src/pta/PTAModelChecker.java

@ -72,8 +72,15 @@ public class PTAModelChecker
if (propertiesFile != null) if (propertiesFile != null)
constantValues.addValues(propertiesFile.getConstantValues()); constantValues.addValues(propertiesFile.getConstantValues());
// Get combined label list, expand constants
labelList = propertiesFile.getCombinedLabelList();
// Build a combined label list and expand any constants
// (note labels in model are ignored (removed) during PTA translation so need to store here)
labelList = new LabelList();
for (int i = 0; i < modulesFile.getLabelList().size(); i++) {
labelList.addLabel(modulesFile.getLabelList().getLabelNameIdent(i), modulesFile.getLabelList().getLabel(i).deepCopy());
}
for (int i = 0; i < propertiesFile.getLabelList().size(); i++) {
labelList.addLabel(propertiesFile.getLabelList().getLabelNameIdent(i), propertiesFile.getLabelList().getLabel(i).deepCopy());
}
labelList = (LabelList) labelList.replaceConstants(constantValues); labelList = (LabelList) labelList.replaceConstants(constantValues);
// Build mapping from all (original model) variables to non-clocks only // Build mapping from all (original model) variables to non-clocks only

Loading…
Cancel
Save