25#include <spot/misc/optionmap.hh>
26#include <spot/twa/twagraph.hh>
27#include <spot/twaalgos/emptiness_stats.hh>
143 public std::enable_shared_from_this<emptiness_check>
211 typedef std::shared_ptr<emptiness_check_instantiator>
391 : s(s), label(label), acc(acc)
456 bool replay(std::ostream& os,
bool debug =
false)
const;
Emptiness-check statistics.
Definition emptiness_stats.hh:62
Dynamically create emptiness checks. Given their name and options.
Definition emptiness.hh:216
emptiness_check_instantiator(option_map o, void *i)
Construct an instantiator from options and implementation info.
emptiness_check_ptr instantiate(const const_twa_ptr &a) const
Actually instantiate the emptiness check, for a.
void * info_
Opaque pointer to implementation-specific data.
Definition emptiness.hh:250
option_map o_
The options.
Definition emptiness.hh:249
option_map & options()
Definition emptiness.hh:230
unsigned int min_sets() const
Minimum number of acceptance sets supported by the emptiness check.
const option_map & options() const
Definition emptiness.hh:224
unsigned int max_sets() const
Maximum number of acceptance conditions supported by the emptiness check.
The result of an emptiness check.
Definition emptiness.hh:82
virtual const unsigned_statistics * statistics() const
Return statistics, if available.
virtual void options_updated(const option_map &old)
Notify option updates.
option_map o_
The options.
Definition emptiness.hh:135
virtual twa_run_ptr accepting_run()
Return a run accepted by the automaton passed to the emptiness check.
const option_map & options() const
Return the options parameterizing how the accepting run is computed.
Definition emptiness.hh:119
const char * parse_options(char *options)
Modify the algorithm options.
const_twa_ptr a_
The automaton.
Definition emptiness.hh:134
const const_twa_ptr & automaton() const
The automaton on which an accepting_run() was found.
Definition emptiness.hh:112
emptiness_check_result(const const_twa_ptr &a, option_map o=option_map())
Construct a result for the given automaton and options.
Definition emptiness.hh:85
Common interface to emptiness check algorithms.
Definition emptiness.hh:144
const_twa_ptr a_
The automaton.
Definition emptiness.hh:202
const const_twa_ptr & automaton() const
The automaton that this emptiness-check inspects.
Definition emptiness.hh:155
option_map o_
The options.
Definition emptiness.hh:203
emptiness_check(const const_twa_ptr &a, option_map o=option_map())
Construct an emptiness check for the given automaton and options.
Definition emptiness.hh:147
virtual bool safe() const
Return false iff accepting_run() can return 0 for non-empty automata.
virtual const ec_statistics * emptiness_check_statistics() const
Return emptiness check statistics, if available.
virtual const unsigned_statistics * statistics() const
Return statistics, if available.
const option_map & options() const
Return the options parameterizing how the emptiness check is realized.
Definition emptiness.hh:162
virtual void options_updated(const option_map &old)
Notify option updates.
virtual std::ostream & print_stats(std::ostream &os) const
Print statistics, if any.
const char * parse_options(char *options)
Modify the algorithm options.
virtual emptiness_check_result_ptr check()=0
Check whether the automaton contains an accepting run.
Manage a map of options.
Definition optionmap.hh:34
Abstract class for states.
Definition twa.hh:49
std::shared_ptr< emptiness_check > emptiness_check_ptr
Shared pointer to emptiness_check.
Definition emptiness.hh:207
std::shared_ptr< emptiness_check_result > emptiness_check_result_ptr
Shared pointer to emptiness_check_result.
Definition emptiness.hh:139
emptiness_check_instantiator_ptr make_emptiness_check_instantiator(const char *name, const char **err)
Create an emptiness-check instantiator, given the name of an emptiness check.
std::shared_ptr< emptiness_check_instantiator > emptiness_check_instantiator_ptr
Shared pointer to emptiness_check_instantiator.
Definition emptiness.hh:212
std::shared_ptr< twa_run > twa_run_ptr
Shared pointer to a twa_run.
Definition twa.hh:41
std::shared_ptr< const twa > const_twa_ptr
Shared pointer to a const twa.
Definition fwd.hh:36
std::shared_ptr< twa_graph > twa_graph_ptr
Shared pointer to a mutable twa_graph.
Definition fwd.hh:44
Definition automata.hh:26
std::shared_ptr< const twa_run > const_twa_run_ptr
Shared pointer to const twa_run.
Definition emptiness.hh:34
An acceptance mark.
Definition acc.hh:76
A single step in a TωA run, pairing a state with an edge label and acceptance marks.
Definition emptiness.hh:384
const state * s
Source state.
Definition emptiness.hh:385
acc_cond::mark_t acc
Acceptance marks on the transition.
Definition emptiness.hh:387
bdd label
Transition label.
Definition emptiness.hh:386
step(const state *s, bdd label, acc_cond::mark_t acc) noexcept
Construct a step from a state, label, and acceptance marks.
Definition emptiness.hh:390
An accepted run, for a twa.
Definition emptiness.hh:381
void highlight(unsigned color)
Highlight the accepting run on the automaton.
twa_run_ptr project(const const_twa_ptr &other, bool right=false)
Project an accepting run.
steps prefix
The prefix part of the run.
Definition emptiness.hh:399
void ensure_non_empty_cycle(const char *where) const
Raise an exception if the cycle is empty.
steps cycle
The cycle part of the run.
Definition emptiness.hh:400
twa_graph_ptr as_twa(bool preserve_names=false) const
Convert the run into a lasso-shaped automaton.
twa_run(const twa_run &run)
Copy constructor.
const_twa_ptr aut
The automaton this run is associated with.
Definition emptiness.hh:401
twa_run_ptr reduce() const
Reduce an accepting run.
friend std::ostream & operator<<(std::ostream &os, const twa_run &run)
Display a twa_run.
twa_run & operator=(const twa_run &run)
Copy-assignment operator.
std::list< step > steps
Ordered sequence of run steps.
Definition emptiness.hh:397
bool replay(std::ostream &os, bool debug=false) const
Replay a run.
twa_run(const const_twa_ptr &aut) noexcept
Construct an empty run for the given automaton.
Definition emptiness.hh:405
Interface for retrieving unsigned integer statistics from an emptiness check.
Definition emptiness_stats.hh:34