12#ifndef MCRL2_PBES_PBESINST_FIND_LOOPS_H
13#define MCRL2_PBES_PBESINST_FIND_LOOPS_H
22namespace pbes_system {
32 std::unordered_map<structure_graph::index_type, bool>& visited
44 auto i = visited.find(w);
45 if (i != visited.end())
57 if (u == v ||
find_loop(G, U, v, u, p, visited))
61 mCRL2log(
log::debug) <<
" case 1: found a loop starting in " << v <<
" with current vertex w = " << w << std::endl;
74template <
class Container>
76 const Container& discovered,
78 std::array<strategy_vector, 2>& tau, std::size_t iteration_count,
82 mCRL2log(
log::debug) <<
"Apply find loops (iteration " << iteration_count <<
") to graph:\n" << G << std::endl;
85 std::size_t insertion_count = 0;
87 std::size_t n = S[0].
extent();
90 boost::dynamic_bitset<> todo_(n);
121 std::unordered_map<structure_graph::index_type, bool> visited;
131 auto i = visited.find(u);
132 if (i != visited.end())
136 bool b =
find_loop(G, done, u, u, u_.rank, visited);
140 if (u_.rank % 2 == 0)
165 mCRL2log(
log::debug) <<
"Find loops: (iteration " << iteration_count <<
") inserted " << insertion_count <<
" vertices." << std::endl;
const atermpp::deque< propositional_variable_instantiation > & elements() const
const std::unordered_set< propositional_variable_instantiation > & irrelevant_elements() const
\brief A propositional variable instantiation
std::size_t extent() const
const vertex & find_vertex(index_type u)
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
constexpr std::size_t undefined_index()
Returns an index that corresponds to 'undefined'.
void find_loops(const simple_structure_graph &G, const Container &discovered, const pbesinst_lazy_todo &todo, std::array< vertex_set, 2 > &S, std::array< strategy_vector, 2 > &tau, std::size_t iteration_count, const detail::structure_graph_builder &graph_builder)
bool find_loop(const simple_structure_graph &G, const vertex_set &U, structure_graph::index_type v, structure_graph::index_type w, std::size_t p, std::unordered_map< structure_graph::index_type, bool > &visited)
vertex_set attr_default_with_tau(const StructureGraph &G, vertex_set A, std::size_t alpha, std::array< strategy_vector, 2 > &tau)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
add your file description here.
add your file description here.
index_type find_vertex(const pbes_expression &x) const
void set_strategy(structure_graph::index_type u, structure_graph::index_type v)
void insert(structure_graph::index_type u)
bool contains(structure_graph::index_type u) const
const std::vector< structure_graph::index_type > & vertices() const
add your file description here.