Commit graph

1891 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
9559799637 Export tgba_parse() to the python interface.
* src/tgbaparse/public.hh: Hide tgba_parse_errorlist to SWIG.
* wrap/python/spot.i: Export tgba_parse.
* wrap/python/tests/parsetgba.py: New file.
* wrap/python/tests/Makefile.am: Add it.
2012-05-23 11:59:58 +02:00
Alexandre Duret-Lutz
ebf4d2585d Make it easier to convert acc-conditions to associated formulae.
This is motivated by the fact that sog-its used the low-level data
structures used by the bdd_dict to do such work, and broke because of
the recent changes in this area.

* src/tgba/bdddict.cc, src/tgba/bdddict.hh (oneacc_to_formula):
New method.
* src/tgbaalgos/save.cc: Use it.
2012-05-22 17:57:12 +02:00
Alexandre Duret-Lutz
8893f34da1 * NEWS: Summarize recent changes. 2012-05-22 13:46:44 +02:00
Alexandre Duret-Lutz
72f36c50a5 Clear the contaiment cache after -r7.
Doing so will release all BDD variables used by automata created for
syntactic implication.  This way the main translation will create
acceptance variables again in a more natural order, which will help
the degeneralization (until we get a better degeneralization).

* src/ltlvisit/contain.cc, src/ltlvisit/contain.hh
(language_containment_checker::clear): New method to clear the
containment cache.
* src/ltlvisit/simplify.cc, src/ltlvisit/simplify.hh
(clear_as_bdd_cache): Also call language_containment_checker::clear.
2012-05-21 22:35:51 +02:00
Alexandre Duret-Lutz
1c1c95f65f Use the distributed LBTT is the installed one is not 1.2.1a.
* m4/lbtt.m4: Check version number.
2012-05-21 15:37:42 +02:00
Alexandre Duret-Lutz
a8fd9e8b14 [lbtt] Make it clearer this is not LBTT 1.2.1.
* configure.ac: Bump the version number to 1.2.1a.
* NEWS: Summarize all changes since 1.2.1.
* README: Warn this is not 1.2.1, and add pointers to NEWS and
ChangeLog.
2012-05-21 15:37:42 +02:00
Alexandre Duret-Lutz
faed4e8be2 Adjust parseout.pl to the new LBTT output.
* bench/ltl2tgba/parseout.pl: Adjust to output nondeterministic
indices and number of nondeterministic automata.
* bench/ltl2tgba/README: Update explanations.
2012-05-21 14:39:33 +02:00
Tomáš Babiak
f2b188d9ec [lbtt] Count deterministic automata and deterministic states.
* src/BuchiAutomaton.h, src/BuchiAutomaton.cc
(BuchiState::isDeterministic, BuchiAutomaton::isDeterministic,
BuchiAutomaton::nondeterminismIndex): New methods.
* src/TestOperations.cc (generateBuchiAutomaton): Collect
nondeterminism indices, and count deterministic automata.
* src/TestStatistics.cc, src/TestStatistics.h: Add storage
for these statistics.
* src/StatDisplay.cc (printBuchiAutomatonStats,
printCollectiveStats): Display these statistics.
2012-05-21 14:39:27 +02:00
Alexandre Duret-Lutz
31b3a22805 FM: Simplify promises of U, M, and F formulae.
* src/tgbaalgos/ltl2tgba_fm.cc (translate_dict::register_a_variable):
Simplify promises by replacing P(a U b), P(b M a), and P(Fb), by P(b).
2012-05-20 21:00:40 +02:00
Alexandre Duret-Lutz
cb068599dc ltl2tgba: Set assume_sba for automata read from a neverclaim.
This cause double-circles for accepting states in dot output.

* src/tgbatest/ltl2tgba.cc: Set assume_sba for automata read from
neverclaims.  Reset assume_sba after scc_filter and simulation.
* src/tgbatest/neverclaimread.test: Expect a double circle.
2012-05-20 21:00:40 +02:00
Alexandre Duret-Lutz
e5a86290cf Clean the as_bdd() cache after LTL simplification.
Syntactic implication checks may use as_bdd() to compare Boolean
formulae.  By doing so, they register Boolean variables in an order
that is usially detrimental to the LTL translator.  The new,
clear_as_bdd_cache() function offers a mean to unregister these
variables, so that the LTL translator will register them again in the
a more natural way.

* src/ltlvisit/simplify.hh, src/ltlvisit/simplify.cc
(clear_as_bdd_cache): New function.
* src/tgbatest/ltl2tgba.cc, wrap/python/ajax/spot.in: Call it.
2012-05-20 21:00:40 +02:00
Alexandre Duret-Lutz
9633dd6e88 Speedup syntactic implication by not comparing literals using bdd.
* src/ltlvisit/simplify.cc
(ltl_simplifier_cache::syntactic_implication): If the lhs and rhs are
literals that are not equal, return false immediately.
2012-05-20 21:00:40 +02:00
Alexandre Duret-Lutz
a80a5137fd Add -rD option to ltl2tgba, to display some caching statistics.
* src/ltlvisit/simplify.cc, src/ltlvisit/simplify.hh (print_stats):
New function.
* src/tgbatest/ltl2tgba.cc: Call it.
2012-05-20 21:00:40 +02:00
Alexandre Duret-Lutz
babc024097 Correctly handle ltl2tgba's option -rL.
* src/tgbatest/ltl2tgba.cc: Fix mismatch between the help text,
documenting -rL, and the handling code, expecting -rs.
2012-05-20 21:00:40 +02:00
Alexandre Duret-Lutz
8c454f9ddf FM: use a vector to store the Next BDD->formula map.
* src/tgbaalgos/ltl2tgba_fm.cc: Here.
2012-05-20 21:00:40 +02:00
Alexandre Duret-Lutz
191fa370e2 Overhaul bdddict to speedup bdd->formula lookups.
* src/tgba/bdddict.hh, src/tgba/bdddict.cc: Store variable types and
associated formula in a vector indexed by BDD variable numbers,
instead of using several maps.
* src/evtgbaalgos/tgba2evtgba.cc, src/tgba/bddprint.cc,
src/tgba/formula2bdd.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/save.cc: Adjust usage.
2012-05-20 21:00:40 +02:00
Alexandre Duret-Lutz
c5b294c786 FM: collect implied formulae in & arguments; do not to translate them
* src/tgbaalgos/ltl2tgba_fm.cc (implied_subforfmulae): New function.
(ltl_trad_visitor::visit(const binop*)): Use it.  This is an attempt
to correct the unoptimal translation of 'Fa & GFa' left by previous
patch.  It still fails to optimize 'Fa & GF(a&b)', but this is not a
regression compared to previous version.
2012-05-14 10:18:58 +02:00
Alexandre Duret-Lutz
1b143067c0 Faster translation of GFa.
* src/tgbaalgos/ltl2tgba_fm.cc: Add a "recurring" mode for the
translation of the child of G.  This generalizes Couvreur's original
trick to translate GFa as (a|Prom(a))&X(GFa) without generating an
intermediate GF(a)&F(a) state that would have to be merged with GF(a)
latter.  This implementation will also speedup formulas such a G((a U
b) & (c M d)).  With this patch, translating GF(p1) & GF(p2) &
... GF(p20) into a TGBA takes 57s instead of 128s on my computer.
However it alsos causes some formulas to be translated into larger
automata that are not immediately reduced (the simulation-reduction is
needed).  For instance Fa & GFa now has a different signature than
GFa, so translating 'Fa & GFa' generates two states where is used to
generate only one.
2012-05-14 10:15:07 +02:00
Alexandre Duret-Lutz
e2f70e72b8 Fix translation of !{r}.
We need a marked version of !{r} to perform breakpoint unroling.

* src/ltlast/unop.cc, src/ltlast/unop.hh: Declare a NegClosureMarked
operator.
* src/ltlvisit/mark.hh, src/ltlvisit/mark.cc,
src/tgbaalgos/ltl2tgba_fm.cc: Adjust to deal with NegClosureMarked
and NegClosure as apropriate.
* src/ltlvisit/simplify.cc, src/ltlvisit/tostring.cc,
src/ltlvisit/tunabbrev.cc, src/tgbaalgos/eltl2tgba_lacim.cc,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_lacim.cc,
src/tgba/formula2bdd.cc: Deal with NegClosureMarked in the same way as
we deal with NegClosure.
* src/tgbatest/ltl2tgba.test: More tests.
* src/ltltest/kind.test: Adjust.
* doc/tl/tl.tex: Mention the marked negated closure.
2012-05-12 12:21:41 +02:00
Alexandre Duret-Lutz
14144f3b3b * wrap/python/ajax/README: More debugging help. 2012-05-11 23:35:49 +02:00
Alexandre Duret-Lutz
2d0ac3eb75 * src/tgbaalgos/simulation.cc (get_state): Do not lookup the map twice. 2012-05-11 07:58:50 +02:00
Alexandre Duret-Lutz
ebe2362bc9 Equip the LTL parser with printers for formulas and other token.
* src/ltlparse/ltlparse.yy: Add new printers.  Suggested by Akim
Demaille.
2012-05-10 10:23:13 +02:00
Alexandre Duret-Lutz
509edabab4 Missing space in help text.
* src/tgbatest/ltl2tgba.cc (syntax): Here.  Reported by Akim Demaille.
2012-05-10 10:23:12 +02:00
Alexandre Duret-Lutz
9f127deae6 Fix generation of randome SERE formulae.
* src/ltlvisit/randomltl.cc: Use the correct flavor of And and Or.
Reported by Etienne Renault.
* NEWS: Mention the bug.
2012-05-10 10:22:59 +02:00
Alexandre Duret-Lutz
de64a48e8b * m4/buddy.m4: Typo, reported by Thomas Badie. 2012-05-09 21:49:20 +02:00
Alexandre Duret-Lutz
c18c153209 * configure.ac, NEWS: Bump version to 0.9a. 2012-05-09 17:42:28 +02:00
Alexandre Duret-Lutz
1e0ae54892 Release Spot 0.9
* configure.ac, NEWS: Bump version to 0.9.
2012-05-09 13:20:22 +02:00
Alexandre Duret-Lutz
2945668021 Update the help text for the Couvreur/FM algorithm.
* wrap/python/ajax/ltl2tgba.html: Mention PSL.
2012-05-09 13:20:22 +02:00
Alexandre Duret-Lutz
b71eadd8e3 Fix syntactic implication rule between R/M and U/W.
* doc/tl/tl.tex, src/ltlvisit/simplify.cc: Fix the rule.
* src/ltltest/reduccmp.test, src/ltltest/syntimpl.test:
Add more tests.
2012-05-07 16:36:13 +02:00
Alexandre Duret-Lutz
70e3e2cd04 * NEWS: Typo in date. 2012-05-07 16:36:13 +02:00
Alexandre Duret-Lutz
b9afd8e705 Fix mismatch between srand/srand48 and rand/rand48.
Because only the configure macros of spot::srand() had been updated to
the introduction of _config.h, rand() was used even if drand48() was
available, and yet srand48() was being called by spot::srand().  The
consequence is that setting the seed with srand48() had not effect on
the value returned by rand().  Reported by Etienne Renault.

* src/misc/random.cc (drand): Fix configure macros used.
2012-05-07 16:36:10 +02:00
Alexandre Duret-Lutz
a2893520ca Properly thank Christian and Felix.
* THANKS, src/tgbaalgos/ltl2tgba_fm.cc: Here.
2012-05-07 14:44:50 +02:00
Alexandre Duret-Lutz
7438fa3c65 Fix LTL output for Spin.
* src/ltlvisit/tostring.cc (spin_kw): Output X, not ().
2012-05-05 11:05:58 +02:00
Alexandre Duret-Lutz
927d745805 80columns.test: Add workaround for non-unicode systems.
* src/sanity/80columns.test: If the system cannot count unicode
characters, only search for long ascii lines.
2012-05-03 20:46:59 +02:00
Alexandre Duret-Lutz
f5fea7484b Fix two formula leaks.
* src/ltlvisit/simplify.cc (reduce_sere_ltl): Here.
* src/ltltest/reduccmp.test: Add a test case.
2012-05-03 18:50:24 +02:00
Alexandre Duret-Lutz
1f54581215 * src/tgba/tgbaexplicit.hh: Fix clang-3.0 warnings. 2012-05-03 10:55:19 +02:00
Alexandre Duret-Lutz
2c3df109e1 * src/tgbatest/ltl2tgba.cc (-rs): New option for reduce_size_striclty. 2012-05-03 07:22:12 +02:00
Alexandre Duret-Lutz
42963b99c8 Adjust benchmarks that had not been compiled since 0.8...
* bench/scc-stats/stats.cc, bench/split-product/cutscc.cc: Adjust to
use state->destroy() and to use const formula*.
2012-05-02 18:19:57 +02:00
Alexandre Duret-Lutz
db4693b303 Downcase a couple of misnamed class names.
* src/misc/acccompl.hh, src/misc/acccompl.cc (AccCompl): Rename to
acc_compl.
* src/tgbaalgos/simulation.cc (AccComplAutomaton, Simulation): Rename
to acc_compl_automaton and direct_simulation.  At the same time,
reindent the whole file.
* src/sanity/style.test: Detect capitalized class names.
* src/kripke/kripkeexplicit.hh (KripkePrint): Remove useless
predeclaration.
* src/tgbaalgos/simulation.hh: Typo in comment.
2012-05-02 17:57:38 +02:00
Alexandre Duret-Lutz
dadfbdad9d Small documentation fixes.
* doc/tl/tl.tex: Fix a few typos, and comment a missplaced paragraph.
* doc/tl/tl.bib: Typos.
2012-05-02 13:09:34 +02:00
Alexandre Duret-Lutz
1a50ae3bf8 * src/ltlvisit/simplify.cc: Add missing call to recurse_destroy(). 2012-05-02 13:09:25 +02:00
Alexandre Duret-Lutz
4a9bbbafe2 Add ltl3ba to the ltl2tgba benchmark.
* configure.ac: Search for ltl3ba.
* bench/ltl2tgba/defs.in: Define LTL3BA and HAVE_LTL3BA.
* bench/ltl2tgba/algorithms: Use LTL3BA. Also add simulation options
for LTL2BA.
* bench/ltl2tgba/README: Slight wording changes.
2012-05-02 09:59:33 +02:00
Alexandre Duret-Lutz
bf62d439c9 Use 'const formula*' instead of 'formula*' everywhere.
The distinction makes no sense since Spot 0.5, where we switched from
mutable furmulae to immutable formulae.  The difference between
const_visitor and visitor made no sense either.  They have been merged
into one: visitor.

* iface/dve2/dve2check.cc, iface/gspn/ltlgspn.cc,
src/eltlparse/eltlparse.yy, src/eltlparse/public.hh,
src/evtgbatest/ltl2evtgba.cc, src/kripkeparse/kripkeparse.yy,
src/ltlast/atomic_prop.cc, src/ltlast/atomic_prop.hh,
src/ltlast/automatop.cc, src/ltlast/automatop.hh, src/ltlast/binop.cc,
src/ltlast/binop.hh, src/ltlast/bunop.cc, src/ltlast/bunop.hh,
src/ltlast/constant.cc, src/ltlast/constant.hh, src/ltlast/formula.cc,
src/ltlast/formula.hh, src/ltlast/formula_tree.cc,
src/ltlast/formula_tree.hh, src/ltlast/multop.cc,
src/ltlast/multop.hh, src/ltlast/predecl.hh, src/ltlast/refformula.cc,
src/ltlast/refformula.hh, src/ltlast/unop.cc, src/ltlast/unop.hh,
src/ltlast/visitor.hh, src/ltlenv/declenv.cc, src/ltlenv/declenv.hh,
src/ltlenv/defaultenv.cc, src/ltlenv/defaultenv.hh,
src/ltlenv/environment.hh, src/ltlparse/ltlfile.cc,
src/ltlparse/ltlfile.hh, src/ltlparse/ltlparse.yy,
src/ltlparse/public.hh, src/ltltest/consterm.cc,
src/ltltest/equals.cc, src/ltltest/genltl.cc, src/ltltest/kind.cc,
src/ltltest/length.cc, src/ltltest/randltl.cc, src/ltltest/readltl.cc,
src/ltltest/reduc.cc, src/ltltest/syntimpl.cc,
src/ltltest/tostring.cc, src/ltlvisit/apcollect.cc,
src/ltlvisit/apcollect.hh, src/ltlvisit/clone.cc,
src/ltlvisit/clone.hh, src/ltlvisit/contain.cc,
src/ltlvisit/contain.hh, src/ltlvisit/dotty.cc,
src/ltlvisit/length.cc, src/ltlvisit/lunabbrev.cc,
src/ltlvisit/lunabbrev.hh, src/ltlvisit/mark.cc, src/ltlvisit/mark.hh,
src/ltlvisit/nenoform.cc, src/ltlvisit/nenoform.hh,
src/ltlvisit/postfix.cc, src/ltlvisit/postfix.hh,
src/ltlvisit/randomltl.cc, src/ltlvisit/randomltl.hh,
src/ltlvisit/reduce.cc, src/ltlvisit/reduce.hh,
src/ltlvisit/simpfg.cc, src/ltlvisit/simpfg.hh,
src/ltlvisit/simplify.cc, src/ltlvisit/simplify.hh,
src/ltlvisit/snf.cc, src/ltlvisit/snf.hh, src/ltlvisit/tostring.cc,
src/ltlvisit/tunabbrev.cc, src/ltlvisit/tunabbrev.hh,
src/ltlvisit/wmunabbrev.cc, src/ltlvisit/wmunabbrev.hh,
src/neverparse/neverclaimparse.yy, src/sabatest/sabacomplementtgba.cc,
src/tgba/bdddict.cc, src/tgba/formula2bdd.cc, src/tgba/taatgba.cc,
src/tgba/taatgba.hh, src/tgbaalgos/eltl2tgba_lacim.cc,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/ltl2tgba_lacim.cc, src/tgbaalgos/minimize.cc,
src/tgbaalgos/randomgraph.cc, src/tgbaparse/tgbaparse.yy,
src/tgbatest/complementation.cc, src/tgbatest/ltl2tgba.cc,
src/tgbatest/ltlprod.cc, src/tgbatest/mixprod.cc,
src/tgbatest/randtgba.cc: Massive adjustment!
* src/tgbatest/reductgba.cc: Delete.
2012-05-02 09:28:16 +02:00
Alexandre Duret-Lutz
0f0ada825a Show how to rewrite a̅ as ¬a before calling dot, if needed.
Because some old version of libpango will render a̅ as a‾, without
combining.

* wrap/python/ajax/spot.in: Add the code as a comment.
2012-05-01 14:31:15 +02:00
Alexandre Duret-Lutz
ec08e5dce1 * doc/tl/tl.bib (babiak.12.tacas): Update reference. 2012-04-30 23:03:22 +02:00
Alexandre Duret-Lutz
861969b53a Prefer -R3 to -R3f when applying direct simulation in the web interface.
* wrap/python/ajax/spot.in: Adjust.
2012-04-30 18:11:13 +02:00
Alexandre Duret-Lutz
fb6a2a50b5 One more test for U,W,R,M rewritins.
* src/ltltest/uwrm.test: New file.
* src/ltltest/Makefile.am: Add it.
2012-04-30 18:03:33 +02:00
Alexandre Duret-Lutz
84cefea203 * src/tgbaalgos/minimize.hh: Reencode in utf-8 and wrap long lines. 2012-04-30 16:13:13 +02:00
Alexandre Duret-Lutz
6a250eb9c3 * doc/tl/tl.tex: Disable draft mode. 2012-04-30 11:57:59 +02:00
Alexandre Duret-Lutz
a9cccd11e6 Change tgba_dupexp_bfs() and tgba_dupexp_dfs() to build numbered tgba.
* src/tgbaalgos/dupexp.cc, src/tgbaalgos/dupexp.hh: Change the return
type.
2012-04-30 11:57:55 +02:00