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
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2003, 2004, 2006, 2008 Laboratoire d'Informatique de
|
||||
// Copyright (C) 2003, 2004, 2006, 2008, 2009 Laboratoire d'Informatique de
|
||||
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
// Université Pierre et Marie Curie.
|
||||
//
|
||||
|
|
@ -28,7 +28,6 @@
|
|||
#include "ltlvisit/tunabbrev.hh"
|
||||
#include "ltlvisit/dump.hh"
|
||||
#include "ltlvisit/nenoform.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "ltlvisit/contain.hh"
|
||||
#include "ltlast/allnodes.hh"
|
||||
#include "ltlvisit/reduce.hh"
|
||||
|
|
@ -74,21 +73,21 @@ main(int argc, char** argv)
|
|||
#ifdef LUNABBREV
|
||||
tmp = f1;
|
||||
f1 = spot::ltl::unabbreviate_logic(f1);
|
||||
spot::ltl::destroy(tmp);
|
||||
tmp->destroy();
|
||||
spot::ltl::dump(std::cout, f1);
|
||||
std::cout << std::endl;
|
||||
#endif
|
||||
#ifdef TUNABBREV
|
||||
tmp = f1;
|
||||
f1 = spot::ltl::unabbreviate_ltl(f1);
|
||||
spot::ltl::destroy(tmp);
|
||||
tmp->destroy();
|
||||
spot::ltl::dump(std::cout, f1);
|
||||
std::cout << std::endl;
|
||||
#endif
|
||||
#ifdef NENOFORM
|
||||
tmp = f1;
|
||||
f1 = spot::ltl::negative_normal_form(f1);
|
||||
spot::ltl::destroy(tmp);
|
||||
tmp->destroy();
|
||||
spot::ltl::dump(std::cout, f1);
|
||||
std::cout << std::endl;
|
||||
#endif
|
||||
|
|
@ -96,28 +95,28 @@ main(int argc, char** argv)
|
|||
spot::ltl::formula* tmp;
|
||||
tmp = f1;
|
||||
f1 = spot::ltl::reduce(f1);
|
||||
spot::ltl::destroy(tmp);
|
||||
tmp->destroy();
|
||||
spot::ltl::dump(std::cout, f1);
|
||||
#endif
|
||||
#ifdef REDUC_TAU
|
||||
spot::ltl::formula* tmp;
|
||||
tmp = f1;
|
||||
f1 = spot::ltl::reduce_tau03(f1, false);
|
||||
spot::ltl::destroy(tmp);
|
||||
tmp->destroy();
|
||||
spot::ltl::dump(std::cout, f1);
|
||||
#endif
|
||||
#ifdef REDUC_TAUSTR
|
||||
spot::ltl::formula* tmp;
|
||||
tmp = f1;
|
||||
f1 = spot::ltl::reduce_tau03(f1, true);
|
||||
spot::ltl::destroy(tmp);
|
||||
tmp->destroy();
|
||||
spot::ltl::dump(std::cout, f1);
|
||||
#endif
|
||||
|
||||
int exit_code = f1 != f2;
|
||||
|
||||
spot::ltl::destroy(f1);
|
||||
spot::ltl::destroy(f2);
|
||||
f1->destroy();
|
||||
f2->destroy();
|
||||
assert(spot::ltl::atomic_prop::instance_count() == 0);
|
||||
assert(spot::ltl::unop::instance_count() == 0);
|
||||
assert(spot::ltl::binop::instance_count() == 0);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#include "ltlast/atomic_prop.hh"
|
||||
#include "ltlvisit/randomltl.hh"
|
||||
#include "ltlvisit/tostring.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "ltlvisit/length.hh"
|
||||
#include "ltlvisit/reduce.hh"
|
||||
#include "ltlenv/defaultenv.hh"
|
||||
|
|
@ -179,10 +178,10 @@ main(int argc, char** argv)
|
|||
if (opt_r)
|
||||
{
|
||||
spot::ltl::formula* g = reduce(f);
|
||||
spot::ltl::destroy(f);
|
||||
f->destroy();
|
||||
if (spot::ltl::length(g) < opt_r)
|
||||
{
|
||||
spot::ltl::destroy(g);
|
||||
g->destroy();
|
||||
continue;
|
||||
}
|
||||
f = g;
|
||||
|
|
@ -201,7 +200,7 @@ main(int argc, char** argv)
|
|||
exit(2);
|
||||
}
|
||||
std::string txt = spot::ltl::to_string(f);
|
||||
spot::ltl::destroy(f);
|
||||
f->destroy();
|
||||
if (!opt_u || unique.insert(txt).second)
|
||||
{
|
||||
std::cout << txt << std::endl;
|
||||
|
|
@ -223,7 +222,7 @@ main(int argc, char** argv)
|
|||
{
|
||||
spot::ltl::atomic_prop_set::const_iterator j = i;
|
||||
++i;
|
||||
spot::ltl::destroy(*j);
|
||||
(*j)->destroy();
|
||||
}
|
||||
delete ap;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#include "ltlparse/public.hh"
|
||||
#include "ltlvisit/dump.hh"
|
||||
#include "ltlvisit/dotty.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "ltlast/allnodes.hh"
|
||||
|
||||
void
|
||||
|
|
@ -93,7 +92,7 @@ main(int argc, char** argv)
|
|||
spot::ltl::dump(std::cout, f);
|
||||
std::cout << std::endl;
|
||||
#endif
|
||||
spot::ltl::destroy(f);
|
||||
f->destroy();
|
||||
|
||||
if (debug_ref)
|
||||
dump_instances("after");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (C) 2004, 2006, 2007, 2008 Laboratoire d'Informatique de Paris
|
||||
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
// Université Pierre et Marie Curie.
|
||||
// Copyright (C) 2004, 2006, 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.
|
||||
//
|
||||
|
|
@ -27,7 +27,6 @@
|
|||
#include "ltlvisit/tunabbrev.hh"
|
||||
#include "ltlvisit/dump.hh"
|
||||
#include "ltlvisit/nenoform.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "ltlvisit/tostring.hh"
|
||||
#include "ltlvisit/reduce.hh"
|
||||
#include "ltlvisit/length.hh"
|
||||
|
|
@ -135,8 +134,8 @@ main(int argc, char** argv)
|
|||
f1 = unabbreviate_logic(f1);
|
||||
ftmp2 = f1;
|
||||
f1 = negative_normal_form(f1);
|
||||
spot::ltl::destroy(ftmp1);
|
||||
spot::ltl::destroy(ftmp2);
|
||||
ftmp1->destroy();
|
||||
ftmp2->destroy();
|
||||
|
||||
|
||||
int length_f1_before = spot::ltl::length(f1);
|
||||
|
|
@ -146,8 +145,8 @@ main(int argc, char** argv)
|
|||
f1 = spot::ltl::reduce(f1, o);
|
||||
ftmp2 = f1;
|
||||
f1 = spot::ltl::unabbreviate_logic(f1);
|
||||
spot::ltl::destroy(ftmp1);
|
||||
spot::ltl::destroy(ftmp2);
|
||||
ftmp1->destroy();
|
||||
ftmp2->destroy();
|
||||
|
||||
int length_f1_after = spot::ltl::length(f1);
|
||||
std::string f1s_after = spot::ltl::to_string(f1);
|
||||
|
|
@ -160,11 +159,11 @@ main(int argc, char** argv)
|
|||
f2 = unabbreviate_logic(f2);
|
||||
ftmp2 = f2;
|
||||
f2 = negative_normal_form(f2);
|
||||
spot::ltl::destroy(ftmp1);
|
||||
spot::ltl::destroy(ftmp2);
|
||||
ftmp1->destroy();
|
||||
ftmp2->destroy();
|
||||
ftmp1 = f2;
|
||||
f2 = unabbreviate_logic(f2);
|
||||
spot::ltl::destroy(ftmp1);
|
||||
ftmp1->destroy();
|
||||
f2s = spot::ltl::to_string(f2);
|
||||
}
|
||||
|
||||
|
|
@ -204,9 +203,9 @@ main(int argc, char** argv)
|
|||
exit_code = 0;
|
||||
}
|
||||
|
||||
spot::ltl::destroy(f1);
|
||||
f1->destroy();
|
||||
if (f2)
|
||||
spot::ltl::destroy(f2);
|
||||
f2->destroy();
|
||||
|
||||
|
||||
assert(spot::ltl::atomic_prop::instance_count() == 0);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2004, 2008 Laboratoire d'Informatique de Paris 6
|
||||
// Copyright (C) 2004, 2008, 2009 Laboratoire d'Informatique de Paris 6
|
||||
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
||||
// Pierre et Marie Curie.
|
||||
//
|
||||
|
|
@ -26,7 +26,6 @@
|
|||
#include "ltlvisit/lunabbrev.hh"
|
||||
#include "ltlvisit/tunabbrev.hh"
|
||||
#include "ltlvisit/dump.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "ltlvisit/tostring.hh"
|
||||
#include "ltlvisit/syntimpl.hh"
|
||||
#include "ltlast/allnodes.hh"
|
||||
|
|
@ -102,10 +101,10 @@ main(int argc, char** argv)
|
|||
spot::ltl::dump(std::cout, f1) << std::endl;
|
||||
spot::ltl::dump(std::cout, f2) << std::endl;
|
||||
|
||||
spot::ltl::destroy(f1);
|
||||
spot::ltl::destroy(f2);
|
||||
spot::ltl::destroy(ftmp1);
|
||||
spot::ltl::destroy(ftmp2);
|
||||
f1->destroy();
|
||||
f2->destroy();
|
||||
ftmp1->destroy();
|
||||
ftmp2->destroy();
|
||||
assert(spot::ltl::atomic_prop::instance_count() == 0);
|
||||
assert(spot::ltl::unop::instance_count() == 0);
|
||||
assert(spot::ltl::binop::instance_count() == 0);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2003, 2008 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// Copyright (C) 2003, 2008, 2009 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
|
|
@ -24,7 +24,6 @@
|
|||
#include <cstdlib>
|
||||
#include "ltlparse/public.hh"
|
||||
#include "ltlvisit/tostring.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "ltlast/allnodes.hh"
|
||||
|
||||
void
|
||||
|
|
@ -70,8 +69,8 @@ main(int argc, char **argv)
|
|||
if (f2s != f1s)
|
||||
return 1;
|
||||
|
||||
spot::ltl::destroy(f1);
|
||||
spot::ltl::destroy(f2);
|
||||
f1->destroy();
|
||||
f2->destroy();
|
||||
assert(spot::ltl::atomic_prop::instance_count() == 0);
|
||||
assert(spot::ltl::unop::instance_count() == 0);
|
||||
assert(spot::ltl::binop::instance_count() == 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue