* 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
|
|
@ -1,5 +1,7 @@
|
|||
#include "tgbabdddict.hh"
|
||||
#include "ltlvisit/tostring.hh"
|
||||
#include "ltlvisit/clone.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
@ -55,4 +57,47 @@ namespace spot
|
|||
return true;
|
||||
}
|
||||
|
||||
tgba_bdd_dict::tgba_bdd_dict()
|
||||
{
|
||||
}
|
||||
|
||||
tgba_bdd_dict::tgba_bdd_dict(const tgba_bdd_dict& other)
|
||||
: now_map(other.now_map),
|
||||
now_formula_map(other.now_formula_map),
|
||||
var_map(other.var_map),
|
||||
var_formula_map(other.var_formula_map),
|
||||
prom_map(other.prom_map),
|
||||
prom_formula_map(other.prom_formula_map)
|
||||
{
|
||||
fv_map::iterator i;
|
||||
for (i = now_map.begin(); i != now_map.end(); ++i)
|
||||
ltl::clone(i->first);
|
||||
for (i = var_map.begin(); i != var_map.end(); ++i)
|
||||
ltl::clone(i->first);
|
||||
for (i = prom_map.begin(); i != prom_map.end(); ++i)
|
||||
ltl::clone(i->first);
|
||||
}
|
||||
|
||||
tgba_bdd_dict&
|
||||
tgba_bdd_dict::operator=(const tgba_bdd_dict& other)
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
this->~tgba_bdd_dict();
|
||||
new (this) tgba_bdd_dict(other);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
tgba_bdd_dict::~tgba_bdd_dict()
|
||||
{
|
||||
fv_map::iterator i;
|
||||
for (i = now_map.begin(); i != now_map.end(); ++i)
|
||||
ltl::destroy(i->first);
|
||||
for (i = var_map.begin(); i != var_map.end(); ++i)
|
||||
ltl::destroy(i->first);
|
||||
for (i = prom_map.begin(); i != prom_map.end(); ++i)
|
||||
ltl::destroy(i->first);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue