use more override and final keywords
This patch is mostly focused on tagging most virtual methods that override as such. I found a few methods that where not meant to be virtual this way, and tagged a few classes "final" along the way. * bin/common_output.cc, spot/kripke/fairkripke.hh, spot/kripke/kripke.hh, spot/kripke/kripkegraph.hh, spot/ltsmin/ltsmin.cc, spot/misc/formater.hh, spot/priv/bddalloc.hh, spot/ta/ta.hh, spot/ta/taexplicit.hh, spot/ta/taproduct.hh, spot/ta/tgta.hh, spot/ta/tgtaexplicit.cc, spot/ta/tgtaexplicit.hh, spot/ta/tgtaproduct.hh, spot/taalgos/emptinessta.hh, spot/tl/declenv.hh, spot/tl/defaultenv.hh, spot/tl/randomltl.hh, spot/tl/relabel.cc, spot/twa/bdddict.cc, spot/twa/taatgba.hh, spot/twa/twagraph.hh, spot/twa/twaproduct.hh, spot/twaalgos/gtec/ce.cc, spot/twaalgos/gtec/ce.hh, spot/twaalgos/gtec/gtec.hh, spot/twaalgos/gv04.cc, spot/twaalgos/ltl2taa.cc, spot/twaalgos/magic.cc, spot/twaalgos/minimize.cc, spot/twaalgos/ndfs_result.hxx, spot/twaalgos/reachiter.hh, spot/twaalgos/se05.cc, spot/twaalgos/stutter.cc, spot/twaalgos/tau03.cc: Add more override and final keywords.
This commit is contained in:
parent
1ae0600cae
commit
5d272fd256
35 changed files with 249 additions and 291 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et
|
// Copyright (C) 2012, 2013, 2014, 2015, 2016 Laboratoire de Recherche et
|
||||||
// Développement de l'Epita (LRDE).
|
// Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
|
|
@ -165,7 +165,7 @@ namespace
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void
|
virtual void
|
||||||
print(std::ostream& os, const char*) const
|
print(std::ostream& os, const char*) const override
|
||||||
{
|
{
|
||||||
stream_escapable_formula(os, val_->f, val_->filename, val_->line);
|
stream_escapable_formula(os, val_->f, val_->filename, val_->line);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,8 @@ namespace spot
|
||||||
fair_kripke_succ_iterator(const bdd& cond, acc_cond::mark_t acc_cond);
|
fair_kripke_succ_iterator(const bdd& cond, acc_cond::mark_t acc_cond);
|
||||||
virtual ~fair_kripke_succ_iterator();
|
virtual ~fair_kripke_succ_iterator();
|
||||||
|
|
||||||
virtual bdd cond() const;
|
virtual bdd cond() const override;
|
||||||
virtual acc_cond::mark_t acc() const;
|
virtual acc_cond::mark_t acc() const override;
|
||||||
protected:
|
protected:
|
||||||
bdd cond_;
|
bdd cond_;
|
||||||
acc_cond::mark_t acc_cond_;
|
acc_cond::mark_t acc_cond_;
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@ namespace spot
|
||||||
|
|
||||||
virtual ~kripke_succ_iterator();
|
virtual ~kripke_succ_iterator();
|
||||||
|
|
||||||
virtual bdd cond() const;
|
virtual bdd cond() const override;
|
||||||
virtual acc_cond::mark_t acc() const;
|
virtual acc_cond::mark_t acc() const override;
|
||||||
protected:
|
protected:
|
||||||
bdd cond_;
|
bdd cond_;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2011, 2012, 2013, 2014, 2015 Laboratoire de Recherche
|
// Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016 Laboratoire de
|
||||||
// et Développement de l'Epita (LRDE)
|
// Recherche et Développement de l'Epita (LRDE)
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -39,7 +39,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int compare(const spot::state* other) const
|
virtual int compare(const spot::state* other) const override
|
||||||
{
|
{
|
||||||
auto o = down_cast<const kripke_graph_state*>(other);
|
auto o = down_cast<const kripke_graph_state*>(other);
|
||||||
assert(o);
|
assert(o);
|
||||||
|
|
@ -52,19 +52,19 @@ namespace spot
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t hash() const
|
virtual size_t hash() const override
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
reinterpret_cast<const char*>(this) - static_cast<const char*>(nullptr);
|
reinterpret_cast<const char*>(this) - static_cast<const char*>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual kripke_graph_state*
|
virtual kripke_graph_state*
|
||||||
clone() const
|
clone() const override
|
||||||
{
|
{
|
||||||
return const_cast<kripke_graph_state*>(this);
|
return const_cast<kripke_graph_state*>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void destroy() const
|
virtual void destroy() const override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,30 +104,30 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void recycle(const typename Graph::state_storage_t* s)
|
void recycle(const typename Graph::state_storage_t* s)
|
||||||
{
|
{
|
||||||
cond_ = s->cond();
|
cond_ = s->cond();
|
||||||
t_ = s->succ;
|
t_ = s->succ;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool first()
|
virtual bool first() override
|
||||||
{
|
{
|
||||||
p_ = t_;
|
p_ = t_;
|
||||||
return p_;
|
return p_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool next()
|
virtual bool next() override
|
||||||
{
|
{
|
||||||
p_ = g_->edge_storage(p_).next_succ;
|
p_ = g_->edge_storage(p_).next_succ;
|
||||||
return p_;
|
return p_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool done() const
|
virtual bool done() const override
|
||||||
{
|
{
|
||||||
return !p_;
|
return !p_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual kripke_graph_state* dst() const
|
virtual kripke_graph_state* dst() const override
|
||||||
{
|
{
|
||||||
assert(!done());
|
assert(!done());
|
||||||
return const_cast<kripke_graph_state*>
|
return const_cast<kripke_graph_state*>
|
||||||
|
|
@ -138,7 +138,7 @@ namespace spot
|
||||||
|
|
||||||
/// \class kripke_graph
|
/// \class kripke_graph
|
||||||
/// \brief Kripke Structure.
|
/// \brief Kripke Structure.
|
||||||
class SPOT_API kripke_graph : public kripke
|
class SPOT_API kripke_graph final : public kripke
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef digraph<kripke_graph_state, void> graph_t;
|
typedef digraph<kripke_graph_state, void> graph_t;
|
||||||
|
|
@ -180,7 +180,7 @@ namespace spot
|
||||||
return init_number_;
|
return init_number_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const kripke_graph_state* get_init_state() const
|
virtual const kripke_graph_state* get_init_state() const override
|
||||||
{
|
{
|
||||||
if (num_states() == 0)
|
if (num_states() == 0)
|
||||||
const_cast<graph_t&>(g_).new_state();
|
const_cast<graph_t&>(g_).new_state();
|
||||||
|
|
@ -190,7 +190,7 @@ namespace spot
|
||||||
/// \brief Allow to get an iterator on the state we passed in
|
/// \brief Allow to get an iterator on the state we passed in
|
||||||
/// parameter.
|
/// parameter.
|
||||||
virtual kripke_graph_succ_iterator<graph_t>*
|
virtual kripke_graph_succ_iterator<graph_t>*
|
||||||
succ_iter(const spot::state* st) const
|
succ_iter(const spot::state* st) const override
|
||||||
{
|
{
|
||||||
auto s = down_cast<const typename graph_t::state_storage_t*>(st);
|
auto s = down_cast<const typename graph_t::state_storage_t*>(st);
|
||||||
assert(s);
|
assert(s);
|
||||||
|
|
@ -235,13 +235,13 @@ namespace spot
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::string format_state(const state* st) const
|
virtual std::string format_state(const state* st) const override
|
||||||
{
|
{
|
||||||
return format_state(state_number(st));
|
return format_state(state_number(st));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Get the condition on the state
|
/// \brief Get the condition on the state
|
||||||
virtual bdd state_condition(const state* s) const
|
virtual bdd state_condition(const state* s) const override
|
||||||
{
|
{
|
||||||
return down_cast<const kripke_graph_state*>(s)->cond();
|
return down_cast<const kripke_graph_state*>(s)->cond();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ namespace spot
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// SUCC_ITERATOR
|
// SUCC_ITERATOR
|
||||||
|
|
||||||
class spins_succ_iterator: public kripke_succ_iterator
|
class spins_succ_iterator final: public kripke_succ_iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
@ -280,28 +280,24 @@ namespace spot
|
||||||
delete cc_;
|
delete cc_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
virtual bool first() override
|
||||||
bool first()
|
|
||||||
{
|
{
|
||||||
it_ = cc_->transitions.begin();
|
it_ = cc_->transitions.begin();
|
||||||
return it_ != cc_->transitions.end();
|
return it_ != cc_->transitions.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
virtual bool next() override
|
||||||
bool next()
|
|
||||||
{
|
{
|
||||||
++it_;
|
++it_;
|
||||||
return it_ != cc_->transitions.end();
|
return it_ != cc_->transitions.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
virtual bool done() const override
|
||||||
bool done() const
|
|
||||||
{
|
{
|
||||||
return it_ == cc_->transitions.end();
|
return it_ == cc_->transitions.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
virtual state* dst() const override
|
||||||
state* dst() const
|
|
||||||
{
|
{
|
||||||
return (*it_)->clone();
|
return (*it_)->clone();
|
||||||
}
|
}
|
||||||
|
|
@ -605,7 +601,7 @@ namespace spot
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// KRIPKE
|
// KRIPKE
|
||||||
|
|
||||||
class spins_kripke: public kripke
|
class spins_kripke final: public kripke
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
@ -615,7 +611,7 @@ namespace spot
|
||||||
: kripke(dict),
|
: kripke(dict),
|
||||||
d_(d),
|
d_(d),
|
||||||
state_size_(d_->get_state_size()),
|
state_size_(d_->get_state_size()),
|
||||||
dict_(dict), ps_(ps),
|
ps_(ps),
|
||||||
compress_(compress == 0 ? nullptr
|
compress_(compress == 0 ? nullptr
|
||||||
: compress == 1 ? int_array_array_compress
|
: compress == 1 ? int_array_array_compress
|
||||||
: int_array_array_compress2),
|
: int_array_array_compress2),
|
||||||
|
|
@ -696,8 +692,7 @@ namespace spot
|
||||||
delete state_condition_last_cc_; // Might be 0 already.
|
delete state_condition_last_cc_; // Might be 0 already.
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
virtual state* get_init_state() const override
|
||||||
state* get_init_state() const
|
|
||||||
{
|
{
|
||||||
if (compress_)
|
if (compress_)
|
||||||
{
|
{
|
||||||
|
|
@ -848,8 +843,7 @@ namespace spot
|
||||||
|
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
spins_succ_iterator*
|
spins_succ_iterator* succ_iter(const state* st) const override
|
||||||
succ_iter(const state* st) const
|
|
||||||
{
|
{
|
||||||
// This may also compute successors in state_condition_last_cc
|
// This may also compute successors in state_condition_last_cc
|
||||||
bdd scond = compute_state_condition(st);
|
bdd scond = compute_state_condition(st);
|
||||||
|
|
@ -882,14 +876,13 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
bdd
|
bdd state_condition(const state* st) const override
|
||||||
state_condition(const state* st) const
|
|
||||||
{
|
{
|
||||||
return compute_state_condition(st);
|
return compute_state_condition(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
std::string format_state(const state *st) const
|
std::string format_state(const state *st) const override
|
||||||
{
|
{
|
||||||
const int* vars = get_vars(st);
|
const int* vars = get_vars(st);
|
||||||
|
|
||||||
|
|
@ -917,16 +910,9 @@ namespace spot
|
||||||
return res.str();
|
return res.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
|
||||||
spot::bdd_dict_ptr get_dict() const
|
|
||||||
{
|
|
||||||
return dict_;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
spins_interface_ptr d_;
|
spins_interface_ptr d_;
|
||||||
int state_size_;
|
int state_size_;
|
||||||
bdd_dict_ptr dict_;
|
|
||||||
const char** vname_;
|
const char** vname_;
|
||||||
bool* format_filter_;
|
bool* format_filter_;
|
||||||
const spot::prop_set* ps_;
|
const spot::prop_set* ps_;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
|
// Copyright (C) 2012, 2013, 2016 Laboratoire de Recherche et
|
||||||
// de l'Epita (LRDE).
|
// Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -72,7 +72,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void
|
virtual void
|
||||||
print(std::ostream& os, const char*) const
|
print(std::ostream& os, const char*) const override
|
||||||
{
|
{
|
||||||
os << val_;
|
os << val_;
|
||||||
}
|
}
|
||||||
|
|
@ -83,7 +83,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void
|
virtual void
|
||||||
print(std::ostream& os, const char* x) const
|
print(std::ostream& os, const char* x) const override
|
||||||
{
|
{
|
||||||
os << '%' << *x;
|
os << '%' << *x;
|
||||||
}
|
}
|
||||||
|
|
@ -94,7 +94,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void
|
virtual void
|
||||||
print(std::ostream& os, const char*) const
|
print(std::ostream& os, const char*) const override
|
||||||
{
|
{
|
||||||
os << '%';
|
os << '%';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2013 Laboratoire de Recherche et Développement
|
// Copyright (C) 2013, 2016 Laboratoire de Recherche et Développement
|
||||||
// de l'Epita (LRDE).
|
// de l'Epita (LRDE).
|
||||||
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// Copyright (C) 2003, 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
|
||||||
|
|
@ -49,6 +49,6 @@ namespace spot
|
||||||
private:
|
private:
|
||||||
/// Require more variables.
|
/// Require more variables.
|
||||||
void extvarnum(int more);
|
void extvarnum(int more);
|
||||||
virtual int extend(int n);
|
virtual int extend(int n) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -201,20 +201,10 @@ namespace spot
|
||||||
~ta_succ_iterator()
|
~ta_succ_iterator()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool first() = 0;
|
|
||||||
virtual bool next() = 0;
|
|
||||||
virtual bool done() const = 0;
|
|
||||||
|
|
||||||
virtual const state* dst() const = 0;
|
|
||||||
|
|
||||||
/// \brief Get the changeset on the transition leading to current successor.
|
/// \brief Get the changeset on the transition leading to current successor.
|
||||||
///
|
///
|
||||||
/// This is a boolean function of atomic propositions.
|
/// This is a boolean function of atomic propositions.
|
||||||
virtual bdd cond() const = 0;
|
virtual bdd cond() const = 0;
|
||||||
|
|
||||||
acc_cond::mark_t acc() const = 0;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 Laboratoire de
|
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Laboratoire
|
||||||
// Recherche et Développement de l'Epita (LRDE).
|
// de Recherche et Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -64,38 +64,35 @@ namespace spot
|
||||||
// ta interface
|
// ta interface
|
||||||
virtual
|
virtual
|
||||||
~ta_explicit();
|
~ta_explicit();
|
||||||
virtual const_states_set_t
|
virtual const_states_set_t get_initial_states_set() const override;
|
||||||
get_initial_states_set() const;
|
|
||||||
|
virtual ta_succ_iterator* succ_iter(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual ta_succ_iterator*
|
virtual ta_succ_iterator*
|
||||||
succ_iter(const spot::state* s) const;
|
succ_iter(const spot::state* s, bdd condition) const override;
|
||||||
|
|
||||||
virtual ta_succ_iterator*
|
bdd_dict_ptr get_dict() const;
|
||||||
succ_iter(const spot::state* s, bdd condition) const;
|
|
||||||
|
|
||||||
virtual bdd_dict_ptr
|
|
||||||
get_dict() const;
|
|
||||||
|
|
||||||
virtual std::string
|
virtual std::string
|
||||||
format_state(const spot::state* s) const;
|
format_state(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
is_accepting_state(const spot::state* s) const;
|
is_accepting_state(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
is_livelock_accepting_state(const spot::state* s) const;
|
is_livelock_accepting_state(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
is_initial_state(const spot::state* s) const;
|
is_initial_state(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual bdd
|
virtual bdd
|
||||||
get_state_condition(const spot::state* s) const;
|
get_state_condition(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual void
|
virtual void
|
||||||
free_state(const spot::state* s) const;
|
free_state(const spot::state* s) const override;
|
||||||
|
|
||||||
spot::state*
|
virtual spot::state*
|
||||||
get_artificial_initial_state() const
|
get_artificial_initial_state() const override
|
||||||
{
|
{
|
||||||
return (spot::state*) artificial_initial_state_;
|
return (spot::state*) artificial_initial_state_;
|
||||||
}
|
}
|
||||||
|
|
@ -107,7 +104,7 @@ namespace spot
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
delete_stuttering_and_hole_successors(const spot::state* s);
|
delete_stuttering_and_hole_successors(const spot::state* s);
|
||||||
|
|
||||||
ta::states_set_t
|
ta::states_set_t
|
||||||
|
|
@ -129,7 +126,7 @@ namespace spot
|
||||||
|
|
||||||
/// states used by spot::ta_explicit.
|
/// states used by spot::ta_explicit.
|
||||||
/// \ingroup ta_representation
|
/// \ingroup ta_representation
|
||||||
class SPOT_API state_ta_explicit : public spot::state
|
class SPOT_API state_ta_explicit final: public spot::state
|
||||||
{
|
{
|
||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
public:
|
public:
|
||||||
|
|
@ -156,15 +153,11 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int
|
virtual int compare(const spot::state* other) const override;
|
||||||
compare(const spot::state* other) const;
|
virtual size_t hash() const override;
|
||||||
virtual size_t
|
virtual state_ta_explicit* clone() const override;
|
||||||
hash() const;
|
|
||||||
virtual state_ta_explicit*
|
|
||||||
clone() const;
|
|
||||||
|
|
||||||
virtual void
|
virtual void destroy() const override
|
||||||
destroy() const
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -227,21 +220,21 @@ namespace spot
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Successor iterators used by spot::ta_explicit.
|
/// Successor iterators used by spot::ta_explicit.
|
||||||
class SPOT_API ta_explicit_succ_iterator : public ta_succ_iterator
|
class SPOT_API ta_explicit_succ_iterator final: public ta_succ_iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ta_explicit_succ_iterator(const state_ta_explicit* s);
|
ta_explicit_succ_iterator(const state_ta_explicit* s);
|
||||||
|
|
||||||
ta_explicit_succ_iterator(const state_ta_explicit* s, bdd condition);
|
ta_explicit_succ_iterator(const state_ta_explicit* s, bdd condition);
|
||||||
|
|
||||||
virtual bool first();
|
virtual bool first() override;
|
||||||
virtual bool next();
|
virtual bool next() override;
|
||||||
virtual bool done() const;
|
virtual bool done() const override;
|
||||||
|
|
||||||
virtual const state* dst() const;
|
virtual const state* dst() const override;
|
||||||
virtual bdd cond() const;
|
virtual bdd cond() const override;
|
||||||
|
|
||||||
virtual acc_cond::mark_t acc() const;
|
virtual acc_cond::mark_t acc() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
state_ta_explicit::transitions* transitions_;
|
state_ta_explicit::transitions* transitions_;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2011, 2012, 2013, 2014 Laboratoire de Recherche et
|
// Copyright (C) 2011, 2012, 2013, 2014, 2016 Laboratoire de Recherche
|
||||||
// Développement de l'Epita (LRDE).
|
// et Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -60,11 +60,11 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int
|
virtual int
|
||||||
compare(const state* other) const;
|
compare(const state* other) const override;
|
||||||
virtual size_t
|
virtual size_t
|
||||||
hash() const;
|
hash() const override;
|
||||||
virtual state_ta_product*
|
virtual state_ta_product*
|
||||||
clone() const;
|
clone() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const state* ta_state_; ///< State from the ta automaton.
|
const state* ta_state_; ///< State from the ta automaton.
|
||||||
|
|
@ -82,22 +82,17 @@ namespace spot
|
||||||
~ta_succ_iterator_product();
|
~ta_succ_iterator_product();
|
||||||
|
|
||||||
// iteration
|
// iteration
|
||||||
bool first();
|
virtual bool first() override;
|
||||||
bool next();
|
virtual bool next() override;
|
||||||
bool done() const;
|
virtual bool done() const override;
|
||||||
|
|
||||||
// inspection
|
// inspection
|
||||||
state_ta_product*
|
virtual state_ta_product* dst() const override;
|
||||||
dst() const;
|
virtual bdd cond() const override;
|
||||||
bdd
|
virtual acc_cond::mark_t acc() const override;
|
||||||
cond() const;
|
|
||||||
|
|
||||||
acc_cond::mark_t
|
|
||||||
acc() const;
|
|
||||||
|
|
||||||
/// \brief Return true if the changeset of the current transition is empty
|
/// \brief Return true if the changeset of the current transition is empty
|
||||||
bool
|
bool is_stuttering_transition() const;
|
||||||
is_stuttering_transition() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//@{
|
//@{
|
||||||
|
|
@ -129,7 +124,7 @@ namespace spot
|
||||||
/// \ingroup ta_emptiness_check
|
/// \ingroup ta_emptiness_check
|
||||||
/// \brief A lazy product between a Testing automaton and a Kripke structure.
|
/// \brief A lazy product between a Testing automaton and a Kripke structure.
|
||||||
/// (States are computed on the fly.)
|
/// (States are computed on the fly.)
|
||||||
class SPOT_API ta_product: public ta
|
class SPOT_API ta_product final: public ta
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// \brief Constructor.
|
/// \brief Constructor.
|
||||||
|
|
@ -142,39 +137,39 @@ namespace spot
|
||||||
~ta_product();
|
~ta_product();
|
||||||
|
|
||||||
virtual ta::const_states_set_t
|
virtual ta::const_states_set_t
|
||||||
get_initial_states_set() const;
|
get_initial_states_set() const override;
|
||||||
|
|
||||||
virtual ta_succ_iterator_product*
|
virtual ta_succ_iterator_product*
|
||||||
succ_iter(const spot::state* s) const;
|
succ_iter(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual ta_succ_iterator_product*
|
virtual ta_succ_iterator_product*
|
||||||
succ_iter(const spot::state* s, bdd changeset) const;
|
succ_iter(const spot::state* s, bdd changeset) const override;
|
||||||
|
|
||||||
virtual bdd_dict_ptr
|
bdd_dict_ptr
|
||||||
get_dict() const;
|
get_dict() const;
|
||||||
|
|
||||||
virtual std::string
|
virtual std::string
|
||||||
format_state(const spot::state* s) const;
|
format_state(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
is_accepting_state(const spot::state* s) const;
|
is_accepting_state(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
is_livelock_accepting_state(const spot::state* s) const;
|
is_livelock_accepting_state(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
is_initial_state(const spot::state* s) const;
|
is_initial_state(const spot::state* s) const override;
|
||||||
|
|
||||||
/// \brief Return true if the state \a s has no succeseurs
|
/// \brief Return true if the state \a s has no succeseurs
|
||||||
/// in the TA automaton (the TA component of the product automaton)
|
/// in the TA automaton (the TA component of the product automaton)
|
||||||
virtual bool
|
bool
|
||||||
is_hole_state_in_ta_component(const spot::state* s) const;
|
is_hole_state_in_ta_component(const spot::state* s) const;
|
||||||
|
|
||||||
virtual bdd
|
virtual bdd
|
||||||
get_state_condition(const spot::state* s) const;
|
get_state_condition(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual void
|
virtual void
|
||||||
free_state(const spot::state* s) const;
|
free_state(const spot::state* s) const override;
|
||||||
|
|
||||||
const const_ta_ptr&
|
const const_ta_ptr&
|
||||||
get_ta() const
|
get_ta() const
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 Laboratoire de
|
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Laboratoire
|
||||||
// Recherche et Développement de l'Epita (LRDE).
|
// de Recherche et Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -79,7 +79,7 @@ namespace spot
|
||||||
/// longer needed.
|
/// longer needed.
|
||||||
///
|
///
|
||||||
virtual twa_succ_iterator*
|
virtual twa_succ_iterator*
|
||||||
succ_iter_by_changeset(const spot::state* s, bdd change_set) const =0;
|
succ_iter_by_changeset(const spot::state* s, bdd change_set) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::shared_ptr<tgta> tgta_ptr;
|
typedef std::shared_ptr<tgta> tgta_ptr;
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,6 @@ namespace spot
|
||||||
return ta_->succ_iter(state);
|
return ta_->succ_iter(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
bdd_dict_ptr
|
|
||||||
tgta_explicit::get_dict() const
|
|
||||||
{
|
|
||||||
return ta_->get_dict();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
tgta_explicit::format_state(const spot::state* s) const
|
tgta_explicit::format_state(const spot::state* s) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ namespace spot
|
||||||
|
|
||||||
/// Explicit representation of a spot::tgta.
|
/// Explicit representation of a spot::tgta.
|
||||||
/// \ingroup ta_representation
|
/// \ingroup ta_representation
|
||||||
class SPOT_API tgta_explicit : public tgta
|
class SPOT_API tgta_explicit final : public tgta
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
tgta_explicit(const const_twa_ptr& tgba,
|
tgta_explicit(const const_twa_ptr& tgba,
|
||||||
|
|
@ -42,21 +42,18 @@ namespace spot
|
||||||
state_ta_explicit* artificial_initial_state);
|
state_ta_explicit* artificial_initial_state);
|
||||||
|
|
||||||
// tgba interface
|
// tgba interface
|
||||||
virtual spot::state* get_init_state() const;
|
virtual spot::state* get_init_state() const override;
|
||||||
|
|
||||||
virtual twa_succ_iterator*
|
virtual twa_succ_iterator*
|
||||||
succ_iter(const spot::state* local_state) const;
|
succ_iter(const spot::state* local_state) const override;
|
||||||
|
|
||||||
virtual bdd_dict_ptr
|
|
||||||
get_dict() const;
|
|
||||||
|
|
||||||
const_ta_explicit_ptr get_ta() const { return ta_; }
|
const_ta_explicit_ptr get_ta() const { return ta_; }
|
||||||
ta_explicit_ptr get_ta() { return ta_; }
|
ta_explicit_ptr get_ta() { return ta_; }
|
||||||
|
|
||||||
virtual std::string format_state(const spot::state* s) const;
|
virtual std::string format_state(const spot::state* s) const override;
|
||||||
|
|
||||||
virtual twa_succ_iterator*
|
virtual twa_succ_iterator*
|
||||||
succ_iter_by_changeset(const spot::state* s, bdd change_set) const;
|
succ_iter_by_changeset(const spot::state* s, bdd change_set) const override;
|
||||||
protected:
|
protected:
|
||||||
ta_explicit_ptr ta_;
|
ta_explicit_ptr ta_;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2011, 2012, 2013, 2014 Laboratoire de Recherche et
|
// Copyright (C) 2011, 2012, 2013, 2014, 2016 Laboratoire de Recherche
|
||||||
// Développement de l'Epita (LRDE).
|
// et Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -35,10 +35,10 @@ namespace spot
|
||||||
tgta_product(const const_kripke_ptr& left,
|
tgta_product(const const_kripke_ptr& left,
|
||||||
const const_tgta_ptr& right);
|
const const_tgta_ptr& right);
|
||||||
|
|
||||||
virtual const state* get_init_state() const;
|
virtual const state* get_init_state() const override;
|
||||||
|
|
||||||
virtual twa_succ_iterator*
|
virtual twa_succ_iterator*
|
||||||
succ_iter(const state* local_state) const;
|
succ_iter(const state* local_state) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline twa_ptr product(const const_kripke_ptr& left,
|
inline twa_ptr product(const const_kripke_ptr& left,
|
||||||
|
|
@ -48,7 +48,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Iterate over the successors of a product computed on the fly.
|
/// \brief Iterate over the successors of a product computed on the fly.
|
||||||
class SPOT_API tgta_succ_iterator_product : public twa_succ_iterator
|
class SPOT_API tgta_succ_iterator_product final : public twa_succ_iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
tgta_succ_iterator_product(const state_product* s,
|
tgta_succ_iterator_product(const state_product* s,
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ namespace spot
|
||||||
/// \param disable_heuristic_for_livelock_detection disable the heuristic
|
/// \param disable_heuristic_for_livelock_detection disable the heuristic
|
||||||
/// used in the first pass to detect livelock-accepting runs,
|
/// used in the first pass to detect livelock-accepting runs,
|
||||||
/// this heuristic is described in the paper cited above
|
/// this heuristic is described in the paper cited above
|
||||||
virtual bool
|
bool
|
||||||
check(bool disable_second_pass = false,
|
check(bool disable_second_pass = false,
|
||||||
bool disable_heuristic_for_livelock_detection = false);
|
bool disable_heuristic_for_livelock_detection = false);
|
||||||
|
|
||||||
|
|
@ -117,11 +117,11 @@ namespace spot
|
||||||
/// a livelock-accepting run
|
/// a livelock-accepting run
|
||||||
/// Return false if the product automaton accepts no livelock-accepting run,
|
/// Return false if the product automaton accepts no livelock-accepting run,
|
||||||
/// otherwise true
|
/// otherwise true
|
||||||
virtual bool
|
bool
|
||||||
livelock_detection(const const_ta_product_ptr& t);
|
livelock_detection(const const_ta_product_ptr& t);
|
||||||
|
|
||||||
/// Print statistics, if any.
|
/// Print statistics, if any.
|
||||||
virtual std::ostream&
|
std::ostream&
|
||||||
print_stats(std::ostream& os) const;
|
print_stats(std::ostream& os) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2009, 2012, 2013, 2014, 2015 Laboratoire de Recherche
|
// Copyright (C) 2009, 2012, 2013, 2014, 2015, 2016 Laboratoire de
|
||||||
// et Développement de l'Epita (LRDE).
|
// Recherche et Développement de l'Epita (LRDE).
|
||||||
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// 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.
|
// et Marie Curie.
|
||||||
|
|
@ -44,10 +44,10 @@ namespace spot
|
||||||
/// proposition was already declared.
|
/// proposition was already declared.
|
||||||
bool declare(const std::string& prop_str);
|
bool declare(const std::string& prop_str);
|
||||||
|
|
||||||
virtual formula require(const std::string& prop_str);
|
virtual formula require(const std::string& prop_str) override;
|
||||||
|
|
||||||
/// Get the name of the environment.
|
/// Get the name of the environment.
|
||||||
virtual const std::string& name() const;
|
virtual const std::string& name() const override;
|
||||||
|
|
||||||
typedef std::map<const std::string, formula> prop_map;
|
typedef std::map<const std::string, formula> prop_map;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et
|
// Copyright (C) 2012, 2013, 2014, 2015, 2016 Laboratoire de Recherche
|
||||||
// Développement de l'Epita (LRDE).
|
// et Développement de l'Epita (LRDE).
|
||||||
// Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// Copyright (C) 2003, 2004, 2005 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.
|
// et Marie Curie.
|
||||||
|
|
@ -38,8 +38,8 @@ namespace spot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~default_environment();
|
virtual ~default_environment();
|
||||||
virtual formula require(const std::string& prop_str);
|
virtual formula require(const std::string& prop_str) override;
|
||||||
virtual const std::string& name() const;
|
virtual const std::string& name() const override;
|
||||||
|
|
||||||
/// Get the sole instance of spot::default_environment.
|
/// Get the sole instance of spot::default_environment.
|
||||||
static default_environment& instance();
|
static default_environment& instance();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 Laboratoire de
|
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Laboratoire de
|
||||||
// Recherche et Développement de l'Epita (LRDE).
|
// Recherche et Développement de l'Epita (LRDE).
|
||||||
// Copyright (C) 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// Copyright (C) 2005 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
|
||||||
|
|
@ -167,7 +167,7 @@ namespace spot
|
||||||
/// constant and all Boolean operators supported by Spot.
|
/// constant and all Boolean operators supported by Spot.
|
||||||
///
|
///
|
||||||
/// By default each operator has equal chance to be selected.
|
/// By default each operator has equal chance to be selected.
|
||||||
class SPOT_API random_boolean: public random_formula
|
class SPOT_API random_boolean final: public random_formula
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Create a random Boolean formula generator using atomic
|
/// Create a random Boolean formula generator using atomic
|
||||||
|
|
@ -207,7 +207,7 @@ namespace spot
|
||||||
/// constant and all SERE operators supported by Spot.
|
/// constant and all SERE operators supported by Spot.
|
||||||
///
|
///
|
||||||
/// By default each operator has equal chance to be selected.
|
/// By default each operator has equal chance to be selected.
|
||||||
class SPOT_API random_sere: public random_formula
|
class SPOT_API random_sere final: public random_formula
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Create a random SERE genere using atomic propositions from \a ap.
|
/// Create a random SERE genere using atomic propositions from \a ap.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et
|
// Copyright (C) 2012, 2013, 2014, 2015, 2016 Laboratoire de Recherche
|
||||||
// Développement de l'Epita (LRDE).
|
// et Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -47,7 +47,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
formula next()
|
virtual formula next() override
|
||||||
{
|
{
|
||||||
std::ostringstream s;
|
std::ostringstream s;
|
||||||
s << 'p' << nn++;
|
s << 'p' << nn++;
|
||||||
|
|
@ -65,7 +65,7 @@ namespace spot
|
||||||
|
|
||||||
unsigned nn;
|
unsigned nn;
|
||||||
|
|
||||||
formula next()
|
virtual formula next() override
|
||||||
{
|
{
|
||||||
std::string s;
|
std::string s;
|
||||||
unsigned n = nn++;
|
unsigned n = nn++;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int
|
virtual int
|
||||||
extend(int n)
|
extend(int n) override
|
||||||
{
|
{
|
||||||
assert(priv_);
|
assert(priv_);
|
||||||
int b = priv_->allocate_variables(n);
|
int b = priv_->allocate_variables(n);
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,9 @@ namespace spot
|
||||||
|
|
||||||
/// TGBA interface.
|
/// TGBA interface.
|
||||||
virtual ~taa_tgba();
|
virtual ~taa_tgba();
|
||||||
virtual spot::state* get_init_state() const final;
|
virtual spot::state* get_init_state() const override final;
|
||||||
virtual twa_succ_iterator* succ_iter(const spot::state* state) const final;
|
virtual twa_succ_iterator* succ_iter(const spot::state* state)
|
||||||
virtual std::string format_state(const spot::state* state) const = 0;
|
const override final;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
@ -81,9 +81,9 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int compare(const spot::state*) const;
|
virtual int compare(const spot::state*) const override;
|
||||||
virtual size_t hash() const;
|
virtual size_t hash() const override;
|
||||||
virtual set_state* clone() const;
|
virtual set_state* clone() const override;
|
||||||
|
|
||||||
virtual ~set_state()
|
virtual ~set_state()
|
||||||
{
|
{
|
||||||
|
|
@ -103,13 +103,13 @@ namespace spot
|
||||||
taa_succ_iterator(const taa_tgba::state_set* s, const acc_cond& acc);
|
taa_succ_iterator(const taa_tgba::state_set* s, const acc_cond& acc);
|
||||||
virtual ~taa_succ_iterator();
|
virtual ~taa_succ_iterator();
|
||||||
|
|
||||||
virtual bool first();
|
virtual bool first() override;
|
||||||
virtual bool next();
|
virtual bool next() override;
|
||||||
virtual bool done() const;
|
virtual bool done() const override;
|
||||||
|
|
||||||
virtual set_state* dst() const;
|
virtual set_state* dst() const override;
|
||||||
virtual bdd cond() const;
|
virtual bdd cond() const override;
|
||||||
virtual acc_cond::mark_t acc() const;
|
virtual acc_cond::mark_t acc() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Those typedefs are used to generate all possible successors in
|
/// Those typedefs are used to generate all possible successors in
|
||||||
|
|
@ -206,7 +206,7 @@ namespace spot
|
||||||
/// Otherwise a string composed of each string corresponding to
|
/// Otherwise a string composed of each string corresponding to
|
||||||
/// each state->get_state() in the spot::set_state is returned,
|
/// each state->get_state() in the spot::set_state is returned,
|
||||||
/// e.g. like {string_1,...,string_n}.
|
/// e.g. like {string_1,...,string_n}.
|
||||||
virtual std::string format_state(const spot::state* s) const
|
virtual std::string format_state(const spot::state* s) const override
|
||||||
{
|
{
|
||||||
const spot::set_state* se = down_cast<const spot::set_state*>(s);
|
const spot::set_state* se = down_cast<const spot::set_state*>(s);
|
||||||
assert(se);
|
assert(se);
|
||||||
|
|
@ -311,7 +311,8 @@ namespace spot
|
||||||
~taa_tgba_string()
|
~taa_tgba_string()
|
||||||
{}
|
{}
|
||||||
protected:
|
protected:
|
||||||
virtual std::string label_to_string(const std::string& label) const;
|
virtual std::string label_to_string(const std::string& label)
|
||||||
|
const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::shared_ptr<taa_tgba_string> taa_tgba_string_ptr;
|
typedef std::shared_ptr<taa_tgba_string> taa_tgba_string_ptr;
|
||||||
|
|
@ -335,7 +336,8 @@ namespace spot
|
||||||
~taa_tgba_formula()
|
~taa_tgba_formula()
|
||||||
{}
|
{}
|
||||||
protected:
|
protected:
|
||||||
virtual std::string label_to_string(const label_t& label) const;
|
virtual std::string label_to_string(const label_t& label)
|
||||||
|
const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::shared_ptr<taa_tgba_formula> taa_tgba_formula_ptr;
|
typedef std::shared_ptr<taa_tgba_formula> taa_tgba_formula_ptr;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int compare(const spot::state* other) const
|
virtual int compare(const spot::state* other) const override
|
||||||
{
|
{
|
||||||
auto o = down_cast<const twa_graph_state*>(other);
|
auto o = down_cast<const twa_graph_state*>(other);
|
||||||
assert(o);
|
assert(o);
|
||||||
|
|
@ -55,19 +55,19 @@ namespace spot
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t hash() const
|
virtual size_t hash() const override
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
reinterpret_cast<const char*>(this) - static_cast<const char*>(nullptr);
|
reinterpret_cast<const char*>(this) - static_cast<const char*>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual twa_graph_state*
|
virtual twa_graph_state*
|
||||||
clone() const
|
clone() const override
|
||||||
{
|
{
|
||||||
return const_cast<twa_graph_state*>(this);
|
return const_cast<twa_graph_state*>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void destroy() const
|
virtual void destroy() const override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -121,41 +121,41 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void recycle(edge t)
|
void recycle(edge t)
|
||||||
{
|
{
|
||||||
t_ = t;
|
t_ = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool first()
|
virtual bool first() override
|
||||||
{
|
{
|
||||||
p_ = t_;
|
p_ = t_;
|
||||||
return p_;
|
return p_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool next()
|
virtual bool next() override
|
||||||
{
|
{
|
||||||
p_ = g_->edge_storage(p_).next_succ;
|
p_ = g_->edge_storage(p_).next_succ;
|
||||||
return p_;
|
return p_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool done() const
|
virtual bool done() const override
|
||||||
{
|
{
|
||||||
return !p_;
|
return !p_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const twa_graph_state* dst() const
|
virtual const twa_graph_state* dst() const override
|
||||||
{
|
{
|
||||||
assert(!done());
|
assert(!done());
|
||||||
return &g_->state_data(g_->edge_storage(p_).dst);
|
return &g_->state_data(g_->edge_storage(p_).dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bdd cond() const
|
virtual bdd cond() const override
|
||||||
{
|
{
|
||||||
assert(!done());
|
assert(!done());
|
||||||
return g_->edge_data(p_).cond;
|
return g_->edge_data(p_).cond;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual acc_cond::mark_t acc() const
|
virtual acc_cond::mark_t acc() const override
|
||||||
{
|
{
|
||||||
assert(!done());
|
assert(!done());
|
||||||
return g_->edge_data(p_).acc;
|
return g_->edge_data(p_).acc;
|
||||||
|
|
@ -267,7 +267,7 @@ namespace spot
|
||||||
return init_number_;
|
return init_number_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const twa_graph_state* get_init_state() const
|
virtual const twa_graph_state* get_init_state() const override
|
||||||
{
|
{
|
||||||
if (num_states() == 0)
|
if (num_states() == 0)
|
||||||
const_cast<graph_t&>(g_).new_state();
|
const_cast<graph_t&>(g_).new_state();
|
||||||
|
|
@ -275,7 +275,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual twa_succ_iterator*
|
virtual twa_succ_iterator*
|
||||||
succ_iter(const state* st) const
|
succ_iter(const state* st) const override
|
||||||
{
|
{
|
||||||
auto s = down_cast<const typename graph_t::state_storage_t*>(st);
|
auto s = down_cast<const typename graph_t::state_storage_t*>(st);
|
||||||
assert(s);
|
assert(s);
|
||||||
|
|
@ -313,7 +313,7 @@ namespace spot
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::string format_state(const state* st) const
|
virtual std::string format_state(const state* st) const override
|
||||||
{
|
{
|
||||||
return format_state(state_number(st));
|
return format_state(state_number(st));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void destroy() const;
|
virtual void destroy() const override;
|
||||||
|
|
||||||
const state*
|
const state*
|
||||||
left() const
|
left() const
|
||||||
|
|
@ -63,9 +63,9 @@ namespace spot
|
||||||
return right_;
|
return right_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int compare(const state* other) const;
|
virtual int compare(const state* other) const override;
|
||||||
virtual size_t hash() const;
|
virtual size_t hash() const override;
|
||||||
virtual state_product* clone() const;
|
virtual state_product* clone() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const state* left_; ///< State from the left automaton.
|
const state* left_; ///< State from the left automaton.
|
||||||
|
|
@ -74,7 +74,7 @@ namespace spot
|
||||||
fixed_size_pool* pool_;
|
fixed_size_pool* pool_;
|
||||||
|
|
||||||
virtual ~state_product();
|
virtual ~state_product();
|
||||||
state_product(const state_product& o); // No implementation.
|
state_product(const state_product& o) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -90,14 +90,15 @@ namespace spot
|
||||||
|
|
||||||
virtual ~twa_product();
|
virtual ~twa_product();
|
||||||
|
|
||||||
virtual const state* get_init_state() const;
|
virtual const state* get_init_state() const override;
|
||||||
|
|
||||||
virtual twa_succ_iterator*
|
virtual twa_succ_iterator*
|
||||||
succ_iter(const state* state) const;
|
succ_iter(const state* state) const override;
|
||||||
|
|
||||||
virtual std::string format_state(const state* state) const;
|
virtual std::string format_state(const state* state) const override;
|
||||||
|
|
||||||
virtual state* project_state(const state* s, const const_twa_ptr& t) const;
|
virtual state* project_state(const state* s, const const_twa_ptr& t)
|
||||||
|
const override;
|
||||||
|
|
||||||
const acc_cond& left_acc() const;
|
const acc_cond& left_acc() const;
|
||||||
const acc_cond& right_acc() const;
|
const acc_cond& right_acc() const;
|
||||||
|
|
@ -120,7 +121,7 @@ namespace spot
|
||||||
public:
|
public:
|
||||||
twa_product_init(const const_twa_ptr& left, const const_twa_ptr& right,
|
twa_product_init(const const_twa_ptr& left, const const_twa_ptr& right,
|
||||||
const state* left_init, const state* right_init);
|
const state* left_init, const state* right_init);
|
||||||
virtual const state* get_init_state() const;
|
virtual const state* get_init_state() const override;
|
||||||
protected:
|
protected:
|
||||||
const state* left_init_;
|
const state* left_init_;
|
||||||
const state* right_init_;
|
const state* right_init_;
|
||||||
|
|
@ -135,11 +136,11 @@ namespace spot
|
||||||
|
|
||||||
/// \brief on-the-fly TGBA product with forced initial states
|
/// \brief on-the-fly TGBA product with forced initial states
|
||||||
inline twa_product_ptr otf_product_at(const const_twa_ptr& left,
|
inline twa_product_ptr otf_product_at(const const_twa_ptr& left,
|
||||||
const const_twa_ptr& right,
|
const const_twa_ptr& right,
|
||||||
const state* left_init,
|
const state* left_init,
|
||||||
const state* right_init)
|
const state* right_init)
|
||||||
{
|
{
|
||||||
return std::make_shared<twa_product_init>(left, right,
|
return std::make_shared<twa_product_init>(left, right,
|
||||||
left_init, right_init);
|
left_init, right_init);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2010, 2011, 2013, 2014, 2015 Laboratoire de Recherche et
|
// Copyright (C) 2010, 2011, 2013, 2014, 2015, 2016 Laboratoire de
|
||||||
// Développement de l'Epita (LRDE).
|
// Recherche et Développement de l'Epita (LRDE).
|
||||||
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// Copyright (C) 2004, 2005 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.
|
// et Marie Curie.
|
||||||
|
|
@ -170,7 +170,7 @@ namespace spot
|
||||||
const state* substart = ecs_->cycle_seed;
|
const state* substart = ecs_->cycle_seed;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
struct scc_bfs: bfs_steps
|
struct scc_bfs final: bfs_steps
|
||||||
{
|
{
|
||||||
const couvreur99_check_status* ecs;
|
const couvreur99_check_status* ecs;
|
||||||
couvreur99_check_result* r;
|
couvreur99_check_result* r;
|
||||||
|
|
@ -186,7 +186,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const state*
|
virtual const state*
|
||||||
filter(const state* s)
|
filter(const state* s) override
|
||||||
{
|
{
|
||||||
auto i = ecs->h.find(s);
|
auto i = ecs->h.find(s);
|
||||||
s->destroy();
|
s->destroy();
|
||||||
|
|
@ -201,7 +201,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
match(twa_run::step& st, const state* s)
|
match(twa_run::step& st, const state* s) override
|
||||||
{
|
{
|
||||||
acc_cond::mark_t less_acc =
|
acc_cond::mark_t less_acc =
|
||||||
acc_to_traverse - st.acc;
|
acc_to_traverse - st.acc;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement de
|
// Copyright (C) 2013, 2014, 2016 Laboratoire de Recherche et Développement de
|
||||||
// l'Epita (LRDE).
|
// l'Epita (LRDE).
|
||||||
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// Copyright (C) 2004, 2005 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
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
namespace spot
|
namespace spot
|
||||||
{
|
{
|
||||||
/// Compute a counter example from a spot::couvreur99_check_status
|
/// Compute a counter example from a spot::couvreur99_check_status
|
||||||
class SPOT_API couvreur99_check_result:
|
class SPOT_API couvreur99_check_result final:
|
||||||
public emptiness_check_result,
|
public emptiness_check_result,
|
||||||
public acss_statistics
|
public acss_statistics
|
||||||
{
|
{
|
||||||
|
|
@ -38,11 +38,11 @@ namespace spot
|
||||||
std::shared_ptr<const couvreur99_check_status>& ecs,
|
std::shared_ptr<const couvreur99_check_status>& ecs,
|
||||||
option_map o = option_map());
|
option_map o = option_map());
|
||||||
|
|
||||||
virtual twa_run_ptr accepting_run();
|
virtual twa_run_ptr accepting_run() override;
|
||||||
|
|
||||||
void print_stats(std::ostream& os) const;
|
void print_stats(std::ostream& os) const;
|
||||||
|
|
||||||
virtual unsigned acss_states() const;
|
virtual unsigned acss_states() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Called by accepting_run() to find a cycle which traverses all
|
/// Called by accepting_run() to find a cycle which traverses all
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2008, 2013, 2014, 2015 Laboratoire de Recherche et
|
// Copyright (C) 2008, 2013, 2014, 2015, 2016 Laboratoire de Recherche
|
||||||
// Développement de l'Epita (LRDE).
|
// et Développement de l'Epita (LRDE).
|
||||||
// Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
|
// Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
|
||||||
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||||
// Université Pierre et Marie Curie.
|
// Université Pierre et Marie Curie.
|
||||||
|
|
@ -146,12 +146,13 @@ namespace spot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
couvreur99_check(const const_twa_ptr& a, option_map o = option_map());
|
couvreur99_check(const const_twa_ptr& a, option_map o = option_map());
|
||||||
|
|
||||||
virtual ~couvreur99_check();
|
virtual ~couvreur99_check();
|
||||||
|
|
||||||
/// Check whether the automaton's language is empty.
|
/// Check whether the automaton's language is empty.
|
||||||
virtual emptiness_check_result_ptr check();
|
virtual emptiness_check_result_ptr check() override;
|
||||||
|
|
||||||
virtual std::ostream& print_stats(std::ostream& os) const;
|
virtual std::ostream& print_stats(std::ostream& os) const override;
|
||||||
|
|
||||||
/// \brief Return the status of the emptiness-check.
|
/// \brief Return the status of the emptiness-check.
|
||||||
///
|
///
|
||||||
|
|
@ -190,7 +191,7 @@ namespace spot
|
||||||
couvreur99_check_shy(const const_twa_ptr& a, option_map o = option_map());
|
couvreur99_check_shy(const const_twa_ptr& a, option_map o = option_map());
|
||||||
virtual ~couvreur99_check_shy();
|
virtual ~couvreur99_check_shy();
|
||||||
|
|
||||||
virtual emptiness_check_result_ptr check();
|
virtual emptiness_check_result_ptr check() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct successor {
|
struct successor {
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual emptiness_check_result_ptr
|
virtual emptiness_check_result_ptr
|
||||||
check()
|
check() override
|
||||||
{
|
{
|
||||||
top = dftop = -1;
|
top = dftop = -1;
|
||||||
violation = false;
|
violation = false;
|
||||||
|
|
@ -226,7 +226,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::ostream&
|
virtual std::ostream&
|
||||||
print_stats(std::ostream& os) const
|
print_stats(std::ostream& os) const override
|
||||||
{
|
{
|
||||||
os << h.size() << " unique states visited\n";
|
os << h.size() << " unique states visited\n";
|
||||||
os << transitions() << " transitions explored\n";
|
os << transitions() << " transitions explored\n";
|
||||||
|
|
@ -264,7 +264,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual unsigned
|
virtual unsigned
|
||||||
acss_states() const
|
acss_states() const override
|
||||||
{
|
{
|
||||||
// Gross!
|
// Gross!
|
||||||
const_cast<result*>(this)->update_lowlinks();
|
const_cast<result*>(this)->update_lowlinks();
|
||||||
|
|
@ -282,7 +282,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual twa_run_ptr
|
virtual twa_run_ptr
|
||||||
accepting_run()
|
accepting_run() override
|
||||||
{
|
{
|
||||||
auto res = std::make_shared<twa_run>(automaton());
|
auto res = std::make_shared<twa_run>(automaton());
|
||||||
|
|
||||||
|
|
@ -335,7 +335,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const state*
|
virtual const state*
|
||||||
filter(const state* s)
|
filter(const state* s) override
|
||||||
{
|
{
|
||||||
// Do not escape the SCC
|
// Do not escape the SCC
|
||||||
auto j = data.h.find(s);
|
auto j = data.h.find(s);
|
||||||
|
|
@ -357,13 +357,13 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
match(twa_run::step& step, const state*)
|
match(twa_run::step& step, const state*) override
|
||||||
{
|
{
|
||||||
return step.acc != 0U;
|
return step.acc != 0U;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct second_bfs: first_bfs
|
struct second_bfs final: first_bfs
|
||||||
{
|
{
|
||||||
const state* target;
|
const state* target;
|
||||||
second_bfs(result* r, int scc_root, const state* target)
|
second_bfs(result* r, int scc_root, const state* target)
|
||||||
|
|
@ -372,7 +372,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
match(twa_run::step&, const state* s)
|
match(twa_run::step&, const state* s) override
|
||||||
{
|
{
|
||||||
return s == target;
|
return s == target;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2009, 2010, 2012, 2013, 2014, 2015 Laboratoire de
|
// Copyright (C) 2009, 2010, 2012, 2013, 2014, 2015, 2016 Laboratoire
|
||||||
// Recherche et Développement de l'Epita (LRDE).
|
// de Recherche et Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -29,7 +29,7 @@ namespace spot
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
/// \brief Recursively translate a formula into a TAA.
|
/// \brief Recursively translate a formula into a TAA.
|
||||||
class ltl2taa_visitor
|
class ltl2taa_visitor final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ltl2taa_visitor(const taa_tgba_formula_ptr& res,
|
ltl2taa_visitor(const taa_tgba_formula_ptr& res,
|
||||||
|
|
@ -40,7 +40,6 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
|
||||||
~ltl2taa_visitor()
|
~ltl2taa_visitor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ namespace spot
|
||||||
/// check() can be called several times (until it returns a null
|
/// check() can be called several times (until it returns a null
|
||||||
/// pointer) to enumerate all the visited accepting paths. The method
|
/// pointer) to enumerate all the visited accepting paths. The method
|
||||||
/// visits only a finite set of accepting paths.
|
/// visits only a finite set of accepting paths.
|
||||||
virtual emptiness_check_result_ptr check()
|
virtual emptiness_check_result_ptr check() override
|
||||||
{
|
{
|
||||||
auto t = std::static_pointer_cast<magic_search_>
|
auto t = std::static_pointer_cast<magic_search_>
|
||||||
(this->emptiness_check::shared_from_this());
|
(this->emptiness_check::shared_from_this());
|
||||||
|
|
@ -114,7 +114,7 @@ namespace spot
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::ostream& print_stats(std::ostream &os) const
|
virtual std::ostream& print_stats(std::ostream &os) const override
|
||||||
{
|
{
|
||||||
os << states() << " distinct nodes visited" << std::endl;
|
os << states() << " distinct nodes visited" << std::endl;
|
||||||
os << transitions() << " transitions explored" << std::endl;
|
os << transitions() << " transitions explored" << std::endl;
|
||||||
|
|
@ -128,7 +128,7 @@ namespace spot
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool safe() const
|
virtual bool safe() const override
|
||||||
{
|
{
|
||||||
return heap::Safe;
|
return heap::Safe;
|
||||||
}
|
}
|
||||||
|
|
@ -319,7 +319,7 @@ namespace spot
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
class result_from_stack: public emptiness_check_result,
|
class result_from_stack final: public emptiness_check_result,
|
||||||
public acss_statistics
|
public acss_statistics
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -328,7 +328,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual twa_run_ptr accepting_run()
|
virtual twa_run_ptr accepting_run() override
|
||||||
{
|
{
|
||||||
assert(!ms_->st_blue.empty());
|
assert(!ms_->st_blue.empty());
|
||||||
assert(!ms_->st_red.empty());
|
assert(!ms_->st_red.empty());
|
||||||
|
|
@ -366,7 +366,7 @@ namespace spot
|
||||||
return run;
|
return run;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned acss_states() const
|
virtual unsigned acss_states() const override
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -376,7 +376,7 @@ namespace spot
|
||||||
|
|
||||||
# define FROM_STACK "ar:from_stack"
|
# define FROM_STACK "ar:from_stack"
|
||||||
|
|
||||||
class magic_search_result: public emptiness_check_result
|
class magic_search_result final: public emptiness_check_result
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
magic_search_result(const std::shared_ptr<magic_search_>& m,
|
magic_search_result(const std::shared_ptr<magic_search_>& m,
|
||||||
|
|
@ -389,7 +389,7 @@ namespace spot
|
||||||
computer = new ndfs_result<magic_search_<heap>, heap>(ms);
|
computer = new ndfs_result<magic_search_<heap>, heap>(ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void options_updated(const option_map& old)
|
virtual void options_updated(const option_map& old) override
|
||||||
{
|
{
|
||||||
if (old[FROM_STACK] && !options()[FROM_STACK])
|
if (old[FROM_STACK] && !options()[FROM_STACK])
|
||||||
{
|
{
|
||||||
|
|
@ -408,12 +408,12 @@ namespace spot
|
||||||
delete computer;
|
delete computer;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual twa_run_ptr accepting_run()
|
virtual twa_run_ptr accepting_run() override
|
||||||
{
|
{
|
||||||
return computer->accepting_run();
|
return computer->accepting_run();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const unsigned_statistics* statistics() const
|
virtual const unsigned_statistics* statistics() const override
|
||||||
{
|
{
|
||||||
return computer->statistics();
|
return computer->statistics();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ namespace spot
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wdba_search_acc_loop : public bfs_steps
|
struct wdba_search_acc_loop final : public bfs_steps
|
||||||
{
|
{
|
||||||
wdba_search_acc_loop(const const_twa_ptr& det_a,
|
wdba_search_acc_loop(const const_twa_ptr& det_a,
|
||||||
unsigned scc_n, scc_info& sm,
|
unsigned scc_n, scc_info& sm,
|
||||||
|
|
@ -185,7 +185,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const state*
|
virtual const state*
|
||||||
filter(const state* s)
|
filter(const state* s) override
|
||||||
{
|
{
|
||||||
s = seen(s);
|
s = seen(s);
|
||||||
if (sm.scc_of(std::static_pointer_cast<const twa_graph>(a_)
|
if (sm.scc_of(std::static_pointer_cast<const twa_graph>(a_)
|
||||||
|
|
@ -195,7 +195,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
match(twa_run::step&, const state* to)
|
match(twa_run::step&, const state* to) override
|
||||||
{
|
{
|
||||||
return to == dest;
|
return to == dest;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2011, 2013, 2014, 2015 Laboratoire de recherche et
|
// Copyright (C) 2011, 2013, 2014, 2015, 2016 Laboratoire de recherche
|
||||||
// développement de l'Epita (LRDE).
|
// et développement de l'Epita (LRDE).
|
||||||
// Copyright (C) 2004, 2005, 2006 Laboratoire d'Informatique de Paris
|
// Copyright (C) 2004, 2005, 2006 Laboratoire d'Informatique de Paris
|
||||||
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||||
// Université Pierre et Marie Curie.
|
// Université Pierre et Marie Curie.
|
||||||
|
|
@ -76,8 +76,8 @@ namespace spot
|
||||||
struct stats_interface<T, 1>
|
struct stats_interface<T, 1>
|
||||||
: public acss_statistics
|
: public acss_statistics
|
||||||
{
|
{
|
||||||
unsigned
|
virtual unsigned
|
||||||
acss_states() const
|
acss_states() const override
|
||||||
{
|
{
|
||||||
// all visited states are in the state space search
|
// all visited states are in the state space search
|
||||||
return static_cast<const T*>(this)->h_.size();
|
return static_cast<const T*>(this)->h_.size();
|
||||||
|
|
@ -88,7 +88,7 @@ namespace spot
|
||||||
|
|
||||||
|
|
||||||
template <typename ndfs_search, typename heap>
|
template <typename ndfs_search, typename heap>
|
||||||
class ndfs_result:
|
class ndfs_result final:
|
||||||
public emptiness_check_result,
|
public emptiness_check_result,
|
||||||
// Conditionally inherit from acss_statistics or ars_statistics.
|
// Conditionally inherit from acss_statistics or ars_statistics.
|
||||||
public stats_interface<ndfs_result<ndfs_search, heap>, heap::Has_Size>
|
public stats_interface<ndfs_result<ndfs_search, heap>, heap::Has_Size>
|
||||||
|
|
@ -104,7 +104,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual twa_run_ptr accepting_run()
|
virtual twa_run_ptr accepting_run() override
|
||||||
{
|
{
|
||||||
const stack_type& stb = ms_->get_st_blue();
|
const stack_type& stb = ms_->get_st_blue();
|
||||||
const stack_type& str = ms_->get_st_red();
|
const stack_type& str = ms_->get_st_red();
|
||||||
|
|
|
||||||
|
|
@ -102,8 +102,8 @@ namespace spot
|
||||||
public:
|
public:
|
||||||
tgba_reachable_iterator_breadth_first(const const_twa_ptr& a);
|
tgba_reachable_iterator_breadth_first(const const_twa_ptr& a);
|
||||||
|
|
||||||
virtual void add_state(const state* s);
|
virtual void add_state(const state* s) override;
|
||||||
virtual const state* next_state();
|
virtual const state* next_state() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::deque<const state*> todo; ///< A queue of states yet to explore.
|
std::deque<const state*> todo; ///< A queue of states yet to explore.
|
||||||
|
|
@ -189,8 +189,8 @@ namespace spot
|
||||||
/// the stack after process_link() has been called.
|
/// the stack after process_link() has been called.
|
||||||
bool on_stack(int sn) const;
|
bool on_stack(int sn) const;
|
||||||
protected:
|
protected:
|
||||||
virtual void push(const state* s, int sn);
|
virtual void push(const state* s, int sn) override;
|
||||||
virtual void pop();
|
virtual void pop() override;
|
||||||
|
|
||||||
std::unordered_set<int> stack_;
|
std::unordered_set<int> stack_;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ namespace spot
|
||||||
/// \brief Emptiness checker on spot::tgba automata having at most one
|
/// \brief Emptiness checker on spot::tgba automata having at most one
|
||||||
/// acceptance condition (i.e. a TBA).
|
/// acceptance condition (i.e. a TBA).
|
||||||
template <typename heap>
|
template <typename heap>
|
||||||
class se05_search : public emptiness_check, public ec_statistics
|
class se05_search final : public emptiness_check, public ec_statistics
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// \brief Initialize the Magic Search algorithm on the automaton \a a
|
/// \brief Initialize the Magic Search algorithm on the automaton \a a
|
||||||
|
|
@ -87,7 +87,7 @@ namespace spot
|
||||||
/// check() can be called several times (until it returns a null
|
/// check() can be called several times (until it returns a null
|
||||||
/// pointer) to enumerate all the visited accepting paths. The method
|
/// pointer) to enumerate all the visited accepting paths. The method
|
||||||
/// visits only a finite set of accepting paths.
|
/// visits only a finite set of accepting paths.
|
||||||
virtual emptiness_check_result_ptr check()
|
virtual emptiness_check_result_ptr check() override
|
||||||
{
|
{
|
||||||
auto t = std::static_pointer_cast<se05_search>
|
auto t = std::static_pointer_cast<se05_search>
|
||||||
(this->emptiness_check::shared_from_this());
|
(this->emptiness_check::shared_from_this());
|
||||||
|
|
@ -114,7 +114,7 @@ namespace spot
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::ostream& print_stats(std::ostream &os) const
|
virtual std::ostream& print_stats(std::ostream &os) const override
|
||||||
{
|
{
|
||||||
os << states() << " distinct nodes visited" << std::endl;
|
os << states() << " distinct nodes visited" << std::endl;
|
||||||
os << transitions() << " transitions explored" << std::endl;
|
os << transitions() << " transitions explored" << std::endl;
|
||||||
|
|
@ -128,7 +128,7 @@ namespace spot
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool safe() const
|
virtual bool safe() const override
|
||||||
{
|
{
|
||||||
return heap::Safe;
|
return heap::Safe;
|
||||||
}
|
}
|
||||||
|
|
@ -334,7 +334,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual twa_run_ptr accepting_run()
|
virtual twa_run_ptr accepting_run() override
|
||||||
{
|
{
|
||||||
assert(!ms_->st_blue.empty());
|
assert(!ms_->st_blue.empty());
|
||||||
assert(!ms_->st_red.empty());
|
assert(!ms_->st_red.empty());
|
||||||
|
|
@ -378,7 +378,7 @@ namespace spot
|
||||||
return run;
|
return run;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned acss_states() const
|
virtual unsigned acss_states() const override
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -388,7 +388,7 @@ namespace spot
|
||||||
|
|
||||||
# define FROM_STACK "ar:from_stack"
|
# define FROM_STACK "ar:from_stack"
|
||||||
|
|
||||||
class se05_result: public emptiness_check_result
|
class se05_result final: public emptiness_check_result
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
se05_result(const std::shared_ptr<se05_search>& m,
|
se05_result(const std::shared_ptr<se05_search>& m,
|
||||||
|
|
@ -401,7 +401,7 @@ namespace spot
|
||||||
computer = new ndfs_result<se05_search<heap>, heap>(ms);
|
computer = new ndfs_result<se05_search<heap>, heap>(ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void options_updated(const option_map& old)
|
virtual void options_updated(const option_map& old) override
|
||||||
{
|
{
|
||||||
if (old[FROM_STACK] && !options()[FROM_STACK])
|
if (old[FROM_STACK] && !options()[FROM_STACK])
|
||||||
{
|
{
|
||||||
|
|
@ -420,12 +420,12 @@ namespace spot
|
||||||
delete computer;
|
delete computer;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual twa_run_ptr accepting_run()
|
virtual twa_run_ptr accepting_run() override
|
||||||
{
|
{
|
||||||
return computer->accepting_run();
|
return computer->accepting_run();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const unsigned_statistics* statistics() const
|
virtual const unsigned_statistics* statistics() const override
|
||||||
{
|
{
|
||||||
return computer->statistics();
|
return computer->statistics();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
class state_tgbasl: public state
|
class state_tgbasl final: public state
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
state_tgbasl(const state* s, bdd cond) : s_(s), cond_(cond)
|
state_tgbasl(const state* s, bdd cond) : s_(s), cond_(cond)
|
||||||
|
|
@ -54,7 +54,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int
|
virtual int
|
||||||
compare(const state* other) const
|
compare(const state* other) const override
|
||||||
{
|
{
|
||||||
const state_tgbasl* o =
|
const state_tgbasl* o =
|
||||||
down_cast<const state_tgbasl*>(other);
|
down_cast<const state_tgbasl*>(other);
|
||||||
|
|
@ -66,13 +66,13 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t
|
virtual size_t
|
||||||
hash() const
|
hash() const override
|
||||||
{
|
{
|
||||||
return wang32_hash(s_->hash()) ^ wang32_hash(cond_.id());
|
return wang32_hash(s_->hash()) ^ wang32_hash(cond_.id());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
state_tgbasl* clone() const
|
state_tgbasl* clone() const override
|
||||||
{
|
{
|
||||||
return new state_tgbasl(*this);
|
return new state_tgbasl(*this);
|
||||||
}
|
}
|
||||||
|
|
@ -94,7 +94,7 @@ namespace spot
|
||||||
bdd cond_;
|
bdd cond_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class twasl_succ_iterator : public twa_succ_iterator
|
class twasl_succ_iterator final : public twa_succ_iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
twasl_succ_iterator(twa_succ_iterator* it, const state_tgbasl* state,
|
twasl_succ_iterator(twa_succ_iterator* it, const state_tgbasl* state,
|
||||||
|
|
@ -111,8 +111,8 @@ namespace spot
|
||||||
|
|
||||||
// iteration
|
// iteration
|
||||||
|
|
||||||
bool
|
virtual bool
|
||||||
first()
|
first() override
|
||||||
{
|
{
|
||||||
loop_ = false;
|
loop_ = false;
|
||||||
done_ = false;
|
done_ = false;
|
||||||
|
|
@ -125,8 +125,8 @@ namespace spot
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
virtual bool
|
||||||
next()
|
next() override
|
||||||
{
|
{
|
||||||
if (cond_ != bddfalse)
|
if (cond_ != bddfalse)
|
||||||
{
|
{
|
||||||
|
|
@ -148,32 +148,32 @@ namespace spot
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
virtual bool
|
||||||
done() const
|
done() const override
|
||||||
{
|
{
|
||||||
return it_->done() && done_;
|
return it_->done() && done_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// inspection
|
// inspection
|
||||||
|
|
||||||
state_tgbasl*
|
virtual state_tgbasl*
|
||||||
dst() const
|
dst() const override
|
||||||
{
|
{
|
||||||
if (loop_)
|
if (loop_)
|
||||||
return new state_tgbasl(state_->real_state(), state_->cond());
|
return new state_tgbasl(state_->real_state(), state_->cond());
|
||||||
return new state_tgbasl(it_->dst(), one_);
|
return new state_tgbasl(it_->dst(), one_);
|
||||||
}
|
}
|
||||||
|
|
||||||
bdd
|
virtual bdd
|
||||||
cond() const
|
cond() const override
|
||||||
{
|
{
|
||||||
if (loop_)
|
if (loop_)
|
||||||
return state_->cond();
|
return state_->cond();
|
||||||
return one_;
|
return one_;
|
||||||
}
|
}
|
||||||
|
|
||||||
acc_cond::mark_t
|
virtual acc_cond::mark_t
|
||||||
acc() const
|
acc() const override
|
||||||
{
|
{
|
||||||
if (loop_)
|
if (loop_)
|
||||||
return 0U;
|
return 0U;
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ namespace spot
|
||||||
/// \brief Emptiness checker on spot::tgba automata having at most one
|
/// \brief Emptiness checker on spot::tgba automata having at most one
|
||||||
/// acceptance condition (i.e. a TBA).
|
/// acceptance condition (i.e. a TBA).
|
||||||
template <typename heap>
|
template <typename heap>
|
||||||
class tau03_search : public emptiness_check, public ec_statistics
|
class tau03_search final : public emptiness_check, public ec_statistics
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// \brief Initialize the search algorithm on the automaton \a a
|
/// \brief Initialize the search algorithm on the automaton \a a
|
||||||
|
|
@ -82,7 +82,7 @@ namespace spot
|
||||||
///
|
///
|
||||||
/// \return non null pointer iff the algorithm has found an
|
/// \return non null pointer iff the algorithm has found an
|
||||||
/// accepting path.
|
/// accepting path.
|
||||||
virtual emptiness_check_result_ptr check()
|
virtual emptiness_check_result_ptr check() override
|
||||||
{
|
{
|
||||||
if (!st_blue.empty())
|
if (!st_blue.empty())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
@ -98,7 +98,7 @@ namespace spot
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::ostream& print_stats(std::ostream &os) const
|
virtual std::ostream& print_stats(std::ostream &os) const override
|
||||||
{
|
{
|
||||||
os << states() << " distinct nodes visited" << std::endl;
|
os << states() << " distinct nodes visited" << std::endl;
|
||||||
os << transitions() << " transitions explored" << std::endl;
|
os << transitions() << " transitions explored" << std::endl;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue