adjust to Swig 4.1.0
* python/spot/__init__.py: Add flatnested versions of some static methods. * spot/twa/acc.hh: Hide && version of & and |, causing trouble to swig. * tests/python/_synthesis.ipynb, tests/python/synthesis.ipynb: Upgrade expected type names. * tests/python/ipnbdoctest.py: Adjust for difference between 4.0 and 4.1.
This commit is contained in:
parent
6dc740184c
commit
b36cee06a1
5 changed files with 27 additions and 15 deletions
|
|
@ -104,19 +104,22 @@ def setup(**kwargs):
|
|||
os.environ['SPOT_DOTDEFAULT'] = d
|
||||
|
||||
|
||||
# In version 3.0.2, Swig puts strongly typed enum in the main
|
||||
# namespace without prefixing them. Latter versions fix this. So we
|
||||
# can remove for following hack once 3.0.2 is no longer used in our
|
||||
# build farm.
|
||||
if 'op_ff' not in globals():
|
||||
# Swig versions prior to 4.1.0 export formula.X as formula_X as well,
|
||||
# for all operators. Swig 4.1.0 stops doing this, breaking some
|
||||
# existing code.
|
||||
if 'formula_ff' not in globals():
|
||||
for i in ('ff', 'tt', 'eword', 'ap', 'Not', 'X', 'F', 'G',
|
||||
'Closure', 'NegClosure', 'NegClosureMarked',
|
||||
'Xor', 'Implies', 'Equiv', 'U', 'R', 'W', 'M',
|
||||
'EConcat', 'EConcatMarked', 'UConcat', 'Or',
|
||||
'OrRat', 'And', 'AndRat', 'AndNLM', 'Concat',
|
||||
'Fusion', 'Star', 'FStar'):
|
||||
globals()['op_' + i] = globals()[i]
|
||||
del globals()[i]
|
||||
'Fusion', 'Star', 'FStar', 'nested_unop_range',
|
||||
'sugar_goto', 'sugar_equal', 'sugar_delay', 'unop',
|
||||
'binop', 'bunop', 'multop', 'first_match', 'unbounded'):
|
||||
globals()['formula_' + i] = formula.__dict__[i].__func__
|
||||
if 'trival_maybe' not in globals():
|
||||
for i in ('maybe',):
|
||||
globals()['trival_' + i] = trival.__dict__[i].__func__
|
||||
|
||||
|
||||
# Global BDD dict so that we do not have to create one in user code.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue