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:
parent
48fb19ea44
commit
77df39b4dd
53 changed files with 260 additions and 259 deletions
|
|
@ -28,7 +28,6 @@
|
|||
#include "lunabbrev.hh"
|
||||
#include "simpfg.hh"
|
||||
#include "nenoform.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "contain.hh"
|
||||
|
||||
namespace spot
|
||||
|
|
@ -137,14 +136,14 @@ namespace spot
|
|||
if (syntactic_implication(f1, f2))
|
||||
{
|
||||
result_ = f2;
|
||||
destroy(f1);
|
||||
f1->destroy();
|
||||
return;
|
||||
}
|
||||
/* !b < a => a U b = Fb */
|
||||
if (syntactic_implication_neg(f2, f1, false))
|
||||
{
|
||||
result_ = unop::instance(unop::F, f2);
|
||||
destroy(f1);
|
||||
f1->destroy();
|
||||
return;
|
||||
}
|
||||
/* a < b => a U (b U c) = (b U c) */
|
||||
|
|
@ -154,7 +153,7 @@ namespace spot
|
|||
&& syntactic_implication(f1, bo->first()))
|
||||
{
|
||||
result_ = f2;
|
||||
destroy(f1);
|
||||
f1->destroy();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -165,14 +164,14 @@ namespace spot
|
|||
if (syntactic_implication(f2, f1))
|
||||
{
|
||||
result_ = f2;
|
||||
destroy(f1);
|
||||
f1->destroy();
|
||||
return;
|
||||
}
|
||||
/* b < !a => a R b = Gb */
|
||||
if (syntactic_implication_neg(f2, f1, true))
|
||||
{
|
||||
result_ = unop::instance(unop::G, f2);
|
||||
destroy(f1);
|
||||
f1->destroy();
|
||||
return;
|
||||
}
|
||||
/* b < a => a R (b R c) = b R c */
|
||||
|
|
@ -182,7 +181,7 @@ namespace spot
|
|||
&& syntactic_implication(bo->first(), f1))
|
||||
{
|
||||
result_ = f2;
|
||||
destroy(f1);
|
||||
f1->destroy();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -230,7 +229,7 @@ namespace spot
|
|||
(mo->op() == multop::And)))
|
||||
{
|
||||
// We keep f2
|
||||
destroy(*f1);
|
||||
(*f1)->destroy();
|
||||
res->erase(f1);
|
||||
removed = true;
|
||||
break;
|
||||
|
|
@ -241,7 +240,7 @@ namespace spot
|
|||
(mo->op() == multop::And)))
|
||||
{
|
||||
// We keep f1
|
||||
destroy(*f2);
|
||||
(*f2)->destroy();
|
||||
res->erase(f2);
|
||||
removed = true;
|
||||
break;
|
||||
|
|
@ -261,7 +260,7 @@ namespace spot
|
|||
{
|
||||
for (multop::vec::iterator j = res->begin();
|
||||
j != res->end(); j++)
|
||||
destroy(*j);
|
||||
(*j)->destroy();
|
||||
res->clear();
|
||||
delete res;
|
||||
if (mo->op() == multop::Or)
|
||||
|
|
@ -309,7 +308,7 @@ namespace spot
|
|||
assert(n < 100);
|
||||
if (prev)
|
||||
{
|
||||
destroy(prev);
|
||||
prev->destroy();
|
||||
prev = const_cast<formula*>(f);
|
||||
}
|
||||
else
|
||||
|
|
@ -318,15 +317,15 @@ namespace spot
|
|||
}
|
||||
f1 = unabbreviate_logic(f);
|
||||
f2 = simplify_f_g(f1);
|
||||
destroy(f1);
|
||||
f1->destroy();
|
||||
f1 = negative_normal_form(f2);
|
||||
destroy(f2);
|
||||
f2->destroy();
|
||||
f2 = f1;
|
||||
|
||||
if (opt & Reduce_Basics)
|
||||
{
|
||||
f1 = basic_reduce(f2);
|
||||
destroy(f2);
|
||||
f2->destroy();
|
||||
f2 = f1;
|
||||
}
|
||||
|
||||
|
|
@ -336,7 +335,7 @@ namespace spot
|
|||
reduce_visitor v(opt);
|
||||
f2->accept(v);
|
||||
f1 = v.result();
|
||||
destroy(f2);
|
||||
f2->destroy();
|
||||
f2 = f1;
|
||||
}
|
||||
|
||||
|
|
@ -347,12 +346,12 @@ namespace spot
|
|||
formula* f1 =
|
||||
reduce_tau03(f2,
|
||||
opt & Reduce_Containment_Checks_Stronger);
|
||||
destroy(f2);
|
||||
f2->destroy();
|
||||
f2 = f1;
|
||||
}
|
||||
f = f2;
|
||||
}
|
||||
destroy(prev);
|
||||
prev->destroy();
|
||||
return const_cast<formula*>(f);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue