17 #ifndef AWALI_RATEXP_HISTORY_HH
18 # define AWALI_RATEXP_HISTORY_HH
47 template <
typename RatExpSet>
51 using ratexp_t =
typename ratexpset_t::value_t;
54 std::map<state_t, ratexp_t> origins_;
69 const std::string& fmt)
const override
77 const std::map<state_t, ratexp_t>&
origins()
const
88 return (origins_.find(s)!=origins_.end());
107 throw std::runtime_error(
"Origin state not available");
114 throw std::runtime_error(
"Origin state set not available");
base type for history of automata
Definition: history.hh:40
specialisation of history_base
Definition: ratexp_history.hh:48
typename ratexpset_t::value_t ratexp_t
Definition: ratexp_history.hh:51
history_kind_t get_nature() const override
Definition: ratexp_history.hh:62
RatExpSet ratexpset_t
Definition: ratexp_history.hh:50
std::ostream & print_state_name(state_t s, std::ostream &o, const std::string &fmt) const override
Definition: ratexp_history.hh:68
ratexp_history(const ratexpset_t &rs)
Definition: ratexp_history.hh:57
const std::map< state_t, ratexp_t > & origins() const
map between states and rational expressions
Definition: ratexp_history.hh:77
std::vector< state_t > get_state_set(state_t) override
unsupported method : use get_ratexp
Definition: ratexp_history.hh:113
const ratexp_t & get_ratexp(state_t s)
Definition: ratexp_history.hh:98
bool has_history(state_t s) const override
Definition: ratexp_history.hh:87
state_t get_state(state_t) override
unsupported method : use get_ratexp
Definition: ratexp_history.hh:106
bool remove_history(state_t s) override
Definition: ratexp_history.hh:82
void add_state(state_t s, const ratexp_t &expr)
set the history of state s
Definition: ratexp_history.hh:93
history_kind_t
The different kinds of history.
Definition: enums.hh:178
@ RATEXP
The state comes from a rational expression.
std::ostream & str_escape(std::ostream &os, const int c)
Definition: escape.hh:30
auto format(const ValueSet &vs, const typename ValueSet::value_t &v, Args &&... args) -> std::string
Format v via vs.print.
Definition: stream.hh:109
Main namespace of Awali.
Definition: ato.hh:22
unsigned state_t
Definition: types.hh:21