Commit graph

1502 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
a4d1e18bf3 Safra: Fix usage of multiple acceptance conditions and fix text output.
* src/tgba/tgbasafracomplement.cc
(tgba_safra_complement::tgba_safra_complement)
(tgba_safra_complement::succ_iter): Correct the declaration and
use of multiple acceptance conditions.
(state_complement::to_string): Output the L set, not U.  The previous
code caused different states to share the same names, causing issues
with the text-based output (state with identical names get merged).
* src/tgba/tgbasafracomplement.hh
(tgba_safra_complement::acceptance_cond_vec_): Adjust type to
store BDDs.
* src/tgbatest/complementation.cc: Implement a new "-b" option
to output automata in Spot's syntax.
* src/tgbatest/complementation.test: Add a test-case supplied
by Martin Dieguez Lodeiro.
* THANKS: Add Martin.
2011-10-23 23:06:59 +02:00
Alexandre Duret-Lutz
ff3c02f51d * src/tgba/tgbasafracomplement.cc: Fix two asserts. 2011-10-23 22:02:19 +02:00
Alexandre Duret-Lutz
73d9f65d2c Improve the print_safra_automaton output.
* src/tgba/tgbasafracomplement.cc (print_safra_tree): Fix output in
case of hash collision.  Use the actual states to get a number, not
their hash value.
(print_safra_automaton): Output a mapping of values to states names.
(safra_tree_automaton::get_sba): New method, used by
print_safra_automaton.
2011-10-23 22:01:40 +02:00
Alexandre Duret-Lutz
101b18b24b Fix errors reported by clang++-2.9.
* src/evtgbaalgos/tgba2evtgba.cc (process_link): Fix prototype
to match tgba_reachable_iterator::process_link.
* src/ltlvisit/tunabbrev.hh: Add using super::visit, so that the
other visit() method are in scope when we overload one.
* src/tgba/tgbareduc.hh, src/tgba/tgbareduc.cc (start, end,
process_link): Remove these empty methods.  The default
implementations are empty too, and process_link had the
wrong prototype.
* src/tgbaalgos/reductgba_sim.hh, src/tgbaalgos/reductgba_sim.cc
(start, end, process_link): Likewise.
2011-08-28 10:37:43 +02:00
Alexandre Duret-Lutz
92ef9d6e07 * examples/adder/adder.cxx (test_vector): Add parentheses to
remove a clang++-2.9 warning.
2011-08-28 10:37:42 +02:00
Alexandre Duret-Lutz
24be6076f6 * src/bddop.c (bdd_support): Speedup using a cache. 2011-08-28 10:37:42 +02:00
Alexandre Duret-Lutz
d9fc75e94e Improve SCC simplification by removing implied acceptance conditions.
Spot 0.7.1 used to need 190 acceptance conditions to translate the
188 literature formulae.  With this patch we are down to 185.
That's not an impressive, but there are only ~20 formulae that
require more than 1 acceptance conditions; hence little room for
improvement.

* src/misc/bddlt.hh (bdd_hash): New function.
* src/misc/accconv.hh, src/misc/accconv.cc: New files.
* src/misc/Makefile.am: Add them.
* src/tgbaalgos/scc.cc (scc_map::build_map): Adjust
to record all combination of acceptance conditions occurring in a SCC.
* src/tgbaalgos/scc.hh (scc_map::scc::useful_acc): Update description.
* src/tgbaalgos/sccfilter.cc (scc_filter): Simplify acceptance
conditions that are always implied by another acceptance
conditions.  Previously, we only removed acceptance conditions
that where always present in accepting SCCs.
* src/tgbatest/sccsimpl.test: New file.
* src/tgbatest/Makefile.am (TESTS): Add it.
2011-08-28 10:37:42 +02:00
Alexandre Duret-Lutz
9d232af82f Refine yesterday's change to the degeneralization.
This avoids a small regression on the size of degeneralized
automata of our usual list of literature formulae.

* src/tgba/tgbatba.hh, src/tgba/tgbatba.cc
(tgba_tba_proxy::union_acceptance_conditions_of_original_state):
New method.
* src/tgba/tgbatba.cc (tgba_tba_proxy_succ_iterator): In accepting
states, ignore only the last expected acceptance condition if its
common to all outgoing transitions AND if it is not used by any
outgoing transitions of the destination.
2011-08-26 15:23:54 +02:00
Alexandre Duret-Lutz
bc416fdb2f Make sure the degeneralization is idempotent (up to renaming of
states).

* src/tgbaalgos/tgbatba.cc: When degeneralizing to SBA, remove the
acceptance conditions that are common to all outgoing transitions
of this state.  This helps to make the degeneralization
idempotent.
* src/tgbatest/degenid.test: New test case.
* src/tgbatest/Makefile.am: Add it.
2011-08-25 18:42:00 +02:00
Alexandre Duret-Lutz
bf7b94e1cd Fix escaping of state name in save_reachable()'s output.
* src/tgbaalgos/save.c (process_state): Escape quotes in the
name of source and destination states.  This fixes a side bug
in the upcoming degenid.test test case.
2011-08-25 18:29:46 +02:00
Alexandre Duret-Lutz
d8ba172e6d Running ltl2tgba -R1q -R1t -N would degeneralize before and
after the simulation-reduction.

Report from Tomáš Babiak <xbabiak@fi.muni.cz>.

* src/tgbaalgos/neverclaim.hh (never_claim_reachable): Take
a tgba as input.
* src/tgbaalgos/neverclaim.cc (never_claim_bfs): Call
state_is_accepting() only if this tgba turns out to be
a tgba_sba_proxy.  Otherwise check the acceptance of one
outgoing transition as we do in dotty_bfs since 2011-03-05.
* src/tgbatest/ltl2tgba.cc: Do not redegeneralize before
calling never_claim_reachable() if we know the automaton is
degeneralized already.
* src/tgbatest/ltl2tgba.test: Add a test case.
2011-08-25 16:53:40 +02:00
Alexandre Duret-Lutz
1c2450f609 Please GCC 4.6.
* src/tgbatest/complementation.cc (check, automaton): Remove
these unused variables.
2011-08-17 16:27:40 +02:00
Alexandre Duret-Lutz
03aabf9a3a Fix a nondeterministic behavior of the degeneralization algorithm.
Reported by Tomáš Babiak <xbabiak@fi.muni.cz>.

* src/tgba/tgbatba.cc (tgba_tba_proxy): Replace the std::map used
to record outgoing transitions by an Sgi::hash_map, and keep the
order of these transitions in a separate list.
* src/tgbatest/degendet.test: New file.
* src/tgbatest/Makefile.am (TESTS): Add it.
* THANKS: Add Tomáš and convert to utf8.
2011-08-17 16:24:38 +02:00
Alexandre Duret-Lutz
7760b459e7 * src/tgbatest/ltl2tgba.cc (syntax): -N implies -DS, not -D. 2011-08-17 14:00:39 +02:00
Alexandre Duret-Lutz
cdb4e36121 * iface/dve2/dve2check.cc: Add option -W and simplify formulae. 2011-07-26 18:55:19 +02:00
Alexandre Duret-Lutz
1719287b1e -e means we expect an accepting run.
* iface/dve2/dve2check.cc: Reverse the value of
expect_counter_example with respect to the -e/-E options.
* iface/dve2/dve2check.test: Swap -e and -E.
2011-07-26 18:44:18 +02:00
Alexandre Duret-Lutz
7aefc190c9 Add some "drop shadow" in ltl2tgba.html.
* wrap/python/ajax/ltl2tgba.html: Add shadow to all boxes.
* wrap/python/ajax/css/ltl2tgba.css (.shadow): New class.
2011-06-26 18:26:20 +02:00
Alexandre Duret-Lutz
1a823fea96 Revamp the ltl2tgba benchmark.
* bench/ltl2tgba/algorithms: Reduce the number of Spot configuration
tested.
* bench/ltl2tgba/Makefile.am (run, small.txt, big.txt, known.txt):
New rules.
* bench/ltl2tgba/big, bench/ltl2tgba/small, bench/ltl2tgba/known:
Add a 15min timeout to the lbtt configuration.
* bench/ltl2tgba/defs.in: Adjust variable definitions to accept
variable inderections.
* bench/ltl2tgba/parseout.pl: Add an option to output the table in
LaTeX.  Also consider all formulae, not just the positive
formulae.
* bench/ltl2tgba/README: Update.
2011-06-26 18:14:53 +02:00
Alexandre Duret-Lutz
3fecb250a2 * src/ltlvisit/tostring.cc (to_spin_string_visitor): Add missing break. 2011-06-16 15:13:53 +02:00
Alexandre Duret-Lutz
fb3edb47e0 [buddy] * src/bddop.c (apply_rec, appquant_rec): Improve caching by
reordering operands of commutative operators.
2011-06-14 09:51:32 +02:00
Alexandre Duret-Lutz
c42d55e6b1 * wrap/python/ajax/spot.in: Touch the directory containing
the cached result for the requests.  So that it survives
the browser's cache.
(finish): Prune the cache only once per hour, and only eraes
files that are older than 2 hours.
2011-06-10 11:12:05 +02:00
Alexandre Duret-Lutz
8059047b21 * wrap/python/ajax/ltl2tgba.html: Add focus on the formula field
on page load.
2011-06-09 14:51:45 +02:00
Alexandre Duret-Lutz
d3ccaa7cb9 [buddy] Remove some valgrind warnings about uninitialized memory when
BddCache_lookup return an entry from a Not operation.

* src/bddop.c (apply_rec, simplify_rec): When checking the cache
entry, always check entry->a and entry->c before checking
entry->b, because the "not_rec()" function does not initialize
the latter.
2011-06-09 11:56:02 +02:00
Alexandre Duret-Lutz
a0ca684dc6 more files to ignore 2011-06-08 17:24:22 +02:00
Alexandre Duret-Lutz
d26a7f7e48 * NEWS: Update with recent changes. 2011-06-08 17:12:06 +02:00
Alexandre Duret-Lutz
3216494cf6 Implement cache pruning in the CGI script.
* wrap/python/ajax/spot.in (finish): Prune the cache once in a
while.  We rely on hardlinks for garbage collecting the pictures
and dot sources that may be shared by different requests.
2011-06-08 16:44:52 +02:00
Alexandre Duret-Lutz
155ba42c90 Cache dot sources in the CGI script.
* wrap/python/ajax/spot.in (render_dot, render_dot_maybe)
(render_automaton, render_formula): Cache the dot source, so that
we do not have to regenerate two pictures from the same contents.
* wrap/python/spot.i: Typo in the ostringstream declaration.
2011-06-08 16:44:52 +02:00
Alexandre Duret-Lutz
0d2ac81a8c Output a "Cache-Control:" header in the CGI script.
* wrap/python/ajax/spot.in: Output a cache-control header, so that
browsers do no even send two identical requests.
2011-06-08 16:44:47 +02:00
Alexandre Duret-Lutz
b8f8441167 Cache results of the spot.py CGI script.
* wrap/python/ajax/spot.in: Use the QUERY_STRING as a hash key to
cache the result of the script.  Open stdout without buffering and
redirect it to a file that we can dump later on cache hits.  Parts
of this change are extracted from code from Pierre Parutto
<parutto@lrde.epita.fr>.
* AUTHORS: Add him.
2011-06-08 11:36:45 +02:00
Alexandre Duret-Lutz
b535741a90 [buddy] * examples/cmilner/cmilner.c (A, transitions, initial_state)
(reachable_states, has_deadlocks): Declare as static functions,
to suppress a GCC warning.
2011-06-07 14:52:35 +02:00
Alexandre Duret-Lutz
f4ecb34275 * src/ltltest/genltl.cc (X_n): Fix assertion. 2011-06-07 07:26:43 +02:00
Alexandre Duret-Lutz
0b11fc2e11 * src/ltlvisit/dotty.cc (dotty_visitor): Reorder attributes. 2011-06-06 19:25:27 +02:00
Alexandre Duret-Lutz
bb06db7c1b * src/ltltest/genltl.cc (fair_response): Typo. 2011-06-06 19:02:03 +02:00
Alexandre Duret-Lutz
d47aa1d8b2 DVE2: Do not display state variables with only one possible value.
* iface/dve2/dve2.cc (dve2_kripke::dve2_kripke): Fill
a format_filter_ array with boolean indicating whether each
variable should be printed.  Ignore variable with only one
possible value.
(dve2_kripke::~dve2_kripke): Destroy it.
(dve2_kripke::format_state): Use it.
* iface/dve2/finite.test: Adjust.
2011-06-06 18:19:11 +02:00
Alexandre Duret-Lutz
866af2a715 Remove Kristin Rozier's LTLcounter.pl scripts, now that we can
generate these formulae with "genltl".

* src/tgbatest/ltlcounter/: Remove this directory.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/ltlcounter.test, bench/ltlcounter/run: Use genltl
to generate the formulae.
* bench/ltlcounter/README: Do not mention src/tgbatest/ltlcounter/
anymore.
2011-06-06 17:57:55 +02:00
Alexandre Duret-Lutz
4087d37fe5 Better layout of the LTL formula parse tree.
* src/ltlvisit/dotty.cc: Display "L" and "R" tail-labels
for binary operators.  Gather all constants and atomic
propositions in a sub-graph with "rank=sink".
2011-06-06 17:04:49 +02:00
Alexandre Duret-Lutz
625b9362c8 Add more formula families to genltl.
* src/ltltest/genltl.cc (fair_response, ltl_counter)
(ltl_counter_carry): New functions, constructing function from
gastin.03.cav and rozier.07.cav.  The LTL counter will replace the
scripts in src/tgbatest/ltlcounter/.
(X_n): New helper function.
2011-06-06 15:58:15 +02:00
Alexandre Duret-Lutz
67ff9f203f Install a misc/_config.h to hide all the defines that clutter the
built output.

This is also a step towards better checks for things like
__attribute__ or std::tr1.

* m4/ax_prefix_config_h.m4: New file.
* configure.ac: Call AC_CONFIG_HEADERS and AX_PREFIX_CONFIG_H.
* src/misc/Makefile.am: Install misc/_config.h.
* src/misc/random.cc, src/misc/version.cc: Include misc/_config.h.
2011-06-06 12:52:50 +02:00
Alexandre Duret-Lutz
78f932081b Document the protocol used between ltl2tgba.html and spot.py.
* wrap/python/ajax/protocol.txt: New file.
* wrap/python/ajax/Makefile.am (EXTRA_DIST): Add it.
2011-06-03 17:13:53 +02:00
Alexandre Duret-Lutz
23334e7e25 * iface/dve2/README: Document state compression. 2011-06-02 19:37:20 +02:00
Alexandre Duret-Lutz
f3bae53e5b Update jQuery and jQuery-UI.
* wrap/python/ajax/ltl2tgba.html: Adjust to use
jQuery 1.6.1 and jQuery-UI 1.8.13.  Remove a useless check
of $("#autoupdate").attr("checked") since this checkbox no longer
exists.
* wrap/python/ajax/css/ui-lightness/jquery-ui-1.8.8.custom.css:
Replace by ...
* wrap/python/ajax/css/ui-lightness/jquery-ui-1.8.13.custom.css: This.
* wrap/python/ajax/Makefile.am (EXTRA_DIST): Adjust.
2011-06-02 14:10:40 +02:00
Alexandre Duret-Lutz
bf2b44c6de * iface/dve2/dve2.cc: Kill a spurious warning. 2011-05-30 12:00:58 +02:00
Alexandre Duret-Lutz
1eb0464afc * bench/wdba/README: Typos. 2011-05-30 09:11:40 +02:00
Alexandre Duret-Lutz
290b825a3a Some intvcomp2 speedups.
* src/misc/intvcmp2.cc (stream_compression_base::run):
Implement a shift-less encoding for the 1-bit and 3-bit cases.
Also declare offsets as size_t, to help 64-bit compilers.
2011-05-18 19:00:53 +02:00
Alexandre Duret-Lutz
ced733e4da * src/misc/intvcomp.hh, src/misc/intvcmp2.hh: Include stddef.h for
size_t.
2011-05-16 16:18:49 +02:00
Alexandre Duret-Lutz
3752c3918e * src/misc/intvcmp2.cc: Cosmetics to please sanity checks. 2011-05-05 15:06:41 +02:00
Alexandre Duret-Lutz
fea61e9f51 Fix compilation error with g++ <= 4.3.
* src/misc/intvcmp2.cc (int_array_array_compression): Specify full
type of stream_compression_base<int_array_array_compression> in
constructor to please g++ versions <= 4.3.
2011-05-05 12:10:08 +02:00
Alexandre Duret-Lutz
ff43212e67 DVE2: Minor memory compaction.
* iface/dve2/dve2.cc (dve2_state, dve2_compressed_state): Store
size and count on 16 bits, and hash on 32 bits, to limit memory
wasted.
2011-05-02 14:46:19 +02:00
Alexandre Duret-Lutz
bf8becccea DVE2: Optionally use the new compression.
* iface/dve2/dve2.cc, iface/dve2/dve2.hh, iface/dve2/dve2check.cc:
Add a -Z option and pass it through.
2011-05-02 14:46:19 +02:00
Alexandre Duret-Lutz
a832eab156 Implement a new compression inspired from simple-9.
* src/misc/intvcmp2.cc, src/misc/intvcmp2.hh: New files.
* src/misc/Makefile.am: Add them.
* src/tgbatest/intvcmp2.cc: New test.
* src/tgbatest/Makefile.am: Add it.
* src/tgbatest/intvcomp.test: Call it.
2011-05-02 14:46:18 +02:00