Commit 919fc298 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Fix the computation of the length of multops.

* src/ltlvisit/length.cc (visit(multop*)): New function. "a & b &
c" has length 5, not 4, even though it is stored as And(a,b,c).
This caused reduc.test to fail on some formulae.
parent e733f951
2010-01-22 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix the computation of the length of multops.
* src/ltlvisit/length.cc (visit(multop*)): New function. "a & b &
c" has length 5, not 4, even though it is stored as And(a,b,c).
This caused reduc.test to fail on some formulae.
2010-01-21 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Please the style checks...
......
// Copyright (C) 2010 Laboratoire de Recherche et Dveloppement de
// l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre
// et Marie Curie.
......@@ -21,6 +23,7 @@
#include "length.hh"
#include "ltlvisit/postfix.hh"
#include "ltlast/multop.hh"
namespace spot
{
......@@ -42,6 +45,17 @@ namespace spot
return result_;
}
virtual void
visit(multop* mo)
{
unsigned s = mo->size();
for (unsigned i = 0; i < s; ++i)
mo->nth(i)->accept(*this);
// "a & b & c" should count for 5, even though it is
// stored as And(a,b,c).
mo += s - 1;
}
virtual void
doit_default(formula*)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment