spot 2.3.4

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

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Classes | Enumerations | Functions
TωA simplifications
TωA (Transition-based ω-Automata) » TωA algorithms

## Classes
class | spot::postprocessor
| Wrap TGBA/BA/Monitor post-processing algorithms in an easy interface. More...

## Enumerations
enum | output_type { TGBA, BA, Monitor, Generic }
enum | { Any = 0, Small = 1, Deterministic = 2, Complete = 4, SBAcc = 8, Unambiguous = 16 }
enum | optimization_level { Low, Medium, High }

## Functions
twa_graph_ptr | spot::minimize_monitor (const const_twa_graph_ptr &a)
| Construct a minimal deterministic monitor. More...
twa_graph_ptr | spot::minimize_wdba (const const_twa_graph_ptr &a)
| Minimize a Büchi automaton in the WDBA class. More...
twa_graph_ptr | spot::minimize_obligation (const const_twa_graph_ptr &aut_f, formula f=nullptr, const_twa_graph_ptr aut_neg_f=nullptr, bool reject_bigger=false)
| Minimize an automaton if it represents an obligation property. More...
twa_graph_ptr | spot::simulation (const const_twa_graph_ptr &automaton)
| Attempt to reduce the automaton by direct simulation. More...
twa_graph_ptr | spot::simulation (const const_twa_graph_ptr &automaton, std::vector< bdd > *implications)
twa_graph_ptr | spot::simulation_sba (const const_twa_graph_ptr &automaton)
twa_graph_ptr | spot::cosimulation (const const_twa_graph_ptr &automaton)
| Attempt to reduce the automaton by reverse simulation. More...
twa_graph_ptr | spot::cosimulation_sba (const const_twa_graph_ptr &automaton)
| Attempt to reduce the automaton by reverse simulation. More...
twa_graph_ptr | spot::iterated_simulations (const const_twa_graph_ptr &automaton)
| Iterate simulation() and cosimulation(). More...
twa_graph_ptr | spot::iterated_simulations_sba (const const_twa_graph_ptr &automaton)
| Iterate simulation() and cosimulation(). More...

## Detailed Description

## Function Documentation

twa_graph_ptr spot::cosimulation | ( | const const_twa_graph_ptr & | automaton | ) |

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

Attempt to reduce the automaton by reverse simulation.

When the prefixes (letter and acceptance conditions) leading to one state are included in the prefixes leading to one, the former state can be merged into the latter.

Reverse simulation is discussed in the following paper, but generalized to handle TωA directly.

    @InProceedings{ somenzi.00.cav,
      author        = {Fabio Somenzi and Roderick Bloem},
      title         = {Efficient {B\"u}chi Automata for {LTL} Formul{\ae}},
      booktitle     = {Proceedings of the 12th International Conference on
                       Computer Aided Verification (CAV'00)},
      pages         = {247--263},
      year          = {2000},
      volume        = {1855},
      series        = {Lecture Notes in Computer Science},
      address       = {Chicago, Illinois, USA},
      publisher     = {Springer-Verlag}
    }

Our reconstruction of the quotient automaton based on this prefix-inclusion relation will also improve codeterminism.

We recommend to call scc_filter() to first simplify the automaton that should be reduced by cosimulation.

Reducing an automaton by reverse simulation (1) does not change the number of acceptance conditions so the resulting automaton may have superfluous acceptance conditions, and (2) can create SCCs that are terminal and non-accepting. For these reasons, you should call scc_filer() to prune useless SCCs and acceptance conditions afterwards.

If you plan to run both simulation() and cosimulation() on the same automaton, you should start with simulation() so that the codeterminism improvements achieved by cosimulation() does not hinder the determinism improvements attempted by simulation(). (This of course assumes that you prefer determinism over codeterminism.)

Parameters

  automaton | the automaton to simulate.

Returns
  a new automaton which is at worst a copy of the received one

twa_graph_ptr spot::cosimulation_sba | ( | const const_twa_graph_ptr & | automaton | ) |

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

Attempt to reduce the automaton by reverse simulation.

When the prefixes (letter and acceptance conditions) leading to one state are included in the prefixes leading to one, the former state can be merged into the latter.

Reverse simulation is discussed in the following paper, but generalized to handle TωA directly.

    @InProceedings{ somenzi.00.cav,
      author        = {Fabio Somenzi and Roderick Bloem},
      title         = {Efficient {B\"u}chi Automata for {LTL} Formul{\ae}},
      booktitle     = {Proceedings of the 12th International Conference on
                       Computer Aided Verification (CAV'00)},
      pages         = {247--263},
      year          = {2000},
      volume        = {1855},
      series        = {Lecture Notes in Computer Science},
      address       = {Chicago, Illinois, USA},
      publisher     = {Springer-Verlag}
    }

Our reconstruction of the quotient automaton based on this prefix-inclusion relation will also improve codeterminism.

We recommend to call scc_filter() to first simplify the automaton that should be reduced by cosimulation.

Reducing an automaton by reverse simulation (1) does not change the number of acceptance conditions so the resulting automaton may have superfluous acceptance conditions, and (2) can create SCCs that are terminal and non-accepting. For these reasons, you should call scc_filer() to prune useless SCCs and acceptance conditions afterwards.

If you plan to run both simulation() and cosimulation() on the same automaton, you should start with simulation() so that the codeterminism improvements achieved by cosimulation() does not hinder the determinism improvements attempted by simulation(). (This of course assumes that you prefer determinism over codeterminism.)

Parameters

  automaton | the automaton to simulate.

Returns
  a new automaton which is at worst a copy of the received one

twa_graph_ptr spot::iterated_simulations | ( | const const_twa_graph_ptr & | automaton | ) |

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

Iterate simulation() and cosimulation().

Runs simulation(), cosimulation(), and scc_filter() in a loop, until the automaton does not change size (states and transitions).

We recommend to call scc_filter() to first simplify the automaton that should be reduced by iterated simulations, since this algorithm will only call scc_filter() at the end of the loop.

Parameters

  automaton | the automaton to simulate.

Returns
  a new automaton which is at worst a copy of the received one

twa_graph_ptr spot::iterated_simulations_sba | ( | const const_twa_graph_ptr & | automaton | ) |

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

Iterate simulation() and cosimulation().

Runs simulation(), cosimulation(), and scc_filter() in a loop, until the automaton does not change size (states and transitions).

We recommend to call scc_filter() to first simplify the automaton that should be reduced by iterated simulations, since this algorithm will only call scc_filter() at the end of the loop.

Parameters

  automaton | the automaton to simulate.

Returns
  a new automaton which is at worst a copy of the received one

twa_graph_ptr spot::minimize_monitor | ( | const const_twa_graph_ptr & | a | ) |

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

Construct a minimal deterministic monitor.

The automaton will be converted into minimal deterministic monitor. All useless SCCs should have been previously removed (using scc_filter() for instance). Then the automaton will be determinized and minimized using the standard DFA construction as if all states were accepting states.

For more detail about monitors, see the following paper:

    @InProceedings{          tabakov.10.rv,
      author         = {Deian Tabakov and Moshe Y. Vardi},
      title          = {Optimized Temporal Monitors for SystemC{$^*$}},
      booktitle = {Proceedings of the 10th International Conferance
                   on Runtime Verification},
      pages          = {436--451},
      year           = 2010,
      volume         = {6418},
      series         = {Lecture Notes in Computer Science},
      month          = nov,
      publisher = {Spring-Verlag}
    }

(Note: although the above paper uses Spot, this function did not exist in Spot at that time.)

Parameters

  a | the automaton to convert into a minimal deterministic monitor

Precondition
  Dead SCCs should have been removed from a before calling this function.

twa_graph_ptr spot::minimize_obligation | ( | const const_twa_graph_ptr & | aut_f,
|  | formula | f = `nullptr`,
|  | const_twa_graph_ptr | aut_neg_f = `nullptr`,
|  | bool | reject_bigger = `false`
| ) |  |

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

Minimize an automaton if it represents an obligation property.

This function attempts to minimize the automaton aut_f using the algorithm implemented in the minimize_wdba() function, and presented by the following paper:

    @InProceedings{          dax.07.atva,
      author    = {Christian Dax and Jochen Eisinger and Felix Klaedtke},
      title     = {Mechanizing the Powerset Construction for Restricted
                     Classes of {$\omega$}-Automata},
      year      = 2007,
      series    = {Lecture Notes in Computer Science},
      publisher = {Springer-Verlag},
      volume    = 4762,
      booktitle = {Proceedings of the 5th International Symposium on
                     Automated Technology for Verification and Analysis
                     (ATVA'07)},
      editor    = {Kedar S. Namjoshi and Tomohiro Yoneda and Teruo Higashino
                     and Yoshio Okamura},
      month     = oct
    }

Because it is hard to determine if an automaton corresponds to an obligation property, you should supply either the formula f expressed by the automaton aut_f, or aut_neg_f the negation of the automaton aut_neg_f.

Parameters

  aut_f | the automaton to minimize
  f | the LTL formula represented by the automaton aut_f
  aut_neg_f | an automaton representing the negation of aut_f
  reject_bigger | Whether the minimal WDBA should be discarded if it has more states than the input.

Returns
  a new tgba if the automaton could be minimized, aut_f if the automaton cannot be minimized, 0 if we do not know if the minimization is correct because neither f nor aut_neg_f were supplied.

The function proceeds as follows. If the formula f or the automaton aut can easily be proved to represent an obligation formula, then the result of `minimize(aut)` is returned. Otherwise, if aut_neg_f was not supplied but f was, aut_neg_f is built from the negation of f. Then we check that `product(aut,!minimize(aut_f))` and `product(aut_neg_f,minize(aut))` are both empty. If they are, the the minimization was sound. (See the paper for full details.)

If reject_bigger is set, this function will return the input automaton aut_f when the minimized WDBA has more states than the input automaton. (More states are possible because of determinization step during minimize_wdba().) Note that checking the size of the minimized WDBA occurs before ensuring that the minimized WDBA is correct.

twa_graph_ptr spot::minimize_wdba | ( | const const_twa_graph_ptr & | a | ) |

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

Minimize a Büchi automaton in the WDBA class.

This takes a TGBA whose language is representable by a Weak Deterministic Büchi Automaton, and construct a minimal WDBA for this language. This essentially chains three algorithms: determinization, acceptance adjustment (Löding's coloring algorithm), and minimization (using a Moore-like approache).

If the input automaton does not represent a WDBA language, the resulting automaton is still a WDBA, but it will not be equivalent to the original automaton. Use the minimize_obligation() function if you are not sure whether it is safe to call this function.

Please see the following paper for a discussion of this technique.

    @InProceedings{          dax.07.atva,
      author    = {Christian Dax and Jochen Eisinger and Felix Klaedtke},
      title     = {Mechanizing the Powerset Construction for Restricted
                     Classes of {$\omega$}-Automata},
      year      = 2007,
      series    = {Lecture Notes in Computer Science},
      publisher = {Springer-Verlag},
      volume    = 4762,
      booktitle = {Proceedings of the 5th International Symposium on
                     Automated Technology for Verification and Analysis
                     (ATVA'07)},
      editor    = {Kedar S. Namjoshi and Tomohiro Yoneda and Teruo Higashino
                     and Yoshio Okamura},
      month     = oct
    }

twa_graph_ptr spot::simulation | ( | const const_twa_graph_ptr & | automaton | ) |

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

Attempt to reduce the automaton by direct simulation.

When the suffixes (letter and acceptance conditions) reachable from one state are included in the suffixes seen by another one, the former state can be merged into the latter. The algorithm is based on the following paper, but generalized to handle TωA directly.

    @InProceedings{ etessami.00.concur,
      author        = {Kousha Etessami and Gerard J. Holzmann},
      title         = {Optimizing {B\"u}chi Automata},
      booktitle     = {Proceedings of the 11th International Conference on
                           Concurrency Theory (Concur'00)},
      pages         = {153--167},
      year          = {2000},
      editor        = {C. Palamidessi},
      volume        = {1877},
      series        = {Lecture Notes in Computer Science},
      address       = {Pennsylvania, USA},
      publisher     = {Springer-Verlag}
    }

Our reconstruction of the quotient automaton based on this suffix-inclusion relation will also improve determinism.

We recommend to call scc_filter() to first simplify the automaton that should be reduced by simulation.

Reducing an automaton by simulation does not change the number of acceptance conditions. In some rare cases (1 out of more than 500 in our benchmark), the reduced automaton will use more acceptance conditions than necessary, and running scc_filter() again afterwards will remove these superfluous conditions.

Parameters

  automaton | the automaton to simulate.

Returns
  a new automaton which is at worst a copy of the received one

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