Skip to content
Snippets Groups Projects
Commit b7af7718 authored by Markus Alexander Kuppe's avatar Markus Alexander Kuppe
Browse files

"-lncheck seqfinal" checks satisfiability branches of liveness checking

sequentially.

Multiple properties are usually split into individual branches that TLC
checks in parallel.  In memory constrained environments, running the
branches sequentially trades memory (space) for time.

[Feature][TLC]
parent e2f99e6c
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,11 @@ public class TLCGlobals
public static String lnCheck = "default";
public static boolean doLiveness() {
return !lnCheck.equals("final");
return !(lnCheck.equals("final") || lnCheck.equals("seqfinal"));
}
public static boolean doSequentialLiveness() {
return lnCheck.startsWith("seq");
}
public synchronized static void setNumWorkers(int n)
......
......@@ -227,7 +227,7 @@ public class LiveCheck implements ILiveCheck {
* a violation found by another LW. However, if any LW fails to check, we terminate
* model checking after all LWs completed.
*/
final int wNum = Math.min(checker.length, TLCGlobals.getNumWorkers());
final int wNum = TLCGlobals.doSequentialLiveness() ? 1 : Math.min(checker.length, TLCGlobals.getNumWorkers());
final ExecutorService pool = Executors.newFixedThreadPool(wNum);
// CS is really just a container around the set of Futures returned by the pool. It saves us from
// creating a low-level array.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment