gen: hide ks_cobuchi(), introduce aut_pattern()

* spot/gen/automata.hh, spot/gen/automata.cc: Hide ks_cobuchi() behind
introduce aut_pattern(), as we have already done for the formulas.
* bin/genaut.cc: Simplify using this interface.
* python/spot/gen.i: Introduce aut_patterns().
* tests/python/gen.ipynb, tests/python/gen.py: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2017-04-27 11:47:19 +02:00
parent ca7f72bb4b
commit 11ca2803c9
6 changed files with 216 additions and 122 deletions

View file

@ -24,7 +24,7 @@
import spot.gen as gen
from sys import exit
k2 = gen.ks_cobuchi(2)
k2 = gen.aut_pattern(gen.AUT_KS_COBUCHI, 2)
assert k2.prop_state_acc()
assert k2.num_states() == 5
# to_str is defined in the spot package, so this makes sure
@ -32,7 +32,7 @@ assert k2.num_states() == 5
assert 'to_str' in dir(k2)
try:
gen.ks_cobuchi(0)
gen.aut_pattern(gen.AUT_KS_COBUCHI, 0)
except RuntimeError as e:
assert 'positive argument' in str(e)
else: