During the complementation, transform the auxiliary Streett automaton
into a TGBA instead of a TBA.
* src/tgba/tgbacomplement.hh, src/tgba/tgbacomplement.cc:
Adjust the transformation from Streett to Büchi to support
generalized acceptance conditions.
* src/tgbatest/complementation.cc: Improve output messages.
* src/tgbatest/complementation.test: New tests.
This commit is contained in:
parent
4d4fc641b5
commit
e0a8114f06
5 changed files with 116 additions and 19 deletions
|
|
@ -137,19 +137,25 @@ int main(int argc, char* argv[])
|
|||
spot::tgba_statistics a_size = spot::stats_reachable(a);
|
||||
std::cout << "Original: "
|
||||
<< a_size.states << ", "
|
||||
<< a_size.transitions << std::endl;
|
||||
<< a_size.transitions << ", "
|
||||
<< a->number_of_acceptance_conditions()
|
||||
<< std::endl;
|
||||
|
||||
spot::tgba *buchi = new spot::tgba_sba_proxy(a);
|
||||
a_size = spot::stats_reachable(buchi);
|
||||
std::cout << "Buchi: "
|
||||
<< a_size.states << ", "
|
||||
<< a_size.transitions << std::endl;
|
||||
<< a_size.transitions << ", "
|
||||
<< buchi->number_of_acceptance_conditions()
|
||||
<< std::endl;
|
||||
delete buchi;
|
||||
|
||||
spot::tgba_statistics b_size = spot::stats_reachable(complement);
|
||||
std::cout << "Complement: "
|
||||
<< b_size.states << ", "
|
||||
<< b_size.transitions << std::endl;
|
||||
<< b_size.transitions << ", "
|
||||
<< complement->number_of_acceptance_conditions()
|
||||
<< std::endl;
|
||||
|
||||
delete complement;
|
||||
delete a;
|
||||
|
|
@ -162,7 +168,9 @@ int main(int argc, char* argv[])
|
|||
spot::tgba_statistics a_size = spot::stats_reachable(a2);
|
||||
std::cout << "Not Formula: "
|
||||
<< a_size.states << ", "
|
||||
<< a_size.transitions << std::endl;
|
||||
<< a_size.transitions << ", "
|
||||
<< a2->number_of_acceptance_conditions()
|
||||
<< std::endl;
|
||||
|
||||
delete a2;
|
||||
spot::ltl::destroy(f1);
|
||||
|
|
@ -187,18 +195,20 @@ int main(int argc, char* argv[])
|
|||
spot::emptiness_check* ec = spot::couvreur99(prod);
|
||||
spot::emptiness_check_result* res = ec->check();
|
||||
spot::tgba_statistics a_size = spot::stats_reachable(ec->automaton());
|
||||
std::cout << std::right << std::setw(10)
|
||||
<< a_size.states << ", "
|
||||
<< std::right << std::setw(10)
|
||||
<< a_size.transitions << ", "
|
||||
<< ec->automaton()->number_of_acceptance_conditions();
|
||||
std::cout << "States: "
|
||||
<< a_size.states << std::endl
|
||||
<< "Transitions: "
|
||||
<< a_size.transitions << std::endl
|
||||
<< "Acc Cond: "
|
||||
<< ec->automaton()->number_of_acceptance_conditions()
|
||||
<< std::endl;
|
||||
if (res)
|
||||
{
|
||||
std::cout << ", FAIL";
|
||||
std::cout << "FAIL";
|
||||
return_value = 1;
|
||||
}
|
||||
else
|
||||
std::cout << ", OK";
|
||||
std::cout << "OK";
|
||||
std::cout << std::endl;
|
||||
|
||||
delete res;
|
||||
|
|
|
|||
|
|
@ -24,8 +24,17 @@
|
|||
|
||||
set -e
|
||||
|
||||
FORMULAE='GFa FGa <>p1->(p0Up1) [](p0-><>p3) GFa&&FGa'
|
||||
|
||||
for f in $FORMULAE; do
|
||||
while read f; do
|
||||
run 0 ./complement -f "$f"
|
||||
done
|
||||
done <<EOF
|
||||
GFa
|
||||
FGa
|
||||
<>p1->(p0Up1)
|
||||
[](p0-><>p3)
|
||||
GFa&&FGa
|
||||
[] ((p2 && ! p1) -> (p0 U (p1 || [] p0)))
|
||||
[] (p2 -> ((! p0 && ! p1) U (p1 || ((p0 && ! p1) U (p1 || ((! p0 && ! p1) \
|
||||
U (p1 || ((p0 && ! p1) U ((p1 || (! p0 U (p1 || [] ! p0))) || [] p0)))))))))
|
||||
(p0 U (p1 && X (p2 && (true U (p3 && X (true U (p4 && X \
|
||||
(true U (p5 && X (true U p6))))))))))
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue