parity: add spot::parity_product_or()
parity_product_or constructs the sum of two parity automata and it keeps the parity. * spot/twaalgos/parity.cc, spot/twaalgos/parity.hh: Here. * tests/core/parity.cc: Add tests here.
This commit is contained in:
parent
192fb6c1e7
commit
7a11842613
3 changed files with 81 additions and 22 deletions
|
|
@ -147,5 +147,22 @@ namespace spot
|
|||
SPOT_API twa_graph_ptr
|
||||
parity_product(const const_twa_graph_ptr& left,
|
||||
const const_twa_graph_ptr& right);
|
||||
|
||||
/// \brief Construct a product performing the union of two automata
|
||||
/// with parity acceptance and keeping their parity acceptance
|
||||
///
|
||||
/// This is based on an algorithm introduced by Olivier Carton (Theoretical
|
||||
/// Computer Science 161, 1-2 (1996)). The output is a parity max even
|
||||
/// automaton. The inputs must be automata with a parity acceptance, otherwise
|
||||
/// an invalid_argument exception is thrown.
|
||||
///
|
||||
/// \param left the first automaton
|
||||
///
|
||||
/// \param right the second automaton
|
||||
///
|
||||
/// \result the sum which is a parity automaton
|
||||
SPOT_API twa_graph_ptr
|
||||
parity_product_or(const const_twa_graph_ptr& left,
|
||||
const const_twa_graph_ptr& right);
|
||||
/// @}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue