|
spot 2.15
|
A structure for selecting a set of automaton properties to copy. More...
#include <spot/twa/twa.hh>
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 | |
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:
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.
|
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
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.
| bool spot::twa::prop_set::complete |
preserve completeness
Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().
| bool spot::twa::prop_set::deterministic |
preserve deterministic, semi-det, unambiguous
Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().
| bool spot::twa::prop_set::improve_det |
improve deterministic, semi-det, unambiguous
Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().
| bool spot::twa::prop_set::inherently_weak |
preserve inherently weak, weak, & terminal
Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().
| bool spot::twa::prop_set::state_based |
preserve state-based acceptance
Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().
| bool spot::twa::prop_set::stutter_inv |
preserve stutter invariance
Referenced by spot::twa::prop_copy(), and spot::twa::prop_keep().
1.9.8