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

* src/ltlast/formulae.hh (formulae::equals): Remove.

* src/ltlast/unop.hh (unop::equals): Remove.
* src/ltlast/unop.cc (unop::equals): Remove.
* src/ltlast/binop.hh (binop::equals): Remove.
* src/ltlast/binop.cc (binop::equals): Remove.
* src/ltlast/multop.hh (multop::equals): Remove.
* src/ltlast/multop.cc (multop::equals): Remove.
* src/ltlast/atomic_prop.hh (atomic_prop::equals): Remove.
* src/ltlast/atomic_prop.cc (atomic_prop::equals): Remove.
* src/ltlast/constant.hh (constant::equals): Remove.
* src/ltlast/constant.cc (constant::equals): Remove.
parent f0a8d0ae
2003-04-15 Alexandre DURET-LUTZ <aduret@src.lip6.fr>
* src/ltlast/formulae.hh (formulae::equals): Remove.
* src/ltlast/unop.hh (unop::equals): Remove.
* src/ltlast/unop.cc (unop::equals): Remove.
* src/ltlast/binop.hh (binop::equals): Remove.
* src/ltlast/binop.cc (binop::equals): Remove.
* src/ltlast/multop.hh (multop::equals): Remove.
* src/ltlast/multop.cc (multop::equals): Remove.
* src/ltlast/atomic_prop.hh (atomic_prop::equals): Remove.
* src/ltlast/atomic_prop.cc (atomic_prop::equals): Remove.
* src/ltlast/constant.hh (constant::equals): Remove.
* src/ltlast/constant.cc (constant::equals): Remove.
* HACKING, Makefile.am, configure.ac, m4/gccwarn.m4,
src/Makefile.am, src/ltlast/Makefile.am, src/ltlast/allnodes.hh,
src/ltlast/atomic_prop.cc, src/ltlast/atomic_prop.hh,
......
......@@ -27,13 +27,6 @@ namespace spot
v.visit(this);
}
bool
atomic_prop::equals(const formulae* f) const
{
const atomic_prop* p = dynamic_cast<const atomic_prop*>(f);
return p && p->name() == name();
}
const std::string&
atomic_prop::name() const
{
......
......@@ -18,8 +18,6 @@ namespace spot
virtual void accept(visitor& visitor);
virtual void accept(const_visitor& visitor) const;
virtual bool equals(const formulae* f) const;
const std::string& name() const;
private:
std::string name_;
......
......@@ -51,15 +51,6 @@ namespace spot
return second_;
}
bool
binop::equals(const formulae* f) const
{
const binop* p = dynamic_cast<const binop*>(f);
return p && p->op() == op()
&& first()->equals(p->first())
&& second()->equals(p->second());
}
binop::type
binop::op() const
{
......
......@@ -21,8 +21,6 @@ namespace spot
virtual void accept(visitor& v);
virtual void accept(const_visitor& v) const;
virtual bool equals(const formulae* f) const;
const formulae* first() const;
formulae* first();
const formulae* second() const;
......
......@@ -27,13 +27,6 @@ namespace spot
v.visit(this);
}
bool
constant::equals(const formulae* f) const
{
const constant* p = dynamic_cast<const constant*>(f);
return p && p->val() == val();
}
constant::type
constant::val() const
{
......
......@@ -19,8 +19,6 @@ namespace spot
virtual void accept(visitor& v);
virtual void accept(const_visitor& v) const;
virtual bool equals(const formulae* h) const;
const formulae* child() const;
formulae* child();
......
......@@ -13,8 +13,6 @@ namespace spot
public:
virtual void accept(visitor& v) = 0;
virtual void accept(const_visitor& v) const = 0;
virtual bool equals(const formulae* f) const = 0;
};
}
......
......@@ -60,38 +60,6 @@ namespace spot
return op_;
}
bool
multop::equals(const formulae* f) const
{
// This check is a bit more complicated than other checks
// because And(a, b, c) is equal to And(c, a, b, a).
const multop* p1 = dynamic_cast<const multop*>(f);
if (!p1 || p1->op() != op())
return false;
const multop* p2 = this;
unsigned s1 = p1->size();
unsigned s2 = p2->size();
if (s1 > s2)
{
std::swap(s1, s2);
std::swap(p1, p2);
}
for (unsigned n1 = 0; n1 < s1; ++n1)
{
unsigned n2;
for (n2 = 0; n2 < s2; ++n2)
{
if (p1->nth(n1)->equals(p2->nth(n2)))
break;
}
if (n2 == s2)
return false;
}
return true;
}
const char*
multop::op_name() const
{
......
......@@ -24,8 +24,6 @@ namespace spot
virtual void accept(visitor& v);
virtual void accept(const_visitor& v) const;
virtual bool equals(const formulae* f) const;
unsigned size() const;
const formulae* nth(unsigned n) const;
formulae* nth(unsigned n);
......
......@@ -39,13 +39,6 @@ namespace spot
return child_;
}
bool
unop::equals(const formulae* f) const
{
const unop* p = dynamic_cast<const unop*>(f);
return p && p->op() == op() && child()->equals(p->child());
}
unop::type
unop::op() const
{
......
......@@ -19,8 +19,6 @@ namespace spot
virtual void accept(visitor& v);
virtual void accept(const_visitor& v) const;
virtual bool equals(const formulae* h) const;
const formulae* child() const;
formulae* child();
......
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