From 9dd562a6ebd19e528b85bb9b4144584c3e8effee Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Wed, 10 Aug 2011 10:02:57 +0000 Subject: [PATCH] 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 --- prism/src/simulator/SimulatorEngine.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/prism/src/simulator/SimulatorEngine.java b/prism/src/simulator/SimulatorEngine.java index a3b93fbf..ec9a27a9 100644 --- a/prism/src/simulator/SimulatorEngine.java +++ b/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