12#ifndef MCRL2_PBES_PBES_EQUATION_INDEX_H
13#define MCRL2_PBES_PBES_EQUATION_INDEX_H
15#include "mcrl2/pbes/pbes.h"
28 template <
typename PBES>
31 auto const& equations = p.equations();
34 for ( ; i < equations.size(); i++)
36 const auto& eqn = equations[i];
39 rank = equations.front().symbol().is_mu() ? 1 : 0;
43 if (equations[i - 1].symbol() != equations[i].symbol())
48 equation_index.insert({eqn.variable().name(), std::make_pair(i, rank)});
57 auto i = equation_index.find(name);
58 assert (i != equation_index.end());
59 return i->second.first;
65 auto i = equation_index.find(name);
66 assert (i != equation_index.end());
67 return i->second.second;
86 for (
const auto& p: index.equation_index)
88 out << p.first <<
" -> (" << p.second.first <<
", " << p.second.second <<
")" << std::endl;
std::ostream & operator<<(std::ostream &out, const pbes_equation_index &index)
pbes_equation_index()=default
std::size_t max_rank() const
Returns the rank of the equation of the variable with the given name.
std::size_t max_index() const
Returns the rank of the equation of the variable with the given name.
std::size_t index(const core::identifier_string &name) const
Returns the index of the equation of the variable with the given name.
std::size_t rank(const core::identifier_string &name) const
Returns the rank of the equation of the variable with the given name.
pbes_equation_index(const PBES &p)