* src/ltlvisit/clone.hh, src/ltlvisit/clone.cc: New files.
* src/ltlvisit/Makefile.am (libltlvisit_a_SOURCES): Add them. * src/ltlvisit/lunabbrev.hh, src/ltlvisit/lunabbrev.cc: Inherit from clone_visitor and remove all useless methods (now inherited).
This commit is contained in:
parent
0c7a2412a4
commit
ae7fdeba59
6 changed files with 125 additions and 50 deletions
|
|
@ -13,30 +13,6 @@ namespace spot
|
|||
{
|
||||
}
|
||||
|
||||
formula*
|
||||
unabbreviate_logic_visitor::result() const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
void
|
||||
unabbreviate_logic_visitor::visit(const atomic_prop* ap)
|
||||
{
|
||||
result_ = new atomic_prop(ap->name());
|
||||
}
|
||||
|
||||
void
|
||||
unabbreviate_logic_visitor::visit(const constant* c)
|
||||
{
|
||||
result_ = new constant(c->val());
|
||||
}
|
||||
|
||||
void
|
||||
unabbreviate_logic_visitor::visit(const unop* uo)
|
||||
{
|
||||
result_ = new unop(uo->op(), recurse(uo->child()));
|
||||
}
|
||||
|
||||
void
|
||||
unabbreviate_logic_visitor::visit(const binop* bo)
|
||||
{
|
||||
|
|
@ -74,20 +50,9 @@ namespace spot
|
|||
/* Unreachable code. */
|
||||
assert(0);
|
||||
}
|
||||
|
||||
void
|
||||
unabbreviate_logic_visitor::visit(const multop* mo)
|
||||
{
|
||||
multop* res = new multop(mo->op());
|
||||
unsigned mos = mo->size();
|
||||
for (unsigned i = 0; i < mos; ++i)
|
||||
{
|
||||
res->add(recurse(mo->nth(i)));
|
||||
}
|
||||
result_ = res;
|
||||
}
|
||||
|
||||
formula* unabbreviate_logic_visitor::recurse(const formula* f)
|
||||
formula*
|
||||
unabbreviate_logic_visitor::recurse(const formula* f)
|
||||
{
|
||||
return unabbreviate_logic(f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue