Cosmetics.
* src/sanity/style.test: Catch some binary operators not delimited with spaces. * src/tgbaalgos/bfssteps.cc, src/tgbaalgos/magic.cc, src/tgbaalgos/reducerun.cc, src/tgbaalgos/se05.cc, src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03opt.cc: Fix these.
This commit is contained in:
parent
36f7c648b6
commit
12783ff784
8 changed files with 51 additions and 35 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -1,3 +1,13 @@
|
||||||
|
2011-03-31 Alexandre Duret-Lutz <adl@va-et-vient.net>
|
||||||
|
|
||||||
|
Cosmetics.
|
||||||
|
|
||||||
|
* src/sanity/style.test: Catch some binary operators not
|
||||||
|
delimited with spaces.
|
||||||
|
* src/tgbaalgos/bfssteps.cc, src/tgbaalgos/magic.cc,
|
||||||
|
src/tgbaalgos/reducerun.cc, src/tgbaalgos/se05.cc,
|
||||||
|
src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03opt.cc: Fix these.
|
||||||
|
|
||||||
2011-03-31 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
2011-03-31 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
Make state_explicit instances persistent objects.
|
Make state_explicit instances persistent objects.
|
||||||
|
|
|
||||||
|
|
@ -121,10 +121,16 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
|
||||||
grep ",[^ \t\"%']" $tmp &&
|
grep ",[^ \t\"%']" $tmp &&
|
||||||
diag 'Space after coma.'
|
diag 'Space after coma.'
|
||||||
|
|
||||||
grep '[^ ]&&[^ ]' $tmp &&
|
# The 'r' allows operator&&
|
||||||
|
grep '[^ r]&&[^ ]' $tmp &&
|
||||||
diag 'Space arround binary operators.'
|
diag 'Space arround binary operators.'
|
||||||
|
|
||||||
grep '[^ ]||[^ ]' $tmp &&
|
# The 'r' allows operator||
|
||||||
|
grep '[^ r]||[^ ]' $tmp &&
|
||||||
|
diag 'Space arround binary operators.'
|
||||||
|
|
||||||
|
# The 'r' allows operator==
|
||||||
|
grep '[^ r][!<>=]=[^ ]' $tmp &&
|
||||||
diag 'Space arround binary operators.'
|
diag 'Space arround binary operators.'
|
||||||
|
|
||||||
grep '[ ]default:[^:].*;' $tmp &&
|
grep '[ ]default:[^:].*;' $tmp &&
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ namespace spot
|
||||||
break;
|
break;
|
||||||
std::map<const state*, tgba_run::step,
|
std::map<const state*, tgba_run::step,
|
||||||
state_ptr_less_than>::const_iterator it = father.find(current.s);
|
state_ptr_less_than>::const_iterator it = father.find(current.s);
|
||||||
assert(it!=father.end());
|
assert(it != father.end());
|
||||||
current = it->second;
|
current = it->second;
|
||||||
}
|
}
|
||||||
l.splice(l.end(), p);
|
l.splice(l.end(), p);
|
||||||
|
|
|
||||||
|
|
@ -447,7 +447,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
bool is_white() const
|
bool is_white() const
|
||||||
{
|
{
|
||||||
return p==0;
|
return p == 0;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
color *p;
|
color *p;
|
||||||
|
|
@ -472,19 +472,19 @@ namespace spot
|
||||||
color_ref get_color_ref(const state*& s)
|
color_ref get_color_ref(const state*& s)
|
||||||
{
|
{
|
||||||
hash_type::iterator it = h.find(s);
|
hash_type::iterator it = h.find(s);
|
||||||
if (it==h.end())
|
if (it == h.end())
|
||||||
return color_ref(0);
|
return color_ref(0);
|
||||||
if (s!=it->first)
|
if (s != it->first)
|
||||||
{
|
{
|
||||||
s->destroy();
|
s->destroy();
|
||||||
s = it->first;
|
s = it->first;
|
||||||
}
|
}
|
||||||
return color_ref(&(it->second));
|
return color_ref(&it->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_new_state(const state* s, color c)
|
void add_new_state(const state* s, color c)
|
||||||
{
|
{
|
||||||
assert(h.find(s)==h.end());
|
assert(h.find(s) == h.end());
|
||||||
h.insert(std::make_pair(s, c));
|
h.insert(std::make_pair(s, c));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -532,7 +532,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
bool is_white() const
|
bool is_white() const
|
||||||
{
|
{
|
||||||
return get_color()==WHITE;
|
return get_color() == WHITE;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
unsigned char *base;
|
unsigned char *base;
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ namespace spot
|
||||||
filter(const state* s)
|
filter(const state* s)
|
||||||
{
|
{
|
||||||
state_set::const_iterator i = seen.find(s);
|
state_set::const_iterator i = seen.find(s);
|
||||||
if (i==seen.end())
|
if (i == seen.end())
|
||||||
seen.insert(s);
|
seen.insert(s);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -469,7 +469,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
assert(c != CYAN);
|
assert(c != CYAN);
|
||||||
int i = phc->erase(ps);
|
int i = phc->erase(ps);
|
||||||
assert(i==1);
|
assert(i == 1);
|
||||||
(void)i;
|
(void)i;
|
||||||
ph->insert(std::make_pair(ps, c));
|
ph->insert(std::make_pair(ps, c));
|
||||||
}
|
}
|
||||||
|
|
@ -480,7 +480,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
bool is_white() const
|
bool is_white() const
|
||||||
{
|
{
|
||||||
return !is_cyan && pc==0;
|
return !is_cyan && pc == 0;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
bool is_cyan;
|
bool is_cyan;
|
||||||
|
|
@ -515,19 +515,19 @@ namespace spot
|
||||||
color_ref get_color_ref(const state*& s)
|
color_ref get_color_ref(const state*& s)
|
||||||
{
|
{
|
||||||
hcyan_type::iterator ic = hc.find(s);
|
hcyan_type::iterator ic = hc.find(s);
|
||||||
if (ic==hc.end())
|
if (ic == hc.end())
|
||||||
{
|
{
|
||||||
hash_type::iterator it = h.find(s);
|
hash_type::iterator it = h.find(s);
|
||||||
if (it==h.end())
|
if (it == h.end())
|
||||||
return color_ref(0); // white state
|
return color_ref(0); // white state
|
||||||
if (s!=it->first)
|
if (s != it->first)
|
||||||
{
|
{
|
||||||
s->destroy();
|
s->destroy();
|
||||||
s = it->first;
|
s = it->first;
|
||||||
}
|
}
|
||||||
return color_ref(&(it->second)); // blue or red state
|
return color_ref(&it->second); // blue or red state
|
||||||
}
|
}
|
||||||
if (s!=*ic)
|
if (s != *ic)
|
||||||
{
|
{
|
||||||
s->destroy();
|
s->destroy();
|
||||||
s = *ic;
|
s = *ic;
|
||||||
|
|
@ -537,7 +537,7 @@ namespace spot
|
||||||
|
|
||||||
void add_new_state(const state* s, color c)
|
void add_new_state(const state* s, color c)
|
||||||
{
|
{
|
||||||
assert(hc.find(s)==hc.end() && h.find(s)==h.end());
|
assert(hc.find(s) == hc.end() && h.find(s) == h.end());
|
||||||
if (c == CYAN)
|
if (c == CYAN)
|
||||||
hc.insert(s);
|
hc.insert(s);
|
||||||
else
|
else
|
||||||
|
|
@ -599,17 +599,17 @@ namespace spot
|
||||||
}
|
}
|
||||||
void set_color(color c)
|
void set_color(color c)
|
||||||
{
|
{
|
||||||
if (is_cyan && c!=CYAN)
|
if (is_cyan && c != CYAN)
|
||||||
{
|
{
|
||||||
int i = phc->erase(ps);
|
int i = phc->erase(ps);
|
||||||
assert(i==1);
|
assert(i == 1);
|
||||||
(void)i;
|
(void)i;
|
||||||
}
|
}
|
||||||
*b = (*b & ~(3U << o)) | (c << o);
|
*b = (*b & ~(3U << o)) | (c << o);
|
||||||
}
|
}
|
||||||
bool is_white() const
|
bool is_white() const
|
||||||
{
|
{
|
||||||
return get_color()==WHITE;
|
return get_color() == WHITE;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
bool is_cyan;
|
bool is_cyan;
|
||||||
|
|
@ -634,7 +634,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
size_t ha = s->hash();
|
size_t ha = s->hash();
|
||||||
hcyan_type::iterator ic = hc.find(s);
|
hcyan_type::iterator ic = hc.find(s);
|
||||||
if (ic!=hc.end())
|
if (ic != hc.end())
|
||||||
return color_ref(&hc, *ic, &h[ha%size_], ha%4);
|
return color_ref(&hc, *ic, &h[ha%size_], ha%4);
|
||||||
return color_ref(&h[ha%size_], ha%4);
|
return color_ref(&h[ha%size_], ha%4);
|
||||||
}
|
}
|
||||||
|
|
@ -642,7 +642,7 @@ namespace spot
|
||||||
void add_new_state(const state* s, color c)
|
void add_new_state(const state* s, color c)
|
||||||
{
|
{
|
||||||
assert(get_color_ref(s).is_white());
|
assert(get_color_ref(s).is_white());
|
||||||
if (c==CYAN)
|
if (c == CYAN)
|
||||||
hc.insert(s);
|
hc.insert(s);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -337,19 +337,19 @@ namespace spot
|
||||||
color_ref get_color_ref(const state*& s)
|
color_ref get_color_ref(const state*& s)
|
||||||
{
|
{
|
||||||
hash_type::iterator it = h.find(s);
|
hash_type::iterator it = h.find(s);
|
||||||
if (it==h.end())
|
if (it == h.end())
|
||||||
return color_ref(0, 0);
|
return color_ref(0, 0);
|
||||||
if (s!=it->first)
|
if (s != it->first)
|
||||||
{
|
{
|
||||||
s->destroy();
|
s->destroy();
|
||||||
s = it->first;
|
s = it->first;
|
||||||
}
|
}
|
||||||
return color_ref(&(it->second.first), &(it->second.second));
|
return color_ref(&it->second.first, &it->second.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_new_state(const state* s, color c)
|
void add_new_state(const state* s, color c)
|
||||||
{
|
{
|
||||||
assert(h.find(s)==h.end());
|
assert(h.find(s) == h.end());
|
||||||
h.insert(std::make_pair(s, std::make_pair(c, bddfalse)));
|
h.insert(std::make_pair(s, std::make_pair(c, bddfalse)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -450,7 +450,7 @@ namespace spot
|
||||||
assert(p.second);
|
assert(p.second);
|
||||||
acc = &(p.first->second.second);
|
acc = &(p.first->second.second);
|
||||||
int i = phc->erase(ps);
|
int i = phc->erase(ps);
|
||||||
assert(i==1);
|
assert(i == 1);
|
||||||
(void)i;
|
(void)i;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -508,33 +508,33 @@ namespace spot
|
||||||
color_ref get_color_ref(const state*& s)
|
color_ref get_color_ref(const state*& s)
|
||||||
{
|
{
|
||||||
hcyan_type::iterator ic = hc.find(s);
|
hcyan_type::iterator ic = hc.find(s);
|
||||||
if (ic==hc.end())
|
if (ic == hc.end())
|
||||||
{
|
{
|
||||||
hash_type::iterator it = h.find(s);
|
hash_type::iterator it = h.find(s);
|
||||||
if (it==h.end())
|
if (it == h.end())
|
||||||
// white state
|
// white state
|
||||||
return color_ref(0, 0);
|
return color_ref(0, 0);
|
||||||
if (s!=it->first)
|
if (s != it->first)
|
||||||
{
|
{
|
||||||
s->destroy();
|
s->destroy();
|
||||||
s = it->first;
|
s = it->first;
|
||||||
}
|
}
|
||||||
// blue or red state
|
// blue or red state
|
||||||
return color_ref(&(it->second.first), &(it->second.second));
|
return color_ref(&it->second.first, &it->second.second);
|
||||||
}
|
}
|
||||||
if (s!=ic->first)
|
if (s != ic->first)
|
||||||
{
|
{
|
||||||
s->destroy();
|
s->destroy();
|
||||||
s = ic->first;
|
s = ic->first;
|
||||||
}
|
}
|
||||||
// cyan state
|
// cyan state
|
||||||
return color_ref(&h, &hc, ic->first,
|
return color_ref(&h, &hc, ic->first,
|
||||||
&(ic->second.first), &(ic->second.second));
|
&ic->second.first, &ic->second.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_new_state(const state* s, color c, const weight& w)
|
void add_new_state(const state* s, color c, const weight& w)
|
||||||
{
|
{
|
||||||
assert(hc.find(s)==hc.end() && h.find(s)==h.end());
|
assert(hc.find(s) == hc.end() && h.find(s) == h.end());
|
||||||
assert(c == CYAN);
|
assert(c == CYAN);
|
||||||
(void)c;
|
(void)c;
|
||||||
hc.insert(std::make_pair(s, std::make_pair(w, bddfalse)));
|
hc.insert(std::make_pair(s, std::make_pair(w, bddfalse)));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue