python: add bindings for BuDDy's minterms_of

minterms_of was introduced in BuDDy with Spot 2.10, but
wasn't properly binded in Python.

* python/buddy.i: Add bindings.
* tests/python/bdditer.py: Test them.
This commit is contained in:
Alexandre Duret-Lutz 2024-03-11 17:38:52 +01:00
parent 0d4e93a4ec
commit 75e552fdac
2 changed files with 107 additions and 0 deletions

View file

@ -65,6 +65,12 @@ del res2
del c
gcollect()
res3 = []
for i in buddy.minterms_of(buddy.bddtrue, run.aut.ap_vars()):
res3.append(str(spot.bdd_to_formula(i)))
tc.assertEqual(res3, ['!a & !b', '!a & b', 'a & !b', 'a & b'])
gcollect()
f = spot.bdd_to_formula(b)
tc.assertTrue(f._is(spot.op_And))
tc.assertTrue(f[0]._is(spot.op_ap))