spot: Add 'langmap' option with dichotomy (it helps to choose min val)
* python/spot/__init__.py: Handle 'dicho' option in 'sat_minimize'. * spot/priv/satcommon.cc: Implement get_number_of_distinct_vals. * spot/priv/satcommon.hh: Declare get_number_of_distinct_vals. * spot/twaalgos/dtbasat.cc: Use get_number_of_distinct_vals. * spot/twaalgos/dtbasat.hh: Change dichotomy function's prototype. * spot/twaalgos/dtwasat.cc: Use get_number_of_distinct_vals. * spot/twaalgos/dtwasat.hh: Change dichotomy function's prototype. Handle options. * spot/twaalgos/postproc.cc: Handle options. * spot/twaalgos/postproc.hh: Add dicho_langmap_ var for options. * tests/core/satmin2.test: Add tests for dichotomy. * tests/core/satmin.test: Add tests for dichotomy. * tests/python/satmin.py: Replace 'dichotomy' with 'dicho' option.
This commit is contained in:
parent
7046a49622
commit
67e3a4f28e
12 changed files with 229 additions and 31 deletions
|
|
@ -858,7 +858,7 @@ for fun in ['remove_x', 'relabel', 'relabel_bse',
|
|||
# Better interface to the corresponding C++ function.
|
||||
def sat_minimize(aut, acc=None, colored=False,
|
||||
state_based=False, states=0,
|
||||
max_states=0, dichotomy=False,
|
||||
max_states=0, dicho=False,
|
||||
param=0, incr=False, assume=False):
|
||||
args=''
|
||||
if acc is not None:
|
||||
|
|
@ -875,8 +875,8 @@ def sat_minimize(aut, acc=None, colored=False,
|
|||
if type(max_states) is not int or max_states < 0:
|
||||
raise ValueError("argument 'states' should be a positive integer")
|
||||
args += ',max-states=' + str(max_states)
|
||||
if dichotomy:
|
||||
args += ',dichotomy'
|
||||
if dicho:
|
||||
args += ',dicho';
|
||||
if param:
|
||||
args += ',param=' + str(param)
|
||||
if incr:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue