Commit graph

2357 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
90a466d6a3 degen: consider common outgoing acceptance only inside an SCC
* src/tgbaalgos/degen.cc: Here.
* src/tgbatest/degenid.test: Add a test case that is improved
by this.
* src/tgbatest/ltl2ta.test, src/tgbatest/ltl2tgba.test: Adjust.
2013-09-16 08:31:43 +02:00
Alexandre Duret-Lutz
073334dfd6 * src/tgbaalgos/dtbasat.cc: Skip clauses for trivial SCCs. 2013-09-16 08:31:43 +02:00
Alexandre Duret-Lutz
88cd81c547 * src/misc/satsolver.cc: Report when SAT-solver terminate by signal. 2013-09-16 08:31:43 +02:00
Alexandre Duret-Lutz
22f944ad56 sat: catch write errors
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Throw
exceptions on write errors.
2013-09-16 08:31:43 +02:00
Alexandre Duret-Lutz
1f3b7e8002 sat: catch cases where nbclause > INT_MAX and report them
* src/misc/satsolver.hh (clause_counter): New class.
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Use it.
2013-09-16 08:31:43 +02:00
Alexandre Duret-Lutz
ba5bddec78 degen: use the initial state heuristic when entering SCCs
* src/tgbaalgos/degen.cc: Implement it.
* src/tgbatest/degenid.test: New test cases.
2013-09-16 08:31:43 +02:00
Alexandre Duret-Lutz
3eb993e224 postproc: make it possible to force sat-minimization
* src/tgbaalgos/postproc.cc: Handle negative values for
sat_minimize_ as a force option.
2013-09-16 08:31:42 +02:00
Alexandre Duret-Lutz
8e30fcd84b postproc: two fixes for sat-minimize
* src/tgbaalgos/postproc.cc: Compute original_acc before calling
scc_filter(), and do not degeneralize the automaton before calling
tba_determinize() even when building a BA.
2013-09-16 08:31:42 +02:00
Alexandre Duret-Lutz
484c56c6ea sat: skip reference transitions that are out of any cycle
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Greatly reduce
the number of clauses and variable by removing any path variable that
reference a reference transition that is not in a SCC.
2013-09-16 08:31:42 +02:00
Alexandre Duret-Lutz
e9f60df857 sat: implement partial symmetry breaking
Thanks to Rüdiger Ehlers for his helpful email.

* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Here.
2013-09-08 20:43:53 +02:00
Alexandre Duret-Lutz
9cfe1a3496 tostring: add LaTeX output
* src/ltlvisit/tostring.cc, src/ltlvisit/tostring.hh
(to_latex_string): New function.
* src/bin/common_output.cc, src/bin/common_output.hh:
Add a --latex option.
* doc/tl/spotltl.sty: New file.
* doc/tl/Makefile.am: Distribute it.
* src/ltltest/latex.test: New test.
* src/ltltest/Makefile.am: Add it.
* NEWS: Mention it.
2013-09-08 20:43:53 +02:00
Alexandre Duret-Lutz
90c106f8a8 sat: generalize the code for reading the solution
* src/misc/satsolver.cc, src/misc/satsolver.hh (satsolver_get_solution):
New function, that accepts a solution split on multiple 'v ' lines.
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc (get_solution):
Remove, and adjust existing code to use satsolver_get_solution().
* src/tgbatest/readsat.cc, src/tgbatest/readsat.test: New files.
* src/tgbatest/Makefile.am: Add them.
* src/bin/man/spot-x.x: Mention the SAT competition rules for
the expected input/output format.
2013-09-08 20:43:52 +02:00
Alexandre Duret-Lutz
1ab46b0864 postproc: Add option to output Complete automata.
* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh: Tweak set_pref()
to also accept Any|Complete, Small|Complete, or Deterministic|Complete.
* src/bin/common_post.hh, src/bin/common_post.cc: Add option --complete
and set comp.
* src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc: Pass
comp to set_pref().
* src/tgbaalgos/complete.cc: Preserve state-based acceptance.
* src/tgbatest/dstar.test, src/tgbatest/ltlcross2.test,
src/tgbatest/nondet.test: Augment tests.
* doc/org/dstar2tgba.org, doc/org/ltl2tgba.org, NEWS: Document.
2013-09-08 20:43:52 +02:00
Alexandre Duret-Lutz
b31facffb1 * NEWS: Summarize recent changes 2013-09-08 20:43:52 +02:00
Alexandre Duret-Lutz
7a7ed8a632 rename dba_complement() to dtgba_complement()
* src/tgbaalgos/dbacomp.cc, src/tgbaalgos/dbacomp.hh
(dba_complement): Rename to...
* src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/dtgbacomp.hh
(dtgba_complement): ... this.
* src/tgbaalgos/minimize.cc, src/tgbaalgos/powerset.cc,
src/tgbatest/ltl2tgba.cc, src/bin/ltlcross.cc,
src/tgbaalgos/Makefile.am: Adjust to name change.
2013-09-08 20:43:52 +02:00
Alexandre Duret-Lutz
fdb157bf94 satmin: cleanup interfaces and minimization loops
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtbasat.hh:
(dtba_sat_minimize): Split into...
(dtba_sat_synthetize, dtba_sat_minimize): These.
(dtba_sat_minimize_dichotomy): New function.
* src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/dtgbasat.hh
(dtgba_sat_minimize, dtgba_sat_synthetize): Likewise.
* src/tgbatest/ltl2tgba.cc: Adjust to new interface.
* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh:
Cleanup option processing for SAT options.
* src/tgbatest/satmin.test: Adjust.
* src/bin/spot-x.cc, src/bin/man/spot-x.x, NEWS: Document.
2013-09-08 20:43:17 +02:00
Alexandre Duret-Lutz
b09ef5bea9 postproc: disable WDBA-minimization on request
* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh:
Implement the wdba-minimize option.
* src/bin/spot-x.cc (wdba-minimize): Document.
* src/bin/man/spot-x.x: Update references.
2013-08-26 17:27:43 +02:00
Alexandre Duret-Lutz
bfbe5b448b stats: add %r to display run-time
* src/tgbaalgos/stats.cc, src/tgbaalgos/stats.hh: Add
support for printing run-time.
* src/bin/ltl2tgba.cc, src/bin/dstar2tgba.cc: Compute
the run-time and show the option.
* NEWS: Mention it.
2013-08-26 17:27:43 +02:00
Alexandre Duret-Lutz
4dd8d80292 isdet: simplify is_deterministic(), add is_complete().
* src/tgbaalgos/isdet.cc: Simplify determinism check.
* src/tgbaalgos/isdet.hh, src/tgbaalgos/isdet.cc (is_complete): New
function.
* src/tgbaalgos/stats.cc, src/tgbaalgos/stats.hh, src/bin/dstar2tgba.cc
src/bin/ltl2tgba.cc: Add escape sequence %p to the possible statistics
to show whether an automaton is complete.
* src/tgbatest/nondet.test: Add a couple more tests.
2013-08-26 17:27:42 +02:00
Alexandre Duret-Lutz
bcd794c608 sat: improve our algorithms
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtbasat.hh:
Rename dba_sat_minimize to dtba_sat_minimize.
Make it possible to produce state-based automata, and do
not output useless clauses.
* src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/dtgbasat.hh:
likewise, but also add the possibility to set the
target number of states, as in dtba_sat_minimize.
* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh:
Add new options for state-based computations and
setting acceptance and states number when using
dtgba_sat_minimize().
* src/tgbatest/ltl2tgba.cc: Adjust calls to
dtba_sat_minimize().
* src/tgbatest/satmin.test: Adjust calls.
2013-08-26 17:27:42 +02:00
Alexandre Duret-Lutz
1029d08a77 ltlcross: Complement deterministic automata.
* src/bin/ltlcross.cc: Complement deterministic automata,
and use them for additional intersection checks.
* NEWS, doc/org/ltlcross.org, src/bin/man/ltlcross.x: Document it.
2013-08-26 17:27:42 +02:00
Alexandre Duret-Lutz
2dda2c9122 minimize_obligation: can complement the input TGBA if deterministic
This makes dstar2tgba able to produce a minimal WDBA when the input DRA
represent an obligation property.

* src/tgbaalgos/minimize.cc (minimize_obligation): When the
formula is not supplied but the input automaton is deterministic,
complement it to check the result of WDBA minimization.
* src/tgbatest/ltl2dstar.test, src/tgbatest/ltl2dstar2.test: Improve
tests.
2013-08-26 17:27:42 +02:00
Alexandre Duret-Lutz
3b10bb3b8c satsolver: new function
Uses the value of the SPOT_SATSOLVER environment variable
to decide how to call the SAT solver.

* src/misc/satsolver.cc, src/misc/satsolver.hh: New files.
* src/misc/Makefile.am: Add them.
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Use satsolver().
2013-08-26 17:27:42 +02:00
Alexandre Duret-Lutz
6ce005b2d0 * .gitignore: More files to ignore. 2013-08-26 17:27:42 +02:00
Alexandre Duret-Lutz
679df4eee1 Implement dtgba_sat_minimize().
Joint work with Soheib Baarir.

* src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/dtgbasat.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh: Add
a dtgba-sat-minimize option.
* src/tgbatest/ltl2tgba.cc: Add option -RG.
* src/tgbatest/satmin.test: Add more tests.
2013-08-26 17:27:42 +02:00
Alexandre Duret-Lutz
260ab53cb5 * src/tgba/tgbatba.cc: Register the variables of the source automaton. 2013-08-26 17:27:41 +02:00
Alexandre Duret-Lutz
84dabae374 Add some test of the SAT-based minimization.
* src/tgbatest/satmin.test: New file.
* src/tgbatest/Makefile.am: Add it.
2013-08-26 17:27:41 +02:00
Alexandre Duret-Lutz
b679adadf9 postproc: Add a sat-minimize option.
* src/tgbaalgos/postproc.hh, src/tgbaalgos/postproc.cc: Here.
2013-08-26 17:27:41 +02:00
Alexandre Duret-Lutz
d9f3ca71c0 dtbasat: implement dba_sat_minimize()
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtbasat.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatest/ltl2tgba.cc: Add option -RS.
2013-08-26 17:27:41 +02:00
Alexandre Duret-Lutz
3fd49da159 complete: new algorithm for TGBAs
* src/tgbaalgos/complete.cc, src/tgbaalgos/complete.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
2013-08-26 17:27:41 +02:00
Alexandre Duret-Lutz
78e76eb07d dbacomp: connect only back-links and generalize to tgba
* src/tgbaalgos/dbacomp.cc: Here.
* src/tgbaalgos/dbacomp.hh: Adjust documentation.
* src/tgbatest/dbacomp.test: New file.
* src/tgbatest/Makefile.am (TESTS): Add it.
* src/tgbatest/det.test: Update.
2013-08-26 17:27:41 +02:00
Alexandre Duret-Lutz
63b7cdb6c8 tba_determinize: add a cycle_threshold
* src/tgbaalgos/powerset.cc, src/tgbaalgos/powerset.hh
(tba_determinize, tba_determinize_check): Add a cycle_threshold
argument.
* src/tgbaalgos/postproc.cc: Use it.
* src/tgbatest/ltl2tgba.cc: Adjust calls.
2013-08-26 17:27:41 +02:00
Alexandre Duret-Lutz
0117fc2c36 postproc: use tba_determinize_check()
* src/tgbaalgos/postproc.cc: Use tba_determinize_check()
if option "tba-det" is set.
* src/tgbaalgos/postproc.hh (tba_determinize_): New attribute.
* src/tgbatest/det.test: New file.
* src/tgbatest/Makefile.am (TESTS): Add it.
2013-08-26 17:27:40 +02:00
Alexandre Duret-Lutz
07ab225cc4 dba_determinize: Add a threshold argument.
* src/tgbaalgos/powerset.cc, src/tgbaalgos/powerset.hh
(dba_determinize, dba_determinize_check): Add a threshold
argument.
* src/tgbatest/ltl2tgba.cc (-O, -RQ): Accept a threshold
argument.
2013-08-26 17:27:40 +02:00
Alexandre Duret-Lutz
4ac6468bfc Implement tba_determinize_check(), following Dax et al. (ATVA'07).
* src/tgbaalgos/powerset.cc, src/tgbaalgos/powerset.hh
(tba_determinize_check): New function.
* src/tgbatest/ltl2tgba.cc (-O): Use it.
2013-08-26 17:27:40 +02:00
Alexandre Duret-Lutz
bd2e78c1ed Introduce a dba_complement() function.
Loosely based on "Complementing Deterministic Büchi Automata in
Polynomial Time", R. P. Kurshan, 1987, J. Comp. Syst. Sci. 35.

* src/tgbaalgos/dbacomp.cc, src/tgbaalgos/dbacomp.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatest/ltl2tgba.cc (-DC): New option to test it.
2013-08-26 17:27:40 +02:00
Alexandre Duret-Lutz
ec5bbf4fcf Implementent tba_determinize(), based on Dax et al (ATVA'07).
* src/tgbaalgos/powerset.hh,
src/tgbaalgos/powerset.cc (tba_determinize): New function.
* src/tgbatest/ltl2tgba.cc (-RQ): New option, for testing.
2013-08-26 17:27:40 +02:00
Alexandre Duret-Lutz
29bc087d56 reachiter: fix the DFS, and add a version with on_stack()
* src/tgbaalgos/reachiter.hh, src/tgbaalgos/reachiter.cc: Fix the
tgba_reachable_iterator_depth_first implementation by not making
inheriting from tgba_reachable_iterator.  Add a
tgba_reachable_iterator_depth_first_stack
* src/tgbatest/sim.test, src/tgbatest/dstar.test: Adjust.
2013-08-26 17:27:40 +02:00
Alexandre Duret-Lutz
57f712fcbd ltlcross: Allow %D, %N, or %T to be used multiple time
For example to interface with Rabinizer, we can now use
'java -jar /pathto/Rabinizer.jar -ltl2dstar %F %D; mv %D.dst %D'
because Rabinizer always append a suffix to its last argument, we
rename the file...

* src/bin/ltlcross.cc (printable_result_filename): Adjust.
2013-08-26 17:27:39 +02:00
Alexandre Duret-Lutz
f704513b6b org: document dstar2tgba.
* doc/org/dstar2tgba.org: New file.
* doc/org/tools.org: Link to it.
* doc/Makefile.am: Distribute it.
* NEWS: Mention the generated web page.
2013-08-26 17:27:39 +02:00
Alexandre Duret-Lutz
d561dfb7e0 * src/bin/ltlcross.cc: Use dstar_to_tgba(). 2013-08-26 14:40:13 +02:00
Alexandre Duret-Lutz
d7027c34d3 dstar: Improve conversion from DRA to BA.
Extended former conversion from DRA->DBA to handle
the case where some SCC is not DBA-realizable.

* src/dstarparse/dra2dba.cc: Rename as...
* src/dstarparse/dra2ba.cc: ... this.
(dra_to_dba, dra_to_dba_worker): Rename as...
(dra_to_ba, dra_to_ba_worker): ... these and extend.
* src/dstarparse/Makefile.am, src/dstarparse/public.hh,
src/dstarparse/dstar2tgba.cc, src/dstarparse/nra2nba.cc: Adjust.
* NEWS: Update the description of dstar2tgba accordingly.
2013-08-26 14:40:13 +02:00
Alexandre Duret-Lutz
c58bfbd2ee * src/kripkeparse/Makefile.am: Add missing include directory. 2013-08-23 17:02:30 +02:00
Alexandre Duret-Lutz
d3b81809c8 dstar2tgba: new command.
* src/bin/dstar2tgba.cc, src/bin/man/dstar2tgba.x: New files.
* src/bin/Makefile.am, src/bin/man/Makefile.am: Add them.
* NEWS: Mention it.
* src/bin/ltl2tgba.cc, src/tgbaalgos/stats.cc, doc/org/ltl2tgba.org:
Rename the %S sequence as %c, for consistency with dstar2tgba.
* src/tgbatest/ltl2dstar.test: Add more tests.
* src/tgbatest/ltl2dstar2.test: New file.
* src/tgbatest/Makefile.am: Add it.
2013-08-23 17:02:30 +02:00
Alexandre Duret-Lutz
9a7590a646 dstar: implement dra_to_dba()
This is an implementation of Krishnan's ISAAC'94 paper to convert
deterministic Rabin automata into DBA when possible.

* src/dstarparse/dra2dba.cc: New file.
* src/dstarparse/dstar2tgba.cc: New file.
* src/dstarparse/Makefile.am: Add them.
* src/dstarparse/nra2nba.cc (nra_to_nba): Adjust so
that dra_to_dba() can call it using a masked automaton.
* src/dstarparse/public.hh (dra_to_dba, dstar_to_tgba): Declare.
* src/tgbatest/ltl2tgba.cc: Add an -XDD option.
* src/tgbatest/dstar.test: More tests.
2013-08-23 17:02:30 +02:00
Alexandre Duret-Lutz
ce0aec604c Introduce some masked tgba.
* src/tgba/tgbamask.cc, src/tgba/tgbamask.hh,
src/tgba/tgbaproxy.cc, src/tgba/tgbaproxy.hh: New files.
* src/tgba/Makefile.am: Add them.
* src/tgbatest/explicit3.cc, src/tgbatest/explicit3.test:
New files.
* src/tgbatest/Makefile.am: Add them.
2013-08-23 17:02:30 +02:00
Alexandre Duret-Lutz
68ce9980d1 Introduce spot::state_set.
* src/tgba/state.hh: Define state_set and shared_state_set.
* src/tgba/taatgba.cc, src/tgba/taatgba.hh: Rename the existing
state_set (that inherits from spot::state) as set_state.
* src/tgba/tgbakvcomplement.cc: Use shared_state_set instead
of state_set.
* src/tgbaalgos/minimize.cc (state_set): Rename as...
(build_state_set): ... this.
2013-08-23 17:02:30 +02:00
Alexandre Duret-Lutz
d2560944b6 * src/tgbatest/ltl2tgba.cc: Accept reading LBTT files from stdin. 2013-08-23 17:02:30 +02:00
Alexandre Duret-Lutz
337aeefcc3 ltlcross: add support for ltl2dstar's output.
* src/bin/ltlcross.cc: Add support for %D.
* src/bin/man/ltlcross.x: Add example.
* NEWS: Mention it.
* src/tgbatest/ltl2dstar.test: New file.
* src/tgbatest/Makefile.am: Add it.
2013-08-23 17:02:30 +02:00
Alexandre Duret-Lutz
2da0053c53 dstarparse: Preliminary work on a parser for ltl2dstar.
Supports reading Rabin and Streett automata, and converting them to
nondeterministic Büchi automata (for Rabin) or TGBA (for Streett).

* src/dstarparse/Makefile.am, src/dstarparse/dstarparse.yy,
src/dstarparse/dstarscan.ll, src/dstarparse/fmterror.cc,
src/dstarparse/parsedecl.hh, src/dstarparse/public.hh,
src/dstarparse/nra2nba.cc, src/dstarparse/nsa2tgba.cc: New files.
* configure.ac, src/Makefile.am, README: Adjust.
* src/tgbatest/ltl2tgba.cc: Add options -XD, -XDB.
* src/tgbatest/dstar.test: New file.
* src/tgbatest/Makefile.am (TESTS): Add it.
2013-08-23 17:02:30 +02:00