parity: add spot::parity_product()

Compute the synchronized product of two parity automata, this product
keeps the parity acceptance.

* spot/twaalgos/parity.cc, spot/twaalgos/parity.hh: Here
* tests/core/parity.cc: Add tests for spot::parity_product()
This commit is contained in:
Laurent XU 2017-02-15 00:25:11 +01:00
parent 3e650f18d9
commit b92320cc33
3 changed files with 286 additions and 0 deletions

View file

@ -130,5 +130,22 @@ namespace spot
SPOT_API twa_graph_ptr
colorize_parity_here(twa_graph_ptr aut, bool keep_style = false);
/// @}
/// \brief Construct a product performing the intersection 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 product, which is a parity automaton
SPOT_API twa_graph_ptr
parity_product(const const_twa_graph_ptr& left,
const const_twa_graph_ptr& right);
/// @}
}