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
......
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Laboratoire de Recherche et Développement
# Copyright (C) 2017, 2018 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
......@@ -118,7 +118,6 @@ Xb -> Gb
(b | X!b) W a
b W (!b xor (!a M FXb))
((b M 1) M 1) xor (a xor Ga)
b <-> (a M 1)
a xor F(!X!Fa xor (b U Xa))
......@@ -149,6 +148,36 @@ a M (G!b R Xb)
(!a R a) | (Fa xor XFb)
XF(b | Gb) M ((b R a) R !a)
!a xor (0 R ((b -> a) -> Gb))
b & X(b U (F(!b | X(!b M !a)) W a))
G(Fb & ((Gb & (a R F!a)) | (F!b & (!a U Ga))))
G((G!b & (G(!a & b) | (F!b & Fa))) | (Fb&((F!b&G!a) | (Fa&Gb))))
GF(a | b | (!a & XFb))
GF((a & (!b | X(!b R XX!a))) | (!a & b & X(b U XXa)))
F!b | G(a M Fb)
G(a | (!b M (G!a | GFa)))
Ga | (!a & G(b | X(b M Fa)))
GF(Fa R (a | F!b))
G(((b & Fa) | (!b & G!a)) M Fa)
XG!a | G(a M Fb)
G(b | X(b M Fa))
G(b | G(((!a & FG!b) | (a & GFb)) U !a))
G(!a | F((!a & (a W b)) | (a & (!a M !b))))
G((Fa & ((b & Ga) | (!b & F!a))) | (G!a & ((b & F!a) | (!b & Ga))))
G(b | G(!a & !b) | F(!a & Fa))
(b | Ga) & G(Fa & F(!a & b))
G(F!a & Fa)
G(b M Fa)
G(G(a & b) | (F!b & F!a))
Ga R XF((Xa & (!a | Fb)) | (a & G!b & X!a))
G(Fb & ((G!a & XXGb) | (Fa & XXF!b)))
G((b & G(!a | Ga)) | (!b & F(a & F!a)))
G(b & (X!a M Fa))
G(Fa & (X((!a & G!b) | (a & Fb)) M Fb))
G(Fa | G(!b M F!a))
G((Ga & F(!a W b)) | (F!a & G(a M !b)))
G(Fb U a)
G(F!b & Fb)
F(b & F!b) R (!a M Fa)
(Ga | Fb) M 1
!G(F(b & Fa) W b)
......@@ -180,248 +209,118 @@ Fa -> XXG(1 U Gb)
XXFa U Ga
a & F!X(a | XFa)
F(a | Gb)
F((XXb&G(!a|(Gb&XG!a)|(F!b&XFa)))|(XX!b&F(a&((Gb&XFa)|(XG!a&F!b)))))
F((!a & F(a W (a R b))) | (a & G(!a M (!a U !b))))
XFb R F((b & F!a) | (!b & Ga))
F((G!b & XX!a) | (Fb & XXa)) W (!a | Ga)
F((a & FG(Ga M b)) | (!a & GF(F!a W !b)))
XF(!a | GF(!b W F!a))
(b & X(b W a)) M (Xb R (Fb & Fa))
F(b | (G!b & FGa) | G(Fb & F!a))
FG(((a & !b) | (!a & b)) & F((F!a & Xb) | (Ga & X!b)))
X(!b | XF((a & F((F!b & G!a) | (Gb & Fa))) | (!a & G(G(!a & b) | (F!b & Fa)))))
F((a & !b & G((b | Fa) U b)) | ((!a | b) & F((!b & G!a) R !b)))
XF(b | GF((b & Fa) | (!b & G!a)))
(FGa R (!b M F!a)) R (!b | FGb)
F(!b | (FGa & F(Gb & X!a)) | G(F!a & (F!b | Xa)))
Xb R (F!b U ((b & XF!a) | (!b & XGa)))
(Fa U ((b & Ga) | (!b & F!a))) W X((a & F!b) | (!a & Gb))
X!a R F(Fb R !a)
Ga | F((a & b & G((!a | F!b) U !a)) | ((!a | !b) & F((a & Gb) R a)))
F(a W Fb) W ((!a & G!b) | (a & Fb))
F((b&G(F((a&b)|(!a&!b))|(G!b U!a)))|(!b&F(G((a&!b)|(!a&b))&(Fb R a))))
F((Fa & G(a | b)) | (G!a & F(!a & !b))) W G!a
F(Fa & G(a | b)) W G!a
F(!b | GF((!b & Fa) | (b & G!a)))
Fa R XF(Xb | (!b M G!a))
F((b & G(F!b & Fa)) | (!b & F(Gb | G!a)))
XX(FGb R (b U ((a & F!b) | (!a & Gb))))
F((a & F(!a W G!b)) | (!a & G(a M Fb)))
Fa R (((a & F!b) | (!a & Gb)) R F(Xb W Fa))
F((b & F(G!b | G!a)) | (!b & G(Fb & Fa)))
F((Fb & G!a) | (G!b & Fa)) W (a | Xb)
EOF
cat formulas | ltlcross \
ltlcross --grind=bugs -F formulas \
--timeout=60 \
'{1} ltl2tgba %f >%T' \
'{2} case `ltlfilt -f %f --format=%%[w]h` in *P*) ltl2tgba -B %f | autfilt\
--dca ;; *) ltl2tgba -B %f;; esac >%O'
-D --cobuchi ;; *) ltl2tgba -B %f;; esac >%O' \
'{3} case `ltlfilt -f %f --format=%%[w]h` in *P*) ltl2tgba --cobuchi %f;; \
*) ltl2tgba -B %f;; esac >%O'
for i in 4 5 6 7 8 9 10
do
for acc in "min even" "min odd" "max even" "max odd";
do
randaut -A "parity $acc $i" a b c > input.hoa
autfilt --dca input.hoa > res.hoa
autfilt input.hoa --included-in=res.hoa
autfilt -D --cobuchi input.hoa > res.hoa
autfilt -q input.hoa --included-in=res.hoa
autfilt -q --deterministic --acceptance-is=coBuchi res.hoa
done
done
cat formulas | ltlcross \
ltlcross -F formulas \
--timeout=60 \
'{1} ltl2tgba %f | autfilt --gra >%T' \
'{2} case `ltlfilt -f %f --format=%\[w]h` in *P*) ltl2tgba -B %f | autfilt\