Browse Source

Bugfix: vars option in -simpath was broken in new new simulator.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@2767 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
53db5959d1
  1. 7
      prism/src/simulator/GenerateSimulationPath.java

7
prism/src/simulator/GenerateSimulationPath.java

@ -75,11 +75,11 @@ public class GenerateSimulationPath
public void generateSimulationPath(ModulesFile modulesFile, Values initialState, String details, int maxPathLength,
File file) throws PrismException
{
parseDetails(details);
this.modulesFile = modulesFile;
this.initialState = initialState;
this.maxPathLength = maxPathLength;
this.file = file;
parseDetails(details);
generatePath();
}
@ -126,6 +126,7 @@ public class GenerateSimulationPath
throw new PrismException("Separator must be one of: \"space\", \"tab\", \"comma\"");
} else if (ss[i].indexOf("vars=") == 0) {
// Build list of indices of variables to display
VarList varList = modulesFile.createVarList();
simVars = new ArrayList<Integer>();
done = false;
s = ss[i].substring(5);
@ -136,7 +137,7 @@ public class GenerateSimulationPath
s = s.substring(0, s.length() - 1);
done = true;
}
j = engine.getIndexOfVar(s);
j = varList.getIndex(s);
if (j == -1)
throw new PrismException("Unknown variable \"" + s + "\" in \"vars=(...)\" list");
simVars.add(j);
@ -146,7 +147,7 @@ public class GenerateSimulationPath
s = s.substring(0, s.length() - 1);
done = true;
}
j = engine.getIndexOfVar(s);
j = varList.getIndex(s);
if (j == -1)
throw new PrismException("Unknown variable \"" + s + "\" in \"vars=(...)\" list");
simVars.add(j);

Loading…
Cancel
Save