Commit 61b0a542 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

postproc: add support for co-Büchi output

* spot/twaalgos/cobuchi.cc, spot/twaalgos/cobuchi.hh (to_nca): New
function.
(weak_to_cobuchi): New internal function, used in to_nca and to_dca
when appropriate.
* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh: Implement
the CoBuchi option.
* python/spot/__init__.py: Support it in Python.
* bin/common_post.cc: Add support for --buchi.
* bin/autfilt.cc: Remove the --dca option.
* tests/core/dca.test, tests/python/automata.ipynb: Adjust and add
more tests.  In particular, add more complex persistence and
recurrence formulas to the list of dca.test.
* tests/python/dca.test: Adjust and rename to...
* tests/core/dca2.test: ... this.  Add more tests, to the point
that this is now failing, as described in issue #317.
* tests/python/dca.py: Remove.
* tests/Makefile.am: Adjust.
parent 9464043d
......@@ -30,6 +30,11 @@ New in spot 2.4.4.dev (net yet released)
output. Different styles can be requested using for instance
--parity='min odd' or --parity='max even'.
- ltl2tgba, autfilt, and dstar2tgba have some new '--cobuchi' option
to force co-Büchi acceptance on the output. Beware: if the input
language is not co-Büchi realizable the output automaton will
recognize a superset of the input.
- genltl learned to generate six new families of formulas, taken from
the SYNTCOMP competition on reactive synthesis, and from from
Müller & Sickert's GandALF'17 paper:
......@@ -40,11 +45,8 @@ New in spot 2.4.4.dev (net yet released)
--ms-phi-r=RANGE (FGa{n}&GFb{n})|((FGa{n-1}|GFb{n-1})&(...))
--ms-phi-s=RANGE (FGa{n}|GFb{n})&((FGa{n-1}&GFb{n-1})|(...))
- autfilt learned a couple of acceptance transformations:
--streett-like converts automata with DNF acceptance
into automata with Streett-like acceptance.
--dca converts automata with DNF or Streett-like
acceptance into deterministic co-Büchi.
- autfilt learned --streett-like to convert automata with DNF
acceptance into automata with Streett-like acceptance.
- autfilt learned --acceptance-is=ACC to filter automata by
acceptance condition. ACC can be the name of some acceptance
......@@ -91,10 +93,11 @@ New in spot 2.4.4.dev (net yet released)
- spot::nsa_to_nca(), spot::dfn_to_nca(), spot::dfn_to_dca(), and
spot::nsa_to_dca(), convert automata with DNF or Streett-like
acceptance into deterministic or non-deterministic co-Büchi
automata. spot::to_dca() dispatches between the last two
functions. The language of produced automata include the original
language, but may be larger if the original automaton is not
co-Büchi realizable. Based on Boker & Kupferman FOSSACS'11 paper.
automata. spot::to_dca() and spot::to_nca() dispatches between
these four functions. The language of produced automata include
the original language, but may be larger if the original automaton
is not co-Büchi realizable. Based on Boker & Kupferman FOSSACS'11
paper.
- spot::scc_info::states_on_acc_cycle_of() return all states
visited by any accepting cycle of the specified SCC. It only
......@@ -182,6 +185,10 @@ New in spot 2.4.4.dev (net yet released)
have parity acceptance, it will simply be degeneralized or
determinized.
- spot::postprocessor::set_type() can now request co-Büchi
acceptance as output. This calls the aforementioned to_nca() or
to_dca() functions.
- spot::remove_fin() will now call simplify_acceptance(),
introduced in 2.4, before attempting its different Fin-removal
strategies.
......
......@@ -359,12 +359,6 @@ static const argp_option options[] =
"solver can be set thanks to the SPOT_SATSOLVER environment variable"
"(see spot-x)."
, 0 },
{ "dca", OPT_DCA, nullptr, 0,
"convert to deterministic co-Büchi. The resulting automaton will always "
"recognize at least the same language. Actually, it can recognize "
"more if the original language can not be expressed using a co-Büchi "
"acceptance condition."
, 0 },
{ nullptr, 0, nullptr, 0, "Decorations (for -d and -H1.1 output):", 9 },
{ "highlight-nondet-states", OPT_HIGHLIGHT_NONDET_STATES, "NUM",
OPTION_ARG_OPTIONAL, "highlight nondeterministic states with color NUM",
......@@ -1440,8 +1434,6 @@ namespace
aut = spot::to_generalized_rabin(aut, opt_gra == GRA_SHARE_INF);
if (opt_gsa)
aut = spot::to_generalized_streett(aut, opt_gsa == GSA_SHARE_FIN);
if (opt_dca)
aut = spot::to_dca(aut, false);
if (opt_streett_like)
aut = spot::dnf_to_streett(aut);
......
......@@ -34,7 +34,8 @@ bool level_set = false;
bool pref_set = false;
enum {
OPT_HIGH = 1,
OPT_COBUCHI = 256,
OPT_HIGH,
OPT_LOW,
OPT_MEDIUM,
OPT_SMALL,
......@@ -65,6 +66,11 @@ static constexpr const argp_option options[] =
"any|min|max|odd|even|min odd|min even|max odd|max even",
OPTION_ARG_OPTIONAL,
"colored automaton with parity acceptance", 0, },
{ "cobuchi", OPT_COBUCHI, nullptr, 0,
"automaton with co-Büchi acceptance (will recognize"
"a superset of the input language if not co-Büchi "
"realizable)", 0 },
{ "coBuchi", 0, nullptr, OPTION_ALIAS, nullptr, 0 },
/**************************************************/
{ nullptr, 0, nullptr, 0, "Simplification goal:", 20 },
{ "small", OPT_SMALL, nullptr, 0, "prefer small automata (default)", 0 },
......@@ -123,6 +129,11 @@ static const argp_option options_disabled[] =
"any|min|max|odd|even|min odd|min even|max odd|max even",
OPTION_ARG_OPTIONAL,
"colored automaton with parity acceptance", 0, },
{ "cobuchi", OPT_COBUCHI, nullptr, 0,
"automaton with co-Büchi acceptance (will recognize"
"a superset of the input language if not co-Büchi "
"realizable)", 0 },
{ "coBuchi", 0, nullptr, OPTION_ALIAS, nullptr, 0 },
/**************************************************/
{ nullptr, 0, nullptr, 0, "Simplification goal:", 20 },
{ "small", OPT_SMALL, nullptr, 0, "prefer small automata", 0 },
......@@ -210,6 +221,9 @@ parse_opt_post(int key, char* arg, struct argp_state*)
case 'S':
sbacc = spot::postprocessor::SBAcc;
break;
case OPT_COBUCHI:
type = spot::postprocessor::CoBuchi;
break;
case OPT_HIGH:
level = spot::postprocessor::High;
simplification_level = 3;
......
......@@ -503,6 +503,11 @@ def _postproc_translate_options(obj, default_type, *args):
type_ = postprocessor.TGBA
elif val == 'ba':
type_ = postprocessor.BA
elif val == 'cobuchi' or val == 'nca':
type_ = postprocessor.CoBuchi
elif val == 'dca':
type_ = postprocessor.CoBuchi
pref_ = postprocessor.Deterministic
elif val == 'parity min odd':
type_ = postprocessor.ParityMinOdd
elif val == 'parity min even':
......@@ -566,14 +571,17 @@ def _postproc_translate_options(obj, default_type, *args):
options = {
'any': pref_set,
'ba': type_set,
'complete': misc_set,
'cobuchi': type_set,
'colored': misc_set,
'complete': misc_set,
'dca': type_set,
'deterministic': pref_set,
'generic': type_set,
'high': optm_set,
'low': optm_set,
'medium': optm_set,
'monitor': type_set,
'nca': type_set,
'parity even': type_set,
'parity max even': type_set,
'parity max odd': type_set,
......@@ -635,7 +643,7 @@ def translate(formula, *args, dict=_bdd_dict):
- at most one in 'TGBA', 'BA', or 'Monitor', 'generic',
'parity', 'parity min odd', 'parity min even',
'parity max odd', 'parity max even' (type of automaton to
build)
build), 'coBuchi'
- at most one in 'Small', 'Deterministic', 'Any'
(preferred characteristics of the produced automaton)
- at most one in 'Low', 'Medium', 'High'
......@@ -668,7 +676,7 @@ def postprocess(automaton, *args, formula=None):
- at most one in 'Generic', 'TGBA', 'BA', or 'Monitor',
'parity', 'parity min odd', 'parity min even',
'parity max odd', 'parity max even' (type of automaton to
build)
build), 'coBuchi'
- at most one in 'Small', 'Deterministic', 'Any'
(preferred characteristics of the produced automaton)
- at most one in 'Low', 'Medium', 'High'
......
......@@ -29,6 +29,8 @@
#include <spot/twaalgos/product.hh>
#include <spot/twaalgos/sccinfo.hh>
#include <spot/twaalgos/totgba.hh>
#include <spot/twaalgos/isdet.hh>
#include <spot/twaalgos/strength.hh>
#include <stack>
#include <unordered_map>
......@@ -196,7 +198,7 @@ namespace spot
bool was_rabin = false,
unsigned orig_num_st = 0)
: aut_(ref_prod),
state_based_((bool)aut_->prop_state_acc()),
state_based_(aut_->prop_state_acc().is_true()),
pairs_(pairs),
nb_pairs_(pairs.size()),
named_states_(named_states),
......@@ -241,29 +243,30 @@ namespace spot
twa_graph_ptr
nsa_to_nca(const const_twa_graph_ptr& ref,
nsa_to_nca(const_twa_graph_ptr ref,
bool named_states,
vect_nca_info* nca_info)
{
twa_graph_ptr ref_tmp = ref->acc().is_parity() ? to_generalized_streett(ref)
: nullptr;
if (ref->acc().is_parity())
ref = to_generalized_streett(ref);
std::vector<acc_cond::rs_pair> pairs;
if (!(ref_tmp ? ref_tmp : ref)->acc().is_streett_like(pairs))
if (!ref->acc().is_streett_like(pairs))
throw std::runtime_error("nsa_to_nca() only works with Streett-like or "
"Parity acceptance condition");
nsa_to_nca_converter nca_converter(ref_tmp ? ref_tmp : ref,
ref_tmp ? ref_tmp : ref,
pairs,
named_states,
false);
// FIXME: At the moment this algorithm does not support
// transition-based acceptance. See issue #317. Once that is
// fixed we may remove the next line.
ref = sbacc(std::const_pointer_cast<twa_graph>(ref));
nsa_to_nca_converter nca_converter(ref, ref, pairs, named_states, false);
return nca_converter.run(nca_info);
}
twa_graph_ptr
dnf_to_nca(const const_twa_graph_ptr& ref,
bool named_states,
dnf_to_nca(const_twa_graph_ptr ref, bool named_states,
vect_nca_info* nca_info)
{
const acc_cond::acc_code& code = ref->get_acceptance();
......@@ -287,6 +290,61 @@ namespace spot
return nca_converter.run(nca_info);
}
namespace
{
twa_graph_ptr
weak_to_cobuchi(const const_twa_graph_ptr& aut)
{
trival iw = aut->prop_inherently_weak();
if (iw.is_false())
return nullptr;
scc_info si(aut);
if (iw.is_maybe() && !is_weak_automaton(aut, &si))
return nullptr;
auto res = make_twa_graph(aut->get_dict());
res->copy_ap_of(aut);
res->prop_copy(aut, twa::prop_set::all());
res->new_states(aut->num_states());
si.determine_unknown_acceptance();
unsigned ns = si.scc_count();
for (unsigned s = 0; s < ns; ++s)
{
acc_cond::mark_t m = 0U;
if (si.is_rejecting_scc(s))
m = acc_cond::mark_t{0};
else
assert(si.is_accepting_scc(s));
for (auto& e: si.edges_of(s))
res->new_edge(e.src, e.dst, e.cond, m);
}
res->set_co_buchi();
res->set_init_state(aut->get_init_state_number());
res->prop_weak(true);
res->prop_state_acc(true);
return res;
}
}
twa_graph_ptr
to_nca(const_twa_graph_ptr aut, bool named_states)
{
if (auto weak = weak_to_cobuchi(aut))
return weak;
const acc_cond::acc_code& code = aut->get_acceptance();
std::vector<acc_cond::rs_pair> pairs;
if (aut->acc().is_streett_like(pairs) || aut->acc().is_parity())
return nsa_to_nca(aut, named_states);
else if (code.is_dnf())
return dnf_to_nca(aut, named_states);
auto tmp = make_twa_graph(aut, twa::prop_set::all());
tmp->set_acceptance(aut->acc().num_sets(),
aut->get_acceptance().to_dnf());
return to_nca(tmp, named_states);
}
namespace
{
......@@ -543,7 +601,7 @@ namespace spot
twa_graph_ptr
nsa_to_dca(const const_twa_graph_ptr& aut, bool named_states)
nsa_to_dca(const_twa_graph_ptr aut, bool named_states)
{
debug << "NSA_to_dca" << std::endl;
std::vector<acc_cond::rs_pair> pairs;
......@@ -568,7 +626,7 @@ namespace spot
twa_graph_ptr
dnf_to_dca(const const_twa_graph_ptr& aut, bool named_states)
dnf_to_dca(const_twa_graph_ptr aut, bool named_states)
{
debug << "DNF_to_dca" << std::endl;
const acc_cond::acc_code& code = aut->get_acceptance();
......@@ -599,8 +657,12 @@ namespace spot
twa_graph_ptr
to_dca(const const_twa_graph_ptr& aut, bool named_states)
to_dca(const_twa_graph_ptr aut, bool named_states)
{
if (is_deterministic(aut))
if (auto weak = weak_to_cobuchi(aut))
return weak;
const acc_cond::acc_code& code = aut->get_acceptance();
std::vector<acc_cond::rs_pair> pairs;
......@@ -608,8 +670,10 @@ namespace spot
return nsa_to_dca(aut, named_states);
else if (code.is_dnf())
return dnf_to_dca(aut, named_states);
else
throw std::runtime_error("to_dca() only works with Streett-like, Parity "
"or any acceptance condition in DNF");
auto tmp = make_twa_graph(aut, twa::prop_set::all());
tmp->set_acceptance(aut->acc().num_sets(),
aut->get_acceptance().to_dnf());
return to_nca(tmp, named_states);
}
}
......@@ -78,7 +78,7 @@ namespace spot
/// \a named_states name each state for easier debugging.
/// \a nca_info retrieve information about state visited infinitely often.
SPOT_API twa_graph_ptr
nsa_to_nca(const const_twa_graph_ptr& aut,
nsa_to_nca(const_twa_graph_ptr aut,
bool named_states = false,
vect_nca_info* nca_info = nullptr);
......@@ -103,10 +103,21 @@ namespace spot
/// \a named_states name each state for easier debugging.
/// \a nca_info retrieve information about state visited infinitely often.
SPOT_API twa_graph_ptr
dnf_to_nca(const const_twa_graph_ptr& aut,
dnf_to_nca(const_twa_graph_ptr aut,
bool named_states = false,
vect_nca_info* nca_info = nullptr);
/// \brief Converts any ω-automata to non-deterministic co-buchi
///
/// The language of the resulting automaton always include the
/// original language, and is a superset iff the original language
/// can not be expressed using a co-Büchi acceptance condition.
///
/// The implementation dispatches between dnf_to_nca, nsa_to_nca,
/// and a trivial implementation for weak automata.
SPOT_API twa_graph_ptr
to_nca(const_twa_graph_ptr aut, bool named_states = false);
/// \brief Converts a nondet Streett-like aut. to a det. co-Büchi aut.
///
/// This function calls first nsa_to_nca() in order to retrieve som
......@@ -127,7 +138,7 @@ namespace spot
/// \a aut The automaton to convert.
/// \a named_states name each state for easier debugging.
SPOT_API twa_graph_ptr
nsa_to_dca(const const_twa_graph_ptr& aut, bool named_states = false);
nsa_to_dca(const_twa_graph_ptr aut, bool named_states = false);
/// \brief Converts an aut. with acceptance in DNF to a det. co-Büchi aut.
///
......@@ -149,13 +160,16 @@ namespace spot
/// \a aut The automaton to convert.
/// \a named_states name each state for easier debugging.
SPOT_API twa_graph_ptr
dnf_to_dca(const const_twa_graph_ptr& aut, bool named_states = false);
dnf_to_dca(const_twa_graph_ptr aut, bool named_states = false);
/// \brief Converts any ω-automata to det. co-buchi (when possible)
/// \brief Converts any ω-automata to deterministic co-buchi
///
/// The language of the resulting automaton always include the
/// original language, and is a superset iff the original language
/// can not be expressed using a co-Büchi acceptance condition.
///
/// The resulting automaton will always recognize at least the same language.
/// Actually, it can recognize more if the original language can not be
/// expressed using a co-Büchi acceptance condition.
/// The implementation dispatches between dnf_to_dca, nsa_to_dca,
/// and a trivial implementation for deterministic weak automata.
SPOT_API twa_graph_ptr
to_dca(const const_twa_graph_ptr& aut, bool named_states = false);
to_dca(const_twa_graph_ptr aut, bool named_states = false);
}
......@@ -36,6 +36,8 @@
#include <spot/twaalgos/determinize.hh>
#include <spot/twaalgos/alternation.hh>
#include <spot/twaalgos/parity.hh>
#include <spot/twaalgos/cobuchi.hh>
#include <spot/twaalgos/dot.hh>
namespace spot
{
......@@ -194,6 +196,7 @@ namespace spot
if (type_ == BA || SBACC_)
state_based_ = true;
bool via_gba = (type_ == BA) || (type_ == TGBA) || (type_ == Monitor);
bool want_parity = (type_ & Parity) == Parity;
if (COLORED_ && !want_parity)
throw std::runtime_error("postprocessor: the Colored setting only works "
......@@ -234,7 +237,7 @@ namespace spot
!(type_ == Generic && PREF_ == Any && level_ == Low))
a = remove_alternation(a);
if ((type_ != Generic && !a->acc().is_generalized_buchi())
if ((via_gba && !a->acc().is_generalized_buchi())
|| (want_parity && !a->acc().is_parity()))
{
a = to_generalized_buchi(a);
......@@ -247,7 +250,8 @@ namespace spot
|| type_ == TGBA
|| (type_ == BA && a->is_sba())
|| (type_ == Monitor && a->num_sets() == 0)
|| (want_parity && a->acc().is_parity())))
|| (want_parity && a->acc().is_parity())
|| (type_ == CoBuchi && a->acc().is_co_buchi())))
return finalize(a);
int original_acc = a->num_sets();
......@@ -290,6 +294,8 @@ namespace spot
{
if (type_ == BA)
a = do_degen(a);
else if (type_ == CoBuchi)
a = to_nca(a);
return finalize(a);
}
......@@ -552,6 +558,21 @@ namespace spot
sim = dba ? dba : sim;
sim->remove_unused_ap();
if (type_ == CoBuchi)
{
unsigned ns = sim->num_states();
if (PREF_ == Deterministic)
sim = to_dca(sim);
else
sim = to_nca(sim);
// if the input of to_dca/to_nca was weak, the number of
// states has not changed, and running simulation is useless.
if (level_ != Low && ns < sim->num_states())
sim = do_simul(sim, simul_);
}
return finalize(sim);
}
}
......@@ -72,8 +72,8 @@ namespace spot
/// options used for debugging or benchmarking.
postprocessor(const option_map* opt = nullptr);
enum output_type { TGBA = 0,
BA = 1,
enum output_type { TGBA = 0, // should be renamed GeneralizedBuchi
BA = 1, // should be renamed Buchi and not imply SBAcc
Monitor = 2,
Generic = 3,
Parity = 4,
......@@ -85,6 +85,7 @@ namespace spot
ParityMaxOdd = ParityMax | ParityOdd,
ParityMinEven = ParityMin | ParityEven,
ParityMaxEven = ParityMax | ParityEven,
CoBuchi = 128,
};
/// \brief Select the desired output type.
......@@ -121,6 +122,10 @@ namespace spot
/// but other parity types can be obtained from there by minor
/// adjustments.
///
/// \a CoBuchi requests a Co-Büchi automaton equivalent to
/// the input, when possible, or a Co-Büchi automaton that
/// recognize a larger language otherwise.
///
/// If set_type() is not called, the default \c output_type is \c TGBA.
void
set_type(output_type type)
......
......@@ -309,11 +309,15 @@ TESTS_twa = \
core/cycles.test \
core/acc_word.test \
core/dca.test \
core/dca2.test \
core/dnfstreett.test \
core/parity.test \
core/parity2.test \
core/ltlsynt.test
# Issue #317.
XFAIL_TESTS = core/dca2.test
############################## PYTHON ##############################
if USE_PYTHON
......@@ -356,7 +360,6 @@ TESTS_python = \
python/bdditer.py \
python/bddnqueen.py \
python/bugdet.py \
python/dca.test \
python/declenv.py \
python/decompose_scc.py \
python/dualize.py \
......@@ -410,7 +413,6 @@ nb-html: $(TESTS_ipython:.ipynb=.html)
EXTRA_DIST = \
$(TESTS) \
python/ltl2tgba.py \
python/dca.py \
python/ipnbdoctest.py
......
This diff is collapsed.
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Laboratoire de Recherche et
# Copyright (C) 2017, 2018 Laboratoire de Recherche et
# Développement de l'EPITA.
#
# This file is part of Spot, a model checking library.
......@@ -18,45 +18,58 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. ./defs
set -e
# Skip this test if ltl2dstar is not installed.
(ltl2dstar --version) || exit 77
DIR=dca.dir
mkdir -p $DIR
cat >$DIR/ba_formulas << 'EOF'
FG((Xc & XXa) <-> !(b xor (c M b)))
F!FGFb
cat >l_formulas <<'EOF'
FG!b
FGc
F(a | Gb)
XF(b & Ga)
FG(F(b R Fc) R Gc)
(!c M F(b M Ga)) W (b U a)
(c xor Gb) M 1
X!Gc M ((Fb R a) M 1)
!a | F(b W 0)
F(!a -> Gb)
(Gb <-> X(b W Xb)) M (b xor !c)
(c R (X!c W Fb)) M 1
!a -> (FX!(0 R F(b | c)) W c)
XF((!c R a) W !Fb)
(!a <-> !(c <-> Gb)) M 1
((0 R a) M c) M ((b xor Fb) M F(b -> a))
a | c | FG(!b & !c)
!a | FGb
F((!a & ((c & F!b) | (!c & Gb))) | (a & ((c & Gb) | (!c & F!b))))
F((c & F!b) | (!c & Gb))
F((!c R a) W G!b)
FG(((!b | (c M b)) & X(c & Xa)) | (b & (!c W !b) & X(!c | X!a)))
(Ga M c) M ((!b & Fb) M F(a | !b))
(Gb | X(!b M X!b)) M ((b & c) | (!b & !c))
F(c R (X!c W Fb))
XF!c & F(Fb R a)
(!c M F(b & Ga)) W (b U a)
EOF
cat >$DIR/dsa_formulas <<'EOF'
(!b U b) U X(!a -> Fb)
1 U (a xor b)
X(!(!b | (a M b)) -> XXa)
!Gb
F(XF!a & (Fb U !a))
cat >r_formulas <<'EOF'
GF(b | GF!c)
!b & G(G!c | XFc)
GF(b | c | (!c & XFb))
GFc | G(!b | !c)
G(Gb | Fc)
G(c | (c R Xc) | XF(b & !c))
Gc R XFb
G(c | (!b M (GFc | G!c)))
F(((c W Xb) & F(b R !c)) | ((!c M X!b) & G(!b U c)))
EOF
while read ba_f; do
../run "$srcdir/dca.py" "$ba_f" > $DIR/ba
while read dsa_f; do
ltldo -f "$dsa_f" "ltl2dstar --automata=streett\
--ltl2nba=spin:ltl2tgba@-Ds" -H |
autfilt --product=$DIR/ba > $DIR/input.hoa
autfilt --dca $DIR/input.hoa > $DIR/res.hoa
autfilt $DIR/input.hoa --equivalent-to $DIR/res.hoa
done <$DIR/dsa_formulas
done <$DIR/ba_formulas
while read l_f; do
ltl2tgba --parity='max odd' "$l_f" > l.hoa
autfilt -q --acceptance-is='Fin(0) | Inf(1)' l.hoa
while read r_f; do
# Dualizing a deterministic transition-based parity automaton
# to obtain a transition-based deterministic streett
# automaton. What we want to avoid as much as possible is
# weak automata, because l.hoa is already weak and that would
# make the sum/product weak as well.
ltl2tgba "$r_f" -D --parity='min odd' | autfilt --dualize --gsa > r.hoa
# Streett & Streett
autfilt r.hoa --name="($l_f)&!($r_f)" --product=l.hoa -S > and.hoa
autfilt -q --acceptance-is=Streett and.hoa
# Streett | Streett
autfilt r.hoa --name="($l_f)|!($r_f)" --product-or=l.hoa -S > or.hoa
autfilt -q -v --acceptance-is=Streett or.hoa
autcross --language-preserved --verbose -F or.hoa -F and.hoa \
'autfilt %H --stats=%M | ltl2tgba >%O' \
'autfilt --cobuchi' 'autfilt --cobuchi -D'
done <r_formulas
done <l_formulas
This diff is collapsed.
#!/usr/bin/python3
# -*- mode: python; coding: utf-8 -*-
# Copyright (C) 2017 Laboratoire de Recherche et Développement de
# l'EPITA.
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import spot