Deprecate ltl::destroy(f) in favor of f->destroy()

* src/ltlast/formula.cc, src/ltlast/formula.hh (formula::clone):
Transform this static function into a member function.
* src/ltlvisit/destroy.hh (destroy): Document and declare as
deprecated.
* bench/split-product/cutscc.cc, iface/gspn/ltlgspn.cc,
src/eltlparse/eltlparse.yy, src/eltltest/acc.cc,
src/evtgbaalgos/tgba2evtgba.cc, src/evtgbatest/ltl2evtgba.cc,
src/ltlast/automatop.cc, src/ltlast/binop.cc,
src/ltlast/multop.cc, src/ltlast/unop.cc, src/ltlenv/declenv.cc,
src/ltlenv/declenv.hh, src/ltlparse/ltlparse.yy,
src/ltltest/equals.cc, src/ltltest/randltl.cc,
src/ltltest/readltl.cc, src/ltltest/reduc.cc,
src/ltltest/syntimpl.cc, src/ltltest/tostring.cc,
src/ltlvisit/destroy.cc src/ltlvisit/basicreduce.cc,
src/ltlvisit/contain.cc, src/ltlvisit/reduce.cc,
src/ltlvisit/syntimpl.cc, src/tgba/bdddict.cc,
src/tgba/bddprint.cc, src/tgba/taa.cc,
src/tgba/tgbabddconcretefactory.cc, src/tgba/tgbaexplicit.cc,
src/tgba/tgbafromfile.cc, src/tgbaalgos/eltl2tgba_lacim.cc,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/ltl2tgba_lacim.cc, src/tgbaalgos/neverclaim.cc,
src/tgbaalgos/randomgraph.cc, src/tgbaparse/tgbaparse.yy,
src/tgbatest/complementation.cc, src/tgbatest/eltl2tgba.cc,
src/tgbatest/ltl2tgba.cc, src/tgbatest/ltlprod.cc,
src/tgbatest/mixprod.cc, src/tgbatest/randtgba.cc,
src/tgbatest/reductgba.cc, wrap/python/cgi/ltl2tgba.in,
wrap/python/tests/ltl2tgba.py, wrap/python/tests/ltlparse.py,
wrap/python/tests/ltlsimple.py: Adjust destroy() usage, and remove
the #include "destroy.hh" when appropriate.
This commit is contained in:
Alexandre Duret-Lutz 2009-11-09 06:54:52 +01:00
parent 48fb19ea44
commit 77df39b4dd
53 changed files with 260 additions and 259 deletions

View file

@ -1,6 +1,6 @@
// Copyright (C) 2004, 2007, 2008, 2009 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
// Copyright (C) 2004, 2007, 2008, 2009 Laboratoire d'Informatique de
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
// Université Pierre et Marie Curie.
//
// This file is part of Spot, a model checking library.
//
@ -24,8 +24,6 @@
#include "ltlast/allnodes.hh"
#include <cassert>
#include "destroy.hh"
namespace spot
{
namespace ltl
@ -97,7 +95,7 @@ namespace spot
resGF->push_back(mo->nth(i)->clone());
else
res1->push_back(mo->nth(i)->clone());
destroy(mo);
mo->destroy();
multop::vec* res3 = new multop::vec;
if (!res1->empty())
res3->push_back(unop::instance(op,
@ -162,10 +160,10 @@ namespace spot
unop::instance(unop::X,
unop::instance(unop::F,
basic_reduce(u->child())));
destroy(u);
u->destroy();
// FXX(a) = XXF(a) ...
result_ = basic_reduce(res);
destroy(res);
res->destroy();
return;
}
@ -192,7 +190,7 @@ namespace spot
{
result_ = unop::instance(unop::G,
basic_reduce(bo->second()));
destroy(bo);
bo->destroy();
return;
}
@ -204,11 +202,11 @@ namespace spot
unop::instance(unop::X,
unop::instance(unop::G,
basic_reduce(u->child())));
destroy(u);
u->destroy();
// GXX(a) = XXG(a) ...
// GXF(a) = XGF(a) = GF(a) ...
result_ = basic_reduce(res);
destroy(res);
res->destroy();
return;
}
@ -275,9 +273,9 @@ namespace spot
basic_reduce(fu1->child()),
basic_reduce(fu2->child()));
result_ = unop::instance(unop::X, basic_reduce(ftmp));
destroy(f1);
destroy(f2);
destroy(ftmp);
f1->destroy();
f2->destroy();
ftmp->destroy();
return;
}
@ -362,7 +360,7 @@ namespace spot
->push_back(bo2->first()->clone());
if (j != i)
{
destroy(*j);
(*j)->destroy();
*j = 0;
}
}
@ -393,7 +391,7 @@ namespace spot
->push_back(bo2->second()->clone());
if (j != i)
{
destroy(*j);
(*j)->destroy();
*j = 0;
}
}
@ -414,7 +412,7 @@ namespace spot
{
tmpOther->push_back((*i)->clone());
}
destroy(*i);
(*i)->destroy();
}
delete tmpGF;
@ -473,7 +471,7 @@ namespace spot
->push_back(bo2->second()->clone());
if (j != i)
{
destroy(*j);
(*j)->destroy();
*j = 0;
}
}
@ -502,7 +500,7 @@ namespace spot
->push_back(bo2->first()->clone());
if (j != i)
{
destroy(*j);
(*j)->destroy();
*j = 0;
}
}
@ -523,7 +521,7 @@ namespace spot
{
tmpOther->push_back((*i)->clone());
}
destroy(*i);
(*i)->destroy();
}
break;