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.
* src/ltlast/automatop.cc, src/ltlast/automatop.hh,
src/ltlast/binop.cc, src/ltlast/binop.hh, src/ltlast/multop.cc,
src/ltlast/multop.hh, src/ltlast/unop.cc, src/ltlast/unop.hh:
Add a dump_instance() static method to all class.
* src/ltltest/readltl.cc: Add option -r to dump all instances
with their reference count, after parsing and after deletion.
* src/ltlast/unop.hh (map): Use unop* as values.
* src/ltlast/binop.hh (map): Use binop* as values.
* src/ltlast/multop.hh (map): Use multop* as values.
* src/ltlast/automatop.hh (paircmp): Rename as tripletcmp.
(map): Use automaton* as values, not formula*.
* src/ltlast/automatop.hh, src/ltlast/automatop.cc: Add missing
instance_count() functions.
* src/tgbatests/eltl2tgba.cc: Add missing instance_count()
assertions at the end.
* src/tgbatests/ltl2tgba.cc: Also call automatop::instance_count(),
even if automatop are not used in ltl2tgba yet. This way we won't
forget once eltl2tgba and ltl2tgba are merged.
* src/tgbatest/defs.in (srcdir): Adjust from VPATH builds.
* src/tgbatest/ltlcounter.test (lcdir): Adjust definition to
new value of $srcdir.
(run): Fix setting of $run after $n = 2. Using run=: would in
fact disable all the big tests...
* src/ltlast/formula.hh (formula_ptr_less_than::operator()):
Fix a typo where `l' was typed as `1'.
* src/tgbatest/ltlcounter/: New files from Kristin Y. Rozier.
* src/tgbatest/ltlcounter.test: New
* src/tgbatest/Makefile.am (TESTS): Add ltlcounter.test.
(EXTRA_DIST): Add files in ltlcounter/.
constructor. It does the same thing as the default copy
constructor, and g++ 4.2.3 complained that the copy constructor
of spot::state was not called. Reported by Denis Poitrenaud.
* src/tgbaalgos/scc.cc (dump_scc_dot): Escape labels and other
strings output between quote in dot.
* src/tgbatest/kv.test: New file.
* src/tgbatest/Makefile.am (TESTS): Add it.
* src/tgba/taa.cc, src/tgba/taa.hh: taa_succ_iterator is not
on-the-fly anymore allowing some redundant transitions to be
removed. Also a new function to output a TAA.
* src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2taa.hh: Add the
refined rules from Tauriainen.
* src/tgbatest/ltl2tgba.cc: Use -c to activate refined rules in
ltl_to_taa.
* src/tgbatest/spotlbtt.test: More tests.
TGBA which uses TAA as an intermediate representation. This is a
basic version, optimizations and enhancements will come later.
* src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2taa.hh: The algortihm.
* src/tgbaalgos/Makefile.am: Adjust.
* src/tgbatest/ltl2tgba: New option: -taa, which uses this new
translation algorithm.
* src/tgbatest/spotlbtt.test: Add ltl2tgba -taa.
* misc/Makefile.am, misc/bbop.cc, misc/bddop.hh: Factorize some
code on BDDs to compute all_acceptance_conditions from
neg_acceptance_condition.
* src/tgba/Makefile.am, src/tgbatest/Makefile.am: Adjust.
* src/tgba/taa.cc, src/tgba/taa.hh: The TAA class.
* src/tgba/tgbaexplicit.hh: Use the factorized code in bddop.hh.
* src/tgbatest/taa.cc, src/tgbatest/taa.test: Some test cases.
the original automaton has no acceptance condition.
* src/tgba/tgbasgba.cc, src/tgba/tgbasgba.hh: New option:
when the original automaton has no accepting condition, it
explicitly considers that every state is accepting.
shared_ptr on states...
* src/tgba/state.hh: ... here.
* src/tgbatest/complementation.test: Do not apply some tests on
the new algorithm because it takes to much time to run.
* src/tgba/tgbacomplement.cc, src/tgba/tgbacomplement.hh: The
construction.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/complementation.cc: Add options to support this
construction in addition to Safra construction.
* src/tgba/Makefile.am: Adjust.
* src/tgbatest/complementation.test: Adjust to test also this
complementation.
* src/tgba/tgbasgba.hh, src/tgba/tgbasgba.hh: Here.
* src/tgbatest/ltl2tgba.cc: New option `-lS' for state-labeled
automata.
* src/tgba/Makefile.am: Adjust and sort files in tgba_HEADERS
and libtgba_la_SOURCES.
* src/tgbaalgos/scc.hh (scc_map::scc::supp_rec): Initialize to
bddfalse, since this cannot occur in reallife.
* src/tgbaalgos/scc.cc (scc_map::update_supp_rec): Adjust.
* src/tgbaalgos/scc.hh (scc_map::scc): Add a supp_rec member to
hold reachable APs.
* src/tgbaalgos/scc.cc (scc_map::update_supp_rec): New function,
to update supp_rec.
(scc_map::build_map): Call it.
(scc_map::aprec_set_of): New function.
(dump_scc_dot): Show the output of aprec_set_of().
* src/tgbaalgos/scc.hh (scc_map::scc): Add a supp member to hold APs.
* src/tgbaalgos/scc.cc (scc_map::build_map): Update supp.
(scc_map::ap_set_of): New function.
(dump_scc_dot): Show the output of ap_set_of().
* src/eltlparse/eltlparse.yy: Free the automatop::vec when
CHECK_ARITY fails while parsing an automatop.
* src/eltltest/acc.cc: Free all constructed formulae.
size of TGBAs represented as BDDs by deleting unaccepting SCCs.
* src/eltlparse/eltlparse.yy: Remove a warning.
* src/tgba/tgbabddconcrete.cc, src/tgba/tgbabddconcrete.hh,
src/tgba/tgbabddcoredata.cc, src/tgba/tgbabddcoredata.hh: Add a
new function delete_unaccepting_scc in both classes.
* src/tgbatest/eltl2tgba.cc, src/tgbatest/spotlbtt.test: Use this
new function in LaCIM for ELTL and bench it.
* src/tgbatest/defs.in: Fix it.
* bench/ltl2tgba/algorithms, bench/ltl2tgba/defs.in: Add LaCIM for
ELTL in benchs.
* src/ltltest/defs.in, src/eltltest/defs.in, src/tgbatest/defs.in,
src/evtgbatest/defs.in (run): Use ../../../libtool instead of
../../libtool, now that testcases have been moved down one directory.
Add an algorithm to split an automaton in several automata.
* bench/scc-stats: New directory. Contains input files and test
program for computing statistics.
* bench/split-product: New directory. Contains test program for
synchronised product on splitted automata.
* bench/split-product/models: New directory. Contains Promela
files and LTL formulae that should be verified by the models.
* src/tgba/tgbafromfile.cc, src/tgba/tgbafromfile.hh:
New files. Small class to avoid long initializations with numerous
constants when translating to TGBA many LTL formulae from a
given file.
* src/tgbaalgos/cutscc.cc, src/tgbaalgos/cutscc.hh:
New file. From a single automaton, create, at most,
X sub automata.
* src/tgbaalgos/scc.cc, src/tgbaalgos/scc.hh:
Adjust to compute self-loops count.