autfilt: add highlighting options for nondeterminism

Fixes #123.

* bin/autfilt.cc: Add options --highlight-nondet-states=NUM,
 --highlight-nondet-edges=NUM, and  --highlight-nondet=NUM.
* spot/twaalgos/isdet.cc,
spot/twaalgos/isdet.hh (highlight_nondet_states,
highlight_nondet_edges): New functions.
* tests/core/det.test: Add test cases.
* NEWS: Mention them.
This commit is contained in:
Alexandre Duret-Lutz 2016-07-18 13:12:58 +02:00
parent 39332fb118
commit b6cd54ab16
5 changed files with 186 additions and 5 deletions

View file

@ -46,12 +46,32 @@ namespace spot
SPOT_API bool
is_deterministic(const const_twa_graph_ptr& aut);
/// \brief Highlight nondeterministic states
///
/// A state is nondeterministic if it has two outgoing edges whose
/// labels are not incompatibles.
///
/// \param aut the automaton to process
/// \param color the color to give to nondeterministic states.
SPOT_API void
highlight_nondet_states(twa_graph_ptr& aut, unsigned color);
/// \brief Highlight nondeterministic edges
///
/// An edge is nondeterministic if there exist another edge leaving
/// the same source state, with a compatible label (i.e., the
/// conjunction of the two labels is not false).
///
/// \param aut the automaton to process
/// \param color the color to give to nondeterministic edges.
SPOT_API void
highlight_nondet_edges(twa_graph_ptr& aut, unsigned color);
/// @}
/// \brief Return true iff \a aut is complete.
///
/// An automaton is complete if its translation relation is total,
/// i.e., each state as a successor for any possible configuration.
SPOT_API bool
is_complete(const const_twa_graph_ptr& aut);
/// @}
}