Merge branch master (Spot 1.2.5) into next.
* src/bin/dstar2tgba.cc, src/bin/ltlcross.cc, src/bin/randltl.cc, src/ltltest/reduccmp.test, src/neverparse/neverclaimparse.yy, src/tgbatest/ltl2ta.test, src/tgbatest/ltl2tgba.cc, src/tgbatest/ltlcross.test, src/tgbatest/neverclaimread.test, wrap/python/ajax/ltl2tgba.html: Fix conflicts.
This commit is contained in:
commit
700cf88b06
30 changed files with 1029 additions and 163 deletions
|
|
@ -42,6 +42,7 @@ tgbaalgos_HEADERS = \
|
|||
emptiness.hh \
|
||||
emptiness_stats.hh \
|
||||
gv04.hh \
|
||||
hoaf.hh \
|
||||
isdet.hh \
|
||||
isweakscc.hh \
|
||||
lbtt.hh \
|
||||
|
|
@ -87,6 +88,7 @@ libtgbaalgos_la_SOURCES = \
|
|||
dupexp.cc \
|
||||
emptiness.cc \
|
||||
gv04.cc \
|
||||
hoaf.cc \
|
||||
isdet.cc \
|
||||
isweakscc.cc \
|
||||
lbtt.cc \
|
||||
|
|
|
|||
364
src/tgbaalgos/hoaf.cc
Normal file
364
src/tgbaalgos/hoaf.cc
Normal file
|
|
@ -0,0 +1,364 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2011, 2012, 2014 Laboratoire de Recherche et
|
||||
// Developpement de l'Epita (LRDE).
|
||||
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
// 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/>.
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
#include "tgba/tgba.hh"
|
||||
#include "hoaf.hh"
|
||||
#include "reachiter.hh"
|
||||
#include "misc/escape.hh"
|
||||
#include "misc/bddlt.hh"
|
||||
#include "misc/minato.hh"
|
||||
#include "tgba/formula2bdd.hh"
|
||||
#include "ltlvisit/tostring.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
namespace
|
||||
{
|
||||
struct metadata
|
||||
{
|
||||
// Assign a number to each atomic proposition.
|
||||
typedef std::map<int, unsigned> ap_map;
|
||||
ap_map ap;
|
||||
typedef std::vector<int> vap_t;
|
||||
vap_t vap;
|
||||
|
||||
// Assign a number to each acceptance condition.
|
||||
typedef std::map<bdd, unsigned, bdd_less_than> acc_map;
|
||||
acc_map acc;
|
||||
|
||||
// Map each state to a number.
|
||||
typedef std::unordered_map<const state*, unsigned,
|
||||
state_ptr_hash, state_ptr_equal> state_map;
|
||||
state_map sm;
|
||||
// Map each number to its states.
|
||||
typedef std::vector<const state*> number_map;
|
||||
number_map nm;
|
||||
|
||||
std::vector<bool> common_acc;
|
||||
bool state_acc;
|
||||
bool is_complete;
|
||||
bool is_deterministic;
|
||||
|
||||
// Label support: the set of all conditions occurring in the
|
||||
// automaton.
|
||||
typedef std::map<bdd, std::string, bdd_less_than> sup_map;
|
||||
sup_map sup;
|
||||
|
||||
metadata(const const_tgba_ptr& aut)
|
||||
: state_acc(true), is_complete(true), is_deterministic(true)
|
||||
{
|
||||
number_all_acc(aut);
|
||||
number_all_states_and_fill_sup(aut);
|
||||
number_all_ap();
|
||||
}
|
||||
|
||||
void number_all_acc(const const_tgba_ptr& aut)
|
||||
{
|
||||
bdd all_acc = aut->all_acceptance_conditions();
|
||||
unsigned count = 0;
|
||||
while (all_acc != bddfalse)
|
||||
{
|
||||
bdd one = bdd_satone(all_acc);
|
||||
all_acc -= one;
|
||||
acc[one] = count++;
|
||||
}
|
||||
}
|
||||
|
||||
std::ostream&
|
||||
emit_acc(std::ostream& os, bdd b)
|
||||
{
|
||||
// FIXME: We could use a cache for this.
|
||||
if (b == bddfalse)
|
||||
return os;
|
||||
os << " {";
|
||||
bool notfirst = false;
|
||||
while (b != bddfalse)
|
||||
{
|
||||
bdd one = bdd_satone(b);
|
||||
b -= one;
|
||||
if (notfirst)
|
||||
os << ' ';
|
||||
else
|
||||
notfirst = true;
|
||||
os << acc[one];
|
||||
}
|
||||
os << '}';
|
||||
return os;
|
||||
}
|
||||
|
||||
void number_all_states_and_fill_sup(const const_tgba_ptr& aut)
|
||||
{
|
||||
std::string empty;
|
||||
|
||||
// Scan the whole automaton to number states.
|
||||
std::deque<const state*> todo;
|
||||
|
||||
const state* init = aut->get_init_state();
|
||||
sm[init] = 0;
|
||||
nm.push_back(init);
|
||||
todo.push_back(init);
|
||||
|
||||
while (!todo.empty())
|
||||
{
|
||||
auto src = todo.front();
|
||||
todo.pop_front();
|
||||
bdd prev = bddtrue;
|
||||
bool st_acc = true;
|
||||
bdd sum = bddfalse;
|
||||
bdd available = bddtrue;
|
||||
for (auto i: aut->succ(src))
|
||||
{
|
||||
const state* dst = i->current_state();
|
||||
bdd cond = i->current_condition();
|
||||
if (is_complete)
|
||||
sum |= cond;
|
||||
if (is_deterministic)
|
||||
{
|
||||
if (!bdd_implies(cond, available))
|
||||
is_deterministic = false;
|
||||
else
|
||||
available -= cond;
|
||||
}
|
||||
sup.insert(std::make_pair(cond, empty));
|
||||
if (sm.insert(std::make_pair(dst, nm.size())).second)
|
||||
{
|
||||
nm.push_back(dst);
|
||||
todo.push_back(dst);
|
||||
}
|
||||
else
|
||||
{
|
||||
dst->destroy();
|
||||
}
|
||||
if (st_acc)
|
||||
{
|
||||
bdd acc = i->current_acceptance_conditions();
|
||||
if (prev != bddtrue && prev != acc)
|
||||
st_acc = false;
|
||||
else
|
||||
prev = acc;
|
||||
}
|
||||
}
|
||||
if (is_complete)
|
||||
is_complete &= sum == bddtrue;
|
||||
|
||||
common_acc.push_back(st_acc);
|
||||
state_acc &= st_acc;
|
||||
}
|
||||
}
|
||||
|
||||
void number_all_ap()
|
||||
{
|
||||
sup_map::iterator i;
|
||||
bdd all = bddtrue;
|
||||
for (i = sup.begin(); i != sup.end(); ++i)
|
||||
all &= bdd_support(i->first);
|
||||
|
||||
while (all != bddtrue)
|
||||
{
|
||||
int v = bdd_var(all);
|
||||
all = bdd_high(all);
|
||||
ap.insert(std::make_pair(v, vap.size()));
|
||||
vap.push_back(v);
|
||||
}
|
||||
|
||||
for (i = sup.begin(); i != sup.end(); ++i)
|
||||
{
|
||||
bdd cond = i->first;
|
||||
if (cond == bddtrue)
|
||||
{
|
||||
i->second = "t";
|
||||
continue;
|
||||
}
|
||||
if (cond == bddfalse)
|
||||
{
|
||||
i->second = "f";
|
||||
continue;
|
||||
}
|
||||
std::ostringstream s;
|
||||
bool notfirstor = false;
|
||||
|
||||
minato_isop isop(cond);
|
||||
bdd cube;
|
||||
while ((cube = isop.next()) != bddfalse)
|
||||
{
|
||||
if (notfirstor)
|
||||
s << " | ";
|
||||
bool notfirstand = false;
|
||||
while (cube != bddtrue)
|
||||
{
|
||||
if (notfirstand)
|
||||
s << '&';
|
||||
else
|
||||
notfirstand = true;
|
||||
bdd h = bdd_high(cube);
|
||||
if (h == bddfalse)
|
||||
{
|
||||
s << '!' << ap[bdd_var(cube)];
|
||||
cube = bdd_low(cube);
|
||||
}
|
||||
else
|
||||
{
|
||||
s << ap[bdd_var(cube)];
|
||||
cube = h;
|
||||
}
|
||||
}
|
||||
notfirstor = true;
|
||||
}
|
||||
i->second = s.str();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
std::ostream&
|
||||
hoaf_reachable(std::ostream& os,
|
||||
const const_tgba_ptr& aut,
|
||||
const ltl::formula* f,
|
||||
hoaf_acceptance acceptance,
|
||||
hoaf_alias alias,
|
||||
bool newline)
|
||||
{
|
||||
(void) alias;
|
||||
|
||||
metadata md(aut);
|
||||
|
||||
if (acceptance == Hoaf_Acceptance_States
|
||||
&& !md.state_acc)
|
||||
acceptance = Hoaf_Acceptance_Transitions;
|
||||
|
||||
unsigned num_states = md.nm.size();
|
||||
|
||||
const char nl = newline ? '\n' : ' ';
|
||||
os << "HOA: v1" << nl;
|
||||
if (f)
|
||||
escape_str(os << "name: \"", to_string(f)) << '"' << nl;
|
||||
os << "States: " << num_states << nl
|
||||
<< "Start: 0" << nl
|
||||
<< "AP: " << md.vap.size();
|
||||
auto d = aut->get_dict();
|
||||
for (metadata::vap_t::const_iterator i = md.vap.begin();
|
||||
i != md.vap.end(); ++i)
|
||||
escape_str(os << " \"", to_string(d->bdd_map[*i].f)) << '"';
|
||||
os << nl;
|
||||
unsigned num_acc = md.acc.size();
|
||||
if (num_acc == 0)
|
||||
os << "acc-name: all";
|
||||
else if (num_acc == 1)
|
||||
os << "acc-name: Buchi";
|
||||
else
|
||||
os << "acc-name: generalized-Buchi " << num_acc;
|
||||
os << nl;
|
||||
os << "Acceptance: " << num_acc;
|
||||
if (num_acc > 0)
|
||||
{
|
||||
os << " I(0";
|
||||
for (unsigned i = 1; i < num_acc; ++i)
|
||||
os << ")&I(" << i;
|
||||
os << ')';
|
||||
}
|
||||
else
|
||||
{
|
||||
os << " t";
|
||||
}
|
||||
os << nl;
|
||||
os << "properties: trans-labels explicit-labels";
|
||||
if (acceptance == Hoaf_Acceptance_States)
|
||||
os << " state-acc";
|
||||
else if (acceptance == Hoaf_Acceptance_Transitions)
|
||||
os << " trans-acc";
|
||||
if (md.is_complete)
|
||||
os << " complete";
|
||||
if (md.is_deterministic)
|
||||
os << " deterministic";
|
||||
os << nl;
|
||||
os << "--BODY--" << nl;
|
||||
for (unsigned i = 0; i < num_states; ++i)
|
||||
{
|
||||
hoaf_acceptance this_acc = acceptance;
|
||||
if (this_acc == Hoaf_Acceptance_Mixed)
|
||||
this_acc = (md.common_acc[i] ?
|
||||
Hoaf_Acceptance_States : Hoaf_Acceptance_Transitions);
|
||||
|
||||
tgba_succ_iterator* j = aut->succ_iter(md.nm[i]);
|
||||
j->first();
|
||||
|
||||
os << "State: " << i;
|
||||
if (this_acc == Hoaf_Acceptance_States && !j->done())
|
||||
md.emit_acc(os, j->current_acceptance_conditions());
|
||||
os << nl;
|
||||
|
||||
for (; !j->done(); j->next())
|
||||
{
|
||||
const state* dst = j->current_state();
|
||||
os << '[' << md.sup[j->current_condition()] << "] " << md.sm[dst];
|
||||
if (this_acc == Hoaf_Acceptance_Transitions)
|
||||
md.emit_acc(os, j->current_acceptance_conditions());
|
||||
os << nl;
|
||||
dst->destroy();
|
||||
}
|
||||
aut->release_iter(j);
|
||||
}
|
||||
os << "--END--"; // No newline. Let the caller decide.
|
||||
for (unsigned i = 0; i < num_states; ++i)
|
||||
md.nm[i]->destroy();
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream&
|
||||
hoaf_reachable(std::ostream& os,
|
||||
const const_tgba_ptr& aut,
|
||||
const char* opt,
|
||||
const ltl::formula* f)
|
||||
{
|
||||
bool newline = true;
|
||||
hoaf_acceptance acceptance = Hoaf_Acceptance_States;
|
||||
hoaf_alias alias = Hoaf_Alias_None;
|
||||
|
||||
if (opt)
|
||||
while (*opt)
|
||||
{
|
||||
switch (*opt++)
|
||||
{
|
||||
case 'l':
|
||||
newline = false;
|
||||
break;
|
||||
case 'm':
|
||||
acceptance = Hoaf_Acceptance_Mixed;
|
||||
break;
|
||||
case 's':
|
||||
acceptance = Hoaf_Acceptance_States;
|
||||
break;
|
||||
case 't':
|
||||
acceptance = Hoaf_Acceptance_Transitions;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return hoaf_reachable(os, aut, f, acceptance, alias, newline);
|
||||
}
|
||||
|
||||
}
|
||||
67
src/tgbaalgos/hoaf.hh
Normal file
67
src/tgbaalgos/hoaf.hh
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2014 Laboratoire de Recherche et Développement de
|
||||
// l'Epita (LRDE).
|
||||
//
|
||||
// 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/>.
|
||||
|
||||
#ifndef SPOT_TGBAALGOS_HOAF_HH
|
||||
# define SPOT_TGBAALGOS_HOAF_HH
|
||||
|
||||
#include <iosfwd>
|
||||
#include "ltlast/formula.hh"
|
||||
#include "tgba/fwd.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
class tgba;
|
||||
enum hoaf_alias { Hoaf_Alias_None, Hoaf_Alias_Ap, Hoaf_Alias_Cond };
|
||||
enum hoaf_acceptance
|
||||
{
|
||||
Hoaf_Acceptance_States, /// state-based acceptance if
|
||||
/// (globally) possible
|
||||
/// transition-based acceptance
|
||||
/// otherwise.
|
||||
Hoaf_Acceptance_Transitions, /// transition-based acceptance globally
|
||||
Hoaf_Acceptance_Mixed /// mix state-based and transition-based
|
||||
};
|
||||
|
||||
/// \ingroup tgba_io
|
||||
/// \brief Print reachable states in Hanoi Omega Automata format.
|
||||
///
|
||||
/// \param os The output stream to print on.
|
||||
/// \param g The automaton to output.
|
||||
/// \param f The (optional) formula associated to the automaton. If given
|
||||
/// it will be output as a comment.
|
||||
/// \parama acceptance Force the type of acceptance mode used
|
||||
/// in output.
|
||||
/// \param alias Whether aliases should be used in output.
|
||||
/// \param newslines Whether to use newlines in output.
|
||||
SPOT_API std::ostream&
|
||||
hoaf_reachable(std::ostream& os,
|
||||
const const_tgba_ptr& g,
|
||||
const ltl::formula* f = 0,
|
||||
hoaf_acceptance acceptance = Hoaf_Acceptance_States,
|
||||
hoaf_alias alias = Hoaf_Alias_None,
|
||||
bool newlines = true);
|
||||
|
||||
SPOT_API std::ostream&
|
||||
hoaf_reachable(std::ostream& os,
|
||||
const const_tgba_ptr& g,
|
||||
const char* opt,
|
||||
const ltl::formula* f = 0);
|
||||
}
|
||||
|
||||
#endif // SPOT_TGBAALGOS_HOAF_HH
|
||||
|
|
@ -260,24 +260,59 @@ namespace spot
|
|||
// Similarly
|
||||
// a M b = (a R (b&P(a)))
|
||||
// (a M b) M c = (a R (b & Pa)) R (c & P(a M b))
|
||||
// = (a R (b & Pa)) R (c & P(a))
|
||||
// The rules also apply to F:
|
||||
// P(F(a)) = P(a)
|
||||
again:
|
||||
while (const binop* b = is_binop(f))
|
||||
// = (a R (b & Pa)) R (c & P(a & b))
|
||||
//
|
||||
// The code below therefore implement the following
|
||||
// rules:
|
||||
// P(a U b) = P(b)
|
||||
// P(F(a)) = P(a)
|
||||
// P(a M b) = P(a & b)
|
||||
//
|
||||
// The latter rule INCORRECTLY appears as P(a M b)=P(a)
|
||||
// in section 3.5 of
|
||||
// "LTL translation improvements in Spot 1.0",
|
||||
// A. Duret-Lutz. IJCCBS 5(1/2):31-54, March 2014.
|
||||
// and was unfortunately implemented this way until Spot
|
||||
// 1.2.4. A counterexample is given by the formula
|
||||
// G(Fa & ((a M b) U ((c U !d) M d)))
|
||||
// that was found by Joachim Klein. Here P((c U !d) M d)
|
||||
// and P(c U !d) should not both be simplified to P(!d).
|
||||
for (;;)
|
||||
{
|
||||
binop::type op = b->op();
|
||||
if (op == binop::U)
|
||||
f = b->second();
|
||||
else if (op == binop::M)
|
||||
f = b->first();
|
||||
if (const binop* b = is_binop(f))
|
||||
{
|
||||
binop::type op = b->op();
|
||||
if (op == binop::U)
|
||||
{
|
||||
// P(a U b) = P(b)
|
||||
f = b->second();
|
||||
}
|
||||
else if (op == binop::M)
|
||||
{
|
||||
// P(a M b) = P(a & b)
|
||||
const formula* g =
|
||||
multop::instance(multop::And,
|
||||
b->first()->clone(),
|
||||
b->second()->clone());
|
||||
int num = dict->register_acceptance_variable(g, this);
|
||||
a_set &= bdd_ithvar(num);
|
||||
g->destroy();
|
||||
return num;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (const unop* u = is_unop(f, unop::F))
|
||||
{
|
||||
// P(F(a)) = P(a)
|
||||
f = u->child();
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
if (const unop* u = is_unop(f, unop::F))
|
||||
{
|
||||
f = u->child();
|
||||
goto again;
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
int num = dict->register_acceptance_variable(f, this);
|
||||
a_set &= bdd_ithvar(num);
|
||||
|
|
@ -1346,8 +1381,7 @@ namespace spot
|
|||
}
|
||||
else
|
||||
{
|
||||
dest->clone();
|
||||
const formula* dest2 = unop::instance(op, dest);
|
||||
const formula* dest2 = unop::instance(op, dest->clone());
|
||||
if (dest2 == constant::false_instance())
|
||||
continue;
|
||||
int x = dict_.register_next_variable(dest2);
|
||||
|
|
@ -1363,48 +1397,48 @@ namespace spot
|
|||
case unop::NegClosure:
|
||||
rat_seen_ = true;
|
||||
{
|
||||
const formula* c = node->child();
|
||||
if (mark_all_)
|
||||
{
|
||||
op = unop::NegClosureMarked;
|
||||
has_marked_ = true;
|
||||
}
|
||||
bdd f1 = translate_ratexp(c, dict_);
|
||||
|
||||
// trace_ltl_bdd(dict_, f1);
|
||||
const formula* f = node->child();
|
||||
auto p = dict_.transdfa.succ(f);
|
||||
res_ = bddtrue;
|
||||
auto aut = std::get<0>(p);
|
||||
auto namer = std::get<1>(p);
|
||||
auto st = std::get<2>(p);
|
||||
|
||||
bdd var_set = bdd_existcomp(bdd_support(f1), dict_.var_set);
|
||||
bdd all_props = bdd_existcomp(f1, dict_.var_set);
|
||||
if (!aut)
|
||||
break;
|
||||
|
||||
res_ = !all_props &
|
||||
res_ = bddfalse;
|
||||
bdd missing = bddtrue;
|
||||
for (auto i: aut->succ(st))
|
||||
{
|
||||
bdd label = i->current_condition();
|
||||
state* s = i->current_state();
|
||||
const formula* dest = namer->get_name(aut->state_number(s));
|
||||
|
||||
missing -= label;
|
||||
|
||||
if (!dest->accepts_eword())
|
||||
{
|
||||
const formula* dest2 = unop::instance(op, dest->clone());
|
||||
if (dest2 == constant::false_instance())
|
||||
continue;
|
||||
int x = dict_.register_next_variable(dest2);
|
||||
dest2->destroy();
|
||||
res_ |= label & bdd_ithvar(x);
|
||||
}
|
||||
}
|
||||
|
||||
res_ |= missing &
|
||||
// stick X(1) to preserve determinism.
|
||||
bdd_ithvar(dict_.register_next_variable
|
||||
(constant::true_instance()));
|
||||
|
||||
while (all_props != bddfalse)
|
||||
{
|
||||
bdd label = bdd_satoneset(all_props, var_set, bddtrue);
|
||||
all_props -= label;
|
||||
|
||||
const formula* dest =
|
||||
dict_.bdd_to_sere(bdd_exist(f1 & label, dict_.var_set));
|
||||
|
||||
// !{ Exp } is false if Exp accepts the empty word.
|
||||
if (dest->accepts_eword())
|
||||
{
|
||||
dest->destroy();
|
||||
continue;
|
||||
}
|
||||
|
||||
const formula* dest2 = unop::instance(op, dest);
|
||||
|
||||
if (dest2 == constant::false_instance())
|
||||
continue;
|
||||
|
||||
int x = dict_.register_next_variable(dest2);
|
||||
dest2->destroy();
|
||||
res_ |= label & bdd_ithvar(x);
|
||||
}
|
||||
//trace_ltl_bdd(dict_, res_);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1479,9 +1513,23 @@ namespace spot
|
|||
{
|
||||
res_ = recurse(node->second(), recurring_);
|
||||
bdd f1 = recurse(node->first());
|
||||
// r(f1 M f2) = r(f2)(r(f1) + a(f1)X(f1 M f2)) if not recurring
|
||||
// r(f1 M f2) = r(f2)(r(f1) + a(f1)) if recurring
|
||||
bdd a = bdd_ithvar(dict_.register_a_variable(node->first()));
|
||||
// r(f1 M f2) = r(f2)(r(f1) + a(f1&f2)X(f1 M f2)) if not recurring
|
||||
// r(f1 M f2) = r(f2)(r(f1) + a(f1&f2)) if recurring
|
||||
//
|
||||
// Note that the rule above differs from the one given
|
||||
// in Figure 2 of
|
||||
// "LTL translation improvements in Spot 1.0",
|
||||
// A. Duret-Lutz. IJCCBS 5(1/2):31-54, March 2014.
|
||||
// Both rules should be OK, but this one is a better fit
|
||||
// to the promises simplifications performed in
|
||||
// register_a_variable() (see comments in this function).
|
||||
// We do not want a U (c M d) to generate two different
|
||||
// promises. Generating c&d also makes the output similar
|
||||
// to what we would get with the equivalent a U (d U (c & d)).
|
||||
//
|
||||
// Here we just appear to emit a(f1 M f2) and the conversion
|
||||
// to a(f1&f2) is done by register_a_variable().
|
||||
bdd a = bdd_ithvar(dict_.register_a_variable(node));
|
||||
if (!recurring_)
|
||||
a &= bdd_ithvar(dict_.register_next_variable(node));
|
||||
res_ &= f1 | a;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue