Browse Source

Small fixes in simulator wrt experiments (one part should have been commited earlier with undefined constants improvements).

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3439 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
9dd562a6eb
  1. 5
      prism/src/simulator/SimulatorEngine.java

5
prism/src/simulator/SimulatorEngine.java

@ -1352,12 +1352,11 @@ public class SimulatorEngine
for (int i = 0; i < n; i++) {
definedPFConstants = undefinedConstants.getPFConstantValues();
pfcs[i] = definedPFConstants;
propertiesFile.setUndefinedConstants(definedPFConstants);
propertiesFile.setSomeUndefinedConstants(definedPFConstants);
try {
checkPropertyForSimulation(expr);
indices[i] = addProperty(expr, propertiesFile);
validPropsCount++;
undefinedConstants.iterateProperty();
// Attach a SimulationMethod object to each property's sampler
SimulationMethod simMethodNew = simMethod.clone();
propertySamplers.get(indices[i]).setSimulationMethod(simMethodNew);
@ -1367,6 +1366,7 @@ public class SimulatorEngine
simMethodNew.setExpression(properties.get(indices[i]));
} catch (PrismException e) {
// In case of error, also need to remove property/sampler from list
// (NB: this will be at the end of the list so no re-indexing issues)
properties.remove(indices[i]);
propertySamplers.remove(indices[i]);
throw e;
@ -1375,6 +1375,7 @@ public class SimulatorEngine
results[i] = e;
indices[i] = -1;
}
undefinedConstants.iterateProperty();
}
// As long as there are at least some valid props, do sampling

Loading…
Cancel
Save