From af0fb7cba607329216fe6913fb4b5be1b7eaf62a Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Fri, 30 Apr 2010 10:00:23 +0000 Subject: [PATCH] Simulator bug fix (non-compile). git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1864 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/simulator/GenerateSimulationPath.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/prism/src/simulator/GenerateSimulationPath.java b/prism/src/simulator/GenerateSimulationPath.java index 27725058..cd291400 100644 --- a/prism/src/simulator/GenerateSimulationPath.java +++ b/prism/src/simulator/GenerateSimulationPath.java @@ -234,15 +234,15 @@ public class GenerateSimulationPath // check for termination (depending on type) switch (simPathType) { case SIM_PATH_NUM_STEPS: - if (i >= simPathLength || engine.queryIsDeadlock() == 1) + if (i >= simPathLength || engine.queryIsDeadlock()) done = true; break; case SIM_PATH_TIME: - if (t >= simPathTime || i >= maxPathLength || engine.queryIsDeadlock() == 1) + if (t >= simPathTime || i >= maxPathLength || engine.queryIsDeadlock()) done = true; break; case SIM_PATH_DEADLOCK: - if (engine.queryIsDeadlock() == 1 || i >= maxPathLength) + if (engine.queryIsDeadlock() || i >= maxPathLength) done = true; break; } @@ -252,7 +252,7 @@ public class GenerateSimulationPath } // if we are generating multiple paths (to find a deadlock) only stop if deadlock actually found - if (simPathType == PathType.SIM_PATH_DEADLOCK && engine.queryIsDeadlock() == 1) + if (simPathType == PathType.SIM_PATH_DEADLOCK && engine.queryIsDeadlock()) break; } if (j < simPathRepeat) @@ -269,7 +269,7 @@ public class GenerateSimulationPath mainLog.println("\n" + j + " paths were generated."); // export path - if (simPathType == PathType.SIM_PATH_DEADLOCK && engine.queryIsDeadlock() != 1) { + if (simPathType == PathType.SIM_PATH_DEADLOCK && !engine.queryIsDeadlock()) { mainLog.print("\nNo deadlock state found within " + maxPathLength + " steps"); if (simPathRepeat > 1) mainLog.print(" (generated " + simPathRepeat + " paths)");