Commit 266581b2 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

python: fix binding of used_inf_fin_sets()

* python/spot/impl.i: Here.
* tests/python/ Test it.
* NEWS: Mention the bug.
parent 234c9c29
Pipeline #4468 passed with stages
in 134 minutes and 23 seconds
......@@ -75,6 +75,11 @@ New in spot (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:
......@@ -447,6 +447,7 @@ namespace swig
namespace std {
%template(liststr) list<std::string>;
%template(pairunsigned) pair<unsigned, unsigned>;
%template(pairmark_t) pair<spot::acc_cond::mark_t, spot::acc_cond::mark_t>;
%template(vectorformula) vector<spot::formula>;
%template(vectorunsigned) vector<unsigned>;
%template(vectorpairunsigned) vector<pair<unsigned, unsigned>>;
......@@ -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]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment