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,5 +1,5 @@
# -*- mode: python; coding: iso-8859-1 -*-
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
# Copyright (C) 2003, 2004, 2009 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
#
@ -100,7 +100,7 @@ if f:
concrete = 0
else:
a = concrete = spot.ltl_to_tgba_lacim(f, dict)
spot.destroy(f)
f.destroy()
del f
degeneralized = None

View file

@ -1,5 +1,5 @@
# -*- mode: python; coding: iso-8859-1 -*-
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
# Copyright (C) 2003, 2004, 2009 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
#
@ -34,14 +34,14 @@ for str1 in l:
if spot.format_parse_errors(spot.get_cout(), str1, p):
sys.exit(1)
str2 = str(f)
spot.destroy(f)
f.destroy()
print str2
# Try to reparse the stringified formula
f = spot.parse(str2, p, e)
if spot.format_parse_errors(spot.get_cout(), str2, p):
sys.exit(1)
print f
spot.destroy(f)
f.destroy()
assert spot.atomic_prop.instance_count() == 0
assert spot.binop.instance_count() == 0

View file

@ -60,7 +60,7 @@ del op2, op3
assert spot.atomic_prop.instance_count() == 3
assert spot.multop.instance_count() == 1
spot.destroy(op4)
op4.destroy()
del op4
assert spot.atomic_prop.instance_count() == 0
@ -83,11 +83,11 @@ assert spot.binop.instance_count() == 3
assert spot.unop.instance_count() == 1
assert spot.multop.instance_count() == 0
spot.destroy(a)
a.destroy()
del a
spot.destroy(b)
b.destroy()
del b
spot.destroy(c)
c.destroy()
del c
assert spot.atomic_prop.instance_count() == 3
@ -95,7 +95,7 @@ assert spot.binop.instance_count() == 3
assert spot.unop.instance_count() == 1
assert spot.multop.instance_count() == 0
spot.destroy(f1)
f1.destroy()
del f1
assert spot.atomic_prop.instance_count() == 2
@ -103,7 +103,7 @@ assert spot.binop.instance_count() == 2
assert spot.unop.instance_count() == 1
assert spot.multop.instance_count() == 0
spot.destroy(f4)
f4.destroy()
del f4
assert spot.atomic_prop.instance_count() == 1
@ -111,7 +111,7 @@ assert spot.binop.instance_count() == 1
assert spot.unop.instance_count() == 0
assert spot.multop.instance_count() == 0
spot.destroy(f2)
f2.destroy()
del f2
assert spot.atomic_prop.instance_count() == 0