* src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/gtec/gtec.hh:

(couvreur99_check_shy_ssp): Add a onepass_ attribute to
disable the "shyness", and do not increment pos before calling
find_state since gspn's implementation uses it.
* iface/gspn/ssp.cc: Enable "onepass_" for all "shy" variants,
and also fix find_state for the case where onepass_ is
disabled (but I do not yet know why the latter fix isn't enough).
This commit is contained in:
Alexandre Duret-Lutz 2006-04-05 09:24:39 +00:00
parent 644b74f8c0
commit 983d12cc5a
4 changed files with 38 additions and 4 deletions

View file

@ -322,6 +322,7 @@ namespace spot
group_ = o.get("group", 1);
group2_ = o.get("group2", 0);
group_ |= group2_;
onepass_ = o.get("onepass", 0);
// Setup depth-first search from the initial state.
const state* i = ecs_->aut->get_init_state();
@ -364,7 +365,7 @@ namespace spot
couvreur99_check_shy::check()
{
// Position in the loop seeking known successors.
succ_queue::iterator pos = todo.back().q.begin();
pos = todo.back().q.begin();
for (;;)
{
@ -429,13 +430,18 @@ namespace spot
// which state we are considering. Otherwise just pick the
// first one.
succ_queue::iterator old;
if (onepass_)
pos = queue.end();
if (pos == queue.end())
old = queue.begin();
else
old = pos++;
old = pos;
successor succ = *old;
// Beware: the implementation of find_state in ifage/gspn/ssp.cc
// uses POS and modify QUEUE.
numbered_state_heap::state_index_p sip = find_state(succ.s);
if (pos != queue.end())
++pos;
int* i = sip.second;
if (!i)