hoa: rename hoaf_reachable() to hoa_reachable()

* src/tgbaalgos/hoaf.cc, src/tgbaalgos/hoaf.hh: Rename to...
* src/tgbaalgos/hoa.cc, src/tgbaalgos/hoa.hh: ... these, and
fix the function names.
* src/tgbaalgos/Makefile.am, src/bin/autfilt.cc,
src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc, src/tgbatest/ltl2tgba.cc:
Adjust all calls.
This commit is contained in:
Alexandre Duret-Lutz 2014-11-25 22:02:59 +01:00
parent 5b5c5edcf8
commit f08a26f7b9
7 changed files with 63 additions and 63 deletions

View file

@ -43,7 +43,7 @@ tgbaalgos_HEADERS = \
emptiness.hh \
emptiness_stats.hh \
gv04.hh \
hoaf.hh \
hoa.hh \
isdet.hh \
isweakscc.hh \
lbtt.hh \
@ -93,7 +93,7 @@ libtgbaalgos_la_SOURCES = \
dupexp.cc \
emptiness.cc \
gv04.cc \
hoaf.cc \
hoa.cc \
isdet.cc \
isweakscc.cc \
lbtt.cc \

View file

@ -24,7 +24,7 @@
#include <sstream>
#include <map>
#include "tgba/tgba.hh"
#include "hoaf.hh"
#include "hoa.hh"
#include "reachiter.hh"
#include "misc/escape.hh"
#include "misc/bddlt.hh"
@ -226,20 +226,20 @@ namespace spot
std::ostream&
hoaf_reachable(std::ostream& os,
const const_tgba_ptr& aut,
const ltl::formula* f,
hoaf_acceptance acceptance,
hoaf_alias alias,
bool newline)
hoa_reachable(std::ostream& os,
const const_tgba_ptr& aut,
const ltl::formula* f,
hoa_acceptance acceptance,
hoa_alias alias,
bool newline)
{
(void) alias;
metadata md(aut);
if (acceptance == Hoaf_Acceptance_States
if (acceptance == Hoa_Acceptance_States
&& !md.state_acc)
acceptance = Hoaf_Acceptance_Transitions;
acceptance = Hoa_Acceptance_Transitions;
unsigned num_states = md.nm.size();
@ -281,9 +281,9 @@ namespace spot
}
os << nl;
os << "properties: trans-labels explicit-labels";
if (acceptance == Hoaf_Acceptance_States)
if (acceptance == Hoa_Acceptance_States)
os << " state-acc";
else if (acceptance == Hoaf_Acceptance_Transitions)
else if (acceptance == Hoa_Acceptance_Transitions)
os << " trans-acc";
if (md.is_complete)
os << " complete";
@ -293,16 +293,16 @@ namespace spot
os << "--BODY--" << nl;
for (unsigned i = 0; i < num_states; ++i)
{
hoaf_acceptance this_acc = acceptance;
if (this_acc == Hoaf_Acceptance_Mixed)
hoa_acceptance this_acc = acceptance;
if (this_acc == Hoa_Acceptance_Mixed)
this_acc = (md.common_acc[i] ?
Hoaf_Acceptance_States : Hoaf_Acceptance_Transitions);
Hoa_Acceptance_States : Hoa_Acceptance_Transitions);
tgba_succ_iterator* j = aut->succ_iter(md.nm[i]);
j->first();
os << "State: " << i;
if (this_acc == Hoaf_Acceptance_States && !j->done())
if (this_acc == Hoa_Acceptance_States && !j->done())
md.emit_acc(os, aut, j->current_acceptance_conditions());
os << nl;
@ -310,7 +310,7 @@ namespace spot
{
const state* dst = j->current_state();
os << '[' << md.sup[j->current_condition()] << "] " << md.sm[dst];
if (this_acc == Hoaf_Acceptance_Transitions)
if (this_acc == Hoa_Acceptance_Transitions)
md.emit_acc(os, aut, j->current_acceptance_conditions());
os << nl;
dst->destroy();
@ -324,14 +324,14 @@ namespace spot
}
std::ostream&
hoaf_reachable(std::ostream& os,
const const_tgba_ptr& aut,
const char* opt,
const ltl::formula* f)
hoa_reachable(std::ostream& os,
const const_tgba_ptr& aut,
const char* opt,
const ltl::formula* f)
{
bool newline = true;
hoaf_acceptance acceptance = Hoaf_Acceptance_States;
hoaf_alias alias = Hoaf_Alias_None;
hoa_acceptance acceptance = Hoa_Acceptance_States;
hoa_alias alias = Hoa_Alias_None;
if (opt)
while (*opt)
@ -342,17 +342,17 @@ namespace spot
newline = false;
break;
case 'm':
acceptance = Hoaf_Acceptance_Mixed;
acceptance = Hoa_Acceptance_Mixed;
break;
case 's':
acceptance = Hoaf_Acceptance_States;
acceptance = Hoa_Acceptance_States;
break;
case 't':
acceptance = Hoaf_Acceptance_Transitions;
acceptance = Hoa_Acceptance_Transitions;
break;
}
}
return hoaf_reachable(os, aut, f, acceptance, alias, newline);
return hoa_reachable(os, aut, f, acceptance, alias, newline);
}
}

View file

@ -17,8 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef SPOT_TGBAALGOS_HOAF_HH
# define SPOT_TGBAALGOS_HOAF_HH
#ifndef SPOT_TGBAALGOS_HOA_HH
# define SPOT_TGBAALGOS_HOA_HH
#include <iosfwd>
#include "ltlast/formula.hh"
@ -26,15 +26,15 @@
namespace spot
{
enum hoaf_alias { Hoaf_Alias_None, Hoaf_Alias_Ap, Hoaf_Alias_Cond };
enum hoaf_acceptance
enum hoa_alias { Hoa_Alias_None, Hoa_Alias_Ap, Hoa_Alias_Cond };
enum hoa_acceptance
{
Hoaf_Acceptance_States, /// state-based acceptance if
Hoa_Acceptance_States, /// state-based acceptance if
/// (globally) possible
/// transition-based acceptance
/// otherwise.
Hoaf_Acceptance_Transitions, /// transition-based acceptance globally
Hoaf_Acceptance_Mixed /// mix state-based and transition-based
Hoa_Acceptance_Transitions, /// transition-based acceptance globally
Hoa_Acceptance_Mixed /// mix state-based and transition-based
};
/// \ingroup tgba_io
@ -49,18 +49,18 @@ namespace spot
/// \param alias Whether aliases should be used in output.
/// \param newlines Whether to use newlines in output.
SPOT_API std::ostream&
hoaf_reachable(std::ostream& os,
const const_tgba_ptr& g,
const ltl::formula* f = 0,
hoaf_acceptance acceptance = Hoaf_Acceptance_States,
hoaf_alias alias = Hoaf_Alias_None,
bool newlines = true);
hoa_reachable(std::ostream& os,
const const_tgba_ptr& g,
const ltl::formula* f = 0,
hoa_acceptance acceptance = Hoa_Acceptance_States,
hoa_alias alias = Hoa_Alias_None,
bool newlines = true);
SPOT_API std::ostream&
hoaf_reachable(std::ostream& os,
const const_tgba_ptr& g,
const char* opt,
const ltl::formula* f = 0);
hoa_reachable(std::ostream& os,
const const_tgba_ptr& g,
const char* opt,
const ltl::formula* f = 0);
}
#endif // SPOT_TGBAALGOS_HOAF_HH
#endif // SPOT_TGBAALGOS_HOA_HH