24#include <spot/misc/bitvect.hh>
25#include <spot/twa/twagraph.hh>
26#include <spot/twaalgos/sccinfo.hh>
69 typedef std::underlying_type_t<zielonka_tree_options> ut;
71 &
static_cast<ut
>(right));
78 typedef std::underlying_type_t<zielonka_tree_options> ut;
80 |
static_cast<ut
>(right));
87 typedef std::underlying_type_t<zielonka_tree_options> ut;
89 & ~
static_cast<ut
>(right));
114 return num_branches_;
144 std::pair<unsigned, unsigned>
160 return has_rabin_shape_;
169 return has_streett_shape_;
177 return has_streett_shape_ && has_rabin_shape_;
181 void dot(std::ostream&)
const;
186 unsigned next_sibling = 0;
187 unsigned first_child = 0;
191 std::vector<zielonka_node> nodes_;
193 unsigned one_branch_ = 0;
194 unsigned num_branches_ = 0;
197 bool has_rabin_shape_ =
true;
198 bool has_streett_shape_ =
true;
249 typedef std::underlying_type_t<acd_options> ut;
250 return static_cast<acd_options>(
static_cast<ut
>(left)
251 &
static_cast<ut
>(right));
257 typedef std::underlying_type_t<acd_options> ut;
258 return static_cast<acd_options>(
static_cast<ut
>(left)
259 |
static_cast<ut
>(right));
265 typedef std::underlying_type_t<acd_options> ut;
266 return static_cast<acd_options>(
static_cast<ut
>(left)
267 & ~
static_cast<ut
>(right));
298 std::pair<unsigned, unsigned>
299 step(
unsigned branch,
unsigned edge)
const;
317 return nodes_.size();
335 if (scc >= scc_count_)
336 report_invalid_scc_number(scc,
"is_even");
337 return trees_[scc].is_even;
354 unsigned scc_max_level(
unsigned scc)
const
356 if (scc >= scc_count_)
357 report_invalid_scc_number(scc,
"scc_max_level");
358 return trees_[scc].max_level;
392 void dot(std::ostream&,
const char*
id =
nullptr)
const;
396 bool own_si_ =
false;
413 unsigned next_sibling = 0;
414 unsigned first_child = 0;
422 : edges(e), states(s)
428 std::deque<acd_node> nodes_;
431 std::deque<std::unique_ptr<bitvect>> bitvectors;
443 unsigned max_level = 0;
444 unsigned num_nodes = 0;
450 std::vector<scc_data> trees_;
452 const_twa_graph_ptr aut_;
455 bool has_rabin_shape_ =
true;
456 bool has_streett_shape_ =
true;
462 unsigned leftmost_branch_(
unsigned node,
unsigned state)
const;
466 void report_invalid_scc_number(
unsigned num,
const char* fn);
467 [[noreturn]]
static void report_need_opt(
const char* opt);
468 [[noreturn]]
static void report_empty_acd(
const char* fn);
496 bool colored =
false);
499 bool colored =
false,
500 bool order_heuristic =
true);
An acceptance condition.
Definition: acc.hh:61
Alternating Cycle Decomposition implementation.
Definition: zlktree.hh:282
bool has_parity_shape() const
Whether the ACD has Streett shape.
unsigned first_branch(unsigned state) const
Return the first branch for state.
bool node_acceptance(unsigned n) const
const acc_cond::mark_t & node_colors(unsigned n) const
Return the colors of a node.
const const_twa_graph_ptr get_aut() const
Return the automaton on which the ACD is defined.
Definition: zlktree.hh:383
bool is_even(unsigned scc) const
Whether the ACD corresponds to a min even or min odd parity acceptance in SCC scc.
Definition: zlktree.hh:333
std::pair< unsigned, unsigned > step(unsigned branch, unsigned edge) const
Step through the ACD.
bool has_rabin_shape() const
Whether the ACD has Rabin shape.
unsigned node_level(unsigned n) const
Return the level of a node.
std::vector< unsigned > edges_of_node(unsigned n) const
Return the list of edges covered by node n of the ACD.
unsigned node_count() const
Return the number of nodes in the the ACD forest.
Definition: zlktree.hh:315
void dot(std::ostream &, const char *id=nullptr) const
Render the ACD as in GraphViz format.
bool is_even() const
Whether the ACD globally corresponds to a min even or min odd parity acceptance.
Definition: zlktree.hh:346
unsigned state_step(unsigned node, unsigned edge) const
Step through the ACD, with rules for state-based output.
acd(const scc_info &si, acd_options opt=acd_options::NONE)
Build a Alternating Cycle Decomposition an SCC decomposition.
bool has_streett_shape() const
Whether the ACD has Streett shape.
A bit vector.
Definition: bitvect.hh:51
Compute an SCC map and gather assorted information.
Definition: sccinfo.hh:449
Abstract class for states.
Definition: twa.hh:47
Zielonka Tree implementation.
Definition: zlktree.hh:102
std::pair< unsigned, unsigned > step(unsigned branch, acc_cond::mark_t colors) const
Walk through the Zielonka tree.
bool has_rabin_shape() const
Whether the Zielonka tree has Rabin shape.
Definition: zlktree.hh:158
bool has_parity_shape() const
Whether the Zielonka tree has parity shape.
Definition: zlktree.hh:175
bool has_streett_shape() const
Whether the Zielonka tree has Streett shape.
Definition: zlktree.hh:167
zielonka_tree(const acc_cond &cond, zielonka_tree_options opt=zielonka_tree_options::NONE)
Build a Zielonka tree from the acceptance condition.
bool is_even() const
Whether the tree corresponds to a min even or min odd parity acceptance.
Definition: zlktree.hh:149
void dot(std::ostream &) const
Render the tree as in GraphViz format.
unsigned first_branch() const
The number of one branch in the tree.
Definition: zlktree.hh:120
unsigned num_branches() const
The number of branches in the Zielonka tree.
Definition: zlktree.hh:112
Definition: automata.hh:26
const mc_rvalue operator|(const mc_rvalue &lhs, const mc_rvalue &rhs)
This function helps to find the output value from a set of threads that may have different values.
Definition: mc.hh:130
An acceptance mark.
Definition: acc.hh:84
Definition: zlktree.hh:184