Commit 55ee18b9 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

sat-minimize: more statistics.

* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Record
statistics about intermediate automata if SPOT_SATLOG is set to some
filename, and display intermediate automata if SPOT_SATSHOW is set.
* bench/dtgbasat/stat.sh, bench/dtgbasat/stats.sh,
bench/dtgbasat/tabl.pl, bench/dtgbasat/tabl1.pl,
bench/dtgbasat/tabl2.pl, bench/dtgbasat/tabl3.pl,
bench/dtgbasat/tabl4.pl: Gather these extra statistics.
parent 1319ec0b
...@@ -11,7 +11,9 @@ dbamin=${DBA_MINIMIZER-/home/adl/projs/dbaminimizer/minimize.py} ...@@ -11,7 +11,9 @@ dbamin=${DBA_MINIMIZER-/home/adl/projs/dbaminimizer/minimize.py}
get_stats() get_stats()
{ {
$timeout "$@" "$stats" > stdin.$$ 2>stderr.$$ type=$1
shift
SPOT_SATLOG=$n.$type.satlog $timeout "$@" "$stats" > stdin.$$ 2>stderr.$$
if grep -q 'INT_MAX' stderr.$$; then if grep -q 'INT_MAX' stderr.$$; then
# Too many SAT-clause? # Too many SAT-clause?
echo "$tomany" echo "$tomany"
...@@ -29,22 +31,22 @@ get_dbamin_stats() ...@@ -29,22 +31,22 @@ get_dbamin_stats()
echo ${tmp:-$mye} echo ${tmp:-$mye}
} }
n=$1
f=$1 f=$2
type=$2 type=$3
accmax=$3 accmax=$4
case $type in case $type in
*WDBA*) *WDBA*)
echo "$f, $accmax, $type..." 1>&2 echo "$f, $accmax, $type..." 1>&2
input=`get_stats $ltl2tgba "$f" -BD` input=`get_stats BA $ltl2tgba "$f" -BD`
dba=$input dba=$input
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA..." 1>&2
mindba=`get_stats $ltl2tgba "$f" -BD -x 'sat-minimize=-1'` mindba=`get_stats DBA $ltl2tgba "$f" -BD -x 'sat-minimize=-1'`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA..." 1>&2
mindtgba=`get_stats $ltl2tgba "$f" -D -x 'sat-minimize=-1'` mindtgba=`get_stats DTGBA $ltl2tgba "$f" -D -x 'sat-minimize=-1'`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA..." 1>&2
mindtba=`get_stats $ltl2tgba "$f" -D -x 'sat-minimize=-1,sat-acc=1'` mindtba=`get_stats DTBA $ltl2tgba "$f" -D -x 'sat-minimize=-1,sat-acc=1'`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA, $mindtba, dbaminimizer..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA, $mindtba, dbaminimizer..." 1>&2
$ltlfilt --remove-wm -f "$f" -l | $ltlfilt --remove-wm -f "$f" -l |
ltl2dstar --ltl2nba=spin:$ltl2tgba@-sD - dra.$$ ltl2dstar --ltl2nba=spin:$ltl2tgba@-sD - dra.$$
...@@ -54,15 +56,15 @@ case $type in ...@@ -54,15 +56,15 @@ case $type in
;; ;;
*TCONG*|*trad*) # Not in WDBA *TCONG*|*trad*) # Not in WDBA
echo "$f, $accmax, $type..." 1>&2 echo "$f, $accmax, $type..." 1>&2
input=`get_stats $ltl2tgba "$f" -D -x '!wdba-minimize,tba-det'` input=`get_stats TBA $ltl2tgba "$f" -D -x '!wdba-minimize,tba-det'`
echo "$f, $accmax, $type, $input, DBA, ..." 1>&2 echo "$f, $accmax, $type, $input, DBA, ..." 1>&2
dba=`get_stats $ltl2tgba "$f" -BD -x '!wdba-minimize,tba-det'` dba=`get_stats BA $ltl2tgba "$f" -BD -x '!wdba-minimize,tba-det'`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA..." 1>&2
mindba=`get_stats $ltl2tgba "$f" -BD -x '!wdba-minimize,sat-minimize'` mindba=`get_stats DBA $ltl2tgba "$f" -BD -x '!wdba-minimize,sat-minimize'`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA..." 1>&2
mindtgba=`get_stats $ltl2tgba "$f" -D -x '!wdba-minimize,sat-minimize'` mindtgba=`get_stats DTGBA $ltl2tgba "$f" -D -x '!wdba-minimize,sat-minimize'`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA..." 1>&2
mindtba=`get_stats $ltl2tgba "$f" -D -x '!wdba-minimize,sat-minimize,sat-acc=1'` mindtba=`get_stats DTBA $ltl2tgba "$f" -D -x '!wdba-minimize,sat-minimize,sat-acc=1'`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA, $mindtba, dbaminimizer..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA, $mindtba, dbaminimizer..." 1>&2
case $type in case $type in
*TCONG*) dbamin="n/a, n/a" dra="n/a";; *TCONG*) dbamin="n/a, n/a" dra="n/a";;
...@@ -79,15 +81,15 @@ case $type in ...@@ -79,15 +81,15 @@ case $type in
echo "$f, $accmax, $type... " 1>&2 echo "$f, $accmax, $type... " 1>&2
$ltlfilt --remove-wm -f "$f" -l | $ltlfilt --remove-wm -f "$f" -l |
ltl2dstar --ltl2nba=spin:$ltl2tgba@-sD - dra.$$ ltl2dstar --ltl2nba=spin:$ltl2tgba@-sD - dra.$$
input=`get_stats $dstar2tgba dra.$$ -D -x '!wdba-minimize'` input=`get_stats TBA $dstar2tgba dra.$$ -D -x '!wdba-minimize'`
echo "$f, $accmax, $type, $input, DBA, ... " 1>&2 echo "$f, $accmax, $type, $input, DBA, ... " 1>&2
dba=`get_stats $dstar2tgba dra.$$ -BD -x '!wdba-minimize'` dba=`get_stats BA $dstar2tgba dra.$$ -BD -x '!wdba-minimize'`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA... " 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA... " 1>&2
mindba=`get_stats $dstar2tgba dra.$$ -BD -x '!wdba-minimize,sat-minimize'` mindba=`get_stats DBA $dstar2tgba dra.$$ -BD -x '!wdba-minimize,sat-minimize'`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA..." 1>&2
mindtgba=`get_stats $dstar2tgba dra.$$ -D -x '!wdba-minimize,sat-acc='$accmax` mindtgba=`get_stats DTGBA $dstar2tgba dra.$$ -D -x '!wdba-minimize,sat-acc='$accmax`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA..." 1>&2
mindtba=`get_stats $dstar2tgba dra.$$ -D -x '!wdba-minimize,sat-acc=1'` mindtba=`get_stats DTBA $dstar2tgba dra.$$ -D -x '!wdba-minimize,sat-acc=1'`
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA, $mindtba, dbaminimizer..." 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA, $mindtba, dbaminimizer..." 1>&2
dbamin=`get_dbamin_stats dra.$$` dbamin=`get_dbamin_stats dra.$$`
dra=`sed -n 's/States: \(.*\)/\1/p' dra.$$` dra=`sed -n 's/States: \(.*\)/\1/p' dra.$$`
...@@ -101,5 +103,5 @@ case $type in ...@@ -101,5 +103,5 @@ case $type in
exit 2 exit 2
;; ;;
esac esac
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA, $mindtba, dbaminimizer, $dbamin, DRA, $dra" 1>&2 echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA, $mindtba, dbaminimizer, $dbamin, DRA, $dra, $n" 1>&2
echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA, $mindtba, dbaminimizer, $dbamin, DRA, $dra" echo "$f, $accmax, $type, $input, DBA, $dba, minDBA, $mindba, minDTGBA, $mindtgba, minDTBA, $mindtba, dbaminimizer, $dbamin, DRA, $dra, $n"
...@@ -17,15 +17,15 @@ while IFS=, read f type accmax accmin; do ...@@ -17,15 +17,15 @@ while IFS=, read f type accmax accmin; do
case $type in case $type in
*TCONG*) *TCONG*)
echo "$n.log:; ./stat.sh '$f' $type $accmax >\$@" >> stats.tmp echo "$n.log:; ./stat.sh $n '$f' $type $accmax >\$@" >> stats.tmp
all="$all $n.log" all="$all $n.log"
n=`expr $n + 1` n=`expr $n + 1`
echo "$n.log:; ./stat.sh '$f' DRA-CONG $accmax >\$@" >> stats.tmp echo "$n.log:; ./stat.sh $n '$f' DRA-CONG $accmax >\$@" >> stats.tmp
all="$all $n.log" all="$all $n.log"
n=`expr $n + 1` n=`expr $n + 1`
;; ;;
*) *)
echo "$n.log:; ./stat.sh '$f' $type $accmax >\$@" >> stats.tmp echo "$n.log:; ./stat.sh $n '$f' $type $accmax >\$@" >> stats.tmp
all="$all $n.log" all="$all $n.log"
n=`expr $n + 1` n=`expr $n + 1`
;; ;;
......
...@@ -60,7 +60,7 @@ print "\\documentclass{standalone}\n ...@@ -60,7 +60,7 @@ print "\\documentclass{standalone}\n
print "\\begin{document}\n"; print "\\begin{document}\n";
print "\\begin{tabular}{lrcr|r|rrrr|rrr|rr|rrr|rrr|rrrr}"; print "\\begin{tabular}{lrcr|r|rrrr|rrr|rr|rrr|rrr|rrrr}";
print "\\multicolumn{24}{l}{Column \\textbf{type} shows how the initial deterministic automaton was obtained: T = translation produces DTGBA; W = WDBA minimization works; P = powerset construction transforms TBA to DTBA; R = DRA to DBA.}\\\\\n"; print "\\multicolumn{24}{l}{Column \\textbf{type} shows how the initial det. aut. was obtained: T = translation produces DTGBA; W = WDBA minimization works; P = powerset construction transforms TBA to DTBA; R = DRA to DBA.}\\\\\n";
print "\\multicolumn{24}{l}{Column \\textbf{C.} tells whether the output automaton is complete: rejecting sink states are always omitted (add 1 state when C=0 if you want the size of the complete automaton).}\\\\\n"; print "\\multicolumn{24}{l}{Column \\textbf{C.} tells whether the output automaton is complete: rejecting sink states are always omitted (add 1 state when C=0 if you want the size of the complete automaton).}\\\\\n";
print "&&&&DRA&\\multicolumn{4}{|c}{DTGBA} & \\multicolumn{3}{|c}{DBA} & \\multicolumn{2}{|c}{DBA\\footnotesize minimizer}& \\multicolumn{3}{|c}{min DBA} & \\multicolumn{3}{|c}{minDTBA} & \\multicolumn{4}{|c}{minDTGBA}\\\\\n"; print "&&&&DRA&\\multicolumn{4}{|c}{DTGBA} & \\multicolumn{3}{|c}{DBA} & \\multicolumn{2}{|c}{DBA\\footnotesize minimizer}& \\multicolumn{3}{|c}{min DBA} & \\multicolumn{3}{|c}{minDTBA} & \\multicolumn{4}{|c}{minDTGBA}\\\\\n";
print "formula & \$m\$ & type & C. & st. & st. & tr. & acc. & time & st. & tr. & time & st. & time & st. & tr. & time & st. & tr. & time & st. & tr. & acc. & time \\\\\n"; print "formula & \$m\$ & type & C. & st. & st. & tr. & acc. & time & st. & tr. & time & st. & time & st. & tr. & time & st. & tr. & time & st. & tr. & acc. & time \\\\\n";
...@@ -71,6 +71,20 @@ sub nonnull($) ...@@ -71,6 +71,20 @@ sub nonnull($)
return $_[0]; return $_[0];
} }
sub getlastsuccesful($$)
{
my ($n,$type) = @_;
open LOG, "<$n.$type.satlog" or return "";
my $min = "";
while (my $line = <LOG>)
{
my @f = split(/,/, $line);
$min = $f[1] if $f[1] ne '';
}
$min = ", \$\\le\$$min" if $min ne "";
return $min;
}
my $lasttype = ''; my $lasttype = '';
my $linenum = 0; my $linenum = 0;
...@@ -95,6 +109,7 @@ foreach my $tab (@w) ...@@ -95,6 +109,7 @@ foreach my $tab (@w)
print "\\arrayrulecolor{lightgray}\\hline\\arrayrulecolor{black}"; print "\\arrayrulecolor{lightgray}\\hline\\arrayrulecolor{black}";
} }
my $n = $tab->[52];
my $f = $tab->[0]; my $f = $tab->[0];
$f =~ s/\&/\\land /g; $f =~ s/\&/\\land /g;
$f =~ s/\|/\\lor /g; $f =~ s/\|/\\lor /g;
...@@ -169,12 +184,14 @@ foreach my $tab (@w) ...@@ -169,12 +184,14 @@ foreach my $tab (@w)
if ($tab->[21] =~ /\s*-\s*/) # minDBA if ($tab->[21] =~ /\s*-\s*/) # minDBA
{ {
print "\\multicolumn{3}{c|}{(killed)}&"; my $s = getlastsuccesful($n, "DBA");
print "\\multicolumn{3}{c|}{(killed$s)}&";
$tab->[21] = 0+'inf'; $tab->[21] = 0+'inf';
} }
elsif ($tab->[21] =~ /\s*!\s*/) # minDBA elsif ($tab->[21] =~ /\s*!\s*/) # minDBA
{ {
print "\\multicolumn{3}{c|}{(intmax)}&"; my $s = getlastsuccesful($n, "DBA");
print "\\multicolumn{3}{c|}{(intmax$s)}&";
$tab->[21] = 0+'inf'; $tab->[21] = 0+'inf';
} }
else else
...@@ -188,12 +205,14 @@ foreach my $tab (@w) ...@@ -188,12 +205,14 @@ foreach my $tab (@w)
if ($tab->[39] =~ /\s*-\s*/) # min DTBA if ($tab->[39] =~ /\s*-\s*/) # min DTBA
{ {
print "\\multicolumn{3}{c|}{(killed)}&"; my $s = getlastsuccesful($n, "DTBA");
print "\\multicolumn{3}{c|}{(killed$s)}&";
$tab->[39] = 0+'inf'; $tab->[39] = 0+'inf';
} }
elsif ($tab->[39] =~ /\s*!\s*/) # min DTBA elsif ($tab->[39] =~ /\s*!\s*/) # min DTBA
{ {
print "\\multicolumn{3}{c|}{(intmax)}&"; my $s = getlastsuccesful($n, "DTBA");
print "\\multicolumn{3}{c|}{(intmax$s)}&";
$tab->[39] = 0+'inf'; $tab->[39] = 0+'inf';
} }
else else
...@@ -208,12 +227,14 @@ foreach my $tab (@w) ...@@ -208,12 +227,14 @@ foreach my $tab (@w)
if ($tab->[30] =~ /\s*-\s*/) # minTGBA if ($tab->[30] =~ /\s*-\s*/) # minTGBA
{ {
print "\\multicolumn{4}{c}{(killed)}"; my $s = getlastsuccesful($n, "DTGBA");
print "\\multicolumn{4}{c}{(killed$s)}";
$tab->[30] = 0+'inf'; $tab->[30] = 0+'inf';
} }
elsif ($tab->[30] =~ /\s*!\s*/) # minTGBA elsif ($tab->[30] =~ /\s*!\s*/) # minTGBA
{ {
print "\\multicolumn{4}{c}{(intmax)}"; my $s = getlastsuccesful($n, "DTGBA");
print "\\multicolumn{4}{c}{(intmax$s)}";
$tab->[30] = 0+'inf'; $tab->[30] = 0+'inf';
} }
else else
......
...@@ -64,6 +64,21 @@ sub nonnull($) ...@@ -64,6 +64,21 @@ sub nonnull($)
return $_[0]; return $_[0];
} }
sub getlastsuccesful($$)
{
my ($n,$type) = @_;
open LOG, "<$n.$type.satlog" or return "";
my $min = "";
while (my $line = <LOG>)
{
my @f = split(/,/, $line);
$min = $f[1] if $f[1] ne '';
}
$min = ", \$\\le\$$min" if $min ne "";
return $min;
}
my $lasttype = ''; my $lasttype = '';
my $linenum = 0; my $linenum = 0;
...@@ -83,6 +98,7 @@ foreach my $tab (@w) ...@@ -83,6 +98,7 @@ foreach my $tab (@w)
# print "\\arrayrulecolor{lightgray}\\hline\\arrayrulecolor{black}"; # print "\\arrayrulecolor{lightgray}\\hline\\arrayrulecolor{black}";
} }
my $n = $tab->[52];
my $f = $tab->[0]; my $f = $tab->[0];
$f =~ s/\&/\\land /g; $f =~ s/\&/\\land /g;
$f =~ s/\|/\\lor /g; $f =~ s/\|/\\lor /g;
...@@ -119,12 +135,14 @@ foreach my $tab (@w) ...@@ -119,12 +135,14 @@ foreach my $tab (@w)
if ($tab->[21] =~ /\s*-\s*/) # minDBA if ($tab->[21] =~ /\s*-\s*/) # minDBA
{ {
print "\\multicolumn{1}{c|}{(killed)}&"; my $s = getlastsuccesful($n, "DBA");
print "\\multicolumn{1}{c|}{(killed$s)}&";
$tab->[21] = 0+'inf'; $tab->[21] = 0+'inf';
} }
elsif ($tab->[21] =~ /\s*!\s*/) # minDBA elsif ($tab->[21] =~ /\s*!\s*/) # minDBA
{ {
print "\\multicolumn{1}{c|}{(\$>\$INTMAX)}&"; my $s = getlastsuccesful($n, "DBA");
print "\\multicolumn{1}{c|}{(intmax$s)}&";
$tab->[21] = 0+'inf'; $tab->[21] = 0+'inf';
} }
else else
......
...@@ -83,6 +83,21 @@ sub nonnull($) ...@@ -83,6 +83,21 @@ sub nonnull($)
return $_[0]; return $_[0];
} }
sub getlastsuccesful($$)
{
my ($n,$type) = @_;
open LOG, "<$n.$type.satlog" or return "";
my $min = "";
while (my $line = <LOG>)
{
my @f = split(/,/, $line);
$min = $f[1] if $f[1] ne '';
}
$min = ", \$\\le\$$min" if $min ne "";
return $min;
}
my $lasttype = ''; my $lasttype = '';
my $linenum = 0; my $linenum = 0;
...@@ -107,6 +122,7 @@ foreach my $tab (@w) ...@@ -107,6 +122,7 @@ foreach my $tab (@w)
# print "\\arrayrulecolor{lightgray}\\hline\\arrayrulecolor{black}"; # print "\\arrayrulecolor{lightgray}\\hline\\arrayrulecolor{black}";
} }
my $n = $tab->[52];
my $f = $tab->[0]; my $f = $tab->[0];
$f =~ s/\&/\\land /g; $f =~ s/\&/\\land /g;
$f =~ s/\|/\\lor /g; $f =~ s/\|/\\lor /g;
...@@ -178,12 +194,14 @@ foreach my $tab (@w) ...@@ -178,12 +194,14 @@ foreach my $tab (@w)
if ($tab->[21] =~ /\s*-\s*/) # minDBA if ($tab->[21] =~ /\s*-\s*/) # minDBA
{ {
print "\\multicolumn{1}{c|}{(killed)}&"; my $s = getlastsuccesful($n, "DBA");
print "\\multicolumn{1}{c|}{(killed$s)}&";
$tab->[21] = 0+'inf'; $tab->[21] = 0+'inf';
} }
elsif ($tab->[21] =~ /\s*!\s*/) # minDBA elsif ($tab->[21] =~ /\s*!\s*/) # minDBA
{ {
print "\\multicolumn{1}{c|}{(INTMAX)}&"; my $s = getlastsuccesful($n, "DBA");
print "\\multicolumn{1}{c|}{(intmax$s)}&";
$tab->[21] = 0+'inf'; $tab->[21] = 0+'inf';
} }
else else
...@@ -198,12 +216,14 @@ foreach my $tab (@w) ...@@ -198,12 +216,14 @@ foreach my $tab (@w)
if ($tab->[39] =~ /\s*-\s*/) # min DTBA if ($tab->[39] =~ /\s*-\s*/) # min DTBA
{ {
print "\\multicolumn{2}{c|}{(killed)}&"; my $s = getlastsuccesful($n, "DTBA");
print "\\multicolumn{2}{c|}{(killed$s)}&";
$tab->[39] = 0+'inf'; $tab->[39] = 0+'inf';
} }
elsif ($tab->[39] =~ /\s*!\s*/) # min DTBA elsif ($tab->[39] =~ /\s*!\s*/) # min DTBA
{ {
print "\\multicolumn{2}{c|}{(INTMAX)}&"; my $s = getlastsuccesful($n, "DTBA");
print "\\multicolumn{2}{c|}{(intmax$s)}&";
$tab->[39] = 0+'inf'; $tab->[39] = 0+'inf';
} }
else else
...@@ -218,12 +238,14 @@ foreach my $tab (@w) ...@@ -218,12 +238,14 @@ foreach my $tab (@w)
if ($tab->[30] =~ /\s*-\s*/) # minTGBA if ($tab->[30] =~ /\s*-\s*/) # minTGBA
{ {
print "\\multicolumn{3}{c}{(killed)}"; my $s = getlastsuccesful($n, "DTGBA");
print "\\multicolumn{3}{c}{(killed$s)}";
$tab->[30] = 0+'inf'; $tab->[30] = 0+'inf';
} }
elsif ($tab->[30] =~ /\s*!\s*/) # minTGBA elsif ($tab->[30] =~ /\s*!\s*/) # minTGBA
{ {
print "\\multicolumn{3}{c}{(INTMAX)}"; my $s = getlastsuccesful($n, "DTGBA");
print "\\multicolumn{3}{c}{(intmax$s)}";
$tab->[30] = 0+'inf'; $tab->[30] = 0+'inf';
} }
else else
......
...@@ -85,6 +85,21 @@ sub nonnull($) ...@@ -85,6 +85,21 @@ sub nonnull($)
return $_[0]; return $_[0];
} }
sub getlastsuccesful($$)
{
my ($n,$type) = @_;
open LOG, "<$n.$type.satlog" or return "";
my $min = "";
while (my $line = <LOG>)
{
my @f = split(/,/, $line);
$min = $f[1] if $f[1] ne '';
}
$min = ", \$\\le\$$min" if $min ne "";
return $min;
}
my $lasttype = ''; my $lasttype = '';
my $linenum = 0; my $linenum = 0;
...@@ -109,6 +124,7 @@ foreach my $tab (@w) ...@@ -109,6 +124,7 @@ foreach my $tab (@w)
# print "\\arrayrulecolor{lightgray}\\hline\\arrayrulecolor{black}"; # print "\\arrayrulecolor{lightgray}\\hline\\arrayrulecolor{black}";
} }
my $n = $tab->[52];
my $f = $tab->[0]; my $f = $tab->[0];
$f =~ s/\&/\\land /g; $f =~ s/\&/\\land /g;
$f =~ s/\|/\\lor /g; $f =~ s/\|/\\lor /g;
...@@ -179,12 +195,14 @@ foreach my $tab (@w) ...@@ -179,12 +195,14 @@ foreach my $tab (@w)
if ($tab->[21] =~ /\s*-\s*/) # minDBA if ($tab->[21] =~ /\s*-\s*/) # minDBA
{ {
print "\\multicolumn{2}{c|}{(killed)}&"; my $s = getlastsuccesful($n, "DBA");
print "\\multicolumn{2}{c|}{(killed$s)}&";
$tab->[21] = 0+'inf'; $tab->[21] = 0+'inf';
} }
elsif ($tab->[21] =~ /\s*!\s*/) # minDBA elsif ($tab->[21] =~ /\s*!\s*/) # minDBA
{ {
print "\\multicolumn{2}{c|}{(intmax)}&"; my $s = getlastsuccesful($n, "DBA");
print "\\multicolumn{2}{c|}{(intmax$s)}&";
$tab->[21] = 0+'inf'; $tab->[21] = 0+'inf';
} }
else else
...@@ -199,12 +217,14 @@ foreach my $tab (@w) ...@@ -199,12 +217,14 @@ foreach my $tab (@w)
if ($tab->[39] =~ /\s*-\s*/) # min DTBA if ($tab->[39] =~ /\s*-\s*/) # min DTBA
{ {
print "\\multicolumn{2}{c|}{(killed)}&"; my $s = getlastsuccesful($n, "DTBA");
print "\\multicolumn{2}{c|}{(killed$s)}&";
$tab->[39] = 0+'inf'; $tab->[39] = 0+'inf';
} }
elsif ($tab->[39] =~ /\s*!\s*/) # min DTBA elsif ($tab->[39] =~ /\s*!\s*/) # min DTBA
{ {
print "\\multicolumn{2}{c|}{(intmax)}&"; my $s = getlastsuccesful($n, "DTBA");
print "\\multicolumn{2}{c|}{(intmax$s)}&";
$tab->[39] = 0+'inf'; $tab->[39] = 0+'inf';
} }
else else
...@@ -219,12 +239,14 @@ foreach my $tab (@w) ...@@ -219,12 +239,14 @@ foreach my $tab (@w)
if ($tab->[30] =~ /\s*-\s*/) # minTGBA if ($tab->[30] =~ /\s*-\s*/) # minTGBA
{ {
print "\\multicolumn{3}{c}{(killed)}"; my $s = getlastsuccesful($n, "DTGBA");
print "\\multicolumn{3}{c}{(killed$s)}";
$tab->[30] = 0+'inf'; $tab->[30] = 0+'inf';
} }
elsif ($tab->[30] =~ /\s*!\s*/) # minTGBA elsif ($tab->[30] =~ /\s*!\s*/) # minTGBA
{ {
print "\\multicolumn{3}{c}{(intmax)}"; my $s = getlastsuccesful($n, "DTGBA");
print "\\multicolumn{3}{c}{(intmax$s)}";
$tab->[30] = 0+'inf'; $tab->[30] = 0+'inf';
} }
else else
......
...@@ -84,6 +84,21 @@ sub nonnull($) ...@@ -84,6 +84,21 @@ sub nonnull($)
return $_[0]; return $_[0];
} }
sub getlastsuccesful($$)
{
my ($n,$type) = @_;
open LOG, "<$n.$type.satlog" or return "";
my $min = "";
while (my $line = <LOG>)
{
my @f = split(/,/, $line);
$min = $f[1] if $f[1] ne '';
}
$min = ", \$\\le\$$min" if $min ne "";
return $min;
}
my $lasttype = ''; my $lasttype = '';
my $linenum = 0; my $linenum = 0;
...@@ -104,6 +119,7 @@ foreach my $tab (@w) ...@@ -104,6 +119,7 @@ foreach my $tab (@w)
} }
++$linenum; ++$linenum;
my $n = $tab->[52];
my $f = $tab->[0]; my $f = $tab->[0];
next if length($f) > 60; next if length($f) > 60;
$f =~ s/\&/\\land /g; $f =~ s/\&/\\land /g;
...@@ -181,12 +197,14 @@ foreach my $tab (@w) ...@@ -181,12 +197,14 @@ foreach my $tab (@w)
if ($tab->[21] =~ /\s*-\s*/) # minDBA if ($tab-&g