product: add product_xor() and product_xnor()
* spot/twaalgos/product.cc, spot/twaalgos/product.hh: Add those functions. * tests/python/_product_weak.ipynb, tests/python/except.py: Test them. * NEWS: Mention them.
This commit is contained in:
parent
a78137f9d4
commit
3ab2dd17a7
5 changed files with 8975 additions and 200 deletions
|
|
@ -188,3 +188,32 @@ except ValueError as e:
|
|||
assert 'any' in s
|
||||
else:
|
||||
report_missing_exception()
|
||||
|
||||
a1 = spot.translate('FGa')
|
||||
a2 = spot.translate('Gb')
|
||||
assert not spot.is_deterministic(a1)
|
||||
assert spot.is_deterministic(a2)
|
||||
try:
|
||||
spot.product_xor(a1, a2)
|
||||
except RuntimeError as e:
|
||||
assert "product_xor() only works with deterministic automata"
|
||||
else:
|
||||
report_missing_exception()
|
||||
try:
|
||||
spot.product_xor(a2, a1)
|
||||
except RuntimeError as e:
|
||||
assert "product_xor() only works with deterministic automata"
|
||||
else:
|
||||
report_missing_exception()
|
||||
try:
|
||||
spot.product_xnor(a1, a2)
|
||||
except RuntimeError as e:
|
||||
assert "product_xnor() only works with deterministic automata"
|
||||
else:
|
||||
report_missing_exception()
|
||||
try:
|
||||
spot.product_xnor(a2, a1)
|
||||
except RuntimeError as e:
|
||||
assert "product_xnor() only works with deterministic automata"
|
||||
else:
|
||||
report_missing_exception()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue