Commit graph

26 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
82d69241f1 ltlsynt: add a --csv=FILENAME option
* bin/ltlsynt.cc: Add a --csv option to record the
duration of the various phases.
* tests/core/ltlsynt.test: Test the new option.
* NEWS: Mention it.
2020-04-30 08:14:50 +02:00
Alexandre Duret-Lutz
fe340ae8db ltlsynt: fix lar.old implementation
* bin/ltlsynt.cc: Make sure to_parity_old() receive a deterministic
automaton, for correctness.   Also call reduce_parity() afterward,
to match what was done in 2.8.7.
* tests/core/ltlsynt.test: Include lar.old in the comparison of all
results to make sure it give the same result as the other 3
algorithms.
2020-04-25 16:29:03 +02:00
Alexandre Duret-Lutz
a6da6ed95a ltlsynt: add option to call to_parity_old
* bin/ltlsynt.cc: Add support for --algo=lar.old
* NEWS: Mention it.
2020-04-20 14:48:23 +02:00
Florian Renkin
0a4312f8fe Adapt ltlsynt to the new version of to_parity
* bin/ltlsynt.cc: Use colorize_parity_here() but remove
 reduce_parity_here() already used in the new version of
 to_parity().
2020-03-24 19:51:24 +01:00
Florian Renkin
6489d6c091 ltlsynt: Correct segfault with ds algorithm and verbose
* bin/ltlsynt.cc: Use initialized DPA when printing when
 we use DET_SPLIT and verbose.
2020-03-22 16:04:44 +01:00
Alexandre Duret-Lutz
74d1ec2bff * bin/ltlsynt.cc: Typo. 2019-10-07 20:22:24 +02:00
Alexandre Duret-Lutz
d523ce8ba4 bin: handle any exception before returning from parse_opt()
On some architectures (e.g., ARM, or even some -flto setups on Intel)
C++ exceptions to not traverse the C functions.  So even if the C++
main() has a try/catch, it will not catch the exception thrown by C++
code called from the argp module (which is compiled in C).

* bin/common_setup.cc, bin/common_setup.hh: Define some macros
and function to factorize exception handling.
* bin/autcross.cc, bin/autfilt.cc, bin/common_aoutput.cc,
bin/common_color.cc, bin/common_finput.cc, bin/common_hoaread.cc,
bin/common_output.cc, bin/common_post.cc, bin/common_trans.cc,
bin/dstar2tgba.cc, bin/genaut.cc, bin/genltl.cc, bin/ltl2tgba.cc,
bin/ltl2tgta.cc, bin/ltlcross.cc, bin/ltldo.cc, bin/ltlfilt.cc,
bin/ltlgrind.cc, bin/ltlsynt.cc, bin/randaut.cc, bin/randltl.cc:
Protect all parse_opt() functions, even those where there is currently
no exception risk.
2019-09-26 15:19:57 +02:00
Alexandre Duret-Lutz
09c93a3a3d forbid the use of std::endl on std::cerr
std::cerr will flush after each operator<< by default, so it's simpler
to use \n instead of std::endl, especially if we can merge \n into the
previous string.  Ideally we should prefer \n for std::cout as well,
but there are reasonable cases where we want to call std::endl there,
so it's hard to enforce.

* tests/sanity/style.test: Diagnose occurrences of cerr.*<<.*endl.
* bin/autcross.cc, bin/autfilt.cc, bin/ltlcross.cc, bin/ltlsynt.cc,
spot/tl/formula.cc, spot/twa/bdddict.cc, tests/core/checkpsl.cc,
tests/core/checkta.cc, tests/core/consterm.cc, tests/core/emptchk.cc,
tests/core/equalsf.cc, tests/core/ikwiad.cc, tests/core/kind.cc,
tests/core/length.cc, tests/core/ltlrel.cc, tests/core/parity.cc,
tests/core/randtgba.cc, tests/core/reduc.cc, tests/core/syntimpl.cc,
tests/ltsmin/modelcheck.cc: Fix them.
2019-07-17 09:15:50 +02:00
Alexandre Duret-Lutz
c9ddbd0a73 ltlsynt: use reduce_parity()
* bin/ltlsynt.cc: Here.
* tests/core/ltlsynt.test: Adjust.
2019-06-19 23:15:02 +02:00
Alexandre Duret-Lutz
8c13d7209e ltlsynt: misc typos
* doc/org/ltlsynt.org: Fix example.
* bin/ltlsynt.cc: Fix --help text.
2019-06-18 19:12:42 +02:00
Maximilien Colange
8d5d453efa ltlsynt: new algorithm, based on LAR
* bin/ltlsynt.cc: here
* tests/core/ltlsynt.test: test it
* NEWS: document it
2018-07-27 15:34:39 +02:00
Maximilien Colange
bd75ab5b39 ltlsynt: rework synthesis algorithms
ltlsynt now offers two algorithms: one where splitting occurs before
determinization (the historical one) and one where determinization
occurs before splitting.

* bin/ltlsynt.cc: here
* tests/core/ltlsynt.test: test it and refactor test file
* NEWS: document it
* spot/misc/game.hh, spot/misc/game.cc: remove Calude's algorithm
2018-07-27 14:22:11 +02:00
Alexandre Duret-Lutz
645bb55622 bin: factor exception-handling code
* bin/common_setup.cc, bin/common_setup.hh: Define a protected_main()
function that deal with exceptions.
* bin/autcross.cc, bin/autfilt.cc, bin/dstar2tgba.cc, bin/genaut.cc,
bin/genltl.cc, bin/ltl2tgba.cc, bin/ltl2tgta.cc, bin/ltlcross.cc,
bin/ltldo.cc, bin/ltlfilt.cc, bin/ltlgrind.cc, bin/ltlsynt.cc,
bin/randaut.cc, bin/randltl.cc: Use it for all tools.
2018-05-16 20:15:04 +02:00
Maximilien Colange
1fdc32f9bb ltlsynt: improve construction of turn-based games
Improve the way transitions are duplicated when preparing the turn-based
game for synthesis. The resulting arena should now be deterministic on
nodes owned by the environment. Also move the code to another file, so
that it is easier to test (e.g. in Python).

* bin/ltlsynt.cc: move the code
* spot/twaalgos/split.cc, spot/twaalgos/split.hh: move the code and
  implement the improvements
* tests/Makefile.am, tests/python/split.py: test it
* tests/core/ltlsynt.test: update existing tests to reflect the changes
2018-04-30 14:41:52 +02:00
Maximilien Colange
9698363ef5 parity game: various improvements
Zielonka algorithm has been fixed and optimized.
It also now computes the strategy for both players.

* bin/ltlsynt.cc: Update calls to parity_game::solve()
* spot/misc/game.cc, spot/misc/game.hh: Implement the changes
2018-04-23 11:51:12 +02:00
Maximilien Colange
0e29d30d1b ltlsynt: fix the construction of the arena
* bin/ltlsynt.cc: implement it
* tests/core/ltlsynt.test: update tests
2018-04-23 11:51:12 +02:00
Maximilien Colange
5d80cc556c Add a verbose option to ltlsynt
* bin/ltlsynt.cc: implement it
2018-04-23 11:51:02 +02:00
Maximilien Colange
b09c293f1a Clean the usage of spot::acc_cond::mark_t
spot::acc_cond::mark_t is implemented as a bit vector using a single
unsigned, and implicit conversions between mark_t and unsigned may be
confusing. We try to use the proper interface.

* bin/autfilt.cc, bin/ltlsynt.cc, spot/kripke/kripke.cc,
  spot/misc/game.hh, spot/parseaut/parseaut.yy, spot/priv/accmap.hh,
  spot/ta/ta.cc, spot/ta/taexplicit.cc, spot/ta/taproduct.cc,
  spot/taalgos/emptinessta.cc, spot/taalgos/tgba2ta.cc, spot/twa/acc.cc,
  spot/twa/acc.hh, spot/twa/taatgba.cc, spot/twa/taatgba.hh,
  spot/twa/twagraph.hh, spot/twaalgos/alternation.cc,
  spot/twaalgos/cleanacc.cc, spot/twaalgos/cobuchi.cc,
  spot/twaalgos/complete.cc, spot/twaalgos/couvreurnew.cc,
  spot/twaalgos/degen.cc, spot/twaalgos/dot.cc,
  spot/twaalgos/dtwasat.cc, spot/twaalgos/dualize.cc,
  spot/twaalgos/emptiness.cc, spot/twaalgos/gtec/ce.cc,
  spot/twaalgos/gtec/gtec.cc, spot/twaalgos/gtec/sccstack.cc,
  spot/twaalgos/gv04.cc, spot/twaalgos/hoa.cc, spot/twaalgos/lbtt.cc,
  spot/twaalgos/ltl2tgba_fm.cc, spot/twaalgos/magic.cc,
  spot/twaalgos/ndfs_result.hxx, spot/twaalgos/rabin2parity.cc,
  spot/twaalgos/randomgraph.cc, spot/twaalgos/remfin.cc,
  spot/twaalgos/sbacc.cc, spot/twaalgos/sccfilter.cc,
  spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh,
  spot/twaalgos/se05.cc, spot/twaalgos/sepsets.cc,
  spot/twaalgos/simulation.cc, spot/twaalgos/strength.cc,
  spot/twaalgos/stripacc.cc, spot/twaalgos/stutter.cc,
  spot/twaalgos/sum.cc, spot/twaalgos/tau03.cc,
  spot/twaalgos/tau03opt.cc, spot/twaalgos/totgba.cc,
  spot/twaalgos/toweak.cc, python/spot/impl.i, tests/core/acc.cc,
  tests/core/twagraph.cc: do not confuse mark_t and unsigned
* tests/python/acc_cond.ipynb: warn about possible change of the API
2018-03-15 10:05:24 +01:00
Maximilien Colange
1da0afbafe Improve ltlsynt interface
To ease debugging and testing, ltlsynt can output the synthesized
strategy as an automaton, not just an aiger circuit.
Also, its exit code has been changed to something meaningful.

* bin/ltlsynt.cc: Various improvements: options, exit code, code style
* spot/twaalgos/aiger.hh, spot/twaalgos/aiger.cc,
  spot/twaalgos/Makefile.am: Move the aiger printer to separate files
* tests/core/ltlsynt.test: Clean up and update test file
* tests/Makefile.am: Add the test file to the test suite
* NEWS: document the new aiger printer
* doc/org/concepts.org: document the named property "synthesis-outputs",
  used by print_aiger
2017-11-23 14:46:50 +01:00
Alexandre Duret-Lutz
a2cbf0af3a sanity: also check the 80-column limit in bin
* tests/sanity/80columns.test: Check bin sources.
* bin/ltlsynt.cc: Fix it.
2017-09-26 21:46:42 +02:00
Alexandre Duret-Lutz
c473e4ca0b ltlsynt: handle --algo with XARGMATCH
* bin/ltlsynt.cc: Use XARGMATCH for better error handling.
2017-09-26 21:44:37 +02:00
Alexandre Duret-Lutz
69daf9c261 bin: make sure that all options are in a named section
This also fixes some empty lines and unsorted options
that appeared in some tools.

* tests/sanity/bin.test: Ensure this is done.
* bin/README: Add a new paragraph about this.
* bin/autcross.cc, bin/ltlcross.cc: Move the
output options in their own section.
* bin/common_color.cc: Assume color options are
in group -15.
* bin/common_finput.cc, bin/common_finput.hh:
Add a headless variant.
* bin/genltl.cc, bin/ltlfilt.cc, bin/ltlgrind.cc,
bin/randaut.cc, bin/randltl.cc:  Do not force the
children groups, so that the options are correctly sorted.
* bin/ltlsynt.cc: Add missing groups.
2017-09-26 21:28:16 +02:00
Thibaud Michaud
d6ae7af5f5 ltlsynt: translate winning strategy to AIGER
* bin/ltlsynt.cc: Here.
* doc/org/ltlsynt.org: Document it.
* tests/core/ltlsynt.test: Test it.
2017-09-25 12:23:47 +02:00
Thibaud Michaud
601e1405de parity game: compute winning strategy
* spot/misc/game.cc, spot/misc/game.hh: Here.
* bin/ltlsynt.cc: Realizability is now done by checking if the winning
strategy contains the initial state.
2017-09-25 12:23:47 +02:00
Thibaud Michaud
f414e9f5f2 parity game: add Zielonka's recursive algorithm
* spot/misc/game.cc, spot/misc/game.hh: Implement it.
* bin/ltlsynt.cc: Use it.
* doc/org/ltlsynt.org: Document it.
2017-09-25 12:23:47 +02:00
Thibaud Michaud
0821c97eb8 add ltlsynt executable
For now, ltlsynt only handles LTL realizability. It uses a reduction to
parity game followed by Calude et al.'s reduction from parity game to
reachability game.

* bin/ltlsynt.cc, bin/Makefile.am, bin/man/ltlsynt.x,
bin/man/Makefile.am, bin/.gitignore: New binary.
* doc/org/arch.tex, doc/Makefile.am, doc/org/tools.org,
doc/org/ltlsynt.org: Document it.
* spot/misc/game.cc, spot/misc/game.hh, spot/misc/Makefile.am: Parity
game wrapper for parity automata + reachability game interface from
Calude et al.'s paper.
2017-09-25 12:23:47 +02:00