* src/ltlvisit/clone.cc (clone): New const version.

* src/ltlvisit/clone.hh (clone): Likewise.
* src/ltlvisit/destroy.cc (destroy): New const version.
* src/ltlvisit/destroy.hh (destroy): Likewise.
* src/tgba/tgbabddconcretefactory.cc
(tgba_bdd_concrete_factory::create_state,
tgba_bdd_concrete_factory::create_atomic_prop,
tgba_bdd_concrete_factory::promise): Clone new formulae.
* src/tgba/tgbabdddict.cc (tgba_bdd_dict::tgba_bdd_dict,
tgba_bdd_dict::~tgba_bdd_dict, tgba_bdd_dict::operator=): New methods
that clone and destroy formulae.
* src/tgbatest/ltl2tgba.test, src/tgbatest/ltl2tgba.cc: New files.
* src/tgbatest/Makefile.am (check_PROGRAMS): Add ltl2tgba.
(ltl2tgba_SOURCES): New variable.
(TESTS): Add ltl2tgba.test.
This commit is contained in:
Alexandre Duret-Lutz 2003-06-06 12:45:11 +00:00
parent 578fa26cf3
commit 3991a51a17
12 changed files with 170 additions and 6 deletions

View file

@ -70,5 +70,10 @@ namespace spot
return v.result();
}
formula*
clone(const formula* f)
{
return clone(const_cast<formula*>(f));
}
}
}

View file

@ -36,6 +36,8 @@ namespace spot
/// \brief Clone a formula.
formula* clone(formula* f);
/// \brief Clone a formula.
formula* clone(const formula* f);
}
}

View file

@ -16,10 +16,16 @@ namespace spot
};
void
destroy(formula *f)
destroy(formula* f)
{
destroy_visitor v;
f->accept(v);
}
void
destroy(const formula* f)
{
destroy(const_cast<formula*>(f));
}
}
}

View file

@ -9,6 +9,8 @@ namespace spot
{
/// \brief Destroys a formula
void destroy(formula *f);
/// \brief Destroys a formula
void destroy(const formula *f);
}
}