Commit graph

1574 commits

Author SHA1 Message Date
Ala-Eddine Ben-Salem
d64b40452c STA: the artificial livelock state becomes the first successor
* src/taalgos/tgba2ta.cc: improves the STA (Single-pass TA) by adding
the  artificial livelock state as the first successor.
2012-07-15 18:10:01 +02:00
Ala-Eddine Ben-Salem
ed27dab306 Add an implementation of TGTA minimization
* src/ta/taexplicit.cc, src/ta/taexplicit.hh: Bug fix TGTA
* src/taalgos/minimize.cc,src/taalgos/minimize.hh: TGTA minimization
* src/taalgos/tgba2ta.cc: add a TGTA minimization command (uses -Rm)
* src/taalgos/minimize.cc, src/taalgos/minimize.hh
(minimize_tgbta): New function.
* src/taalgos/tgba2ta.cc: Set livelock-accepting flag of TGTA states
to false so they can be merged with other states.
* src/ta/taexplicit.cc (hash): Use id.
* src/ta/taexplicit.hh: Cosmetics.
2012-07-15 18:10:01 +02:00
Ala-Eddine Ben-Salem
c882eadda6 New Automata: TGTA (Transition-based Generalized TA)
* src/ta/Makefile.am, src/ta/taexplicit.cc, src/ta/taexplicit.hh,
src/ta/taproduct.cc, src/ta/tgbta.cc, src/ta/tgbta.hh,
src/ta/tgbtaexplicit.cc, src/ta/tgbtaexplicit.hh,
src/ta/tgbtaproduct.cc, src/ta/tgbtaproduct.hh,
src/taalgos/emptinessta.cc, src/taalgos/emptinessta.hh,
src/taalgos/sba2ta.cc, src/taalgos/tgba2ta.cc, src/taalgos/tgba2ta.hh,
src/tgbatest/ltl2tgba.cc: Implementation of TGTA, a new kind of automata
combining ideas from TGBA and TA.
2012-07-15 18:10:01 +02:00
Alexandre Duret-Lutz
1f0bf0b1cf Remove statement with no effect, to please GCC 4.6.
* src/taalgos/emptinessta.cc (ta_check::check): Remove statement
with no effect, to please GCC 4.6.
2012-07-15 18:10:01 +02:00
Alexandre Duret-Lutz
29ee11cfd3 Remove unused argument in constructor.
* src/taalgos/tgba2ta.cc, src/ta/taexplicit.hh (state_ta_explicit):
Remove unused argument in constructor.
2012-07-15 18:10:01 +02:00
Ala-Eddine Ben-Salem
422bb842bf Properly free memory and print logs
* src/tgbatest/ltl2tgba.cc: Properly free memory
* src/taalgos/tgba2ta.cc, src/taalgos/emptinessta.cc: print logs
2012-07-15 18:10:01 +02:00
Ala-Eddine Ben-Salem
83e7f0fa18 GTA (Generalized Testing Automata) implementation
* src/ta/ta.cc, src/ta/ta.hh, src/ta/taexplicit.cc,
src/ta/taexplicit.hh, src/ta/taproduct.cc, src/ta/taproduct.hh,
src/taalgos/Makefile.am, src/taalgos/dotty.cc,
src/taalgos/emptinessta.cc, src/taalgos/minimize.cc,
src/taalgos/minimize.hh, src/taalgos/tgba2ta.cc, src/taalgos/tgba2ta.hh,
src/tgbatest/ltl2tgba.cc: changes introduced to add a new form of TA
called GTA (Generalized Testing Automata). GTA is a TA with acceptance-
conditions added on transitions.
2012-07-15 18:10:01 +02:00
Ala-Eddine Ben-Salem
c7f4b8e262 Single-pass Testing Automata (STA) optimizations
* src/taalgos/sba2ta.cc, src/taalgos/emptinessta.cc: STA optimizations
2012-07-15 18:10:01 +02:00
Ala-Eddine Ben-Salem
782ba0010b Add a new form of TA with a Single-pass emptiness check (STA)
* src/ta/ta.cc, src/ta/ta.hh, src/ta/taexplicit.cc,
src/ta/taexplicit.hh, src/ta/taproduct.cc,src/ta/taproduct.hh,
src/taalgos/dotty.cc, src/taalgos/emptinessta.cc,
src/taalgos/emptinessta.hh, src/taalgos/minimize.cc,
src/taalgos/reachiter.cc, src/taalgos/sba2ta.cc, src/taalgos/sba2ta.hh,
src/tgbatest/ltl2ta.test, src/tgbatest/ltl2tgba.cc: Impacts of the
implementation of a new variant of TA, called STA, which involve a
Single-pass emptiness check. The new options (-in and -lv) added to
build the new variants of TA allow to add two artificial states:
1- an initial artificial state to have an unique initial state (-in)
2- a livelock artificial state which has no successors in order to
obtain the new form of TA which requires only a Single-pass emptiness-
check: STA (-lv).
2012-07-15 18:10:01 +02:00
Ala-Eddine Ben-Salem
310973f88c Improvement of TA Product/Minimisation and of WFair generation
* src/ta/taproduct.hh, src/ta/taproduct.cc: improvement of TA Product
* src/ltltest/randltl.cc: improvement of WFair Formulas generation
* src/taalgos/minimize.cc: improvement of TA minimization
2012-07-15 18:10:01 +02:00
Ala-Eddine Ben-Salem
2aad5b10d2 TA Product optimization and WFair Formulas generation
* src/ta/taproduct.cc: TA Product optimization
* src/ltltest/randltl.cc: WFair Formulas generation
2012-07-15 18:10:01 +02:00
Alexandre Duret-Lutz
c774ba141d Use downcast when appropriate.
* src/taalgos/sba2ta.cc, src/ta/ta.cc, src/ta/taexplicit.cc,
src/ta/taproduct.cc, src/taalgos/emptinessta.cc: Use downcast
and cleanup whitespace.
2012-07-15 18:10:00 +02:00
Ala Eddine
bf01501e15 Impacts of the new method state.destroy()
* src/ta/taexplicit.cc, src/ta/taproduct.cc,
src/taalgos/minimize.cc, src/taalgos/sba2ta.cc:
changes to use the new method destroy() added to state.hh
2012-07-15 18:10:00 +02:00
Ala Eddine
cd04d9acf3 Add TA minimization: merge bisimulating states
* src/taalgos/minimize.hh, src/taalgos/minimize.cc: implements a
minimization of TA by merging bisimular states.
* src/taalgos/statessetbuilder.hh, src/taalgos/statessetbuilder.cc:
returns the set of reachable states of a TA (used in minimize.cc).
* src/taalgos/Makefile.am: add them.
* src/tgbatest/ltl2tgba.cc: add commands to test TA minimization
2012-07-15 18:10:00 +02:00
Ala Eddine
81e80e6069 Add Testing Automata Product & Emptiness Check
* src/taalgos/stats.hh, src/taalgos/stats.cc: Compute statistics for a
automaton.
* src/ta/ta.hh, src/ta/ta.cc: Abstract representation of a Testing
Automata(TA)
* src/ta/taexplicit.hh, src/ta/taexplicit.cc: Explicit representation of
a Testing Automata (TA)
* src/taalgos/dotty.cc: Print a TA in dot format.
* src/taalgos/reachiter.hh, src/taalgos/reachiter.cc: Iterate over all
reachable states of a TA
* src/taalgos/sba2ta.cc: implements the construction of a TA from a BA
(Buchi Automata)
* src/tgbatest/ltl2tgba.cc: add commands to test the TA implementation
* src/taalgos/emptinessta.hh, src/taalgos/emptinessta.cc: implementation
 of the TA emptiness-check algorithm
* src/ta/taproduct.hh, src/ta/taproduct.cc: representation of the
product (automaton) between a TA and a Kripke structure.
* src/ta/Makefile.am, src/taalgos/Makefile.am: add them
2012-07-15 18:10:00 +02:00
Ala Eddine
ba47b821c6 Preliminary implementation of Testing Automata.
* configure.ac: Generate src/ta/Makefile and src/taalgos/Makefile.
* src/Makefile.am (SUBDIRS): Add them.
* src/tgbatest/ltl2tgba.cc (main): Add option -TA.
* src/ta/Makefile.am, src/ta/ta.hh, src/ta/taexplicit.cc,
src/ta/taexplicit.hh, src/taalgos/Makefile.am,
src/taalgos/dotty.cc, src/taalgos/dotty.hh,
src/taalgos/reachiter.cc, src/taalgos/reachiter.hh,
src/taalgos/sba2ta.cc, src/taalgos/sba2ta.hh: New files.
2012-07-15 18:10:00 +02:00
Alexandre Duret-Lutz
786499534f Please the upcoming g++ 4.8.
* src/tgbaalgos/simulation.cc: Remove unused typedef.
2012-07-02 17:35:23 +02:00
Alexandre Duret-Lutz
0c1fec1259 LTL parser: better error recovery.
* src/ltlparse/ltlparse.yy: Keep the left operand of binary operator,
if the right one is erroneous.  Also keep the sane beginning of
parenthesized blocks.
* src/ltltest/parseerr.test: Adjust test cases.
* NEWS: Mention it.
2012-06-20 10:54:26 +02:00
Alexandre Duret-Lutz
ac41825efd * src/tgbaalgos/degen.cc (~unicity_table): Accommodate g++ 4.0.1. 2012-06-20 08:31:28 +02:00
Alexandre Duret-Lutz
04cc63cac2 Use tgba_explicit_numbered to create SCC-filtered automata.
* src/tgbaalgos/sccfilter.cc: tgba_explicit_numbered replace
tgba_explicit_string for the general case.  This way we don't have to
prefix the result of format_state() in case to states have the same
description.  We just number the states instead.  For the specific
cases where the input automata are instance of tgba_explicit_string or
tgba_explicit_formula, we clone the label.
2012-06-19 21:55:08 +02:00
Alexandre Duret-Lutz
7ceca326ad Small speedup in sba_explicit::state_is_accepting().
* src/tgba/tgbaexplicit.hh (state_is_accepting): Implement without
creating then deleting an iterator.
2012-06-19 21:53:37 +02:00
Alexandre Duret-Lutz
334366a78c * src/tgba/tgbasafracomplement.cc: Use the new offline degeneralization. 2012-06-19 21:53:37 +02:00
Alexandre Duret-Lutz
59dc4a9822 * src/tgbaalgos/degen.cc: Use a small map instead of merge_transitions. 2012-06-19 21:53:37 +02:00
Alexandre Duret-Lutz
509fb7e2a8 * src/tgbaalgos/degen.cc: Use the new bdd_implies() function. 2012-06-19 21:53:37 +02:00
Alexandre Duret-Lutz
b7c77dca31 * src/tgbatest/ltl2tgba.cc: Clock the degeneralization. 2012-06-19 21:53:37 +02:00
Alexandre Duret-Lutz
59a2763f41 * src/tgbaalgos/degen.cc (outgoing_acc): Fill both caches at once. 2012-06-19 21:53:37 +02:00
Alexandre Duret-Lutz
5dbee4faab Offline version of the degeneralization.
* src/tgbaalgos/degen.cc, src/tgbaalgos/degen.hh: New files, with
most of the logic extracted from src/tgba/tgbatba.cc (SBA version).
* src/tgbaalgos/Makefile.am: Distribute these.
* src/tgbatest/ltl2tgba.cc: Use the new degeneralization instead of
the on-the-fly version.
2012-06-19 21:53:37 +02:00
Alexandre Duret-Lutz
484ea488c3 Use bdd_implies() to speedup various algorithms.
* src/ltlvisit/simplify.cc, src/tgba/tgbaproduct.cc,
src/tgba/tgbatba.cc, src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/simulation.cc: Here.
2012-06-19 21:52:03 +02:00
Alexandre Duret-Lutz
25aca9ab7a Fix a few files that claimed to be distributed under GPLv3 by mistake.
* src/eltlparse/Makefile.am, src/ltlvisit/randomltl.cc,
src/ltlvisit/simplify.cc, src/ltlvisit/snf.cc, src/ltlvisit/snf.hh:
Fix GPL to version 2 or later.
2012-06-19 16:22:43 +02:00
Alexandre Duret-Lutz
9460e0761e FM: Translate X(a&b) as if it were X(a)&X(b).
This helps reducing (p&XF!p)|(!p&XFp)|X(Fp&F!p) to (p&XF!p)|(!p&XFp).

* src/tgbaalgos/ltl2tgba_fm.cc: Adjust rewriting rules of X.
* src/tgbatest/ltl2tgba.test: Add a test case.
2012-06-18 18:25:07 +02:00
Alexandre Duret-Lutz
d7ff066513 Fix computation of support_conditions in tgba_wdba_comp_proxy.
* src/tgba/wdbacomp.cc
(tgba_wdba_comp_proxy::compute_support_conditions): Fix.
* src/tgbatest/wdba2.test: Test a formula that used to be wrongly
minimized if translated by LaCIM, because the product of a
tgbabddconcrete automaton with another automaton (done during
WDBA-minimization) use the support conditions to speed things up.
2012-06-07 22:34:00 +02:00
Alexandre Duret-Lutz
fdbdb1a436 Fix a memory leak on failure to WDBA-minimize.
* src/tgbaalgos/minimize.cc (minimize_obligation): Delete the powerset
automaton when we return 0 because we know if the result is correct
and don't have the formulae to check it.  Reported by Étienne Renault.
2012-06-06 10:40:16 +02:00
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
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
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
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