spot/src
Alexandre Duret-Lutz 8e4e692e7f Change the way references are counted to speedup cloning.
Before this patch, every time you cloned a formula, the clone
visitor would recurse into the entire AST to increment the
reference count of all nodes.  When running ltl2tgba_fm on
the formula generated by "LTLcounterLinear.pl 8", approx 27% of
the time was spent in the clone visitor.

After this patch, cloning a formula is just an increment of the
reference count of the top node.  Children are decremented only
when the top node's ref count is decremented to zero.  With this
change, clone() and destroy() become constant time, the
ltl2tgba_fm spend only 0.01% of the time cloning formulae.

* src/ltlast/automatop.cc (~automatop): Decrement children.
(instance): Decrement children if the instance already exists.
* src/ltlast/binop.cc, src/ltlast/multop.cc, src/ltlast/unop.cc:
Likewise.
* src/ltlvisit/clone.cc (clone): Simplify, now we only need to
call ref().
* src/ltlvisit/destroy.cc (destroy): Simplify, now we only need
to call unref().
(destroy_visitor): Remove, no longer needed.
2009-11-09 07:13:31 +01:00
..
eltlparse Fix some memory leaks. 2009-09-07 16:41:49 +02:00
eltltest Fix some memory leaks. 2009-09-07 16:41:49 +02:00
evtgba * src/tgba/tgba.hh (format_state): s/automata who/automata that/. 2009-05-28 18:23:42 +02:00
evtgbaalgos Revert everything related to Damien's work in 2008 (he will commit a new version soon). 2009-03-25 16:44:05 +01:00
evtgbaparse * src/evtgbaparse/evtgbaparse.yy: Stay on 80 columns. 2009-03-25 17:43:55 +01:00
evtgbatest Fix path to libtool in test suites. 2009-09-02 10:41:19 +02:00
kripke Introduce some experimental kripke classes to simplify writing 2009-06-02 17:30:27 +02:00
ltlast Change the way references are counted to speedup cloning. 2009-11-09 07:13:31 +01:00
ltlenv Revert everything related to Damien's work in 2008 (he will commit a new version soon). 2009-03-25 16:44:05 +01:00
ltlparse Update parsers to work with Bison 2.4.1. 2009-03-25 17:26:44 +01:00
ltltest Make it easier to debug reference counts in LTL nodes. 2009-11-09 07:13:31 +01:00
ltlvisit Change the way references are counted to speedup cloning. 2009-11-09 07:13:31 +01:00
misc Minor fixes. 2009-10-16 17:48:47 +02:00
sanity Fix spurious failure of style.test. 2009-11-04 18:29:38 +01:00
tgba * src/tgba/taa.cc, src/tgbatest/taa.cc: Adjust. 2009-11-07 19:20:16 +01:00
tgbaalgos * src/tgba/taa.cc, src/tgba/taa.hh: Speed up the cartesian product 2009-11-07 15:50:45 +01:00
tgbaparse Update parsers to work with Bison 2.4.1. 2009-03-25 17:26:44 +01:00
tgbatest Add missing instance_count() in automatop and eltl2tgba. 2009-11-09 07:13:31 +01:00
.cvsignore * src/ltlvisit/Makefile.am (lib_LTLIBRARIES): Rename as ... 2003-04-30 12:46:12 +00:00
.gitignore more files to ignore 2009-09-02 10:41:18 +02:00
Makefile.am Introduce some experimental kripke classes to simplify writing 2009-06-02 17:30:27 +02:00