Commit graph

2335 commits

Author SHA1 Message Date
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
Alexandre Duret-Lutz
5a3b1a9905 bitvect: implement a dynamic bit-vector class.
* src/misc/bitvect.cc, src/misc/bitvect.hh: New files.
* src/misc/Makefile.am: Add them.
* src/tgbatest/bitvect.cc, src/tgbatest/bitvect.test: New files.
* src/tgbatest/Makefile.am: Add them.
2013-08-23 17:02:29 +02:00
Alexandre Duret-Lutz
dfc5ff95e5 degen: Improve when initial state is accepting without self-loop.
* src/tgbaalgos/degen.cc: Choose the initial level according
to acceptance condition common to all outgoing transitions.
* src/tgbatest/degenid.test: Add test case.
* NEWS: Mention it.
2013-08-23 17:01:55 +02:00
Alexandre Duret-Lutz
67a4833576 Fix --enable-optimization, not to reset CXXFLAGS.
* m4/gccoptim.m4: Typo.
2013-08-21 23:05:18 +02:00
Alexandre Duret-Lutz
a30a59582c Fix builds for older versions of g++.
* configure.ac (CXXFLAGS): Add -DSPOT_BUILD regardless
of whether -fvisibility-inlines-hidden is supported.
2013-08-21 18:42:46 +02:00
Alexandre Duret-Lutz
e7522056ca ltlcross: give an example of accepted word for nonempty cross-products
* src/tgbaalgos/word.cc, src/tgbaalgos/word.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatest/ltlcrossce.test: New file.
* src/tgbatest/Makefile.am: Add it.
* src/bin/ltlcross.cc: Compute and display an accepted word
for nonempty cross-products.
* NEWS, doc/org/ltlcross.org: Document it.
2013-07-29 01:14:38 +02:00
Alexandre Duret-Lutz
4bafa4e1b0 tmpfile: Honor SPOT_TMPFILE and SPOT_TMPKEEP.
* src/misc/tmpfile.cc: Check these environment variables.
* src/bin/man/ltlcross.x, NEWS: Document them.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
1bb5cbd90c Test driver for Teamcity.
* tools/test-driver-teamcity: New file.
* Makefile.am: Distribute it.
* HACKING: Document it.
* wrap/python/tests/Makefile.am: Use it also for Python
tests.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
9894b81775 ltlcross: use tmpfile.
* src/bin/ltlcross.cc: Use features introduced by misc/tmpfile.hh.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
c0e7f9de58 gnulib: import module mkstemps
* lib/mkstemps.c, m4/mkstemps.m4: New files.
* lib/Makefile.am, m4/gnulib-cache.m4, m4/gnulib-comp.m4: Update.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
16b7206dd9 Fix gnulib to not replace gmtime() and localtime()
It cause issues when <ctime> latter undefine the gmtime/localtime macros
to access the real function.

* lib/Makefile.am, lib/time.in.h, m4/gettimeofday.m4, m4/time_h.m4:
These changes are mostly based on the patch posted in
http://permalink.gmane.org/gmane.comp.lib.gnulib.bugs/29229 but
with the prototype of gmtime() and localtime() fixed.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
96f32c73fb Update to gnulib 312af25ba220ccff068245f0dc698e9bcc8f03f8
* lib/.gitignore, lib/c-ctype.h, lib/msvc-inval.c, lib/stdalign.in.h,
lib/vasnprintf.c, lib/verify.h, m4/extern-inline.m4, m4/stdalign.m4:
Update.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
904ff6a555 misc: Include config.h in *.cc files
This is needed now that lib/ is in the include path.

* src/misc/bareword.cc, src/misc/bddop.cc, src/misc/escape.cc,
src/misc/formater.cc, src/misc/intvcmp2.cc, src/misc/intvcomp.cc,
src/misc/memusage.cc, src/misc/minato.cc, src/misc/optionmap.cc,
src/misc/random.cc, src/misc/timer.cc, src/misc/version.cc: Include
config.h.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
e7d09f4fd0 tmpfile: new module to create and keep track of temporary files.
* src/misc/tmpfile.cc, src/misc/tmpfile.hh: New files.
* src/misc/Makefile.am: Add them
* src/Makefile.am: Link with gnulib for mkstemp and mkstemps.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
ab3a4f54c2 gnulib: add module stpcpy
* lib/stpcpy.c, m4/stpcpy.m4: New files.
* lib/Makefile.am, m4/gnulib-cache.m4, m4/gnulib-comp.m4: Update.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
5b0bf8ef09 ltlcross: Add a --color option.
* src/bin/ltlcross.cc: Add a --color option.
* NEWS: Mention it.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
35129e5a5a gnulib: Add modules argmatch and isatty.
* lib/argmatch.c, lib/argmatch.h, lib/c-ctype.c, lib/c-ctype.h,
lib/config.charset, lib/c-strcasecmp.c, lib/c-strcaseeq.h,
lib/c-strcase.h, lib/c-strncasecmp.c, lib/exitfail.c, lib/exitfail.h,
lib/isatty.c, lib/localcharset.c, lib/localcharset.h, lib/mbrtowc.c,
lib/mbsinit.c, lib/quotearg.c, lib/quotearg.h, lib/quote.h,
lib/ref-add.sin, lib/ref-del.sin, lib/streq.h, lib/wctype-h.c,
lib/wctype.in.h, lib/xalloc-die.c, lib/xalloc.h, lib/xalloc-oversized.h,
lib/xmalloc.c, m4/codeset.m4, m4/configmake.m4, m4/glibc21.m4,
m4/isatty.m4, m4/localcharset.m4, m4/locale-fr.m4, m4/locale-ja.m4,
m4/locale-zh.m4, m4/mbrtowc.m4, m4/mbsinit.m4, m4/mbstate_t.m4,
m4/quotearg.m4, m4/quote.m4, m4/wctype_h.m4, m4/xalloc.m4: New files.
* lib/Makefile.am, m4/gnulib-cache.m4, m4/gnulib-comp.m4: Update.
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
542050bab4 * doc/Doxyfile.in: Hide private functions and member. Enable search. 2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
7f31d70345 * src/tgbaalgos/cutscc.cc: Cosmetics. 2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
26f48b1df2 * src/taalgos/tgba2ta.cc: Cosmetics. 2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
92a3366488 * src/taalgos/minimize.cc: Cosmetics. 2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
f00d97b4ba Use the count_state() function instead of stats_reachable().
* src/tgbaalgos/postproc.cc: Move the count_state() function...
* src/priv/countstates.cc, src/priv/countstates.hh: ... in these
new files.
* src/priv/Makefile.am: Add them.
* src/saba/sabacomplementtgba.cc, src/tgba/tgbakvcomplement.cc,
src/tgbaalgos/minimize.cc: Use count_states() instead of
stats_reachable().
2013-07-29 01:14:37 +02:00
Alexandre Duret-Lutz
43b3df0ef0 Use -fvisibility=hidden globally.
* configure.ac: Check for flags and fill CXXFLAGS and CFLAGS.
* iface/dve2/dve2.hh: Mark load_dve2 for export.
* src/eltlparse/Makefile.am, src/kripke/Makefile.am,
src/kripkeparse/Makefile.am, src/ltlast/Makefile.am,
src/ltlenv/Makefile.am, src/ltlparse/Makefile.am,
src/ltlvisit/Makefile.am, src/misc/Makefile.am,
src/neverparse/Makefile.am, src/priv/Makefile.am, src/saba/Makefile.am,
src/sabaalgos/Makefile.am, src/ta/Makefile.am, src/taalgos/Makefile.am,
src/tgba/Makefile.am, src/tgbaalgos/Makefile.am,
src/tgbaalgos/gtec/Makefile.am, src/tgbaparse/Makefile.am:
Remove $(VISIBILITY_CXXFLAGS) now that it is set globally.
2013-07-29 01:14:37 +02:00