Commit 3b3a1965 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* src/tgbatest/ltl2tgba.cc: Simplify using

emptiness_check_instantiator.
* src/tgba/tgba.cc, src/tgba/tgba.hh
(tgba::number_of_acceptance_conditions): Return an unsigned.
* bench/emptchk/algorithms, bench/emptchk/README,
src/tgbatest/emptchk.test, src/tgbatest/emptchke.test: Adjust
references to algorithms.
* bench/emptchk/pml-clserv.sh, bench/emptchk/pml-eeaean.sh: Quote
variables properly.
parent 4e1916ec
2005-02-18 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/tgbatest/ltl2tgba.cc: Simplify using
emptiness_check_instantiator.
* src/tgba/tgba.cc, src/tgba/tgba.hh
(tgba::number_of_acceptance_conditions): Return an unsigned.
* bench/emptchk/algorithms, bench/emptchk/README,
src/tgbatest/emptchk.test, src/tgbatest/emptchke.test: Adjust
references to algorithms.
* bench/emptchk/pml-clserv.sh, bench/emptchk/pml-eeaean.sh: Quote
variables properly.
2005-02-17 Alexandre Duret-Lutz <adl@src.lip6.fr> 2005-02-17 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/tgbaalgos/emptiness.hh, src/tgbaalgos/emptiness.cc * src/tgbaalgos/emptiness.hh, src/tgbaalgos/emptiness.cc
......
...@@ -176,20 +176,22 @@ This directory contains: ...@@ -176,20 +176,22 @@ This directory contains:
========================== ==========================
Here are the short names for the algorithms used in the outputs. Here are the short names for the algorithms used in the outputs.
ltl-*.sh tests use names from the left column, and pml-*.sh tests
Cou99 use names from the right column.
Cou99_shy-
Cou99_shy Cou99 Cou99
> Cou99_rem Cou99_shy- Cou99(shy !group)
> Cou99_rem_shy- Cou99_shy Cou99(shy group)
> Cou99_rem_shy > Cou99_rem Cou99(poprem)
> CVWY90 > Cou99_rem_shy- Cou99(poprem shy !group)
CVWY90_bsh > Cou99_rem_shy Cou99(poprem shy group)
> GV04 > CVWY90 CVWY90
> SE05 CVWY90_bsh CVWY90(bsh=4K)
SE05_bsh > GV04 GV04
> Tau03 > SE05 SE05
> Tau03_opt SE05_bsh SE05(bsh=4K)
> Tau03 Tau03
> Tau03_opt Tau03_opt
Only the algorithms marked with a `>' have been shown in the paper. Only the algorithms marked with a `>' have been shown in the paper.
`bsh' stands for `bit-state hashing'. `bsh' stands for `bit-state hashing'.
...@@ -197,7 +199,7 @@ This directory contains: ...@@ -197,7 +199,7 @@ This directory contains:
`Cou99_rem*' algorithms are using the `rem' field to remove `Cou99_rem*' algorithms are using the `rem' field to remove
the SCC without recomputing the SCC as described in the paper. the SCC without recomputing the SCC as described in the paper.
The other `Cou99*' algorithms are not. (Beware that in the paper The other `Cou99*' algorithms are not. (Beware that in the paper
we showed the `Cou99_rem*' variants and called them `Cou99*'.) we presented the `Cou99_rem*' variants and called them `Cou99*'.)
The ltl-*.sh tests output look as follows: The ltl-*.sh tests output look as follows:
......
Cou99 Cou99
Cou99_shy- Cou99(shy !group)
Cou99_shy Cou99(shy group)
Cou99_rem Cou99(poprem)
Cou99_rem_shy- Cou99(poprem shy !group)
Cou99_rem_shy Cou99(poprem shy group)
GV04 GV04
CVWY90 CVWY90
SE05 SE05
......
...@@ -34,13 +34,13 @@ do ...@@ -34,13 +34,13 @@ do
echo " $model" echo " $model"
echo "+++++++++++++++++++++" echo "+++++++++++++++++++++"
cat $FORMULAE | cat "$FORMULAE" |
while read formula; do while read formula; do
echo "-----------------------------------------------------------" echo "-----------------------------------------------------------"
# echo "### formula: $formula" # echo "### formula: $formula"
cat $ALGORITHMS | cat "$ALGORITHMS" |
while read algo; do while read algo; do
$LTL2TGBA -0 -e$algo $opts -Pmodels/$model "$formula" "$LTL2TGBA" -0 -e"$algo" $opts -Pmodels/$model "$formula"
done done
done done
done done
...@@ -34,13 +34,13 @@ do ...@@ -34,13 +34,13 @@ do
echo " $model" echo " $model"
echo "+++++++++++++++++++++" echo "+++++++++++++++++++++"
cat $FORMULAE | cat "$FORMULAE" |
while read formula; do while read formula; do
echo "-----------------------------------------------------------" echo "-----------------------------------------------------------"
echo "### formula: $formula" echo "### formula: $formula"
cat $ALGORITHMS | cat "$ALGORITHMS" |
while read algo; do while read algo; do
$LTL2TGBA -0 -e$algo $opts -Pmodels/$model "$formula" "$LTL2TGBA" -0 -e"$algo" $opts -Pmodels/$model "$formula"
done done
done done
done done
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie. // et Marie Curie.
// //
...@@ -76,13 +76,13 @@ namespace spot ...@@ -76,13 +76,13 @@ namespace spot
return ""; return "";
} }
int unsigned int
tgba::number_of_acceptance_conditions() const tgba::number_of_acceptance_conditions() const
{ {
if (num_acc_ < 0) if (num_acc_ < 0)
{ {
bdd all = all_acceptance_conditions(); bdd all = all_acceptance_conditions();
int n = 0; unsigned int n = 0;
while (all != bddfalse) while (all != bddfalse)
{ {
++n; ++n;
......
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie. // et Marie Curie.
// //
...@@ -188,7 +188,7 @@ namespace spot ...@@ -188,7 +188,7 @@ namespace spot
virtual bdd all_acceptance_conditions() const = 0; virtual bdd all_acceptance_conditions() const = 0;
/// The number of acceptance conditions. /// The number of acceptance conditions.
virtual int number_of_acceptance_conditions() const; virtual unsigned int number_of_acceptance_conditions() const;
/// \brief Return the conjuction of all negated acceptance /// \brief Return the conjuction of all negated acceptance
/// variables. /// variables.
......
#!/bin/sh #!/bin/sh
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6), # Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
# dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre # dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre
# et Marie Curie. # et Marie Curie.
# #
...@@ -37,23 +37,23 @@ expect_ce() ...@@ -37,23 +37,23 @@ expect_ce()
expect_ce_do -e -D "$1" expect_ce_do -e -D "$1"
expect_ce_do -e -f "$1" expect_ce_do -e -f "$1"
expect_ce_do -e -f -D "$1" expect_ce_do -e -f -D "$1"
expect_ce_do -eCou99_shy "$1" expect_ce_do -e'Cou99(shy)' "$1"
expect_ce_do -eCou99_shy -D "$1" expect_ce_do -e'Cou99(shy)' -D "$1"
expect_ce_do -eCou99_shy -f "$1" expect_ce_do -e'Cou99(shy)' -f "$1"
expect_ce_do -eCou99_shy -f -D "$1" expect_ce_do -e'Cou99(shy)' -f -D "$1"
expect_ce_do -eCVWY90 "$1" expect_ce_do -eCVWY90 "$1"
expect_ce_do -eCVWY90 -f "$1" expect_ce_do -eCVWY90 -f "$1"
run 0 ./ltl2tgba -eCVWY90_bsh "$1" run 0 ./ltl2tgba -e'CVWY90(bsh=10M)' "$1"
run 0 ./ltl2tgba -eCVWY90_bsh -f "$1" run 0 ./ltl2tgba -e'CVWY90(bsh=10M)' -f "$1"
run 0 ./ltl2tgba -eSE05 "$1" run 0 ./ltl2tgba -eSE05 "$1"
run 0 ./ltl2tgba -eSE05 -f "$1" run 0 ./ltl2tgba -eSE05 -f "$1"
run 0 ./ltl2tgba -eSE05_bsh "$1" run 0 ./ltl2tgba -e'SE05(bsh=10M)' "$1"
run 0 ./ltl2tgba -eSE05_bsh -f "$1" run 0 ./ltl2tgba -e'SE05(bsh=10M)' -f "$1"
run 0 ./ltl2tgba -eTau03_opt -f "$1" run 0 ./ltl2tgba -eTau03_opt -f "$1"
run 0 ./ltl2tgba -eGV04 -f "$1" run 0 ./ltl2tgba -eGV04 -f "$1"
# Expect multiple accepting runs # Expect multiple accepting runs
test `./ltl2tgba -eCVWY90_repeated "$1" | grep Prefix: | wc -l` -ge $2 test `./ltl2tgba -e'CVWY90(repeated)' "$1" | grep Prefix: | wc -l` -ge $2
test `./ltl2tgba -eSE05_repeated "$1" | grep Prefix: | wc -l` -ge $2 test `./ltl2tgba -e'SE05(repeated)' "$1" | grep Prefix: | wc -l` -ge $2
} }
expect_no() expect_no()
...@@ -62,23 +62,23 @@ expect_no() ...@@ -62,23 +62,23 @@ expect_no()
run 0 ./ltl2tgba -E -D "$1" run 0 ./ltl2tgba -E -D "$1"
run 0 ./ltl2tgba -E -f "$1" run 0 ./ltl2tgba -E -f "$1"
run 0 ./ltl2tgba -E -f -D "$1" run 0 ./ltl2tgba -E -f -D "$1"
run 0 ./ltl2tgba -ECou99_shy "$1" run 0 ./ltl2tgba -E'Cou99(shy)' "$1"
run 0 ./ltl2tgba -ECou99_shy -D "$1" run 0 ./ltl2tgba -E'Cou99(shy)' -D "$1"
run 0 ./ltl2tgba -ECou99_shy -f "$1" run 0 ./ltl2tgba -E'Cou99(shy)' -f "$1"
run 0 ./ltl2tgba -ECou99_shy -f -D "$1" run 0 ./ltl2tgba -E'Cou99(shy)' -f -D "$1"
run 0 ./ltl2tgba -ECVWY90 "$1" run 0 ./ltl2tgba -ECVWY90 "$1"
run 0 ./ltl2tgba -ECVWY90 -f "$1" run 0 ./ltl2tgba -ECVWY90 -f "$1"
run 0 ./ltl2tgba -ECVWY90_bsh "$1" run 0 ./ltl2tgba -E'CVWY90(bsh=10M)' "$1"
run 0 ./ltl2tgba -ECVWY90_bsh -f "$1" run 0 ./ltl2tgba -E'CVWY90(bsh=10M)' -f "$1"
run 0 ./ltl2tgba -ESE05 "$1" run 0 ./ltl2tgba -ESE05 "$1"
run 0 ./ltl2tgba -ESE05 -f "$1" run 0 ./ltl2tgba -ESE05 -f "$1"
run 0 ./ltl2tgba -ESE05_bsh "$1" run 0 ./ltl2tgba -E'SE05(bsh=10M)' "$1"
run 0 ./ltl2tgba -ESE05_bsh -f "$1" run 0 ./ltl2tgba -E'SE05(bsh=10M)' -f "$1"
run 0 ./ltl2tgba -ETau03_opt -f "$1" run 0 ./ltl2tgba -ETau03_opt -f "$1"
run 0 ./ltl2tgba -EGV04 -f "$1" run 0 ./ltl2tgba -EGV04 -f "$1"
test `./ltl2tgba -eCVWY90_repeated "!($1)" | test `./ltl2tgba -e'CVWY90(repeated)' "!($1)" |
grep Prefix: | wc -l` -ge $2 grep Prefix: | wc -l` -ge $2
test `./ltl2tgba -eSE05_repeated "!($1)" | test `./ltl2tgba -e'SE05(repeated)' "!($1)" |
grep Prefix: | wc -l` -ge $2 grep Prefix: | wc -l` -ge $2
} }
......
#!/bin/sh #!/bin/sh
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6), # Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre # département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie. # et Marie Curie.
# #
...@@ -29,8 +29,8 @@ expect_ce() ...@@ -29,8 +29,8 @@ expect_ce()
{ {
run 0 ./ltl2tgba -e -X "$1" run 0 ./ltl2tgba -e -X "$1"
run 0 ./ltl2tgba -e -D -X "$1" run 0 ./ltl2tgba -e -D -X "$1"
run 0 ./ltl2tgba -eCou99_shy -X "$1" run 0 ./ltl2tgba -e'Cou99(shy)' -X "$1"
run 0 ./ltl2tgba -eCou99_shy -D -X "$1" run 0 ./ltl2tgba -e'Cou99(shy)' -D -X "$1"
run 0 ./ltl2tgba -eCVWY90 -X "$1" run 0 ./ltl2tgba -eCVWY90 -X "$1"
} }
......
...@@ -38,14 +38,7 @@ ...@@ -38,14 +38,7 @@
#include "tgbaalgos/lbtt.hh" #include "tgbaalgos/lbtt.hh"
#include "tgba/tgbatba.hh" #include "tgba/tgbatba.hh"
#include "tgba/tgbaproduct.hh" #include "tgba/tgbaproduct.hh"
#include "tgbaalgos/gv04.hh"
#include "tgbaalgos/magic.hh"
#include "tgbaalgos/reducerun.hh" #include "tgbaalgos/reducerun.hh"
#include "tgbaalgos/se05.hh"
#include "tgbaalgos/tau03.hh"
#include "tgbaalgos/tau03opt.hh"
#include "tgbaalgos/gtec/gtec.hh"
#include "tgbaalgos/gtec/ce.hh"
#include "tgbaparse/public.hh" #include "tgbaparse/public.hh"
#include "tgbaalgos/dupexp.hh" #include "tgbaalgos/dupexp.hh"
#include "tgbaalgos/neverclaim.hh" #include "tgbaalgos/neverclaim.hh"
...@@ -133,27 +126,12 @@ syntax(char* prog) ...@@ -133,27 +126,12 @@ syntax(char* prog)
<< "(implies -f)" << std::endl << "(implies -f)" << std::endl
<< std::endl << std::endl
<< "Where ALGO should be one of:" << std::endl << "Where ALGO should be one of:" << std::endl
<< " Cou99 (the default)" << std::endl << " Cou99(OPTIONS) (the default)" << std::endl
<< " Cou99_shy-" << std::endl << " CVWY90(OPTIONS)" << std::endl
<< " Cou99_shy" << std::endl << " GV04(OPTIONS)" << std::endl
<< " Cou99_rem" << std::endl << " SE05(OPTIONS)" << std::endl
<< " Cou99_rem_shy-" << std::endl << " Tau03(OPTIONS)" << std::endl
<< " Cou99_rem_shy" << std::endl << " Tau03_opt(OPTIONS)" << std::endl;
<< " CVWY90" << std::endl
<< " CVWY90_repeated" << std::endl
<< " CVWY90_bsh[(heap size in Mo - 10Mo by default)]"
<< std::endl
<< " CVWY90_bsh_repeated[(heap size in MB - 10MB"
<< " by default)]" << std::endl
<< " GV04" << std::endl
<< " SE05" << std::endl
<< " SE05_repeated" << std::endl
<< " SE05_bsh[(heap size in MB - 10MB by default)]"
<< std::endl
<< " SE05_bsh_repeated[(heap size in MB - 10MB"
<< " by default)]" << std::endl
<< " Tau03" << std::endl
<< " Tau03_opt" << std::endl;
exit(2); exit(2);
} }
...@@ -165,22 +143,15 @@ main(int argc, char** argv) ...@@ -165,22 +143,15 @@ main(int argc, char** argv)
bool debug_opt = false; bool debug_opt = false;
bool paper_opt = false; bool paper_opt = false;
enum { NoDegen, DegenTBA, DegenSBA } degeneralize_opt = NoDegen; enum { NoDegen, DegenTBA, DegenSBA } degeneralize_opt = NoDegen;
bool degeneralize_maybe = false;
bool fm_opt = false; bool fm_opt = false;
bool fm_exprop_opt = false; bool fm_exprop_opt = false;
bool fm_symb_merge_opt = true; bool fm_symb_merge_opt = true;
bool file_opt = false; bool file_opt = false;
int output = 0; int output = 0;
int formula_index = 0; int formula_index = 0;
std::string echeck_algo; const char* echeck_algo = 0;
enum { None, Couvreur, Couvreur2, MagicSearch, Se05Search, spot::emptiness_check_instantiator* echeck_inst = 0;
Tau03Search, Tau03OptSearch, Gv04 } echeck = None;
enum { NoneDup, BFS, DFS } dupexp = NoneDup; enum { NoneDup, BFS, DFS } dupexp = NoneDup;
bool couv_group = true;
bool poprem = false;
bool search_many = false;
bool bit_state_hashing = false;
int heap_size = 10*1024*1024;
bool expect_counter_example = false; bool expect_counter_example = false;
bool from_file = false; bool from_file = false;
int reduc_aut = spot::Reduce_None; int reduc_aut = spot::Reduce_None;
...@@ -237,29 +208,37 @@ main(int argc, char** argv) ...@@ -237,29 +208,37 @@ main(int argc, char** argv)
} }
else if (!strncmp(argv[formula_index], "-e", 2)) else if (!strncmp(argv[formula_index], "-e", 2))
{ {
if (argv[formula_index][2] != 0) echeck_algo = 2 + argv[formula_index];
{ if (!*echeck_algo)
char *p = strchr(argv[formula_index], '('); echeck_algo = "Cou99";
if (p && sscanf(p+1, "%d)", &heap_size) == 1)
*p = '\0'; const char* err;
echeck_algo = argv[formula_index] + 2; echeck_inst =
} spot::emptiness_check_instantiator::construct(echeck_algo, &err);
else if (!echeck_inst)
echeck_algo = "Cou99"; {
std::cerr << "Failed to parse argument of -e near `"
<< err << "'" << std::endl;
exit(2);
}
expect_counter_example = true; expect_counter_example = true;
output = -1; output = -1;
} }
else if (!strncmp(argv[formula_index], "-E", 2)) else if (!strncmp(argv[formula_index], "-E", 2))
{ {
if (argv[formula_index][2] != 0) const char* echeck_algo = 2 + argv[formula_index];
{ if (!*echeck_algo)
char *p = strchr(argv[formula_index], '('); echeck_algo = "Cou99";
if (p && sscanf(p+1, "%d)", &heap_size) == 1)
*p = '\0'; const char* err;
echeck_algo = argv[formula_index] + 2; echeck_inst =
} spot::emptiness_check_instantiator::construct(echeck_algo, &err);
else if (!echeck_inst)
echeck_algo = "Cou99"; {
std::cerr << "Failed to parse argument of -e near `"
<< err << "'" << std::endl;
exit(2);
}
expect_counter_example = false; expect_counter_example = false;
output = -1; output = -1;
} }
...@@ -416,109 +395,8 @@ main(int argc, char** argv) ...@@ -416,109 +395,8 @@ main(int argc, char** argv)
} }
} }
if (echeck_algo != "")
{
if (echeck_algo == "Cou99")
{
echeck = Couvreur;
}
else if (echeck_algo == "Cou99_shy")
{
echeck = Couvreur2;
couv_group = true;
}
else if (echeck_algo == "Cou99_shy-")
{
echeck = Couvreur2;
couv_group = false;
}
else if (echeck_algo == "Cou99_rem")
{
echeck = Couvreur;
poprem = true;
}
else if (echeck_algo == "Cou99_rem_shy")
{
echeck = Couvreur2;
couv_group = true;
poprem = true;
}
else if (echeck_algo == "Cou99_rem_shy-")
{
echeck = Couvreur2;
couv_group = false;
poprem = true;
}
else if (echeck_algo == "CVWY90")
{
echeck = MagicSearch;
degeneralize_maybe = true;
}
else if (echeck_algo == "CVWY90_repeated")
{
echeck = MagicSearch;
degeneralize_maybe = true;
search_many = true;
}
else if (echeck_algo == "CVWY90_bsh")
{
echeck = MagicSearch;
degeneralize_maybe = true;
bit_state_hashing = true;
}
else if (echeck_algo == "CVWY90_bsh_repeated")
{
echeck = MagicSearch;
degeneralize_maybe = true;
bit_state_hashing = true;
search_many = true;
}
else if (echeck_algo == "SE05")
{
echeck = Se05Search;
degeneralize_maybe = true;
}
else if (echeck_algo == "SE05_repeated")
{
echeck = Se05Search;
degeneralize_maybe = true;
search_many = true;
}
else if (echeck_algo == "SE05_bsh")
{
echeck = Se05Search;
degeneralize_maybe = true;
bit_state_hashing = true;
}
else if (echeck_algo == "SE05_bsh_repeated")
{
echeck = Se05Search;
degeneralize_maybe = true;
bit_state_hashing = true;
search_many = true;
}
else if (echeck_algo == "Tau03")
{
echeck = Tau03Search;
}
else if (echeck_algo == "Tau03_opt")
{
echeck = Tau03OptSearch;
}
else if (echeck_algo == "GV04")
{
echeck = Gv04;
degeneralize_maybe = true;
}
else
{
std::cerr << "unknown emptiness-check: " << echeck_algo << std::endl;
syntax(argv[0]);
}
}
if ((graph_run_opt || graph_run_tgba_opt) if ((graph_run_opt || graph_run_tgba_opt)
&& (echeck_algo == "" || !expect_counter_example)) && (!echeck_inst || !expect_counter_example))
{ {
std::cerr << argv[0] << ": error: -g and -G require -e." << std::endl; std::cerr << argv[0] << ": error: -g and -G require -e." << std::endl;
exit(1); exit(1);
...@@ -601,9 +479,11 @@ main(int argc, char** argv) ...@@ -601,9 +479,11 @@ main(int argc, char** argv)
spot::tgba_tba_proxy* degeneralized = 0; spot::tgba_tba_proxy* degeneralized = 0;
if (degeneralize_maybe unsigned int n_acc = a->number_of_acceptance_conditions();
if (echeck_inst
&& degeneralize_opt == NoDegen && degeneralize_opt == NoDegen
&& a->number_of_acceptance_conditions() > 1) && n_acc > 1
&& echeck_inst->max_acceptance_conditions() < n_acc)
degeneralize_opt = DegenTBA; degeneralize_opt = DegenTBA;
if (degeneralize_opt == DegenTBA) if (degeneralize_opt == DegenTBA)
a = degeneralized = new spot::tgba_tba_proxy(a); a = degeneralized = new spot::tgba_tba_proxy(a);
...@@ -681,9 +561,12 @@ main(int argc, char** argv) ...@@ -681,9 +561,12 @@ main(int argc, char** argv)
if (system) if (system)
{ {
a = product = product_to_free = new spot::tgba_product(system, a); a = product = product_to_free = new spot::tgba_product(system, a);
if (degeneralize_maybe
&& degeneralize_opt == NoDegen unsigned int n_acc = a->number_of_acceptance_conditions();
&& product->number_of_acceptance_conditions() > 1) if (echeck_inst
&& degeneralize_opt == NoDegen
&& n_acc > 1
&& echeck_inst->max_acceptance_conditions() < n_acc)