spot 2.15
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
spot::twa::prop_set Struct Reference

A structure for selecting a set of automaton properties to copy. More...

#include <spot/twa/twa.hh>

Collaboration diagram for spot::twa::prop_set:

Public Member Functions

 prop_set (bool state_based, bool inherently_weak, bool deterministic, bool improve_det, bool complete, bool stutter_inv)
 
 prop_set (bool state_based, bool inherently_weak, bool deterministic, bool improve_det, bool stutter_inv)
 

Static Public Member Functions

static prop_set all ()
 An all-true prop_set.
 

Public Attributes

bool state_based
 preserve state-based acceptance
 
bool inherently_weak
 preserve inherently weak, weak, & terminal
 
bool deterministic
 preserve deterministic, semi-det, unambiguous
 
bool improve_det
 improve deterministic, semi-det, unambiguous
 
bool complete
 preserve completeness
 
bool stutter_inv
 preserve stutter invariance
 

Detailed Description

A structure for selecting a set of automaton properties to copy.

When an algorithm copies an automaton before making some modification on that automaton, it should use a prop_set structure to indicate which properties should be copied from the original automaton.

This structure does not list all supported properties, because properties are copied by groups of related properties. For instance if an algorithm breaks the "inherent_weak" properties, it usually also breaks the "weak" and "terminal" properties.

Set the flags to true to copy the value of the original property, and to false to ignore the original property (leaving the property of the new automaton to its default value, which is trival::maybe()).

This can be used for instance as:

aut->prop_copy(other_aut, {true, false, false, false, false, true});

This would copy the "state-based acceptance" and "stutter invariant" properties from other_aut to aut.

There are two flags for the determinism. If deterministic is set, the universal, semi-deterministic, and unambiguous properties are copied as-is. If deterministic is unset but improve_det is set, then those properties are only copied if they are positive.

The reason there is no default value for these flags is that whenever we add a new property that does not fall into any of these groups, we will be forced to review all algorithms to decide if the property should be preserved or not.

See also
make_twa_graph_ptr
prop_copy

Member Function Documentation

◆ all()

static prop_set spot::twa::prop_set::all ( )
inlinestatic

An all-true prop_set.

Use that only in algorithms that copy an automaton without performing any modification.

If an algorithm X does modifications, but preserves all the properties currently implemented, use an explicit

{true, true, true, true, true, true}

instead of calling all(). This way, the day a new property is added, we will still be forced to review algorithm X, in case that new property is not preserved.

Member Data Documentation

◆ complete

bool spot::twa::prop_set::complete

preserve completeness

Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().

◆ deterministic

bool spot::twa::prop_set::deterministic

preserve deterministic, semi-det, unambiguous

Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().

◆ improve_det

bool spot::twa::prop_set::improve_det

improve deterministic, semi-det, unambiguous

Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().

◆ inherently_weak

bool spot::twa::prop_set::inherently_weak

preserve inherently weak, weak, & terminal

Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().

◆ state_based

bool spot::twa::prop_set::state_based

preserve state-based acceptance

Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().

◆ stutter_inv

bool spot::twa::prop_set::stutter_inv

preserve stutter invariance

Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().


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

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Feb 27 2015 10:00:07 for spot by doxygen 1.9.8