Skip to content

Commit 52fa47c

Browse files
steffan711peterschrammel
authored andcommitted
termination analysis and nontermination analysis now running in parallel (#15)
* termination analysis and nontermination analysis now running in parallel * small error caused by comment removed * requested changes made
1 parent 3977b6c commit 52fa47c

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

2ls.inc

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,33 @@ run()
1010
# add property-specific options
1111
if [[ "$PROP" == "termination" ]]; then
1212
PROPERTY="$PROPERTY --termination --competition-mode"
13+
PROPERTY2="$PROPERTY --nontermination --competition-mode"
14+
15+
# run the termination and nontermination analysis in parallel
16+
$TOOL_BINARY --graphml-witness $LOG.witness $BIT_WIDTH $PROPERTY \
17+
--function $ENTRY $BM >> $LOG.ok 2>&1 &
18+
$TOOL_BINARY --graphml-witness $LOG.witness $BIT_WIDTH $PROPERTY2 \
19+
--function $ENTRY $BM >> $LOG.ok 2>&1 &
20+
wait -n
21+
22+
# store the exit code of the first process that is finished
23+
EC=$?
24+
25+
# if the result of termination analysis is unknown,
26+
# wait for the most recently executed background process,
27+
# which is nontermination analysis
28+
if [$EC -eq 5]; then
29+
wait $!
30+
EC=$?
31+
fi
1332
else
1433
PROPERTY="$PROPERTY --k-induction --competition-mode"
34+
35+
# run the tool
36+
$TOOL_BINARY --graphml-witness $LOG.witness $BIT_WIDTH $PROPERTY \
37+
--function $ENTRY $BM >> $LOG.ok 2>&1
38+
39+
# store the exit code
40+
EC=$?
1541
fi
16-
17-
# run the tool
18-
$TOOL_BINARY --graphml-witness $LOG.witness $BIT_WIDTH $PROPERTY \
19-
--function $ENTRY $BM >> $LOG.ok 2>&1
20-
21-
# store the exit code
22-
EC=$?
2342
}

0 commit comments

Comments
 (0)