* src/tgbaalgos/emptinesscheck.hh (connected_component::not_null,

connected_component::transition_acc,
connected_component::nb_transition,
connected_component::nb_state): Remove these unused attributes.
(connected_component::connected_component): Merge the two
definitions into one.
(connected_component::~connected_component): Remove.
(connected_component::isAccepted): Delete, unused.
* src/tgbaalgos/emptinesscheck.cc
(connected_component::connected_component,
connected_component::~connected_component): Adjust.
(connected_component::isAccepted): Delete.
(spot):

* src/tgbatest/emptchk.test: Typo.
This commit is contained in:
Alexandre Duret-Lutz 2003-10-23 13:50:15 +00:00
parent 636f5238d3
commit b60722bc58
4 changed files with 23 additions and 40 deletions

View file

@ -1,5 +1,21 @@
2003-10-23 Alexandre Duret-Lutz <adl@src.lip6.fr> 2003-10-23 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/tgbaalgos/emptinesscheck.hh (connected_component::not_null,
connected_component::transition_acc,
connected_component::nb_transition,
connected_component::nb_state): Remove these unused attributes.
(connected_component::connected_component): Merge the two
definitions into one.
(connected_component::~connected_component): Remove.
(connected_component::isAccepted): Delete, unused.
* src/tgbaalgos/emptinesscheck.cc
(connected_component::connected_component,
connected_component::~connected_component): Adjust.
(connected_component::isAccepted): Delete.
(spot):
* src/tgbatest/emptchk.test: Typo.
* src/tgbaalgos/emptinesscheck.hh * src/tgbaalgos/emptinesscheck.hh
(emptiness_check::remove_component, emptiness_check::root_component, (emptiness_check::remove_component, emptiness_check::root_component,
emptiness_check::seen_state_num, emptiness_check::suffix): Move in emptiness_check::seen_state_num, emptiness_check::suffix): Move in

View file

@ -8,13 +8,11 @@
#include "bdd.h" #include "bdd.h"
#include <map> #include <map>
#include <list> #include <list>
#include <sstream>
#include <stack> #include <stack>
#include <queue> #include <queue>
#include <stdio.h> #include <stdio.h>
#include <vector> #include <vector>
#include <set> #include <set>
#include <iterator>
#include <utility> #include <utility>
#include <ostream> #include <ostream>
@ -23,34 +21,10 @@ namespace spot
typedef std::pair<const spot::state*, tgba_succ_iterator*> pair_state_iter; typedef std::pair<const spot::state*, tgba_succ_iterator*> pair_state_iter;
typedef std::pair<pair_state_iter, bdd> triplet; typedef std::pair<pair_state_iter, bdd> triplet;
connected_component::connected_component() connected_component::connected_component(int i)
{
index = 0;
condition = bddfalse;
transition_acc = -1;
nb_transition = 0;
nb_state = 1;
not_null = false;
}
connected_component::connected_component(int i, bdd a)
{ {
index = i; index = i;
condition = a; condition = bddfalse;
transition_acc = -1;
nb_transition = 0;
nb_state = 1;
not_null = false;
}
connected_component::~connected_component()
{
}
bool
connected_component::isAccepted(tgba* aut)
{
return aut->all_accepting_conditions() == condition;
} }
/// \brief Remove all the nodes accessible from the given node start_delete. /// \brief Remove all the nodes accessible from the given node start_delete.
@ -98,7 +72,7 @@ namespace spot
int nbstate = 1; int nbstate = 1;
state* init = aut_check->get_init_state(); state* init = aut_check->get_init_state();
seen_state_num[init] = 1; seen_state_num[init] = 1;
root_component.push(spot::connected_component(1,bddfalse)); root_component.push(spot::connected_component(1));
arc_accepting.push(bddfalse); arc_accepting.push(bddfalse);
tgba_succ_iterator* iter_ = aut_check->succ_iter(init); tgba_succ_iterator* iter_ = aut_check->succ_iter(init);
iter_->first(); iter_->first();
@ -143,7 +117,7 @@ namespace spot
nbstate = nbstate + 1; nbstate = nbstate + 1;
assert(nbstate != 0); assert(nbstate != 0);
seen_state_num[current_state] = nbstate; seen_state_num[current_state] = nbstate;
root_component.push(connected_component(nbstate, bddfalse)); root_component.push(connected_component(nbstate));
arc_accepting.push(current_accepting); arc_accepting.push(current_accepting);
tgba_succ_iterator* iter2 = aut_check->succ_iter(current_state); tgba_succ_iterator* iter2 = aut_check->succ_iter(current_state);
iter2->first(); iter2->first();

View file

@ -20,10 +20,7 @@ namespace spot
{ {
// During the Depth path we keep the connected component that we met. // During the Depth path we keep the connected component that we met.
public: public:
connected_component(); connected_component(int index = -1);
connected_component(int i, bdd a);
virtual ~connected_component();
bool isAccepted(tgba* aut);
public: public:
int index; int index;
@ -36,10 +33,6 @@ namespace spot
/// for the counter example we need to know all the states of the /// for the counter example we need to know all the states of the
/// component /// component
set_of_state state_set; set_of_state state_set;
int transition_acc;
int nb_transition;
int nb_state;
bool not_null;
}; };
class emptiness_check class emptiness_check

View file

@ -38,5 +38,5 @@ expect_no '!((FF a) <=> (F a))'
expect_no 'Xa && (!a U b) && !b && X!b' expect_no 'Xa && (!a U b) && !b && X!b'
expect_no '(a U !b) && Gb' expect_no '(a U !b) && Gb'
# Expect four counter-examples.. # Expect five counter-examples..
test `./ltl2tgba -n 'FFx <=> Fx' | grep Prefix: | wc -l` = 4 test `./ltl2tgba -n 'FFx <=> Fx' | grep Prefix: | wc -l` = 5