Moved IAR and the new version of to_parity in toparity.cc

* python/spot/__init__.py: Use keyword arguments in to_parity()
* python/spot/impl.i: remove useless includes.
* spot/twaalgos/car.cc, spot/twaalgos/car.hh,
spot/twaalgos/rabin2parity.cc, spot/twaalgos/rabin2parity.hh,
tests/Makefile.am, spot/twaalgos/Makefile.am:
content moved to toparity.
* spot/twaalgos/postproc.cc: Use the new version of to_parity in
postprocessor::run.
* spot/twaalgos/toparity.cc, spot/twaalgos/toparity.hh: Add the
content of rabin2parity and car.
* tests/python/car.py, tests/python/toparity.py: Moved all tests
from car.py to toparity.py.
* tests/python/except.py: Change iar() to iar_old().
This commit is contained in:
Florian Renkin 2020-03-16 16:20:07 +01:00
parent dddc7920e4
commit 75990063f0
14 changed files with 2027 additions and 2105 deletions

View file

@ -1290,3 +1290,30 @@ class scc_and_mark_filter:
def __exit__(self, exc_type, exc_value, traceback):
self.restore_acceptance()
def to_parity(aut, **kwargs):
option = car_option()
if "search_ex" in kwargs:
option.search_ex = kwargs.get("search_ex")
if "use_last" in kwargs:
option.use_last = kwargs.get("use_last")
if "force_order" in kwargs:
option.force_order = kwargs.get("force_order")
if "partial_degen" in kwargs:
option.partial_degen = kwargs.get("partial_degen")
if "acc_clean" in kwargs:
option.acc_clean = kwargs.get("acc_clean")
if "parity_equiv" in kwargs:
option.parity_equiv = kwargs.get("parity_equiv")
if "parity_prefix" in kwargs:
option.parity_prefix = kwargs.get("parity_prefix")
if "rabin_to_buchi" in kwargs:
option.rabin_to_buchi = kwargs.get("rabin_to_buchi")
if "reduce_col_deg" in kwargs:
option.reduce_col_deg = kwargs.get("reduce_col_deg")
if "propagate_col" in kwargs:
option.propagate_col = kwargs.get("propagate_col")
if "pretty_print" in kwargs:
option.pretty_print = kwargs.get("pretty_print")
return impl.to_parity(aut, option)

View file

@ -160,9 +160,7 @@
#include <spot/twaalgos/relabel.hh>
#include <spot/twaalgos/word.hh>
#include <spot/twaalgos/are_isomorphic.hh>
#include <spot/twaalgos/rabin2parity.hh>
#include <spot/twaalgos/toparity.hh>
#include <spot/twaalgos/car.hh>
#include <spot/parseaut/public.hh>
@ -682,9 +680,7 @@ def state_is_accepting(self, src) -> "bool":
%include <spot/twaalgos/word.hh>
%template(list_bdd) std::list<bdd>;
%include <spot/twaalgos/are_isomorphic.hh>
%include <spot/twaalgos/rabin2parity.hh>
%include <spot/twaalgos/toparity.hh>
%include <spot/twaalgos/car.hh>
%pythonprepend spot::twa::dtwa_complement %{
from warnings import warn