tgba_succ_iterator: have first() and next() return a bool
The returned Boolean indicates whether there is a successor or not.
This way
| for (i->first(); !i->done(); i->next())
| {
| ...
| }
can be replaced by
| if (i->first()) do
| {
| ...
| }
| while (i->next());
avoiding all the virtual calls to done().
* iface/dve2/dve2.cc, src/kripke/kripkeexplicit.cc,
src/kripke/kripkeexplicit.hh, src/ta/ta.hh, src/ta/taexplicit.cc,
src/ta/taexplicit.hh, src/ta/taproduct.cc, src/ta/taproduct.hh,
src/ta/tgtaproduct.cc, src/ta/tgtaproduct.hh, src/tgba/succiter.hh,
src/tgba/succiterconcrete.cc, src/tgba/succiterconcrete.hh,
src/tgba/taatgba.cc, src/tgba/taatgba.hh, src/tgba/tgba.hh,
src/tgba/tgbaexplicit.hh, src/tgba/tgbakvcomplement.cc,
src/tgba/tgbamask.cc, src/tgba/tgbaproduct.cc,
src/tgba/tgbasafracomplement.cc, src/tgba/tgbasgba.cc,
src/tgba/tgbatba.cc, src/tgba/tgbaunion.cc, src/tgba/tgbaunion.hh,
src/tgba/wdbacomp.cc: Implement and adjust to this new interface.
This commit is contained in:
parent
06c69f88ff
commit
1a5c0cb1f3
26 changed files with 256 additions and 206 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2011, 2012, 2013 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
// Copyright (C) 2011, 2012, 2013, 2014 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -54,12 +54,9 @@ namespace spot
|
|||
~tgta_succ_iterator_product();
|
||||
|
||||
// iteration
|
||||
void
|
||||
first();
|
||||
void
|
||||
next();
|
||||
bool
|
||||
done() const;
|
||||
bool first();
|
||||
bool next();
|
||||
bool done() const;
|
||||
|
||||
// inspection
|
||||
state_product*
|
||||
|
|
@ -75,8 +72,7 @@ namespace spot
|
|||
/// Internal routines to advance to the next successor.
|
||||
void
|
||||
step_();
|
||||
void
|
||||
find_next_succ_();
|
||||
bool find_next_succ_();
|
||||
|
||||
void
|
||||
next_kripke_dest();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue