tgba_complete: rename as complete and export in Python
* src/twaalgos/complete.cc, src/twaalgos/complete.hh (tgba_complete, tgba_complete_here): Rename as... (complete, complete_here): ... these. Also fix useless output of acceptance marks on transition leading to the sink when the automaton does not use state-based acceptance. * src/tests/ikwiad.cc, src/twaalgos/dtgbacomp.cc, src/twaalgos/dtgbasat.cc, src/twaalgos/postproc.cc, src/twaalgos/product.cc: Adjust. * wrap/python/spot_impl.i: Export these function. * wrap/python/tests/automata.ipynb: Test spot.complete().
This commit is contained in:
parent
afe5b2a1c0
commit
5e07e8384d
9 changed files with 257 additions and 37 deletions
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
namespace spot
|
||||
{
|
||||
unsigned tgba_complete_here(twa_graph_ptr aut)
|
||||
unsigned complete_here(twa_graph_ptr aut)
|
||||
{
|
||||
unsigned n = aut->num_states();
|
||||
unsigned sink = -1U;
|
||||
|
|
@ -104,6 +104,8 @@ namespace spot
|
|||
}
|
||||
// In case the automaton use state-based acceptance, propagate
|
||||
// the acceptance of the first edge to the one we add.
|
||||
if (!aut->has_state_based_acc())
|
||||
acc = 0U;
|
||||
aut->new_edge(i, sink, missingcond, acc);
|
||||
}
|
||||
}
|
||||
|
|
@ -117,7 +119,7 @@ namespace spot
|
|||
return sink;
|
||||
}
|
||||
|
||||
twa_graph_ptr tgba_complete(const const_twa_ptr& aut)
|
||||
twa_graph_ptr complete(const const_twa_ptr& aut)
|
||||
{
|
||||
auto res = make_twa_graph(aut, {
|
||||
true, // state based
|
||||
|
|
@ -125,7 +127,7 @@ namespace spot
|
|||
true, // deterministic
|
||||
true, // stutter inv.
|
||||
});
|
||||
tgba_complete_here(res);
|
||||
complete_here(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue