private void launchPrismModels(ModelingProject rootModel, ILaunchConfiguration configuration,
ILaunch launch, IProgressMonitor monitor) throws CoreException {
Map<String,AtopTranslationTask> tasks = rootModel.getAllResources(AtopTranslationTask.class);
for (AtopTranslationTask task : tasks.values()) {
PrismModelResource modelRes = null;
PrismPropertiesResource propsRes = null;
for (AbstractResource res : task.getOutputResources().values()) {
if (res instanceof PrismModelResource) modelRes = (PrismModelResource) res;
if (res instanceof PrismPropertiesResource) propsRes = (PrismPropertiesResource) res;
}
if (modelRes == null || propsRes == null)
throw new CoreException(new Status(Status.ERROR, "q_impress", "Unable to launch PRISM model checking for " + task.getName()));
monitor.setTaskName("Launching prism model : " + modelRes.getLocation());
// compute working dir
IResource workingDir = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(modelRes.getLocation())).getParent();
try {
String[] cmdLine = {
getPrismCmdPath() ,
rootModel.getLocationSolver().getAbsoluteLocation(modelRes.getLocation()),
rootModel.getLocationSolver().getAbsoluteLocation(propsRes.getLocation()),
"-fixdl",
"-exportresults",
rootModel.getLocationSolver().getAbsoluteLocation(modelRes.getLocation()) + ".res"};
Process prismProcess = DebugPlugin.exec(cmdLine, new File(workingDir.getLocation().toPortableString()));
DebugPlugin.newProcess(launch, prismProcess, "Prism Model " + cmdLine[2]);
monitor.worked(1);
} catch (LocationException e) {