* 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:
parent
578fa26cf3
commit
3991a51a17
12 changed files with 170 additions and 6 deletions
|
|
@ -70,5 +70,10 @@ namespace spot
|
|||
return v.result();
|
||||
}
|
||||
|
||||
formula*
|
||||
clone(const formula* f)
|
||||
{
|
||||
return clone(const_cast<formula*>(f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ namespace spot
|
|||
|
||||
/// \brief Clone a formula.
|
||||
formula* clone(formula* f);
|
||||
/// \brief Clone a formula.
|
||||
formula* clone(const formula* f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ namespace spot
|
|||
{
|
||||
/// \brief Destroys a formula
|
||||
void destroy(formula *f);
|
||||
/// \brief Destroys a formula
|
||||
void destroy(const formula *f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue