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
|
|
@ -29,6 +29,9 @@ assert aut.is_deterministic()
|
|||
min1 = spot.sat_minimize(aut, acc='Rabin 1')
|
||||
assert min1.num_sets() == 2
|
||||
assert min1.num_states() == 2
|
||||
min1 = spot.sat_minimize(aut, acc='Rabin 1', dicho=True)
|
||||
assert min1.num_sets() == 2
|
||||
assert min1.num_states() == 2
|
||||
min1 = spot.sat_minimize(aut, acc='Rabin 1', assume=True)
|
||||
assert min1.num_sets() == 2
|
||||
assert min1.num_states() == 2
|
||||
|
|
@ -64,6 +67,9 @@ assert min1.num_sets() == 2
|
|||
assert min1.num_states() == 2
|
||||
|
||||
|
||||
min2 = spot.sat_minimize(aut, acc='Streett 2', dicho=True)
|
||||
assert min2.num_sets() == 4
|
||||
assert min2.num_states() == 1
|
||||
min2 = spot.sat_minimize(aut, acc='Streett 2', assume=True)
|
||||
assert min2.num_sets() == 4
|
||||
assert min2.num_states() == 1
|
||||
|
|
@ -100,7 +106,7 @@ assert min2.num_states() == 1
|
|||
|
||||
|
||||
min3 = spot.sat_minimize(aut, acc='Rabin 2',
|
||||
state_based=True, max_states=5, dichotomy=True)
|
||||
state_based=True, max_states=5, dicho=True)
|
||||
assert min3.num_sets() == 4
|
||||
assert min3.num_states() == 3
|
||||
min3 = spot.sat_minimize(aut, acc='Rabin 2',
|
||||
|
|
@ -150,7 +156,7 @@ assert min3.num_states() == 3
|
|||
|
||||
|
||||
min4 = spot.sat_minimize(aut, acc='parity max odd 3',
|
||||
colored=True, dichotomy=True)
|
||||
colored=True, dicho=True)
|
||||
assert min4.num_sets() == 3
|
||||
assert min4.num_states() == 2
|
||||
min4 = spot.sat_minimize(aut, acc='parity max odd 3',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue