Commit graph

1861 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
3c985a3235 sat: document the SPOT_SATLOG envvar
* doc/org/satmin.org, src/bin/man/spot-x.x: Document it.
* NEWS: Mention it.
2014-02-08 20:31:49 +01:00
Alexandre Duret-Lutz
20824b96b9 timer: also consider the time spent in child processes
* src/misc/timer.hh: Fix.
* NEWS: Mention the bug.
2014-02-08 20:31:49 +01:00
Alexandre Duret-Lutz
55ee18b96a sat-minimize: more statistics.
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Record
statistics about intermediate automata if SPOT_SATLOG is set to some
filename, and display intermediate automata if SPOT_SATSHOW is set.
* bench/dtgbasat/stat.sh, bench/dtgbasat/stats.sh,
bench/dtgbasat/tabl.pl, bench/dtgbasat/tabl1.pl,
bench/dtgbasat/tabl2.pl, bench/dtgbasat/tabl3.pl,
bench/dtgbasat/tabl4.pl: Gather these extra statistics.
2014-02-08 20:31:49 +01:00
Alexandre Duret-Lutz
1319ec0bad sat-minimize: limit number of iterations
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Compute the
actual number of reachable states in the produced automaton to prepare
the next iteration.
2014-02-08 20:31:49 +01:00
Alexandre Duret-Lutz
9c0021fac8 * src/tgbatest/satmin2.test, src/tgbatest/Makefile.am: New test. 2014-02-08 20:31:49 +01:00
Alexandre Duret-Lutz
7a26a4f1ec Revert "* src/tgbaalgos/dtbasat.cc: Better encoding for weak SCCs."
This was simply wrong.

* src/tgbaalgos/dtbasat.cc: reverts commit
fc5a00d24d5964d6f6a48d362ecbdec357eaf154.
2014-02-08 20:31:26 +01:00
Alexandre Duret-Lutz
b4d0b9ee42 sat: more debug.
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: More debuging
code.
2014-02-07 12:07:16 +01:00
Alexandre Duret-Lutz
9c98975c19 sat: factor the creation of temporary files
* src/misc/satsolver.hh, src/misc/satsolver.cc: Present
the SAT solver as an object with a stream interface, to
prepare for a better implementation.
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc:
Adjust to the new interface, removing all the handling
of temporary files.
* src/tgbatest/readsat.cc: Adjust.
2014-02-07 12:07:16 +01:00
Alexandre Duret-Lutz
1853bdd53b sat: fix some non-determinism of the encoding
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Rewrite the
loops that number the states of the reference automaton so that
they declare CNF variable numbers in the same order as the states
of the automaton.
2014-02-07 12:07:16 +01:00
Alexandre Duret-Lutz
e5874ee4c7 Call glucose with -verb=0.
* src/misc/satsolver.cc: Call glucose with -verb=0.
* src/bin/man/spot-x.x: Document it.
2014-02-07 12:07:16 +01:00
Alexandre Duret-Lutz
977a6dfaee * src/tgbaalgos/dtbasat.cc: Better encoding for weak SCCs. 2014-02-07 12:07:16 +01:00
Alexandre Duret-Lutz
c2195600b8 Fix spurious failre with Pandas 0.13.
* src/tgbatest/ltlcross4.test: Work around Pandas 0.13.
* NEWS: Mention it.
2014-02-06 01:33:17 +01:00
Alexandre Duret-Lutz
50bdc24514 randltl: gracefully handle the absence of unary or binary operators.
* src/ltlvisit/randomltl.cc: Fix generation of formulas when unary or
binary operators are missing.
* src/ltlvisit/apcollect.cc, src/ltlvisit/apcollect.hh
(destroy_atomic_prop_set): New function.
* src/bin/randltl.cc: Use it, and also honnor --boolean-priorities
when generating SEREs.
* src/ltltest/rand.test: New file.
* src/ltltest/Makefile.am: Add it.
2014-02-06 00:15:27 +01:00
Alexandre Duret-Lutz
4911e7dc1f Fix warning of Clang-3.5 against Doxygen comments.
* src/dstarparse/public.hh: Avoid LaTeX in comments to please clang-3.5.
* src/tgbaalgos/isdet.hh: Typo in Doxygen comment.
2014-02-05 15:07:34 +01:00
Alexandre Duret-Lutz
494dbe2041 length: slight simplification
* src/ltlvisit/length.cc (length_boolone_visitor): Simplify.
* NEWS: Mention Alexandre's fix.
2014-02-03 09:49:30 +01:00
Alexandre Lewkowicz
02334867da length_boolone: fix inconsistency
* src/ltlvisit/length.cc: Consider length of all Boolean
expressions combined in a multop as one.
* src/ltltest/length.test: Test it.
2014-02-03 09:40:25 +01:00
Alexandre Duret-Lutz
4f31a9bbed bitvect: fix block_count() on 0-sized bit-vectors
The bug was introduced by 522373984c.

* src/misc/bitvect.hh (block_count): Here.
* src/tgbatest/dstar.test: Add a test case.
2014-01-24 09:25:48 +01:00
Alexandre Duret-Lutz
91789b9b12 * src/tgbaalgos/degen.cc: Do not copy the unicity table. 2014-01-23 15:05:25 +01:00
Alexandre Duret-Lutz
bbf6a68228 Workaround another g++-4.0.1 bug on Darwin.
* src/ltlast/formula_tree.hh: Mark nodes with SPOT_API.
2014-01-15 23:04:38 +01:00
Alexandre Duret-Lutz
522373984c bitvect: fix some issues observed on 32bit architectures.
* src/misc/bitvect.cc, src/misc/bitvect.hh: Do
not assume the two bitvect with the same size have
the same number of allocated blocks.  Fix an
assertion in extra_range().
2014-01-15 16:27:49 +01:00
Alexandre Duret-Lutz
534edd4d1c bitvect: Fix compilation on 32-bits hosts.
* src/misc/bitvect.cc: Conditionally declare fnv<8>, so that the C++
parser does not choke on 14695981039346656037UL when compiling on a
32bit host.  Problem observed with g++ 4.0.1 and 4.2.1 on Darwin.
2014-01-15 15:57:58 +01:00
Alexandre Duret-Lutz
9ccdef9cbd Workaround GCC 4.0.1 on the Darwin builds.
* src/misc/bitvect.hh: Remove SPOT_API from class forward declarations.
* src/ltlast/nfa.hh: Likewise.
2014-01-15 14:39:45 +01:00
Alexandre Duret-Lutz
72b616c8cc * src/eltlparse/eltlscan.ll (_atoi): Fix range checking. 2014-01-13 17:25:35 +01:00
Alexandre Duret-Lutz
e2143c0313 ltlparse, eltlparse: avoid unnecessary calls to strlen().
* src/ltlparse/ltlscan.ll, src/ltlparse/parsedecl.hh (flex_set_buffer):
Take a std::string as argument and call yy_scan_bytes() with
the string size() instead of calling yy_scan_string() which does
strlen() on the supplied string.
* src/ltlparse/ltlparse.yy: Adjust calls.
* src/eltlparse/eltlscan.ll, src/eltlparse/parsedecl.hh,
src/eltlparse/eltlparse.yy: Use a similar interface.  This
also fixes a memory leak as the scanned buffer was not
released.
2014-01-13 17:25:35 +01:00
Alexandre Duret-Lutz
0c06844655 * src/taalgos/emptinessta.cc: Include <cstdlib> for abs(). 2014-01-13 17:25:35 +01:00
Alexandre Duret-Lutz
7a6af3aa0d Add missing #include.
* src/tgbaalgos/cutscc.cc, src/tgbaalgos/ltl2taa.cc:  Include
<algorithm> for set_difference and binary_search.
2013-12-18 17:03:37 +01:00
Alexandre Duret-Lutz
0afb9fe103 * src/tgba/tgbaunion.hh: Remove unused private member. 2013-12-16 10:27:39 +01:00
Alexandre Duret-Lutz
f0bcab4add bin: support multi-line CSV fields.
* src/bin/common_finput.cc (job_processor::process_stream): Read
multi-line CSV fields.
* src/ltltest/lbt.test, src/tgbatest/nondet.test: Add tests.
2013-12-06 13:45:55 +01:00
Alexandre Duret-Lutz
6c21089599 ltlcross: end CSV lines with \n, not \r\n
* src/bin/ltlcross.cc (print_stats_csv): Revert the recent
addition of \r, it is caussing too many issues.
* NEWS: Mention it.
2013-12-06 11:29:31 +01:00
Alexandre Duret-Lutz
846e33b9e5 ltl2tgba: Add a --csv-escape option and document CSV I/O.
* src/bin/common_output.cc, src/bin/common_output.hh:
(output_formula_checked, aut_stat_printer): New.
* src/bin/genltl.cc, src/bin/randltl.cc, src/bin/ltlfilt.cc: Call
output_formula_checked() instead of output_formula().
* src/bin/ltl2tgba.cc: Use aut_stat_printer and add option --csv-escape.
* doc/org/csv.org: New file to document CSV I/O.
* doc/Makefile.am: Add it.
* doc/org/ioltl.org, doc/org/ltlfilt.org, doc/org/ltl2tgba.org,
doc/org/tools.org: Link to csv.org
2013-12-06 11:09:36 +01:00
Alexandre Duret-Lutz
0faea814da bin: add support for reading formulas from CSV files.
* NEWS: Mention it.
* src/bin/common_finput.cc, src/bin/common_finput.hh: Implement it.
* src/bin/common_output.cc, src/bin/common_output.hh: Add the %< and
%> escapes.
* src/bin/ltlfilt.cc: Connect %< and %> to the
prefix andsuffix of the input, and document them.
* src/tgbatest/det.test, src/tgbatest/nondet.test: Simplify these
tests that read CSV files.
2013-12-06 11:09:36 +01:00
Alexandre Duret-Lutz
d719c706f4 ltlcross: report statistics about Rabin and Streett automata
* src/bin/ltlcross.cc: Implement it.
* src/bin/man/ltlcross.x, doc/org/ltlcross.org, NEWS: Document it.
* src/tgbatest/ltl2dstar.test, src/tgbatest/ltlcross3.test: Test it.
2013-11-22 08:59:13 +01:00
Alexandre Duret-Lutz
2b10745dfb ltlcross: support --products=+N
* src/bin/ltlcross.cc: Implement it.
* NEWS, doc/org/ltlcross.org: Document it.
* src/tgbatest/ltlcross3.test: Test it.
2013-11-22 02:13:57 +01:00
Alexandre Duret-Lutz
3e3d320de5 doc: add suggestions for bibliographic references
* doc/org/tools.org, src/bin/man/genltl.x, src/bin/man/ltl2tgba.x,
src/bin/man/ltl2tgta.x, src/bin/man/ltlcross.x, src/bin/man/ltlfilt.x,
src/bin/man/randltl.x: Add bibliographic references, mostly to
the ATVA'13 paper.
2013-11-22 02:13:57 +01:00
Alexandre Duret-Lutz
f65c621a55 ltlcross: report exit_status and exit_code columns in CSV and JSON
* src/bin/ltlcross.cc: Report exit_status and exit_code columns in CSV
and JSON files.  Also output lines for failed translations, and add
a --omit-missing option to disable that.  Move the time column right
after exit_status and exit_code.
* src/bin/man/ltlcross.x: Document each column of the output.
* bench/ltl2tgba/tools: Use the "{name}cmd" notation.
* bench/ltl2tgba/sum.py: Adjust to the new columns.
* bench/ltl2tgba/README: Update to point to the man page for a
description of the columns.
* bench/ltl2tgba/Makefile.am: Build results.pdf as said announced in
README.
* bench/spin13/html.bottom: Update code to ignore these two new
columns and lines with null values.
* src/tgbatest/ltlcross3.test: Add tests.
* doc/org/ltlcross.org: Adjust examples.
* NEWS: Mention this.
2013-11-22 02:13:57 +01:00
Alexandre Duret-Lutz
686a45484d ltlcross: report missing input/output sequence
* src/bin/ltlcross.cc: Fix it.
* src/tgbatest/ltlcross3.test: New file.
* src/tgbatest/Makefile.am: Add it.
* NEWS: Mention it.
2013-11-22 02:13:57 +01:00
Alexandre Duret-Lutz
cf91a23711 tests: add some missing "set -e"
* src/ltltest/lbt.test, src/ltltest/utf8.test,
src/tgbatest/dbacomp.test, src/tgbatest/ltlcross.test,
src/tgbatest/ltlcross2.test, src/tgbatest/ltlcrossce.test: Add set -e.
2013-11-22 02:13:57 +01:00
Alexandre Duret-Lutz
7de25a32ef ltlcross: support short names
* NEWS: Mention it.
* doc/org/ltlcross.org: Document it.
* src/bin/ltlcross.cc: Implement it.
* src/tgbatest/Makefile.am, src/tgbatest/defs.in,
src/tgbatest/ltlcross4.test: Test it.
2013-11-22 02:13:57 +01:00
Alexandre Duret-Lutz
1c5536ea9c ltlcross: follow RFC 4180 for CSV output.
* src/misc/escape.cc, src/misc/escape.hh (escape_rfc4180): New
function.
* src/bin/ltlcross.cc: Do not output space after ',', use
"\r\n" for end of line, and use escape_rfc4180().
* NEWS: Mention it.
2013-11-22 02:13:50 +01:00
Alexandre Duret-Lutz
d415a23804 * src/bin/ltl2tgta.cc: Simplify using spot::translator(). 2013-10-22 17:55:29 +02:00
Alexandre Duret-Lutz
f38570138d * src/ltlvisit/relabel.cc: Add more comments. 2013-10-01 18:32:57 +02:00
Alexandre Duret-Lutz
f3b87c85a2 Fix uninitialized variables in spot::postprocessor.
* src/tgbaalgos/postproc.cc: Initialize option
variables when opt is not given.
2013-09-30 20:32:54 +02:00
Alexandre Duret-Lutz
3c943d836a Add support for Bison 3.0.
We still want to remain compatible with Bison 2.7 so instead of fixing
all the new errors reported by 3.0 we silence some warning.  We should
fix these for good once Bison 3.0 is more widespread.

* m4/bison.m4: New file. Test if bison support -Wno-empty-rule and
-Wno-deprecated.  Define BISON and BISON_EXTRA_FLAGS.
* configure.ac: Do not test for yacc, use the above test instead.
* src/dstarparse/Makefile.am, src/eltlparse/Makefile.am,
src/kripkeparse/Makefile.am, src/ltlparse/Makefile.am,
src/neverparse/Makefile.am, src/tgbaparse/Makefile.am: Use BISON
and BISON_EXTRA_FLAGS.
* src/ltlparse/ltlparse.yy: Fix or and remove useless %right/%nonassoc
settings.
* src/eltlparse/eltlparse.yy: Likewise, and remove "%pure-parser".
2013-09-30 20:32:15 +02:00
Alexandre Duret-Lutz
5663872083 Work around some configurations of latexmk.
* src/ltltest/latex.test: Use latexmk -pvc- like in doc/tl/Makefile.am.
Reported by Étienne Renault.
2013-09-30 11:52:24 +02:00
Alexandre Duret-Lutz
df109869eb Generalize implication-based simplifications for multops.
And also speedup implication checks for Boolean expressions.

* src/ltlvisit/simplify.cc: Improve implication-based rules
rules for multops by checking one operand against all the
other at once (instead of one by one).  Do not break
Boolean expressions while performing implication checks.
* src/ltlvisit/simplify.hh: Typo.
* src/ltltest/reduccmp.test: More tests.
2013-09-29 21:06:09 +02:00
Alexandre Duret-Lutz
c01909e3ff Sort comutative binops like we sort multops.
* src/ltlast/formula.hh (is_literal): Rename as...
(get_literal): ... this.
(is_literal): New method.
(formula_ptr_less_than_multop): Rename as...
(formula_ptr_less_than_bool_first): ... this.
* src/ltlast/binop.cc: Use formula_ptr_less_than_bool_first.
* src/ltlast/multop.cc, src/ltlast/formula.cc: Adjust
to renamings.
2013-09-29 20:58:19 +02:00
Alexandre Duret-Lutz
228121c963 Include lib/ and config.h in ltlast/.
* src/ltlast/Makefile.am: Include lib/ in search path.
* src/ltlast/atomic_prop.cc, src/ltlast/automatop.cc,
src/ltlast/binop.cc, src/ltlast/bunop.cc,
src/ltlast/constant.cc, src/ltlast/formula_tree.cc,
src/ltlast/multop.cc, src/ltlast/nfa.cc,
src/ltlast/refformula.cc, src/ltlast/unop.cc: Include
config.h.
2013-09-28 16:02:18 +02:00
Alexandre Duret-Lutz
87b65b9bce relabel: implement relabeling of Boolean subexpressions.
* src/ltlast/multop.cc, src/ltlast/multop.hh (multop::boolean_operands,
multop::boolean_count): New methods.
* src/ltlvisit/relabel.cc, src/ltlvisit/relabel.hh
(relabel): Take an optional relabeling_map as parameter.
(relabel_bse): New.
* src/ltltest/ltlrel.test, src/ltltest/ltlrel.cc: New files.
* src/ltltest/Makefile.am: Add them.
* src/bin/ltlfilt.cc: Add option --relabel-bool.
* src/ltltest/ltlfilt.test: Test it.
* NEWS: Mention it.
* doc/org/ltlfilt.org: Illustrate it.
2013-09-28 09:02:30 +02:00
Alexandre Duret-Lutz
2efe52fab0 * src/ltlvisit/clone.cc: Use reserve() for multop. 2013-09-27 16:22:58 +02:00
Alexandre Duret-Lutz
1f1feb935d * src/tgbaalgos/randomgraph.hh: Two typos, reported by Akim. 2013-09-27 14:38:03 +02:00