1. 06 Jan, 2011 2 commits
  2. 05 Jan, 2011 13 commits
    • Alexandre Duret-Lutz's avatar
      Cleanup the minimize.hh interface. · 8c972ad3
      Alexandre Duret-Lutz authored
      * src/tgbaalgos/minimize.hh, src/tgbaalgos/minimize.cc
      (minimize): Split into ...
      (minimize_wdba, minimize_monitor): ... these two functions.
      * src/tgbatest/ltl2tgba.cc (main): Adjust the call to
      minimize_monitor.
      * wrap/python/cgi-bin/ltl2tgba.in: Adjust the calls to
      minimize_monitor and minimize_obligation.
      * wrap/python/spot.i: Declare minimize_monitor, minimize_wdba,
      minimize_obligations.
      * src/tgba/tgbaexplicit.hh (tgba_explicit_string)
      (tgba_explicit_formula, tgba_explicit_number): Add fake
      declarations so that SWIG can see they inherits from tgba.
      8c972ad3
    • Alexandre Duret-Lutz's avatar
      Cleanup the DFA minimization algorithm. · 92126a6c
      Alexandre Duret-Lutz authored
      * src/tgbaalgos/minimize.cc (minimize):  Move the minimization
      code into...
      (minimize_dfa): ... this new function, and fix the condition
      under which a partition is considered to be minimal.  Also
      use a map instead of a list to lookup known formulae.
      92126a6c
    • Alexandre Duret-Lutz's avatar
      Speed up the obligation test. · ef317685
      Alexandre Duret-Lutz authored
      * src/tgbaalgos/minimize.cc (minimize_obligation): Do not
      minimize aut_neg_f, complement min_aut_f instead.
      * src/tgbaalgos/minimize.hh: Adjust description.
      ef317685
    • Alexandre Duret-Lutz's avatar
      * src/tgbaalgos/minimize.cc (minimize): Use the Loeding algorithm · f06fc8ac
      Alexandre Duret-Lutz authored
      to label transient states.
      f06fc8ac
    • Alexandre Duret-Lutz's avatar
      Rewrite the check of WDBA state acceptance in minimize(). · 358d4bfd
      Alexandre Duret-Lutz authored
      * src/tgbaalgos/powerset.hh (power_map): New structure, allowing
      the caller to retrieve the set of original states corresponding to
      the set in the deterministic automaton.
      (power_set): Adjust prototype to take a power_map instead of the
      acc_list.
      * src/tgbaalgos/powerset.cc (power_set): Strip all code using
      acc_list, and update power_set.
      * src/tgbaalgos/minimize.cc (minimize): Rewrite, using an
      algorithm similar to the one in the Dax paper to check whether
      state of the minimized automaton should be accepting.
      358d4bfd
    • Alexandre Duret-Lutz's avatar
      Move the logic for detecting when the minimize() algorithm is · 907d173d
      Alexandre Duret-Lutz authored
      correct from ltl2tgba to the library.
      
      * src/tgbaalgos/minimize.hh,
      src/tgbaalgos/minimize.cc (minimize_obligation): New function.
      * src/tgbatests/ltl2tgba.cc (main): Fix constness of automata,
      and call minimize_obligation() for -R3b.
      907d173d
    • Alexandre Duret-Lutz's avatar
      Preliminary support for monitors. · cc8dd49d
      Alexandre Duret-Lutz authored
      * src/tgbatest/ltl2tgba.cc (-M): New option for building
      deterministic monitors.
      * src/tgbaalgos/minimize.cc (minimize): Take a monitor
      argument and adjust the code.
      * src/tgbaalgos/minimize.hh (minimize): Document it.
      cc8dd49d
    • Alexandre Duret-Lutz's avatar
      Fix bugs in minimize(). · 7d8a5310
      Alexandre Duret-Lutz authored
      * src/tgbaalgos/minimize.cc (init_sets, minimize): Fix memory
      leaks and a usage of the wrong automaton.
      * src/tgbatest/wdba.test: Try using -Rm with -R3 or -R3b, and with
      valgrind.  This caught all the bugs fixed above.
      7d8a5310
    • Alexandre Duret-Lutz's avatar
      Fix bugs in minimize(), caught by spotlbtt.test. · 72139fd7
      Alexandre Duret-Lutz authored
      * src/tgbaalgos/minimize.cc (minimize): Don't add acceptance
      conditions if the final set is empty.
      * src/tgbaalgos/powerset.cc (tgba_powerset): Add the initial state
      to acc_list if it is accepting.  Also do not compute an SCC build
      map if we don't have to build acc_list.
      72139fd7
    • Alexandre Duret-Lutz's avatar
      Better resource handling in minimization. · f9e84ac2
      Alexandre Duret-Lutz authored
      * src/tgbatest/ltl2tgba.cc (main): Delete the minimized automaton.
      * src/tgbaalgos/minimize.cc (minimize): Remove the call to
      unregister_variable() at the end.  It was both
      wrong (unregistering only the first variable) and useless ("delete
      del_a" will unregister all these variables).  Use a map and a set
      to keep track of free BDD variable and reuse them, otherwise the
      algorithm would sometimes use more variables than allocated.
      f9e84ac2
    • Felix Abecassis's avatar
      99c1b607
    • Felix Abecassis's avatar
      Small fixes. · 52090e48
      Felix Abecassis authored and Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz committed
      * src/tgbatest/minimize.cc: Delete useless includes.
      * src/tgbaalgos/minimize.cc: Delete useless includes,
      fixed acceptance conditions.
      * src/tgbatest/ltl2tgba.cc: Add -Rm option for minimization.
      * src/tgba/tgbaexplicit.cc: Fixed typo.
      52090e48
    • Felix Abecassis's avatar
      * src/tgbaalgos/minimize.cc, src/tgbaalgos/minimize.hh: · 03e6dc47
      Felix Abecassis authored and Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz committed
      New files.  Algorithm to minimize an automaton using first the powerset
      construction to determinize the input automaton, the automaton is then
      minimized using the standard algorithm, using BDDs to check if states
      are equivalent.
      03e6dc47