spot 2.3.1

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Classes | Public Types | Public Member Functions | Public Attributes | Friends | List of all members
spot::twa_run Struct Referencefinal
TωA (Transition-based ω-Automata) » TωA algorithms » Emptiness-checks » TωA runs and supporting functions

An accepted run, for a twa. More...

`#include <spot/twaalgos/emptiness.hh>`

Collaboration diagram for spot::twa_run:

## Classes
struct | step

## Public Types
typedef std::list< step > | steps

## Public Member Functions
| twa_run (const const_twa_ptr &aut)
| twa_run (const twa_run &run)
twa_run & | operator= (const twa_run &run)
twa_run_ptr | reduce () const
| Reduce an accepting run. More...
twa_run_ptr | project (const const_twa_ptr &other, bool right=false)
| Project an accepting run. More...
bool | replay (std::ostream &os, bool debug=false) const
| Replay a run. More...
void | highlight (unsigned color)
| Highlight the accepting run on the automaton. More...
twa_graph_ptr | as_twa (bool preserve_names=false) const
| Return a twa_graph_ptr corresponding to run. More...

## Public Attributes
steps | prefix
steps | cycle
const_twa_ptr | aut

## Friends
std::ostream & | operator<< (std::ostream &os, const twa_run &run)
| Display a twa_run. More...

## Detailed Description

An accepted run, for a twa.

## Member Function Documentation

twa_graph_ptr spot::twa_run::as_twa | ( | bool | preserve_names = `false` | ) | const

Return a twa_graph_ptr corresponding to run.

Identical states are merged.

If preserve_names is set, the created states are named using the format_state() result from the original state.

void spot::twa_run::highlight | ( | unsigned | color | ) |

Highlight the accepting run on the automaton.

Note that this works only if the automaton is a twa_graph_ptr.

twa_run_ptr spot::twa_run::project | ( | const const_twa_ptr & | other,
|  | bool | right = `false`
| ) |  |

Project an accepting run.

This only works if the automaton associated to this run has been created with otf_product() or product(), and other is one of the two operands of the product.

Use the right Boolean to specify whether other was a left or right operand.

twa_run_ptr spot::twa_run::reduce | ( |  | ) | const

Reduce an accepting run.

Return a run which is still accepting for `aut`, but is no longer than this one.

bool spot::twa_run::replay | ( | std::ostream & | os,
|  | bool | debug = `false`
| ) |  | const

Replay a run.

This is similar to `os << run;`, except that the run is actually replayed on the automaton while it is printed. The output will stop if the run cannot be completed.

Parameters

  os | the stream on which the replay should be traced
  debug | if set the output will be more verbose and extra debugging informations will be output on failure

Returns
  true iff the run could be completed

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
|  | const twa_run & | run
| ) |  |
| friend

Display a twa_run.

Output the prefix and cycle parts of the twa_run run on os.

The automaton object (stored by run) is used only to format the states, and to know how to print the BDDs describing the conditions and acceptance conditions of the run; it is not used to replay the run. In other words this function will work even if the twa_run you are trying to print appears to connect states that are not connected.

This is unlike replay_twa_run(), which will ensure the run actually exists in the automaton (and will also display any transition annotation).

The documentation for this struct was generated from the following file:

- spot/twaalgos/emptiness.hh

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.