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