kill the ltl namespace
* NEWS: Mention it. * bench/stutter/stutter_invariance_formulas.cc, bench/stutter/stutter_invariance_randomgraph.cc, doc/mainpage.dox, doc/org/tut01.org, doc/org/tut02.org, doc/org/tut10.org, doc/tl/tl.tex, iface/ltsmin/ltsmin.cc, iface/ltsmin/ltsmin.hh, iface/ltsmin/modelcheck.cc, src/bin/autfilt.cc, src/bin/common_aoutput.cc, src/bin/common_aoutput.hh, src/bin/common_finput.cc, src/bin/common_finput.hh, src/bin/common_output.cc, src/bin/common_output.hh, src/bin/common_r.hh, src/bin/common_trans.cc, src/bin/common_trans.hh, src/bin/dstar2tgba.cc, src/bin/genltl.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc, src/bin/ltlcross.cc, src/bin/ltldo.cc, src/bin/ltlfilt.cc, src/bin/ltlgrind.cc, src/bin/randaut.cc, src/bin/randltl.cc, src/kripke/kripkeexplicit.cc, src/kripke/kripkeexplicit.hh, src/kripkeparse/kripkeparse.yy, src/kripkeparse/public.hh, src/ltlparse/fmterror.cc, src/ltlparse/ltlparse.yy, src/ltlparse/ltlscan.ll, src/ltlparse/parsedecl.hh, src/ltlparse/public.hh, src/parseaut/parseaut.yy, src/parseaut/public.hh, src/tests/checkpsl.cc, src/tests/checkta.cc, src/tests/complementation.cc, src/tests/consterm.cc, src/tests/emptchk.cc, src/tests/equalsf.cc, src/tests/ikwiad.cc, src/tests/kind.cc, src/tests/length.cc, src/tests/ltlprod.cc, src/tests/ltlrel.cc, src/tests/parse.test, src/tests/parse_print_test.cc, src/tests/randtgba.cc, src/tests/readltl.cc, src/tests/reduc.cc, src/tests/syntimpl.cc, src/tests/taatgba.cc, src/tests/tostring.cc, src/tests/tostring.test, src/tl/apcollect.cc, src/tl/apcollect.hh, src/tl/contain.cc, src/tl/contain.hh, src/tl/declenv.cc, src/tl/declenv.hh, src/tl/defaultenv.cc, src/tl/defaultenv.hh, src/tl/dot.cc, src/tl/dot.hh, src/tl/environment.hh, src/tl/exclusive.cc, src/tl/exclusive.hh, src/tl/formula.cc, src/tl/formula.hh, src/tl/length.cc, src/tl/length.hh, src/tl/mark.cc, src/tl/mark.hh, src/tl/mutation.cc, src/tl/mutation.hh, src/tl/nenoform.cc, src/tl/nenoform.hh, src/tl/print.cc, src/tl/print.hh, src/tl/randomltl.cc, src/tl/randomltl.hh, src/tl/relabel.cc, src/tl/relabel.hh, src/tl/remove_x.cc, src/tl/remove_x.hh, src/tl/simpfg.cc, src/tl/simpfg.hh, src/tl/simplify.cc, src/tl/simplify.hh, src/tl/snf.cc, src/tl/snf.hh, src/tl/unabbrev.cc, src/tl/unabbrev.hh, src/twa/bdddict.cc, src/twa/bdddict.hh, src/twa/bddprint.cc, src/twa/formula2bdd.cc, src/twa/formula2bdd.hh, src/twa/taatgba.cc, src/twa/taatgba.hh, src/twa/twa.hh, src/twa/twagraph.cc, src/twa/twagraph.hh, src/twaalgos/compsusp.cc, src/twaalgos/compsusp.hh, src/twaalgos/ltl2taa.cc, src/twaalgos/ltl2taa.hh, src/twaalgos/ltl2tgba_fm.cc, src/twaalgos/ltl2tgba_fm.hh, src/twaalgos/minimize.cc, src/twaalgos/minimize.hh, src/twaalgos/neverclaim.cc, src/twaalgos/postproc.cc, src/twaalgos/postproc.hh, src/twaalgos/powerset.cc, src/twaalgos/powerset.hh, src/twaalgos/randomgraph.cc, src/twaalgos/randomgraph.hh, src/twaalgos/relabel.cc, src/twaalgos/relabel.hh, src/twaalgos/remprop.cc, src/twaalgos/remprop.hh, src/twaalgos/stats.cc, src/twaalgos/stats.hh, src/twaalgos/stutter.cc, src/twaalgos/stutter.hh, src/twaalgos/translate.cc, src/twaalgos/translate.hh, wrap/python/spot_impl.i: Remove the ltl namespace.
This commit is contained in:
parent
6ded5e75c4
commit
cb39210166
137 changed files with 10771 additions and 10919 deletions
|
|
@ -34,8 +34,8 @@ namespace spot
|
|||
{
|
||||
namespace
|
||||
{
|
||||
typedef std::map<ltl::formula, bdd> formula_bdd_map;
|
||||
typedef std::vector<ltl::formula> vec;
|
||||
typedef std::map<formula, bdd> formula_bdd_map;
|
||||
typedef std::vector<formula> vec;
|
||||
|
||||
// Rewrite the suspendable subformulae "s" of an LTL formula in
|
||||
// the form Gg where "g" is an atomic proposition representing
|
||||
|
|
@ -44,19 +44,19 @@ namespace spot
|
|||
class ltl_suspender_visitor final
|
||||
{
|
||||
public:
|
||||
typedef std::map<ltl::formula, ltl::formula> fmap_t;
|
||||
typedef std::map<formula, formula> fmap_t;
|
||||
ltl_suspender_visitor(fmap_t& g2s, fmap_t& a2o, bool oblig)
|
||||
: g2s_(g2s), a2o_(a2o), oblig_(oblig)
|
||||
{
|
||||
}
|
||||
|
||||
ltl::formula
|
||||
visit(ltl::formula f)
|
||||
formula
|
||||
visit(formula f)
|
||||
{
|
||||
switch (ltl::op op = f.kind())
|
||||
switch (op o = f.kind())
|
||||
{
|
||||
case ltl::op::Or:
|
||||
case ltl::op::And:
|
||||
case op::Or:
|
||||
case op::And:
|
||||
{
|
||||
vec res;
|
||||
vec oblig;
|
||||
|
|
@ -64,7 +64,7 @@ namespace spot
|
|||
unsigned mos = f.size();
|
||||
for (unsigned i = 0; i < mos; ++i)
|
||||
{
|
||||
ltl::formula c = f[i];
|
||||
formula c = f[i];
|
||||
if (c.is_boolean())
|
||||
res.push_back(c);
|
||||
else if (oblig_ && c.is_syntactic_obligation())
|
||||
|
|
@ -76,40 +76,40 @@ namespace spot
|
|||
}
|
||||
if (!oblig.empty())
|
||||
{
|
||||
res.push_back(recurse(ltl::formula::multop(op, oblig)));
|
||||
res.push_back(recurse(formula::multop(o, oblig)));
|
||||
}
|
||||
if (!susp.empty())
|
||||
{
|
||||
ltl::formula o = ltl::formula::multop(op, susp);
|
||||
// Rewrite 'o' as 'G"o"'
|
||||
ltl::formula g = recurse(o);
|
||||
if (op == ltl::op::And)
|
||||
formula x = formula::multop(o, susp);
|
||||
// Rewrite 'x' as 'G"x"'
|
||||
formula g = recurse(x);
|
||||
if (o == op::And)
|
||||
{
|
||||
res.push_back(g);
|
||||
}
|
||||
else
|
||||
{
|
||||
// res || susp -> (res && G![susp]) || G[susp])
|
||||
auto r = ltl::formula::multop(op, res);
|
||||
auto gn = ltl::formula::G(ltl::formula::Not(g[0]));
|
||||
return ltl::formula::Or({ltl::formula::And({r, gn}), g});
|
||||
auto r = formula::multop(o, res);
|
||||
auto gn = formula::G(formula::Not(g[0]));
|
||||
return formula::Or({formula::And({r, gn}), g});
|
||||
}
|
||||
}
|
||||
return ltl::formula::multop(op, res);
|
||||
return formula::multop(o, res);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return f.map([this](ltl::formula f)
|
||||
return f.map([this](formula f)
|
||||
{
|
||||
return this->recurse(f);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ltl::formula
|
||||
recurse(ltl::formula f)
|
||||
formula
|
||||
recurse(formula f)
|
||||
{
|
||||
ltl::formula res;
|
||||
formula res;
|
||||
if (f.is_boolean())
|
||||
return f;
|
||||
if (oblig_ && f.is_syntactic_obligation())
|
||||
|
|
@ -120,7 +120,7 @@ namespace spot
|
|||
|
||||
std::ostringstream s;
|
||||
print_psl(s << "〈", f) << "〉";
|
||||
res = ltl::formula::ap(s.str());
|
||||
res = formula::ap(s.str());
|
||||
a2o_[res] = f;
|
||||
assoc_[f] = res;
|
||||
return res;
|
||||
|
|
@ -129,14 +129,14 @@ namespace spot
|
|||
{
|
||||
fmap_t::const_iterator i = assoc_.find(f);
|
||||
if (i != assoc_.end())
|
||||
return ltl::formula::G(i->second);
|
||||
return formula::G(i->second);
|
||||
|
||||
std::ostringstream s;
|
||||
print_psl(s << '[', f) << "]$";
|
||||
res = ltl::formula::ap(s.str());
|
||||
res = formula::ap(s.str());
|
||||
g2s_[res] = f;
|
||||
assoc_[f] = res;
|
||||
return ltl::formula::G(res);
|
||||
return formula::G(res);
|
||||
}
|
||||
return visit(f);
|
||||
}
|
||||
|
|
@ -156,7 +156,7 @@ namespace spot
|
|||
|
||||
static
|
||||
twa_graph_ptr
|
||||
susp_prod(const const_twa_ptr& left, ltl::formula f, bdd v)
|
||||
susp_prod(const const_twa_ptr& left, formula f, bdd v)
|
||||
{
|
||||
bdd_dict_ptr dict = left->get_dict();
|
||||
auto right =
|
||||
|
|
@ -266,7 +266,7 @@ namespace spot
|
|||
|
||||
|
||||
twa_graph_ptr
|
||||
compsusp(ltl::formula f, const bdd_dict_ptr& dict,
|
||||
compsusp(formula f, const bdd_dict_ptr& dict,
|
||||
bool no_wdba, bool no_simulation,
|
||||
bool early_susp, bool no_susp_product, bool wdba_smaller,
|
||||
bool oblig)
|
||||
|
|
@ -274,7 +274,7 @@ namespace spot
|
|||
ltl_suspender_visitor::fmap_t g2s;
|
||||
ltl_suspender_visitor::fmap_t a2o;
|
||||
ltl_suspender_visitor v(g2s, a2o, oblig);
|
||||
ltl::formula g = v.recurse(f);
|
||||
formula g = v.recurse(f);
|
||||
|
||||
// Translate the patched formula, and remove useless SCCs.
|
||||
twa_graph_ptr res =
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace spot
|
|||
/// long-term stability should better use the services of the
|
||||
/// spot::translator class instead.
|
||||
SPOT_API twa_graph_ptr
|
||||
compsusp(ltl::formula f, const bdd_dict_ptr& dict,
|
||||
compsusp(formula f, const bdd_dict_ptr& dict,
|
||||
bool no_wdba = false, bool no_simulation = false,
|
||||
bool early_susp = false, bool no_susp_product = false,
|
||||
bool wdba_smaller = false, bool oblig = false);
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ namespace spot
|
|||
{
|
||||
namespace
|
||||
{
|
||||
using namespace ltl;
|
||||
|
||||
/// \brief Recursively translate a formula into a TAA.
|
||||
class ltl2taa_visitor
|
||||
{
|
||||
|
|
@ -385,11 +383,11 @@ namespace spot
|
|||
} // anonymous
|
||||
|
||||
taa_tgba_formula_ptr
|
||||
ltl_to_taa(ltl::formula f,
|
||||
ltl_to_taa(formula f,
|
||||
const bdd_dict_ptr& dict, bool refined_rules)
|
||||
{
|
||||
// TODO: implement translation of F and G
|
||||
auto f2 = ltl::negative_normal_form(ltl::unabbreviate(f, "^ieFG"));
|
||||
auto f2 = negative_normal_form(unabbreviate(f, "^ieFG"));
|
||||
auto res = make_taa_tgba_formula(dict);
|
||||
language_containment_checker* lcc =
|
||||
new language_containment_checker(make_bdd_dict(),
|
||||
|
|
|
|||
|
|
@ -48,6 +48,6 @@ namespace spot
|
|||
/// \param refined_rules If this parameter is set, refined rules are used.
|
||||
/// \return A spot::taa that recognizes the language of \a f.
|
||||
SPOT_API taa_tgba_formula_ptr
|
||||
ltl_to_taa(ltl::formula f, const bdd_dict_ptr& dict,
|
||||
ltl_to_taa(formula f, const bdd_dict_ptr& dict,
|
||||
bool refined_rules = false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
namespace spot
|
||||
{
|
||||
using namespace ltl;
|
||||
|
||||
namespace
|
||||
{
|
||||
typedef std::vector<formula> vec;
|
||||
|
|
@ -264,7 +262,7 @@ namespace spot
|
|||
if (single_acc)
|
||||
{
|
||||
int num = dict->register_acceptance_variable
|
||||
(ltl::formula::tt(), this);
|
||||
(formula::tt(), this);
|
||||
a_set &= bdd_ithvar(num);
|
||||
|
||||
auto p = bm.emplace(num, 0U);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ namespace spot
|
|||
/// representing each state of the automaton will be simplified
|
||||
/// before computing the successor. \a simpl should be configured
|
||||
/// for the type of reduction you want, see
|
||||
/// spot::ltl::ltl_simplifier. This idea is taken from the
|
||||
/// spot::ltl_simplifier. This idea is taken from the
|
||||
/// following paper.
|
||||
/** \verbatim
|
||||
@InProceedings{ thirioux.02.fmics,
|
||||
|
|
@ -140,11 +140,11 @@ namespace spot
|
|||
///
|
||||
/// \return A spot::twa_graph that recognizes the language of \a f.
|
||||
SPOT_API twa_graph_ptr
|
||||
ltl_to_tgba_fm(ltl::formula f, const bdd_dict_ptr& dict,
|
||||
ltl_to_tgba_fm(formula f, const bdd_dict_ptr& dict,
|
||||
bool exprop = false, bool symb_merge = true,
|
||||
bool branching_postponement = false,
|
||||
bool fair_loop_approx = false,
|
||||
const ltl::atomic_prop_set* unobs = nullptr,
|
||||
ltl::ltl_simplifier* simplifier = nullptr,
|
||||
const atomic_prop_set* unobs = nullptr,
|
||||
ltl_simplifier* simplifier = nullptr,
|
||||
bool unambiguous = false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ namespace spot
|
|||
|
||||
twa_graph_ptr
|
||||
minimize_obligation(const const_twa_graph_ptr& aut_f,
|
||||
ltl::formula f,
|
||||
formula f,
|
||||
const_twa_graph_ptr aut_neg_f,
|
||||
bool reject_bigger)
|
||||
{
|
||||
|
|
@ -628,7 +628,7 @@ namespace spot
|
|||
{
|
||||
// If we know the formula, simply build the automaton for
|
||||
// its negation.
|
||||
aut_neg_f = ltl_to_tgba_fm(ltl::formula::Not(f), aut_f->get_dict());
|
||||
aut_neg_f = ltl_to_tgba_fm(formula::Not(f), aut_f->get_dict());
|
||||
// Remove useless SCCs.
|
||||
aut_neg_f = scc_filter(aut_neg_f, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ namespace spot
|
|||
/// that the minimized WDBA is correct.
|
||||
SPOT_API twa_graph_ptr
|
||||
minimize_obligation(const const_twa_graph_ptr& aut_f,
|
||||
ltl::formula f = nullptr,
|
||||
formula f = nullptr,
|
||||
const_twa_graph_ptr aut_neg_f = nullptr,
|
||||
bool reject_bigger = false);
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ namespace spot
|
|||
os_ << " :: atomic { (";
|
||||
else
|
||||
os_ << " :: (";
|
||||
ltl::formula f = bdd_to_formula(t.cond, aut_->get_dict());
|
||||
formula f = bdd_to_formula(t.cond, aut_->get_dict());
|
||||
// This is actually a Boolean formula, but the LTL printer
|
||||
// is all we have.
|
||||
print_spin_ltl(os_, f, true);
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ namespace spot
|
|||
#define SBACC_ (pref_ & SBAcc)
|
||||
|
||||
twa_graph_ptr
|
||||
postprocessor::run(twa_graph_ptr a, ltl::formula f)
|
||||
postprocessor::run(twa_graph_ptr a, formula f)
|
||||
{
|
||||
if (type_ != Generic && !a->acc().is_generalized_buchi())
|
||||
a = to_generalized_buchi(a);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ namespace spot
|
|||
///
|
||||
/// The returned automaton might be a new automaton,
|
||||
/// or an in-place modification of the \a input automaton.
|
||||
twa_graph_ptr run(twa_graph_ptr input, ltl::formula f);
|
||||
twa_graph_ptr run(twa_graph_ptr input, formula f);
|
||||
|
||||
protected:
|
||||
twa_graph_ptr do_simul(const twa_graph_ptr& input, int opt);
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ namespace spot
|
|||
tba_determinize_check(const twa_graph_ptr& aut,
|
||||
unsigned threshold_states,
|
||||
unsigned threshold_cycles,
|
||||
ltl::formula f,
|
||||
formula f,
|
||||
const_twa_graph_ptr neg_aut)
|
||||
{
|
||||
if (f == nullptr && neg_aut == nullptr)
|
||||
|
|
@ -419,7 +419,7 @@ namespace spot
|
|||
|
||||
if (neg_aut == nullptr)
|
||||
{
|
||||
neg_aut = ltl_to_tgba_fm(ltl::formula::Not(f), aut->get_dict());
|
||||
neg_aut = ltl_to_tgba_fm(formula::Not(f), aut->get_dict());
|
||||
// Remove useless SCCs.
|
||||
neg_aut = scc_filter(neg_aut, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ namespace spot
|
|||
tba_determinize_check(const twa_graph_ptr& aut,
|
||||
unsigned threshold_states = 0,
|
||||
unsigned threshold_cycles = 0,
|
||||
ltl::formula f = nullptr,
|
||||
formula f = nullptr,
|
||||
const_twa_graph_ptr neg_aut = nullptr);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ namespace spot
|
|||
|
||||
twa_graph_ptr
|
||||
random_graph(int n, float d,
|
||||
const ltl::atomic_prop_set* ap, const bdd_dict_ptr& dict,
|
||||
const atomic_prop_set* ap, const bdd_dict_ptr& dict,
|
||||
unsigned n_accs, float a, float t,
|
||||
bool deterministic, bool state_acc, bool colored)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ namespace spot
|
|||
/// successors one by one.)
|
||||
SPOT_API twa_graph_ptr
|
||||
random_graph(int n, float d,
|
||||
const ltl::atomic_prop_set* ap, const bdd_dict_ptr& dict,
|
||||
const atomic_prop_set* ap, const bdd_dict_ptr& dict,
|
||||
unsigned n_accs = 0, float a = 0.1, float t = 0.5,
|
||||
bool deterministic = false, bool state_acc = false,
|
||||
bool colored = false);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
namespace spot
|
||||
{
|
||||
void
|
||||
relabel_here(twa_graph_ptr& aut, ltl::relabeling_map* relmap)
|
||||
relabel_here(twa_graph_ptr& aut, relabeling_map* relmap)
|
||||
{
|
||||
bddPair* pairs = bdd_newpair();
|
||||
auto d = aut->get_dict();
|
||||
|
|
|
|||
|
|
@ -27,5 +27,5 @@ namespace spot
|
|||
/// replace atomic propositions in an automaton
|
||||
SPOT_API void
|
||||
relabel_here(twa_graph_ptr& aut,
|
||||
ltl::relabeling_map* relmap);
|
||||
relabeling_map* relmap);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace spot
|
|||
break;
|
||||
if (*start == ',' || *start == '=')
|
||||
unexpected_char(arg, start);
|
||||
ltl::formula the_ap = nullptr;
|
||||
formula the_ap = nullptr;
|
||||
|
||||
if (*start == '"')
|
||||
{
|
||||
|
|
@ -72,7 +72,7 @@ namespace spot
|
|||
throw std::invalid_argument(s);
|
||||
}
|
||||
std::string ap(start, end - start);
|
||||
the_ap = ltl::formula::ap(ap);
|
||||
the_ap = formula::ap(ap);
|
||||
do
|
||||
++end;
|
||||
while (*end == ' ' || *end == '\t');
|
||||
|
|
@ -87,7 +87,7 @@ namespace spot
|
|||
while (rend > start && (rend[-1] == ' ' || rend[-1] == '\t'))
|
||||
--rend;
|
||||
std::string ap(start, rend - start);
|
||||
the_ap = ltl::formula::ap(ap);
|
||||
the_ap = formula::ap(ap);
|
||||
start = end;
|
||||
}
|
||||
if (*start)
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ namespace spot
|
|||
{
|
||||
class SPOT_API remove_ap
|
||||
{
|
||||
std::set<ltl::formula> props_exist;
|
||||
std::set<ltl::formula> props_pos;
|
||||
std::set<ltl::formula> props_neg;
|
||||
std::set<formula> props_exist;
|
||||
std::set<formula> props_pos;
|
||||
std::set<formula> props_neg;
|
||||
public:
|
||||
void add_ap(const char* ap_csv);
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ namespace spot
|
|||
|
||||
void printable_formula::print(std::ostream& os, const char*) const
|
||||
{
|
||||
ltl::print_psl(os, val_);
|
||||
print_psl(os, val_);
|
||||
};
|
||||
|
||||
stat_printer::stat_printer(std::ostream& os, const char* format)
|
||||
|
|
@ -162,7 +162,7 @@ namespace spot
|
|||
|
||||
std::ostream&
|
||||
stat_printer::print(const const_twa_graph_ptr& aut,
|
||||
ltl::formula f, double run_time)
|
||||
formula f, double run_time)
|
||||
{
|
||||
form_ = f;
|
||||
run_time_ = run_time;
|
||||
|
|
|
|||
|
|
@ -55,11 +55,11 @@ namespace spot
|
|||
SPOT_API tgba_sub_statistics sub_stats_reachable(const const_twa_ptr& g);
|
||||
|
||||
|
||||
class SPOT_API printable_formula: public printable_value<ltl::formula>
|
||||
class SPOT_API printable_formula: public printable_value<formula>
|
||||
{
|
||||
public:
|
||||
printable_formula&
|
||||
operator=(ltl::formula new_val)
|
||||
operator=(formula new_val)
|
||||
{
|
||||
val_ = new_val;
|
||||
return *this;
|
||||
|
|
@ -84,7 +84,7 @@ namespace spot
|
|||
/// The \a f argument is not needed if the Formula does not need
|
||||
/// to be output, and so is \a run_time).
|
||||
std::ostream&
|
||||
print(const const_twa_graph_ptr& aut, ltl::formula f = nullptr,
|
||||
print(const const_twa_graph_ptr& aut, formula f = nullptr,
|
||||
double run_time = -1.);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ namespace spot
|
|||
}
|
||||
|
||||
bool
|
||||
is_stutter_invariant(ltl::formula f)
|
||||
is_stutter_invariant(formula f)
|
||||
{
|
||||
if (f.is_ltl_formula() && f.is_syntactic_stutter_invariant())
|
||||
return true;
|
||||
|
|
@ -554,16 +554,16 @@ namespace spot
|
|||
throw std::runtime_error("Cannot use the syntactic "
|
||||
"stutter-invariance check "
|
||||
"for non-LTL formulas");
|
||||
ltl::formula g = remove_x(f);
|
||||
formula g = remove_x(f);
|
||||
bool res;
|
||||
if (algo == 0) // Equivalence check
|
||||
{
|
||||
ltl::ltl_simplifier ls;
|
||||
ltl_simplifier ls;
|
||||
res = ls.are_equivalent(f, g);
|
||||
}
|
||||
else
|
||||
{
|
||||
ltl::formula h = ltl::formula::Xor(f, g);
|
||||
formula h = formula::Xor(f, g);
|
||||
res = ltl_to_tgba_fm(h, make_bdd_dict())->is_empty();
|
||||
}
|
||||
return res;
|
||||
|
|
@ -572,7 +572,7 @@ namespace spot
|
|||
// Prepare for an automata-based check.
|
||||
translator trans;
|
||||
auto aut_f = trans.run(f);
|
||||
auto aut_nf = trans.run(ltl::formula::Not(f));
|
||||
auto aut_nf = trans.run(formula::Not(f));
|
||||
bdd aps = atomic_prop_collect_as_bdd(f, aut_f);
|
||||
return is_stutter_invariant(std::move(aut_f), std::move(aut_nf), aps, algo);
|
||||
}
|
||||
|
|
@ -618,7 +618,7 @@ namespace spot
|
|||
}
|
||||
|
||||
bool
|
||||
check_stutter_invariance(const twa_graph_ptr& aut, ltl::formula f)
|
||||
check_stutter_invariance(const twa_graph_ptr& aut, formula f)
|
||||
{
|
||||
bool is_stut = aut->is_stutter_invariant();
|
||||
if (is_stut)
|
||||
|
|
@ -627,7 +627,7 @@ namespace spot
|
|||
twa_graph_ptr neg = nullptr;
|
||||
if (f)
|
||||
{
|
||||
neg = translator(aut->get_dict()).run(ltl::formula::Not(f));
|
||||
neg = translator(aut->get_dict()).run(formula::Not(f));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace spot
|
|||
/// \ingroup ltl_misc
|
||||
/// \brief Check if a formula has the stutter invariance property.
|
||||
SPOT_API bool
|
||||
is_stutter_invariant(ltl::formula f);
|
||||
is_stutter_invariant(formula f);
|
||||
|
||||
SPOT_API bool
|
||||
is_stutter_invariant(twa_graph_ptr&& aut_f,
|
||||
|
|
@ -65,5 +65,5 @@ namespace spot
|
|||
/// of the automaton is updated and also returned.
|
||||
SPOT_API bool
|
||||
check_stutter_invariance(const twa_graph_ptr& aut,
|
||||
ltl::formula f = nullptr);
|
||||
formula f = nullptr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace spot
|
|||
|
||||
void translator::build_simplifier(const bdd_dict_ptr& dict)
|
||||
{
|
||||
ltl::ltl_simplifier_options options(false, false, false);
|
||||
ltl_simplifier_options options(false, false, false);
|
||||
switch (level_)
|
||||
{
|
||||
case High:
|
||||
|
|
@ -58,10 +58,10 @@ namespace spot
|
|||
options.event_univ = true;
|
||||
// fall through
|
||||
}
|
||||
simpl_owned_ = simpl_ = new ltl::ltl_simplifier(options, dict);
|
||||
simpl_owned_ = simpl_ = new ltl_simplifier(options, dict);
|
||||
}
|
||||
|
||||
twa_graph_ptr translator::run(ltl::formula* f)
|
||||
twa_graph_ptr translator::run(formula* f)
|
||||
{
|
||||
bool unambiguous = (pref_ & postprocessor::Unambiguous);
|
||||
if (unambiguous && type_ == postprocessor::Monitor)
|
||||
|
|
@ -72,7 +72,7 @@ namespace spot
|
|||
set_pref(pref_ | postprocessor::Deterministic);
|
||||
}
|
||||
|
||||
ltl::formula r = simpl_->simplify(*f);
|
||||
formula r = simpl_->simplify(*f);
|
||||
*f = r;
|
||||
|
||||
// This helps ltl_to_tgba_fm() to order BDD variables in a more
|
||||
|
|
@ -102,7 +102,7 @@ namespace spot
|
|||
return aut;
|
||||
}
|
||||
|
||||
twa_graph_ptr translator::run(ltl::formula f)
|
||||
twa_graph_ptr translator::run(formula f)
|
||||
{
|
||||
return run(&f);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace spot
|
|||
class SPOT_API translator: protected postprocessor
|
||||
{
|
||||
public:
|
||||
translator(ltl::ltl_simplifier* simpl, const option_map* opt = nullptr)
|
||||
translator(ltl_simplifier* simpl, const option_map* opt = nullptr)
|
||||
: postprocessor(opt), simpl_(simpl), simpl_owned_(nullptr)
|
||||
{
|
||||
assert(simpl);
|
||||
|
|
@ -101,21 +101,21 @@ namespace spot
|
|||
/// \brief Convert \a f into an automaton.
|
||||
///
|
||||
/// The formula \a f is simplified internally.
|
||||
twa_graph_ptr run(ltl::formula f);
|
||||
twa_graph_ptr run(formula f);
|
||||
|
||||
/// \brief Convert \a f into an automaton, and update f.
|
||||
///
|
||||
/// The formula <code>*f</code> is replaced
|
||||
/// by the simplified version.
|
||||
twa_graph_ptr run(ltl::formula* f);
|
||||
twa_graph_ptr run(formula* f);
|
||||
|
||||
protected:
|
||||
void setup_opt(const option_map* opt);
|
||||
void build_simplifier(const bdd_dict_ptr& dict);
|
||||
|
||||
private:
|
||||
ltl::ltl_simplifier* simpl_;
|
||||
ltl::ltl_simplifier* simpl_owned_;
|
||||
ltl_simplifier* simpl_;
|
||||
ltl_simplifier* simpl_owned_;
|
||||
int comp_susp_;
|
||||
int early_susp_;
|
||||
int skel_wdba_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue