Adjust some uses of bddtrue/bddfalse.
* src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/eltl2tgba_lacim.cc, src/tgbaalgos/simulation.cc, src/tgbaalgos/tau03opt.cc: Fix cases where bddtrue and bddfalse where used in a ternary operator. * src/sanity/style.test: Allow bdd_true()/bdd_false() to be used in ternary operators.
This commit is contained in:
parent
af6cb049f2
commit
4df4b4efd2
5 changed files with 26 additions and 17 deletions
|
|
@ -246,7 +246,8 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
|
||||||
grep '[^a-zA-Z0-9_](\*[a-zA-Z0-9_]*)\.' $tmp &&
|
grep '[^a-zA-Z0-9_](\*[a-zA-Z0-9_]*)\.' $tmp &&
|
||||||
diag 'Use "x->y", not "(*x).y"'
|
diag 'Use "x->y", not "(*x).y"'
|
||||||
|
|
||||||
egrep 'bdd_(false|true)[ ]*\(' $tmp &&
|
# we allow these functions only in ?...:...
|
||||||
|
egrep 'bdd_(false|true)[ ]*\(' $tmp | grep -v '[?:]' &&
|
||||||
diag 'Use bddfalse and bddtrue instead of bdd_false() and bdd_true()'
|
diag 'Use bddfalse and bddtrue instead of bdd_false() and bdd_true()'
|
||||||
|
|
||||||
res=`perl -ne '$/ = undef;
|
res=`perl -ne '$/ = undef;
|
||||||
|
|
|
||||||
|
|
@ -768,8 +768,9 @@ namespace spot
|
||||||
|
|
||||||
bdd f2 = p.acc_cand |
|
bdd f2 = p.acc_cand |
|
||||||
d.all_cand_acc[f];
|
d.all_cand_acc[f];
|
||||||
bdd f2p = is_weak ? bddfalse
|
bdd f2p = bddfalse;
|
||||||
: p.acc_ref | curacc;
|
if (!is_weak)
|
||||||
|
f2p = p.acc_ref | curacc;
|
||||||
|
|
||||||
path p2(p.src_cand, p.src_ref,
|
path p2(p.src_cand, p.src_ref,
|
||||||
q3, dp, f2, f2p);
|
q3, dp, f2, f2p);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2008, 2009, 2010, 2012, 2013 Laboratoire de Recherche et
|
// Copyright (C) 2008, 2009, 2010, 2012, 2013, 2014 Laboratoire de
|
||||||
// Développement de l'Epita (LRDE).
|
// Recherche et Développement de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -195,7 +195,10 @@ namespace spot
|
||||||
|
|
||||||
// Update finish_ with finish(node).
|
// Update finish_ with finish(node).
|
||||||
// FIXME: when node is loop, it does not make sense; hence the bddtrue.
|
// FIXME: when node is loop, it does not make sense; hence the bddtrue.
|
||||||
finish_[node] = !node->get_nfa()->is_loop() ? bddtrue : finish;
|
if (!node->get_nfa()->is_loop())
|
||||||
|
finish_[node] = bddtrue;
|
||||||
|
else
|
||||||
|
finish_[node] = finish;
|
||||||
|
|
||||||
bdd tmp = bddtrue;
|
bdd tmp = bddtrue;
|
||||||
for (nmap::iterator it = m.begin(); it != m.end(); ++it)
|
for (nmap::iterator it = m.begin(); it != m.end(); ++it)
|
||||||
|
|
|
||||||
|
|
@ -470,8 +470,10 @@ namespace spot
|
||||||
// simplifications in the signature by removing a
|
// simplifications in the signature by removing a
|
||||||
// transition which has as a destination a state with
|
// transition which has as a destination a state with
|
||||||
// no outgoing transition.
|
// no outgoing transition.
|
||||||
now_to_next[p.first] =
|
bdd acc = bddfalse;
|
||||||
(p.first == bddfalse) ? bddfalse : *it_bdd;
|
if (p.first != bddfalse)
|
||||||
|
acc = *it_bdd;
|
||||||
|
now_to_next[p.first] = acc;
|
||||||
++it_bdd;
|
++it_bdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -650,15 +652,17 @@ namespace spot
|
||||||
|
|
||||||
if (Cosimulation)
|
if (Cosimulation)
|
||||||
{
|
{
|
||||||
gb->new_transition(dst.id(), src.id(),
|
|
||||||
cond, Sba ? bddfalse : acc);
|
|
||||||
if (Sba)
|
if (Sba)
|
||||||
|
{
|
||||||
// acc should be attached to src, or rather,
|
// acc should be attached to src, or rather,
|
||||||
// in our transition-based representation)
|
// in our transition-based representation)
|
||||||
// to all transitions leaving src. As we
|
// to all transitions leaving src. As we
|
||||||
// can't do this here, store this in a table
|
// can't do this here, store this in a table
|
||||||
// so we can fix it later.
|
// so we can fix it later.
|
||||||
accst[gb->get_state(src.id())] = acc;
|
accst[gb->get_state(src.id())] = acc;
|
||||||
|
acc = bddfalse;
|
||||||
|
}
|
||||||
|
gb->new_transition(dst.id(), src.id(), cond, acc);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -347,7 +347,7 @@ namespace spot
|
||||||
else if (c_prime.get_color() == CYAN &&
|
else if (c_prime.get_color() == CYAN &&
|
||||||
(all_acc == ((use_red_weights ?
|
(all_acc == ((use_red_weights ?
|
||||||
(current_weight - c_prime.get_weight())
|
(current_weight - c_prime.get_weight())
|
||||||
: bddfalse)
|
: bdd_false())
|
||||||
| c_prime.get_acc()
|
| c_prime.get_acc()
|
||||||
| acc
|
| acc
|
||||||
| acu)))
|
| acu)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue