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:
parent
ca85d4184d
commit
51151ab271
195 changed files with 1792 additions and 1837 deletions
|
|
@ -175,6 +175,9 @@ namespace spot
|
|||
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<ta> ta_ptr;
|
||||
typedef std::shared_ptr<const ta> const_ta_ptr;
|
||||
|
||||
/// \ingroup ta_essentials
|
||||
/// \brief Iterate over the successors of a state.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -351,13 +351,12 @@ namespace spot
|
|||
// ta_explicit
|
||||
|
||||
|
||||
ta_explicit::ta_explicit(const tgba* tgba, bdd all_acceptance_conditions,
|
||||
state_ta_explicit* artificial_initial_state,
|
||||
bool own_tgba) :
|
||||
ta_explicit::ta_explicit(const const_tgba_ptr& tgba,
|
||||
bdd all_acceptance_conditions,
|
||||
state_ta_explicit* artificial_initial_state):
|
||||
tgba_(tgba),
|
||||
all_acceptance_conditions_(all_acceptance_conditions),
|
||||
artificial_initial_state_(artificial_initial_state),
|
||||
own_tgba_(own_tgba)
|
||||
artificial_initial_state_(artificial_initial_state)
|
||||
{
|
||||
get_dict()->register_all_variables_of(&tgba_, this);
|
||||
if (artificial_initial_state != 0)
|
||||
|
|
@ -379,8 +378,6 @@ namespace spot
|
|||
delete s;
|
||||
}
|
||||
get_dict()->unregister_all_my_variables(this);
|
||||
if (own_tgba_)
|
||||
delete tgba_;
|
||||
}
|
||||
|
||||
state_ta_explicit*
|
||||
|
|
@ -496,7 +493,7 @@ namespace spot
|
|||
return tgba_->get_dict();
|
||||
}
|
||||
|
||||
const tgba*
|
||||
const_tgba_ptr
|
||||
ta_explicit::get_tgba() const
|
||||
{
|
||||
return tgba_;
|
||||
|
|
|
|||
|
|
@ -41,11 +41,10 @@ namespace spot
|
|||
class SPOT_API ta_explicit : public ta
|
||||
{
|
||||
public:
|
||||
ta_explicit(const tgba* tgba, bdd all_acceptance_conditions,
|
||||
state_ta_explicit* artificial_initial_state = 0,
|
||||
bool own_tgba = false);
|
||||
ta_explicit(const const_tgba_ptr& tgba, bdd all_acceptance_conditions,
|
||||
state_ta_explicit* artificial_initial_state = 0);
|
||||
|
||||
const tgba*
|
||||
const_tgba_ptr
|
||||
get_tgba() const;
|
||||
|
||||
state_ta_explicit*
|
||||
|
|
@ -135,12 +134,11 @@ namespace spot
|
|||
ta_explicit(const ta_explicit& other) SPOT_DELETED;
|
||||
ta_explicit& operator=(const ta_explicit& other) SPOT_DELETED;
|
||||
|
||||
const tgba* tgba_;
|
||||
const_tgba_ptr tgba_;
|
||||
bdd all_acceptance_conditions_;
|
||||
state_ta_explicit* artificial_initial_state_;
|
||||
ta::states_set_t states_set_;
|
||||
ta::states_set_t initial_states_set_;
|
||||
bool own_tgba_;
|
||||
};
|
||||
|
||||
/// states used by spot::ta_explicit.
|
||||
|
|
@ -265,6 +263,19 @@ namespace spot
|
|||
state_ta_explicit::transitions::const_iterator i_;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<ta_explicit> ta_explicit_ptr;
|
||||
typedef std::shared_ptr<const ta_explicit> const_ta_explicit_ptr;
|
||||
|
||||
inline ta_explicit_ptr make_ta_explicit(const const_tgba_ptr& tgba,
|
||||
bdd all_acceptance_conditions,
|
||||
state_ta_explicit*
|
||||
artificial_initial_state = 0)
|
||||
{
|
||||
return std::make_shared<ta_explicit>(tgba,
|
||||
all_acceptance_conditions,
|
||||
artificial_initial_state);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // SPOT_TA_TAEXPLICIT_HH
|
||||
|
|
|
|||
|
|
@ -242,15 +242,15 @@ namespace spot
|
|||
// ta_product
|
||||
|
||||
|
||||
ta_product::ta_product(const ta* testing_automata,
|
||||
const kripke* kripke_structure) :
|
||||
dict_(testing_automata->get_dict()), ta_(testing_automata), kripke_(
|
||||
kripke_structure)
|
||||
ta_product::ta_product(const const_ta_ptr& testing_automata,
|
||||
const const_kripke_ptr& kripke_structure):
|
||||
dict_(testing_automata->get_dict()),
|
||||
ta_(testing_automata),
|
||||
kripke_(kripke_structure)
|
||||
{
|
||||
assert(dict_ == kripke_structure->get_dict());
|
||||
dict_->register_all_variables_of(&ta_, this);
|
||||
dict_->register_all_variables_of(&kripke_, this);
|
||||
|
||||
dict_->register_all_variables_of(ta_, this);
|
||||
dict_->register_all_variables_of(kripke_, this);
|
||||
}
|
||||
|
||||
ta_product::~ta_product()
|
||||
|
|
@ -314,7 +314,7 @@ namespace spot
|
|||
const state_ta_product* stp = down_cast<const state_ta_product*> (s);
|
||||
assert(s);
|
||||
|
||||
return new ta_succ_iterator_product(stp, ta_, kripke_);
|
||||
return new ta_succ_iterator_product(stp, ta_.get(), kripke_.get());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -323,8 +323,9 @@ namespace spot
|
|||
{
|
||||
const state_ta_product* stp = down_cast<const state_ta_product*> (s);
|
||||
assert(s);
|
||||
return new ta_succ_iterator_product_by_changeset(stp, ta_, kripke_,
|
||||
changeset);
|
||||
return new ta_succ_iterator_product_by_changeset(stp,
|
||||
ta_.get(), kripke_.get(),
|
||||
changeset);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,8 @@ namespace spot
|
|||
/// \brief Constructor.
|
||||
/// \param testing_automaton The TA component in the product.
|
||||
/// \param kripke_structure The Kripke component in the product.
|
||||
ta_product(const ta* testing_automaton, const kripke* kripke_structure);
|
||||
ta_product(const const_ta_ptr& testing_automaton,
|
||||
const const_kripke_ptr& kripke_structure);
|
||||
|
||||
virtual
|
||||
~ta_product();
|
||||
|
|
@ -179,13 +180,13 @@ namespace spot
|
|||
virtual void
|
||||
free_state(const spot::state* s) const;
|
||||
|
||||
const ta*
|
||||
const const_ta_ptr&
|
||||
get_ta() const
|
||||
{
|
||||
return ta_;
|
||||
}
|
||||
|
||||
const kripke*
|
||||
const const_kripke_ptr&
|
||||
get_kripke() const
|
||||
{
|
||||
return kripke_;
|
||||
|
|
@ -193,8 +194,8 @@ namespace spot
|
|||
|
||||
private:
|
||||
bdd_dict_ptr dict_;
|
||||
const ta* ta_;
|
||||
const kripke* kripke_;
|
||||
const_ta_ptr ta_;
|
||||
const_kripke_ptr kripke_;
|
||||
|
||||
// Disallow copy.
|
||||
ta_product(const ta_product&) SPOT_DELETED;
|
||||
|
|
@ -202,6 +203,14 @@ namespace spot
|
|||
};
|
||||
|
||||
|
||||
typedef std::shared_ptr<ta_product> ta_product_ptr;
|
||||
typedef std::shared_ptr<const ta_product> const_ta_product_ptr;
|
||||
inline ta_product_ptr product(const const_ta_ptr& testing_automaton,
|
||||
const const_kripke_ptr& kripke_structure)
|
||||
{
|
||||
return std::make_shared<ta_product>(testing_automaton, kripke_structure);
|
||||
}
|
||||
|
||||
class SPOT_API ta_succ_iterator_product_by_changeset :
|
||||
public ta_succ_iterator_product
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
//
|
||||
|
|
@ -78,9 +78,10 @@ namespace spot
|
|||
///
|
||||
virtual tgba_succ_iterator*
|
||||
succ_iter_by_changeset(const spot::state* s, bdd change_set) const =0;
|
||||
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<tgta> tgta_ptr;
|
||||
typedef std::shared_ptr<const tgta> const_tgta_ptr;
|
||||
}
|
||||
|
||||
#endif // SPOT_TA_TGTA_HH
|
||||
|
|
|
|||
|
|
@ -29,23 +29,24 @@
|
|||
namespace spot
|
||||
{
|
||||
|
||||
tgta_explicit::tgta_explicit(const tgba* tgba, bdd all_acceptance_conditions,
|
||||
state_ta_explicit* artificial_initial_state,
|
||||
bool own_tgba) :
|
||||
ta_(tgba, all_acceptance_conditions, artificial_initial_state, own_tgba)
|
||||
tgta_explicit::tgta_explicit(const const_tgba_ptr& tgba,
|
||||
bdd all_acceptance_conditions,
|
||||
state_ta_explicit* artificial_initial_state) :
|
||||
ta_(make_ta_explicit(tgba, all_acceptance_conditions,
|
||||
artificial_initial_state))
|
||||
{
|
||||
}
|
||||
|
||||
state*
|
||||
tgta_explicit::get_init_state() const
|
||||
{
|
||||
return ta_.get_artificial_initial_state();
|
||||
return ta_->get_artificial_initial_state();
|
||||
}
|
||||
|
||||
tgba_succ_iterator*
|
||||
tgta_explicit::succ_iter(const spot::state* state) const
|
||||
{
|
||||
return ta_.succ_iter(state);
|
||||
return ta_->succ_iter(state);
|
||||
}
|
||||
|
||||
bdd
|
||||
|
|
@ -53,37 +54,37 @@ namespace spot
|
|||
{
|
||||
const state_ta_explicit* s = down_cast<const state_ta_explicit*>(in);
|
||||
assert(s);
|
||||
return ta_.get_tgba()->support_conditions(s->get_tgba_state());
|
||||
return ta_->get_tgba()->support_conditions(s->get_tgba_state());
|
||||
}
|
||||
|
||||
bdd_dict_ptr
|
||||
tgta_explicit::get_dict() const
|
||||
{
|
||||
return ta_.get_dict();
|
||||
return ta_->get_dict();
|
||||
}
|
||||
|
||||
bdd
|
||||
tgta_explicit::all_acceptance_conditions() const
|
||||
{
|
||||
return ta_.all_acceptance_conditions();
|
||||
return ta_->all_acceptance_conditions();
|
||||
}
|
||||
|
||||
bdd
|
||||
tgta_explicit::neg_acceptance_conditions() const
|
||||
{
|
||||
return ta_.get_tgba()->neg_acceptance_conditions();
|
||||
return ta_->get_tgba()->neg_acceptance_conditions();
|
||||
}
|
||||
|
||||
std::string
|
||||
tgta_explicit::format_state(const spot::state* s) const
|
||||
{
|
||||
return ta_.format_state(s);
|
||||
return ta_->format_state(s);
|
||||
}
|
||||
|
||||
spot::tgba_succ_iterator*
|
||||
tgta_explicit::succ_iter_by_changeset(const spot::state* s, bdd chngset) const
|
||||
{
|
||||
return ta_.succ_iter(s, chngset);
|
||||
return ta_->succ_iter(s, chngset);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ namespace spot
|
|||
class SPOT_API tgta_explicit : public tgta
|
||||
{
|
||||
public:
|
||||
tgta_explicit(const tgba* tgba, bdd all_acceptance_conditions,
|
||||
state_ta_explicit* artificial_initial_state,
|
||||
bool own_tgba = false);
|
||||
tgta_explicit(const const_tgba_ptr& tgba,
|
||||
bdd all_acceptance_conditions,
|
||||
state_ta_explicit* artificial_initial_state);
|
||||
|
||||
// tgba interface
|
||||
virtual spot::state* get_init_state() const;
|
||||
|
|
@ -51,8 +51,8 @@ namespace spot
|
|||
virtual bdd_dict_ptr
|
||||
get_dict() const;
|
||||
|
||||
const ta_explicit* get_ta() const { return &ta_; }
|
||||
ta_explicit* get_ta() { return &ta_; }
|
||||
const_ta_explicit_ptr get_ta() const { return ta_; }
|
||||
ta_explicit_ptr get_ta() { return ta_; }
|
||||
|
||||
virtual bdd all_acceptance_conditions() const;
|
||||
virtual bdd neg_acceptance_conditions() const;
|
||||
|
|
@ -64,9 +64,21 @@ namespace spot
|
|||
protected:
|
||||
virtual bdd compute_support_conditions(const spot::state* state) const;
|
||||
|
||||
ta_explicit ta_;
|
||||
ta_explicit_ptr ta_;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<tgta_explicit> tgta_explicit_ptr;
|
||||
typedef std::shared_ptr<const tgta_explicit> const_tgta_explicit_ptr;
|
||||
|
||||
inline tgta_explicit_ptr make_tgta_explicit(const const_tgba_ptr& tgba,
|
||||
bdd all_acceptance_conditions,
|
||||
state_ta_explicit*
|
||||
artificial_initial_state = 0)
|
||||
{
|
||||
return std::make_shared<tgta_explicit>(tgba,
|
||||
all_acceptance_conditions,
|
||||
artificial_initial_state);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SPOT_TA_TGTAEXPLICIT_HH
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ namespace spot
|
|||
////////////////////////////////////////////////////////////
|
||||
// tgta_product
|
||||
|
||||
tgta_product::tgta_product(const kripke* left, const tgta* right) :
|
||||
tgta_product::tgta_product(const const_kripke_ptr& left,
|
||||
const const_tgta_ptr& right):
|
||||
tgba_product(left, right)
|
||||
{
|
||||
}
|
||||
|
|
@ -64,15 +65,16 @@ namespace spot
|
|||
|
||||
fixed_size_pool* p = const_cast<fixed_size_pool*> (&pool_);
|
||||
|
||||
return new tgta_succ_iterator_product(s,
|
||||
down_cast<const kripke*>(left_),
|
||||
down_cast<const tgta*>(right_), p);
|
||||
auto l = std::static_pointer_cast<const kripke>(left_);
|
||||
auto r = std::static_pointer_cast<const tgta>(right_);
|
||||
return new tgta_succ_iterator_product(s, l, r, p);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// tgbtgta_succ_iterator_product
|
||||
tgta_succ_iterator_product::tgta_succ_iterator_product(
|
||||
const state_product* s, const kripke* k, const tgta* t,
|
||||
const state_product* s,
|
||||
const const_kripke_ptr& k, const const_tgta_ptr& t,
|
||||
fixed_size_pool* pool)
|
||||
: source_(s), tgta_(t), kripke_(k), pool_(pool)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ namespace spot
|
|||
class SPOT_API tgta_product : public tgba_product
|
||||
{
|
||||
public:
|
||||
tgta_product(const kripke* left, const tgta* right);
|
||||
tgta_product(const const_kripke_ptr& left,
|
||||
const const_tgta_ptr& right);
|
||||
|
||||
virtual state*
|
||||
get_init_state() const;
|
||||
|
|
@ -42,12 +43,20 @@ namespace spot
|
|||
succ_iter(const state* local_state) const;
|
||||
};
|
||||
|
||||
inline tgba_ptr product(const const_kripke_ptr& left,
|
||||
const const_tgta_ptr& right)
|
||||
{
|
||||
return std::make_shared<tgta_product>(left, right);
|
||||
}
|
||||
|
||||
/// \brief Iterate over the successors of a product computed on the fly.
|
||||
class SPOT_API tgta_succ_iterator_product : public tgba_succ_iterator
|
||||
{
|
||||
public:
|
||||
tgta_succ_iterator_product(const state_product* s, const kripke* k,
|
||||
const tgta* tgta, fixed_size_pool* pool);
|
||||
tgta_succ_iterator_product(const state_product* s,
|
||||
const const_kripke_ptr& k,
|
||||
const const_tgta_ptr& tgta,
|
||||
fixed_size_pool* pool);
|
||||
|
||||
virtual
|
||||
~tgta_succ_iterator_product();
|
||||
|
|
@ -80,8 +89,8 @@ namespace spot
|
|||
|
||||
protected:
|
||||
const state_product* source_;
|
||||
const tgta* tgta_;
|
||||
const kripke* kripke_;
|
||||
const_tgta_ptr tgta_;
|
||||
const_kripke_ptr kripke_;
|
||||
fixed_size_pool* pool_;
|
||||
tgba_succ_iterator* tgta_succ_it_;
|
||||
tgba_succ_iterator* kripke_succ_it_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue