Introduce -ks to print only the size of the automaton (without

SCC information).

* src/tgbatest/ltl2tgba.cc (syntax, main): Add a -ks option.
* src/tgbatest/ltl2tgba.test, bench/ltlclasses/run,
bench/ltlcounter/run: Use -ks instead of -k to speed things up.
This commit is contained in:
Alexandre Duret-Lutz 2010-12-10 10:02:53 +01:00
parent 3e7debe53e
commit 1dd524ebce
5 changed files with 28 additions and 10 deletions

View file

@ -243,7 +243,9 @@ syntax(char* prog)
<< std::endl
<< " -FC dump the automaton showing future conditions on states"
<< std::endl
<< " -k display statistics on the automaton of dumping it"
<< " -k display statistics on the automaton (size and SCCs)"
<< std::endl
<< " -ks display statistics on the automaton (size only)"
<< std::endl
<< " -K dump the graph of SCCs in dot format" << std::endl
<< " -KV verbosely dump the graph of SCCs in dot format"
@ -467,6 +469,10 @@ main(int argc, char** argv)
{
output = 9;
}
else if (!strcmp(argv[formula_index], "-ks"))
{
output = 12;
}
else if (!strcmp(argv[formula_index], "-K"))
{
output = 10;
@ -1067,6 +1073,9 @@ main(int argc, char** argv)
case 11:
dump_scc_dot(a, std::cout, true);
break;
case 12:
stats_reachable(a).dump(std::cout);
break;
default:
assert(!"unknown output option");
}

View file

@ -55,7 +55,7 @@ check '((Xp2)U(X(1)))&(p1 R(p2 R p0))'
# Make sure 'a U (b U c)' has 3 states and 6 transitions,
# before and after degeneralization.
for opt in '' -D -DS; do
../ltl2tgba -k -f -R3 $opt 'a U (b U c)' > stdout
../ltl2tgba -ks -f -R3 $opt 'a U (b U c)' > stdout
grep 'transitions: 6$' stdout
grep 'states: 3$' stdout
done
@ -63,7 +63,7 @@ done
# Make sure '!(Ga U b)' has 3 states and 6 transitions,
# before and after degeneralization.
for opt in '' -D -DS; do
../ltl2tgba -k -f -R3 $opt '!(Ga U b)' > stdout
../ltl2tgba -ks -f -R3 $opt '!(Ga U b)' > stdout
grep 'transitions: 6$' stdout
grep 'states: 3$' stdout
done
@ -71,7 +71,7 @@ done
# Make sure 'Ga U b' has 4 states and 6 transitions,
# before and after degeneralization.
for opt in '' -D -DS; do
../ltl2tgba -k -f -R3 $opt 'Ga U b' > stdout
../ltl2tgba -ks -f -R3 $opt 'Ga U b' > stdout
grep 'transitions: 6$' stdout
grep 'states: 4$' stdout
done
@ -80,12 +80,12 @@ done
# has 6 states and 15 transitions, before and after degeneralization.
f='(G (p -> F q)) && ((X (p) U q) || ! X (p U (p && q)))'
for opt in '' -D -DS; do
../ltl2tgba -k -f -R3 $opt "$f" > stdout
../ltl2tgba -ks -f -R3 $opt "$f" > stdout
grep 'transitions: 15$' stdout
grep 'states: 6$' stdout
done
# Note: this is worse with -R3f.
../ltl2tgba -k -f -R3f -DS "$f" > stdout
../ltl2tgba -ks -f -R3f -DS "$f" > stdout
grep 'transitions: 17$' stdout
grep 'states: 7$' stdout