introduce partitioned_relabel_here

Function taking an automaton and trying to relabel
it by partitioning the old conditions and encode the
different subsets of the partition with new variables

* spot/priv/Makefile.am: Add
* spot/priv/partitioned_relabel.hh
, spot/priv/partitioned_relabel.cc: try_partition_me,
computes the partition of a given vector of bdds
* spot/twaalgos/relabel.hh
, spot/twaalgos/relabel.cc: Here. Adapt also relabel()
to cope with the different type of relabeling_maps
* tests/python/_partitioned_relabel.ipynb
, tests/python/except.py: Test and Usage
* tests/Makefile.am: Add test
This commit is contained in:
Philipp Schlehuber-Caissier 2022-11-29 14:01:45 +01:00
parent b02d8328ee
commit fb63dfc309
8 changed files with 1920 additions and 44 deletions

View file

@ -436,6 +436,7 @@ TESTS_python = \
python/origstate.py \
python/otfcrash.py \
python/parsetgba.py \
python/_partitioned_relabel.ipynb \
python/parity.py \
python/pdegen.py \
python/prodexpt.py \

File diff suppressed because it is too large Load diff

View file

@ -359,3 +359,18 @@ except RuntimeError as e:
tc.assertIn(filename, str(e))
else:
report_missing_exception()
# Relabeling must use new variables
aut = spot.make_twa_graph()
aut.new_states(2)
ap = buddy.bdd_ithvar(aut.register_ap("__nv0"))
aut.new_edge(0,1,ap)
try:
spot.partitioned_relabel_here(aut)
except RuntimeError as e:
tc.assertIn("The given prefix for new variables",
str(e))
else:
report_missing_exception()