diff --git a/wrap/python/ajax/spot.in b/wrap/python/ajax/spot.in index 6877b47c6..642e80b57 100755 --- a/wrap/python/ajax/spot.in +++ b/wrap/python/ajax/spot.in @@ -325,14 +325,14 @@ def print_stats(automaton, detinfo = False, ta = False): 's' if stats.transitions > 1 else '', stats.sub_transitions, 's' if stats.sub_transitions > 1 else '')) - if hasattr(automaton, 'number_of_acceptance_conditions'): - count = automaton.number_of_acceptance_conditions() + if hasattr(automaton, 'acc'): + count = automaton.acc().num_sets() if count > 0: unbufprint(", %d acceptance condition" % count) if count > 1: unbufprint("s") - acc = automaton.all_acceptance_conditions() - unbufprint(": " + spot.bdd_format_accset(automaton.get_dict(), acc)) + unbufprint(": " + + automaton.acc().format(automaton.acc().all_sets())) else: unbufprint(", no acceptance condition (all cycles are accepting)") unbufprint("
\n") @@ -780,7 +780,7 @@ if output_type == 'r': ec = 0 else: ec_a = 0 - n_acc = degen.number_of_acceptance_conditions() + n_acc = degen.acc().num_sets() n_max = eci.max_acceptance_conditions() n_min = eci.min_acceptance_conditions() if (n_acc <= n_max): diff --git a/wrap/python/spot.i b/wrap/python/spot.i index 5d14a7a91..4e0b19c33 100644 --- a/wrap/python/spot.i +++ b/wrap/python/spot.i @@ -105,6 +105,7 @@ namespace std { #include "tgba/bddprint.hh" #include "tgba/fwd.hh" +#include "tgba/acc.hh" #include "tgba/tgba.hh" #include "tgba/taatgba.hh" #include "tgba/tgbaproduct.hh" @@ -226,6 +227,8 @@ using namespace spot; #define ltl spot::ltl %include "tgba/bddprint.hh" %include "tgba/fwd.hh" +%feature("flatnested") spot::acc_cond::mark_t; +%include "tgba/acc.hh" %include "tgba/tgba.hh" %include "tgba/taatgba.hh" %include "tgba/tgbaproduct.hh" @@ -359,6 +362,15 @@ empty_tgba_parse_error_list() return l; } +spot::tgba_digraph_ptr +ensure_digraph(const spot::tgba_ptr& a) +{ + auto aa = std::dynamic_pointer_cast