diff --git a/NEWS b/NEWS index 29f6afedd..e97201bc0 100644 --- a/NEWS +++ b/NEWS @@ -75,6 +75,11 @@ New in spot 2.6.3.dev (not yet released) used to check whether a formula or an automaton represents a liveness property. + Bugs fixed: + + - The pair of acc_cond::mark_t returned by + acc_code::used_inf_fin_sets() was not usable in Python. + New in spot 2.6.3 (2018-10-17) Bugs fixed: diff --git a/python/spot/impl.i b/python/spot/impl.i index 6bc5af3c3..05c08f77f 100644 --- a/python/spot/impl.i +++ b/python/spot/impl.i @@ -447,6 +447,7 @@ namespace swig namespace std { %template(liststr) list; %template(pairunsigned) pair; + %template(pairmark_t) pair; %template(vectorformula) vector; %template(vectorunsigned) vector; %template(vectorpairunsigned) vector>; diff --git a/tests/python/setacc.py b/tests/python/setacc.py index e3402cc34..e3bb62111 100644 --- a/tests/python/setacc.py +++ b/tests/python/setacc.py @@ -18,10 +18,21 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Test case reduced from a report from Juraj Major . import spot + + +# Test case reduced from a report from Juraj Major . a = spot.make_twa_graph(spot._bdd_dict) a.set_acceptance(0, spot.acc_code("t")) assert(a.prop_state_acc() == True); a.set_acceptance(1, spot.acc_code("Fin(0)")) assert(a.prop_state_acc() == spot.trival.maybe()); + + +# Some tests for used_inf_fin_sets(), which return a pair of mark_t. +(inf, fin) = a.get_acceptance().used_inf_fin_sets() +assert inf == [] +assert fin == [0] +(inf, fin) = spot.acc_code("(Fin(0)|Inf(1))&Fin(2)&Inf(0)").used_inf_fin_sets() +assert inf == [0,1] +assert fin == [0,2]