22#include <unordered_map>
23#include <spot/misc/common.hh>
24#include <spot/misc/trival.hh>
25#include <spot/graph/adjlist.hh>
32 static constexpr unsigned target = (1U << (
sizeof(unsigned)*8 - 4)) - 1;
41 unsigned choice:
sizeof(unsigned)*8 - 4;
43 backprop_state(
bool owner)
55 : stop_asap_(stop_asap)
59 int new_state(
bool owner)
61 return reverse_.new_state(owner);
64 void set_name(
unsigned state,
const std::string& s)
66 names_.emplace(
state, s);
70 bool new_edge(
unsigned src,
unsigned dst);
74 bool freeze_state(
unsigned state);
76 bool is_frozen(
unsigned state)
const
78 return (*
this)[
state].frozen;
81 bool is_determined(
unsigned state)
const
83 return (*
this)[
state].determined;
86 bool winner(
unsigned state)
const
88 return (*
this)[
state].winner;
91 unsigned choice(
unsigned state)
const
93 return (*
this)[
state].choice;
96 bool set_winner(
unsigned state,
bool winner)
98 return set_winner(
state, winner, target);
101 std::ostream& print_dot(std::ostream& os)
const;
103 unsigned num_edges()
const
105 return reverse_.num_edges();
109 bool set_winner(
unsigned state,
bool winner,
unsigned choice_state);
113 std::unordered_map<unsigned, std::string> names_;
115 const backprop_state& operator[](
unsigned state)
const
117 return reverse_.state_data(
state);
120 backprop_state& operator[](
unsigned state)
122 return reverse_.state_data(
state);
Definition: backprop.hh:31
Abstract class for states.
Definition: twa.hh:47
Definition: automata.hh:26