Handle all automata through shared_ptr. (monstro patch)

A type such as 'const tgba_digraph*' and 'tgba_digraph*' are replaced
by 'const_tgba_digraph_ptr' and 'tgba_digraph_ptr'.  Additionally 'new
tgba_digraph(...)' is replaced by 'make_tgba_digraph(...)'.

This convention is followed by all automata types. Those smart
pointers should normally be passed by const reference as input of
function to avoid the atomic increments/decrements, but I probably
missed a few, as this huge patch took me nearly 12h.

* src/kripke/fwd.hh, src/tgba/fwd.hh: New files.
* src/kripke/Makefile.am, src/tgba/Makefile.am: Adjust.
* iface/dve2/dve2.cc, iface/dve2/dve2.hh, iface/dve2/dve2check.cc,
src/bin/common_output.hh, src/bin/dstar2tgba.cc,
src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc, src/bin/ltlcross.cc,
src/bin/ltlfilt.cc, src/dstarparse/dra2ba.cc,
src/dstarparse/dstar2tgba.cc, src/dstarparse/dstarparse.yy,
src/dstarparse/nra2nba.cc, src/dstarparse/nsa2tgba.cc,
src/dstarparse/public.hh, src/graphtest/tgbagraph.cc,
src/kripke/fairkripke.hh, src/kripke/kripke.hh,
src/kripke/kripkeexplicit.cc, src/kripke/kripkeexplicit.hh,
src/kripke/kripkeprint.cc, src/kripke/kripkeprint.hh,
src/kripkeparse/kripkeparse.yy, src/kripkeparse/public.hh,
src/kripketest/parse_print_test.cc, src/ltlvisit/apcollect.cc,
src/ltlvisit/apcollect.hh, src/ltlvisit/contain.cc,
src/ltlvisit/contain.hh, src/neverparse/neverclaimparse.yy,
src/neverparse/public.hh, src/priv/accmap.hh,
src/priv/countstates.cc, src/priv/countstates.hh, src/saba/saba.hh,
src/saba/sabacomplementtgba.cc, src/saba/sabacomplementtgba.hh,
src/sabaalgos/sabadotty.cc, src/sabaalgos/sabadotty.hh,
src/sabaalgos/sabareachiter.cc, src/sabaalgos/sabareachiter.hh,
src/sabatest/sabacomplementtgba.cc, src/ta/ta.hh,
src/ta/taexplicit.cc, src/ta/taexplicit.hh, src/ta/taproduct.cc,
src/ta/taproduct.hh, src/ta/tgta.hh, src/ta/tgtaexplicit.cc,
src/ta/tgtaexplicit.hh, src/ta/tgtaproduct.cc,
src/ta/tgtaproduct.hh, src/taalgos/dotty.cc, src/taalgos/dotty.hh,
src/taalgos/emptinessta.cc, src/taalgos/emptinessta.hh,
src/taalgos/minimize.cc, src/taalgos/minimize.hh,
src/taalgos/reachiter.cc, src/taalgos/reachiter.hh,
src/taalgos/statessetbuilder.cc, src/taalgos/statessetbuilder.hh,
src/taalgos/stats.cc, src/taalgos/stats.hh, src/taalgos/tgba2ta.cc,
src/taalgos/tgba2ta.hh, src/tgba/bdddict.cc, src/tgba/bdddict.hh,
src/tgba/formula2bdd.hh, src/tgba/futurecondcol.cc,
src/tgba/futurecondcol.hh, src/tgba/taatgba.hh, src/tgba/tgba.cc,
src/tgba/tgba.hh, src/tgba/tgbagraph.hh,
src/tgba/tgbakvcomplement.cc, src/tgba/tgbakvcomplement.hh,
src/tgba/tgbamask.cc, src/tgba/tgbamask.hh, src/tgba/tgbaproduct.cc,
src/tgba/tgbaproduct.hh, src/tgba/tgbaproxy.cc,
src/tgba/tgbaproxy.hh, src/tgba/tgbasafracomplement.cc,
src/tgba/tgbasafracomplement.hh, src/tgba/tgbascc.cc,
src/tgba/tgbascc.hh, src/tgba/tgbasgba.cc, src/tgba/tgbasgba.hh,
src/tgba/wdbacomp.cc, src/tgba/wdbacomp.hh,
src/tgbaalgos/bfssteps.cc, src/tgbaalgos/bfssteps.hh,
src/tgbaalgos/complete.cc, src/tgbaalgos/complete.hh,
src/tgbaalgos/compsusp.cc, src/tgbaalgos/compsusp.hh,
src/tgbaalgos/cycles.hh, src/tgbaalgos/degen.cc,
src/tgbaalgos/degen.hh, src/tgbaalgos/dotty.cc,
src/tgbaalgos/dotty.hh, src/tgbaalgos/dottydec.cc,
src/tgbaalgos/dottydec.hh, src/tgbaalgos/dtbasat.cc,
src/tgbaalgos/dtbasat.hh, src/tgbaalgos/dtgbacomp.cc,
src/tgbaalgos/dtgbacomp.hh, src/tgbaalgos/dtgbasat.cc,
src/tgbaalgos/dtgbasat.hh, src/tgbaalgos/dupexp.cc,
src/tgbaalgos/dupexp.hh, src/tgbaalgos/emptiness.cc,
src/tgbaalgos/emptiness.hh, src/tgbaalgos/gtec/gtec.cc,
src/tgbaalgos/gtec/gtec.hh, src/tgbaalgos/gtec/status.cc,
src/tgbaalgos/gtec/status.hh, src/tgbaalgos/gv04.cc,
src/tgbaalgos/gv04.hh, src/tgbaalgos/isdet.cc,
src/tgbaalgos/isdet.hh, src/tgbaalgos/isweakscc.cc,
src/tgbaalgos/lbtt.cc, src/tgbaalgos/lbtt.hh,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2taa.hh,
src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/ltl2tgba_fm.hh,
src/tgbaalgos/magic.cc, src/tgbaalgos/magic.hh,
src/tgbaalgos/minimize.cc, src/tgbaalgos/minimize.hh,
src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/neverclaim.cc,
src/tgbaalgos/neverclaim.hh, src/tgbaalgos/postproc.cc,
src/tgbaalgos/postproc.hh, src/tgbaalgos/powerset.cc,
src/tgbaalgos/powerset.hh, src/tgbaalgos/projrun.cc,
src/tgbaalgos/projrun.hh, src/tgbaalgos/randomgraph.cc,
src/tgbaalgos/randomgraph.hh, src/tgbaalgos/reachiter.cc,
src/tgbaalgos/reachiter.hh, src/tgbaalgos/reducerun.cc,
src/tgbaalgos/reducerun.hh, src/tgbaalgos/replayrun.cc,
src/tgbaalgos/replayrun.hh, src/tgbaalgos/rundotdec.cc,
src/tgbaalgos/rundotdec.hh, src/tgbaalgos/safety.cc,
src/tgbaalgos/safety.hh, src/tgbaalgos/save.cc,
src/tgbaalgos/save.hh, src/tgbaalgos/scc.cc, src/tgbaalgos/scc.hh,
src/tgbaalgos/sccfilter.cc, src/tgbaalgos/sccfilter.hh,
src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh,
src/tgbaalgos/se05.cc, src/tgbaalgos/se05.hh,
src/tgbaalgos/simulation.cc, src/tgbaalgos/simulation.hh,
src/tgbaalgos/stats.cc, src/tgbaalgos/stats.hh,
src/tgbaalgos/stripacc.cc, src/tgbaalgos/stripacc.hh,
src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03.hh,
src/tgbaalgos/tau03opt.cc, src/tgbaalgos/tau03opt.hh,
src/tgbaalgos/translate.cc, src/tgbaalgos/translate.hh,
src/tgbaparse/public.hh, src/tgbaparse/tgbaparse.yy,
src/tgbatest/complementation.cc, src/tgbatest/explprod.cc,
src/tgbatest/ltl2tgba.cc, src/tgbatest/ltlprod.cc,
src/tgbatest/maskacc.cc, src/tgbatest/powerset.cc,
src/tgbatest/randtgba.cc, src/tgbatest/taatgba.cc,
src/tgbatest/tgbaread.cc, src/tgbatest/tripprod.cc,
wrap/python/ajax/spot.in, wrap/python/spot.i,
wrap/python/tests/interdep.py: Use shared pointers for automata.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-14 20:18:04 +02:00
parent ca85d4184d
commit 51151ab271
195 changed files with 1792 additions and 1837 deletions

View file

@ -31,7 +31,7 @@ namespace spot
class dotty_bfs : public ta_reachable_iterator_breadth_first
{
public:
dotty_bfs(std::ostream& os, const ta* a) :
dotty_bfs(std::ostream& os, const const_ta_ptr& a) :
ta_reachable_iterator_breadth_first(a), os_(os)
{
}
@ -123,7 +123,7 @@ namespace spot
}
std::ostream&
dotty_reachable(std::ostream& os, const ta* a)
dotty_reachable(std::ostream& os, const const_ta_ptr& a)
{
dotty_bfs d(os, a);
d.run();

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2013 Laboratoire de Recherche et Développement
// Copyright (C) 2010, 2013, 2014 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -25,10 +25,8 @@
namespace spot
{
class ta;
SPOT_API std::ostream&
dotty_reachable(std::ostream& os, const ta* a);
dotty_reachable(std::ostream& os, const const_ta_ptr& a);
}
#endif // SPOT_TAALGOS_DOTTY_HH

View file

@ -34,7 +34,7 @@
namespace spot
{
ta_check::ta_check(const ta_product* a, option_map o) :
ta_check::ta_check(const const_ta_product_ptr& a, option_map o) :
a_(a), o_(o)
{
is_full_2_pass_ = o.get("is_full_2_pass", 0);
@ -89,8 +89,8 @@ namespace spot
&& (is_full_2_pass_ == disable_second_pass);
// Setup depth-first search from initial states.
const ta* ta_ = a_->get_ta();
const kripke* kripke_ = a_->get_kripke();
auto& ta_ = a_->get_ta();
auto& kripke_ = a_->get_kripke();
state* kripke_init_state = kripke_->get_init_state();
bdd kripke_init_state_condition = kripke_->state_condition(
kripke_init_state);
@ -383,7 +383,7 @@ namespace spot
}
bool
ta_check::livelock_detection(const ta_product* t)
ta_check::livelock_detection(const const_ta_product_ptr& t)
{
// We use five main data in this algorithm:

View file

@ -89,7 +89,7 @@ namespace spot
typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> hash_type;
public:
ta_check(const ta_product* a, option_map o = option_map());
ta_check(const const_ta_product_ptr& a, option_map o = option_map());
virtual
~ta_check();
@ -119,7 +119,7 @@ namespace spot
/// Return false if the product automaton accepts no livelock-accepting run,
/// otherwise true
virtual bool
livelock_detection(const ta_product* t);
livelock_detection(const const_ta_product_ptr& t);
/// Print statistics, if any.
virtual std::ostream&
@ -141,7 +141,7 @@ namespace spot
hash_type& h, int h_livelock_root, std::set<const state*,
state_ptr_less_than> liveset_curr);
const ta_product* a_; ///< The automaton.
const_ta_product_ptr a_; ///< The automaton.
option_map o_; ///< The options
// Force the second pass

View file

@ -49,7 +49,9 @@ namespace spot
namespace
{
static std::ostream&
dump_hash_set(const hash_set* hs, const ta* aut, std::ostream& out)
dump_hash_set(const hash_set* hs,
const const_ta_ptr& aut,
std::ostream& out)
{
out << '{';
const char* sep = "";
@ -63,7 +65,7 @@ namespace spot
}
static std::string
format_hash_set(const hash_set* hs, const ta* aut)
format_hash_set(const hash_set* hs, const const_ta_ptr& aut)
{
std::ostringstream s;
dump_hash_set(hs, aut, s);
@ -73,8 +75,8 @@ namespace spot
// From the base automaton and the list of sets, build the minimal
// automaton
static void
build_result(const ta* a, std::list<hash_set*>& sets,
tgba_digraph* result_tgba, ta_explicit* result)
build_result(const const_ta_ptr& a, std::list<hash_set*>& sets,
tgba_digraph_ptr result_tgba, const ta_explicit_ptr& result)
{
// For each set, create a state in the tgbaulting automaton.
// For a state s, state_num[s] is the number of the state in the minimal
@ -181,7 +183,7 @@ namespace spot
}
static partition_t
build_partition(const ta* ta_)
build_partition(const const_ta_ptr& ta_)
{
partition_t cur_run;
partition_t next_run;
@ -482,13 +484,12 @@ namespace spot
}
}
ta*
minimize_ta(const ta* ta_)
ta_explicit_ptr
minimize_ta(const const_ta_ptr& ta_)
{
auto tgba = new tgba_digraph(ta_->get_dict());
auto res = new ta_explicit(tgba, ta_->all_acceptance_conditions(),
0, /* own_tgba = */ true);
auto tgba = make_tgba_digraph(ta_->get_dict());
auto res = make_ta_explicit(tgba, ta_->all_acceptance_conditions(), 0);
partition_t partition = build_partition(ta_);
@ -503,15 +504,14 @@ namespace spot
return res;
}
tgta_explicit*
minimize_tgta(const tgta_explicit* tgta_)
tgta_explicit_ptr
minimize_tgta(const const_tgta_explicit_ptr& tgta_)
{
auto tgba = new tgba_digraph(tgta_->get_dict());
auto res = new tgta_explicit(tgba, tgta_->all_acceptance_conditions(),
0, /* own_tgba = */ true);
auto tgba = make_tgba_digraph(tgta_->get_dict());
auto res = make_tgta_explicit(tgba, tgta_->all_acceptance_conditions(), 0);
const ta_explicit* ta = tgta_->get_ta();
auto ta = tgta_->get_ta();
partition_t partition = build_partition(ta);

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2009, 2010, 2011, 2012, 2013 Laboratoire de Recherche
// et Développement de l'Epita (LRDE).
// Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Laboratoire de
// Recherche et Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -56,8 +56,8 @@ namespace spot
\endverbatim */
///
/// \param ta_ the TA automaton to convert into a simplified TA
SPOT_API ta*
minimize_ta(const ta* ta_);
SPOT_API ta_explicit_ptr
minimize_ta(const const_ta_ptr& ta_);
@ -70,8 +70,8 @@ namespace spot
/// the acceptance conditions of the outgoing transitions.
///
/// \param tgta_ the TGTA automaton to convert into a simplified TGTA
SPOT_API tgta_explicit*
minimize_tgta(const tgta_explicit* tgta_);
SPOT_API tgta_explicit_ptr
minimize_tgta(const const_tgta_explicit_ptr& tgta_);
/// @}
}

View file

@ -1,7 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2012 Laboratoire de Recherche et Développement
// de l Epita (LRDE).
//
// Copyright (C) 2010, 2012, 2014 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -29,7 +28,7 @@ namespace spot
// ta_reachable_iterator
//////////////////////////////////////////////////////////////////////
ta_reachable_iterator::ta_reachable_iterator(const ta* a) :
ta_reachable_iterator::ta_reachable_iterator(const const_ta_ptr& a) :
t_automata_(a)
{
}
@ -139,7 +138,7 @@ namespace spot
//////////////////////////////////////////////////////////////////////
ta_reachable_iterator_depth_first::ta_reachable_iterator_depth_first(
const ta* a) :
const const_ta_ptr& a) :
ta_reachable_iterator(a)
{
}
@ -164,7 +163,7 @@ namespace spot
//////////////////////////////////////////////////////////////////////
ta_reachable_iterator_breadth_first::ta_reachable_iterator_breadth_first(
const ta* a) :
const const_ta_ptr& a) :
ta_reachable_iterator(a)
{
}

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2011, 2012, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2010, 2011, 2012, 2013, 2014 Laboratoire de Recherche
// et Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -32,7 +32,7 @@ namespace spot
class SPOT_API ta_reachable_iterator
{
public:
ta_reachable_iterator(const ta* a);
ta_reachable_iterator(const const_ta_ptr& a);
virtual
~ta_reachable_iterator();
@ -87,7 +87,7 @@ namespace spot
protected:
const ta* t_automata_; ///< The spot::ta to explore.
const_ta_ptr t_automata_; ///< The spot::ta to explore.
typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> seen_map;
@ -101,7 +101,7 @@ namespace spot
: public ta_reachable_iterator
{
public:
ta_reachable_iterator_depth_first(const ta* a);
ta_reachable_iterator_depth_first(const const_ta_ptr& a);
virtual void
add_state(const state* s);
@ -119,7 +119,7 @@ namespace spot
: public ta_reachable_iterator
{
public:
ta_reachable_iterator_breadth_first(const ta* a);
ta_reachable_iterator_breadth_first(const const_ta_ptr& a);
virtual void
add_state(const state* s);

View file

@ -1,4 +1,5 @@
// Copyright (C) 2010 Laboratoire de Recherche et Développement
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2014 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -28,7 +29,7 @@ namespace spot
class states_set_builder_bfs : public ta_reachable_iterator_breadth_first
{
public:
states_set_builder_bfs(const ta* a) :
states_set_builder_bfs(const const_ta_ptr& a) :
ta_reachable_iterator_breadth_first(a)
{
}
@ -58,7 +59,7 @@ namespace spot
std::set<const state*>
get_states_set(const ta* t)
get_states_set(const const_ta_ptr& t)
{
states_set_builder_bfs d(t);
d.run();

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2013 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2010, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -26,7 +26,7 @@ namespace spot
{
/// \brief Compute states set for an automaton.
SPOT_API std::set<const state*> get_states_set(const ta* t);
SPOT_API std::set<const state*> get_states_set(const const_ta_ptr& t);
/// @}
}

View file

@ -1,7 +1,8 @@
// Copyright (C) 2008 Laboratoire de Recherche et Développement
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2014 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
//
// This file is part of Spot, a model checking library.
@ -31,7 +32,7 @@ namespace spot
class stats_bfs : public ta_reachable_iterator_breadth_first
{
public:
stats_bfs(const ta* a, ta_statistics& s) :
stats_bfs(const const_ta_ptr a, ta_statistics& s) :
ta_reachable_iterator_breadth_first(a), s_(s)
{
}
@ -66,7 +67,7 @@ namespace spot
}
ta_statistics
stats_reachable(const ta* t)
stats_reachable(const const_ta_ptr& t)
{
ta_statistics s =
{ 0, 0, 0};

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013 Laboratoire de Recherche et Développement
// Copyright (C) 2011, 2013, 2014 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -39,7 +39,7 @@ namespace spot
};
/// \brief Compute statistics for an automaton.
SPOT_API ta_statistics stats_reachable(const ta* t);
SPOT_API ta_statistics stats_reachable(const const_ta_ptr& t);
/// @}
}

View file

@ -50,7 +50,7 @@ namespace spot
static void
transform_to_single_pass_automaton
(ta_explicit* testing_automata,
(const ta_explicit_ptr& testing_automata,
state_ta_explicit* artificial_livelock_acc_state = 0)
{
@ -148,7 +148,7 @@ namespace spot
}
static void
compute_livelock_acceptance_states(ta_explicit* testing_automata,
compute_livelock_acceptance_states(const ta_explicit_ptr& testing_automata,
bool single_pass_emptiness_check,
state_ta_explicit*
artificial_livelock_acc_state)
@ -408,14 +408,15 @@ namespace spot
artificial_livelock_acc_state);
}
ta_explicit*
build_ta(ta_explicit* ta, bdd atomic_propositions_set_, bool degeneralized,
ta_explicit_ptr
build_ta(const ta_explicit_ptr& ta, bdd atomic_propositions_set_,
bool degeneralized,
bool single_pass_emptiness_check,
bool artificial_livelock_state_mode)
{
std::stack<state_ta_explicit*> todo;
const tgba* tgba_ = ta->get_tgba();
const_tgba_ptr tgba_ = ta->get_tgba();
// build Initial states set:
state* tgba_init_state = tgba_->get_init_state();
@ -540,12 +541,12 @@ namespace spot
}
}
ta_explicit*
tgba_to_ta(const tgba* tgba_, bdd atomic_propositions_set_,
ta_explicit_ptr
tgba_to_ta(const const_tgba_ptr& tgba_, bdd atomic_propositions_set_,
bool degeneralized, bool artificial_initial_state_mode,
bool single_pass_emptiness_check, bool artificial_livelock_state_mode)
{
ta_explicit* ta;
ta_explicit_ptr ta;
state* tgba_init_state = tgba_->get_init_state();
if (artificial_initial_state_mode)
@ -553,18 +554,18 @@ namespace spot
state_ta_explicit* artificial_init_state =
new state_ta_explicit(tgba_init_state->clone(), bddfalse, true);
ta = new spot::ta_explicit(tgba_, tgba_->all_acceptance_conditions(),
artificial_init_state);
ta = make_ta_explicit(tgba_, tgba_->all_acceptance_conditions(),
artificial_init_state);
}
else
{
ta = new spot::ta_explicit(tgba_, tgba_->all_acceptance_conditions());
ta = make_ta_explicit(tgba_, tgba_->all_acceptance_conditions());
}
tgba_init_state->destroy();
// build ta automata:
// build ta automaton
build_ta(ta, atomic_propositions_set_, degeneralized,
single_pass_emptiness_check, artificial_livelock_state_mode);
single_pass_emptiness_check, artificial_livelock_state_mode);
// (degeneralized=true) => TA
if (degeneralized)
@ -597,20 +598,20 @@ namespace spot
return ta;
}
tgta_explicit*
tgba_to_tgta(const tgba* tgba_, bdd atomic_propositions_set_)
tgta_explicit_ptr
tgba_to_tgta(const const_tgba_ptr& tgba_, bdd atomic_propositions_set_)
{
state* tgba_init_state = tgba_->get_init_state();
state_ta_explicit* artificial_init_state = new state_ta_explicit(
tgba_init_state->clone(), bddfalse, true);
auto artificial_init_state = new state_ta_explicit(tgba_init_state->clone(),
bddfalse, true);
tgba_init_state->destroy();
tgta_explicit* tgta = new spot::tgta_explicit(tgba_,
tgba_->all_acceptance_conditions(), artificial_init_state);
auto tgta = make_tgta_explicit(tgba_, tgba_->all_acceptance_conditions(),
artificial_init_state);
// build a Generalized TA automaton involving a single_pass_emptiness_check
// (without an artificial livelock state):
ta_explicit* ta = tgta->get_ta();
auto ta = tgta->get_ta();
build_ta(ta, atomic_propositions_set_, false, true, false);
trace << "***tgba_to_tgbta: POST build_ta***" << std::endl;

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2012, 2013 Laboratoire de Recherche et
// Copyright (C) 2010, 2012, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -79,11 +79,12 @@ namespace spot
///
/// \return A spot::ta_explicit that recognizes the same language as the
/// TGBA \a tgba_to_convert.
SPOT_API ta_explicit*
tgba_to_ta(const tgba* tgba_to_convert, bdd atomic_propositions_set,
bool degeneralized = true, bool artificial_initial_state_mode = true,
bool single_pass_emptiness_check = false,
bool artificial_livelock_state_mode = false);
SPOT_API ta_explicit_ptr
tgba_to_ta(const const_tgba_ptr& tgba_to_convert, bdd atomic_propositions_set,
bool degeneralized = true,
bool artificial_initial_state_mode = true,
bool single_pass_emptiness_check = false,
bool artificial_livelock_state_mode = false);
/// \ingroup tgba_ta
/// \brief Build a spot::tgta_explicit* (TGTA) from an LTL formula.
@ -94,8 +95,9 @@ namespace spot
///
/// \return A spot::tgta_explicit (spot::tgta) that recognizes the same
/// language as the TGBA \a tgba_to_convert.
SPOT_API tgta_explicit*
tgba_to_tgta(const tgba* tgba_to_convert, bdd atomic_propositions_set);
SPOT_API tgta_explicit_ptr
tgba_to_tgta(const const_tgba_ptr& tgba_to_convert,
bdd atomic_propositions_set);
}