Commit graph

489 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
9d70eeef97 ltlcross: display short names when supplied
Suggested by František Blahoudek.

* bin/ltlcross.cc: Implement this.
* NEWS, doc/org/ltlcross.org: Document it.
* tests/core/ltlcross4.test: Test it.
2020-01-04 15:54:18 +01:00
Alexandre Duret-Lutz
d1ef380d32 twagraph: merge_edge() can determinize automata
Reported by František Blahoudek.

* spot/twa/twagraph.cc: Reset prop_universal() if edges are merged in
a non-deterministic automaton.
* tests/core/det.test: Add test case.
* NEWS: Mention the issue.
2019-12-31 22:34:39 +01:00
Alexandre Duret-Lutz
cfe3ed707a fix ltl2tgba -B not always returning Inf(0)
Reported by František Blahoudek.

* spot/twaalgos/postproc.cc: Turn "t" into "Inf(0)" for BA.
* tests/core/ltl2tgba.test: Add test case.
* NEWS: Mention the bug.
2019-12-26 23:05:58 +01:00
Alexandre Duret-Lutz
d2ba554507 tmpfile: improve error message
* spot/misc/tmpfile.cc: Display strerror(errno) plus some suggestions
that depend on the error.  Based on a report from Shengping Shaw.
* THANKS: Add reporter.
* tests/core/ltlcross5.test: New file.
* tests/Makefile.am: Add it.
2019-12-15 17:44:54 +01:00
Alexandre Duret-Lutz
c36b1588fc remfin: fix tra_to_tba
This fixes a complementation bug reported by Juraj Major and Tereza
Šťastná.

* spot/twaalgos/remfin.cc (is_scc_tba_type): Fix the condition for
handling Fin-alone pairs.
* tests/core/complement.test: Add Juraj & Tereza's test case.
* NEWS: Mention it.
2019-12-05 22:44:15 +01:00
Alexandre Duret-Lutz
44df3c0837 add a --check=stutter-sensitive-example option
* spot/twaalgos/stutter.cc,
spot/twaalgos/stutter.hh (check_stutter_invariance): Add a
find_counterexamples argument.
* spot/twaalgos/hoa.cc: Output accepted-word and rejected-word examples.
* bin/common_aoutput.cc: Handle --check=stutter-sensitive-example.
* NEWS: Mention it.
* tests/core/stutter-tgba.test: Test it.
* doc/org/concepts.org, doc/org/hoa.org: Document accepted-word and
rejected-word named properties.
* bin/man/spot-x.x: Mention that --check=stutter-sensitive-example
ignores SPOT_STUTTER_CHECK.
2019-12-05 08:00:47 +01:00
Alexandre Duret-Lutz
cc9659bca0 acc: improve diagnostics for algorithms that use too many colors
* spot/twa/acc.hh (acc_cond::mark_t): Diagnose mark_t with set numbers
that are too larges.
* tests/python/except.py: Adjust.
* tests/core/acc.cc: Remove most of asserts, as those can be disabled,
and adjust expected exception.
2019-10-18 17:01:07 +02:00
Etienne Renault
896925ae1c core: random_shuffle is deprecated and not portable
* tests/core/parity.cc: Here.
2019-10-17 16:45:25 +02:00
Alexandre Duret-Lutz
ce93cdca21 aiger: simplify output code, and fix some function call order
* spot/twaalgos/aiger.cc: Simplify some bit operatitions.  Force the
ordering of operations in aig_and, that was causing a test case to
fail on ARM, and greatly simplify the code and data structures used in
remove_unused().
* tests/core/ltlsynt.test: Adjust expected output.
2019-09-26 15:19:57 +02:00
Alexandre Duret-Lutz
4378745458 from-ltlf: never output strong_X
* spot/tl/ltlf.cc: Here.
* tests/core/ltlfilt.test: Adjust test case.
2019-09-24 10:47:23 +02:00
Alexandre Duret-Lutz
7f21d3ff29 ltl2tgba, ltldo: add a --negate option
Suggested by Victor Khomenko.

* bin/ltl2tgba.cc, bin/ltldo.cc: Implement it.
* doc/org/hierarchy.org: Use it.
* tests/core/ltldo2.test: Test it.
* bin/common_output.cc: Typo.
* NEWS: Mention the new option.
2019-09-23 17:02:06 +02:00
Alexandre Duret-Lutz
be389c5c25 introduce op::strong_X
This was prompted by reports by Andrew Wells and Yong Li.

* NEWS, doc/tl/tl.tex: Document the changes.
* THANKS: Add Andrew.
* bin/ltlfilt.cc: Match --ltl before --from-ltlf if needed.
* spot/parsetl/parsedecl.hh, spot/parsetl/parsetl.yy,
spot/parsetl/scantl.ll: Parse X[!].
* spot/tl/formula.cc, spot/tl/formula.hh: Declare the new operator.
* spot/tl/ltlf.cc: Adjust to handle op::X and op::strong_X correctly.
* spot/tl/dot.cc, spot/tl/mark.cc, spot/tl/mutation.cc,
spot/tl/print.cc, spot/tl/simplify.cc, spot/tl/snf.cc,
spot/tl/unabbrev.cc, spot/twa/formula2bdd.cc,
spot/twaalgos/ltl2taa.cc, spot/twaalgos/ltl2tgba_fm.cc,
tests/core/ltlgrind.test, tests/core/rand.test,
tests/core/sugar.test, tests/python/randltl.ipynb: Adjust.
* tests/core/ltlfilt.test, tests/core/sugar.test,
tests/core/utf8.test: More tests.
2019-09-23 17:01:28 +02:00
Alexandre Duret-Lutz
8ec6ea838d twa_graph: fix precondition on set_init_state
Fixes #391.

* spot/twa/twagraph.hh: Here.
* tests/core/dualize.test, tests/python/except.py: New tests.
* NEWS: Mention the bug.
2019-07-30 15:35:12 +02:00
Alexandre Duret-Lutz
6f37ff8ed0 ltlcross, autcross: add --quiet/-q option
* bin/autcross.cc, bin/ltlcross.cc: Implement it.
* doc/org/autcross.org, doc/org/ltlcross.org, NEWS: Document it.
* doc/org/spot.css: Add colors for Makefile snippets.
* tests/core/autcross4.test, tests/core/ltlcross3.test,
tests/core/ltlcrossce.test: Add test cases.
2019-07-17 17:34:01 +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
b4cced9ba8 genltl: add --pps-arbiter-{strict,standard}
* spot/gen/formulas.cc, spot/gen/formulas.hh, bin/genltl.cc: Implement
this.
* NEWS, bin/man/genltl.x, doc/spot.bib: Add documentation.
* tests/core/genltl.test, tests/core/ltlfilt.test: Add some tests.
2019-07-12 16:48:10 +02:00
Alexandre Duret-Lutz
e2fad2d7ae complement: fix handling of output_aborter with postproc
Reported by Salomon Sickert.

* spot/twaalgos/complement.cc: Make sure the output of postproc
is deterministic.
* tests/core/ltlcross.test: Add test case.
* NEWS: Mention the bug.
2019-07-11 14:48:50 +02:00
Alexandre Duret-Lutz
0d9cc29b46 tl: eight new simplification rules
* NEWS, doc/tl/tl.tex: Document the rules.
* spot/tl/simplify.cc: Implement them.
* tests/core/reduccmp.test: Test them.
* tests/core/det.test, tests/core/ltl2tgba2.test,
tests/python/stutter-inv.ipynb, tests/core/385.test: Adjust.
2019-07-09 16:09:15 +02:00
Alexandre Duret-Lutz
bfe0ada634 deprecate spot::acc_cond::format()
* NEWS: Mention it.
* spot/twa/acc.hh (spot::acc_cond::format): Deprecate.
(spot::acc_cond::mark_t::as_string): New function.
* spot/taalgos/dot.cc: Use mark_t::as_string().
* spot/priv/satcommon.cc, spot/priv/satcommon.hh,
spot/twaalgos/dtwasat.cc, spot/twaalgos/emptiness.cc,
tests/core/acc.cc, tests/core/acc.test: Adjust to use << directly.
2019-07-05 22:43:36 +02:00
Alexandre Duret-Lutz
f3e57901a4 simulation: improve merging of transiant-SCCs
* spot/twaalgos/simulation.cc: Code this.
* tests/core/det.test, tests/core/dra2dba.test,
tests/core/satmin.test, tests/core/sim3.test,
tests/python/decompose.ipynb, tests/python/dualize.py: Adjust test
cases.
* NEWS: Mention the optimization.
2019-06-20 13:25:26 +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
da5d23f0a2 simplify: GF(f)=GF(dnf(f)) FG(f)=FG(cnf(f))
These rules come from Delag's paper, and help some cases
in issue #385.

* spot/tl/simplify.cc: Implement the simplification.
* doc/tl/tl.tex, NEWS: Document it.
* tests/core/385.test: New file.
* tests/Makefile.am: Add it.
* tests/core/reduccmp.test: More tests.
* tests/core/ltl2tgba2.test: Adjust one improved case.
* tests/python/automata.ipynb, tests/python/twagraph-internals.ipynb:
Adjust expected output, as the cnf/dnf reorder some subformulas.
2019-06-18 10:03:56 +02:00
Alexandre Duret-Lutz
b4da0cf660 hierarchy: add a new way to check DBA-realizability via DPA
* spot/tl/hierarchy.cc, spot/tl/hierarchy.hh: Here.
* tests/core/hierarchy.test: Test it.
* bin/man/spot-x.x: Document SPOT_PR_CHECK.
* doc/org/hierarchy.org, NEWS: Update.
2019-06-12 23:38:17 +02:00
Alexandre Duret-Lutz
eb7b68ad58 use reduce_parity in translator and posprocessor
* spot/twaalgos/postproc.cc, spot/twaalgos/translate.cc: Here.
* tests/core/genltl.test, tests/core/parity2.test,
tests/core/sccsimpl.test, tests/python/twagraph-internals.ipynb:
Adjust test cases.
* NEWS: Mention it.
2019-06-12 22:05:04 +02:00
Alexandre Duret-Lutz
ebfa3a377a parity: introduce reduce_parity()
* spot/twaalgos/parity.cc, spot/twaalgos/parity.hh: Here.
* tests/core/parity.cc: Add test case.
* tests/python/parity.ipynb, NEWS: More documentation.
2019-06-12 22:05:02 +02:00
Alexandre Duret-Lutz
f6575d2ec5 improve cleanup_parity() and colorize_parity()
Fixes #384.

* spot/twaalgos/parity.cc: Here.
* tests/core/parity2.test, tests/python/highlighting.ipynb,
tests/python/parity.py: Adjust test cases.
* tests/python/parity.ipynb: Improve the presentation.
* NEWS: Mention the change.
2019-06-11 21:24:55 +02:00
Alexandre Duret-Lutz
f0b77e21c8 autcross: simplify code using complement() and intersecting_word()
* bin/autcross.cc: Let complement() decide how to complement automata.
Do not apply remove_fin(), because we have a generic emptiness check
now.  Use intersecting_word() instead of product()+accepting_word() so
that the former can maybe be optimized in the future.
* tests/core/autcross2.test: Adjust test case to use TGBA instead
of monitors, as calling complement() had a side-effect of setting
the "weak" property on the input.
2019-06-07 14:56:56 +02:00
Alexandre Duret-Lutz
cba012328e genaut: introduce --m-nba
* bin/genaut.cc: Implement the --m-nba option.
* spot/gen/automata.hh, spot/gen/automata.cc: Add the generation code.
* NEWS, bin/man/genaut.x: Document it.
* doc/org/genaut.org: Update.
* tests/core/genaut.test, tests/core/parity2.test: Add some tests.
2019-06-07 14:16:42 +02:00
Alexandre Duret-Lutz
58389bdb80 tl: extend F[n:m] and G[n:m] to the case of m=$
Suggested by Victor Khomenko.

* spot/tl/formula.cc, spot/tl/formula.hh, spot/parsetl/parsetl.yy:
Implement this.
* NEWS, doc/tl/tl.tex: Document it.
* tests/core/sugar.test, tests/python/ltlparse.py: Add some tests.
2019-06-02 14:39:21 +02:00
Alexandre Duret-Lutz
a85045091b introduce output_aborter, and use it in ltlcross
* spot/twaalgos/alternation.cc, spot/twaalgos/alternation.hh,
spot/twaalgos/complement.cc, spot/twaalgos/complement.hh,
spot/twaalgos/determinize.cc, spot/twaalgos/determinize.hh,
spot/twaalgos/minimize.cc, spot/twaalgos/minimize.hh,
spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh,
spot/twaalgos/powerset.cc, spot/twaalgos/powerset.hh,
spot/twaalgos/product.cc, spot/twaalgos/product.hh: Use an
output_aborter argument to abort if the output is too large.
* bin/ltlcross.cc: Use complement() with an output_aborter
so that ltlcross will not attempt to build complement larger
than 500 states or 5000 edges.  Add --determinize-max-states
and --determinize-max-edges options.
* tests/core/ltlcross3.test, tests/core/ltlcrossce2.test,
tests/core/sccsimpl.test, tests/core/wdba2.test,
tests/python/stutter-inv.ipynb: Adjust test cases.
* NEWS: Document this.
* bin/spot-x.cc: Add documentation for postprocessor's
det-max-states and det-max-edges arguments.
* doc/org/ltlcross.org: Update description.
2019-05-28 14:27:30 +02:00
Alexandre Duret-Lutz
90a88d0b5a tl: fix handling of f##[0:0]g, and of ##[0:n]g
The first issue was reported by Victor Khomenko.

* spot/tl/formula.cc: Introduce a single-argument
version of sugar_delay().
* spot/parsetl/parsetl.yy: Use it.
* doc/tl/tl.tex, spot/tl/formula.hh: Adjust doc.
* tests/core/ltlfilt.test, tests/core/sugar.test: More tests.
2019-05-20 20:59:33 +02:00
Alexandre Duret-Lutz
66a3b6f7cb tl: fix the definition of ##[i:j]
Reported by Victor Khomenko.

* NEWS, doc/tl/tl.tex, spot/tl/formula.cc: Fix the definition.
* tests/core/ltl2tgba.test: Add some test cases.
2019-05-19 09:16:42 +02:00
Alexandre Duret-Lutz
89fcd2b455 dot: replace large labels by "(label too long)"
Based on a report by Victor Khomenko.

* spot/twaalgos/dot.cc: Here.
* tests/core/readsave.test: Add test case.
* NEWS: Mention it.
2019-05-18 13:46:33 +02:00
Alexandre Duret-Lutz
f476483f4a tl: add support for ##[+] and ##[*]
Suggested by Victor Khomenko.

* spot/parsetl/parsetl.yy, spot/parsetl/scantl.ll: Implement them.
* NEWS, doc/tl/tl.tex: Document them.
* tests/core/sugar.test: Add a couple of tests.
2019-05-18 12:06:35 +02:00
Alexandre Duret-Lutz
b726d78cbd tl: new simplification rules
Related to issue #385.

* doc/tl/tl.tex, NEWS: Document the rules.
* spot/tl/simplify.cc: Implement the rules.
* tests/core/reduccmp.test, tests/core/ltl2tgba2.test: Add tests.
* tests/core/degenscc.test: Adjust.
2019-05-18 11:39:09 +02:00
Alexandre Duret-Lutz
e325289a12 simplify: more rules for first_match
* spot/tl/simplify.cc: Implement the rules.
* tests/core/reduccmp.test: Test them.
* doc/tl/tl.tex: Document them.
2019-05-11 14:10:57 +02:00
Alexandre Duret-Lutz
c6605e951d tl: add some simplifications for first_match
Following a discussion with Victor Khomenko.

* doc/tl/tl.tex: Document those rules.
* spot/tl/simplify.cc: Implement them.
* tests/core/reduccmp.test: Test them.
2019-05-08 15:08:31 +02:00
Alexandre Duret-Lutz
b7cd475632 tl: first_match does not preserve syntactic_si
* spot/tl/formula.cc: Fix it.
* tests/core/kind.test: Add test case.
2019-05-06 21:52:05 +02:00
Alexandre Duret-Lutz
6fac026454 implement SVA's first_match operator
* NEWS, doc/tl/tl.tex, doc/tl/tl.bib: Document it.
* spot/parsetl/parsetl.yy, spot/parsetl/scantl.ll: Parse it.
* spot/tl/formula.cc, spot/tl/formula.hh, spot/tl/dot.cc,
spot/tl/mutation.cc, spot/tl/print.cc, spot/tl/randomltl.cc,
spot/twaalgos/ltl2tgba_fm.cc: Adjust to support first_match.
* spot/tl/mark.cc, spot/tl/simplify.cc, spot/tl/snf.cc,
spot/tl/unabbrev.cc, spot/twa/formula2bdd.cc,
spot/twaalgos/ltl2taa.cc: Ignore it.
* tests/core/acc_word.test, tests/core/randpsl.test: Add more tests.
* tests/core/rand.test, tests/core/unambig.test,
tests/python/randltl.ipynb: Adjust.
* tests/python/formulas.ipynb: Show first_match.
2019-05-06 15:11:30 +02:00
Alexandre Duret-Lutz
60d488b30c tl: add support for ##n and ##[i:j] from SVA
* spot/tl/formula.cc, spot/tl/formula.hh (formula::sugar_delay): New
function to implement this operator as syntactic sugar.
* spot/parsetl/parsetl.yy, spot/parsetl/scantl.ll: Parse it.
* doc/tl/tl.tex: Document the syntactic sugar rules and precedence.
* tests/core/sugar.test: Add tests.
* NEWS: Mention this new feature.
2019-05-04 22:03:13 +02:00
Alexandre Duret-Lutz
9e7e6d50fb formula: b* is siSERE
Since b[+] and [*0] are siSERE, b* is siSERE as well.
Suggested by Victor Khomenko.

* spot/tl/formula.cc: Implement that for Star and also
in the concatenation rule.
* tests/core/kind.test, tests/core/ltlfilt.test: Adjust.
2019-04-26 22:14:19 +02:00
Alexandre Duret-Lutz
897925975b formula: fix syntactic-SI detection for ; operator
Reported by Victor Khomenko.

* spot/tl/formula.cc: Rewrite the siPSL detection for ";".
* tests/core/ltlfilt.test: Add more tests.
* tests/core/kind.test: Adjust.
* NEWS: Mention the bug.
2019-04-26 16:21:12 +02:00
Alexandre Duret-Lutz
7300488a24 fix "requires separate Inf and Fin sets" error from ltl2tgba -G
Report from David Müller.

* spot/twaalgos/simulation.cc: Add wrapper to deal with automata
sharing Fin/Inf sets.
* tests/core/ltl2tgba2.test: New test cases.
* NEWS: Mention the change.
2019-04-26 11:49:15 +02:00
Alexandre Duret-Lutz
48ecb903c5 sepsets: fix infinite loop
* tests/core/sepsets.test: New test case.
* spot/twaalgos/sepsets.cc: Fix the code.
* NEWS: Mention the problem.
2019-04-26 11:35:55 +02:00
Alexandre Duret-Lutz
d65ceb0bc8 bin: prefer posix_spawn over fork+exec
* configure.ac: Test for <spawn.h>.
* bin/common_trans.cc: Use posix_spawn when available.
* NEWS: Mention the change.
* tests/core/ltldo.test: Adjust expected error message.
2019-04-14 15:07:48 +02:00
Alexandre Duret-Lutz
948f99bc4e complement: add a complement() function
* spot/twaalgos/complement.cc,
spot/twaalgos/complement.hh (complement): New function.
* bin/autfilt.cc, spot/twa/twa.cc, spot/twaalgos/contains.cc,
spot/twaalgos/powerset.cc, spot/twaalgos/stutter.cc: Use it.
* tests/core/complement.test: Adjust.
* NEWS: Mention it.
2019-04-07 15:48:06 +02:00
Alexandre Duret-Lutz
4bb4aeb372 simulation: fix commit 8959eabad
* spot/twaalgos/simulation.cc: Restrict common_in marks to current SCC
when pushing them, otherwise weak automata might become inherently
weak.
* tests/core/sim3.test: Add test case.
2019-04-07 15:27:55 +02:00
Alexandre Duret-Lutz
628364909d dot: add option 'g'
* spot/twaalgos/dot.cc: Implement support for hidding labels.
* tests/core/readsave.test: Test it.
* bin/common_aoutput.cc: Add --help text.
* NEWS: Mention it.
2019-03-31 22:21:24 +02:00
Alexandre Duret-Lutz
01edf4f8e1 minimize_obligation: complement very weak automata if needed
Fixes #379.

* spot/twaalgos/minimize.cc: Here.
* tests/core/optba.test: Add test case provided by Rüdiger Ehlers.
* NEWS: Mention the improvement.
2019-03-22 22:20:00 +01:00
Alexandre Duret-Lutz
55c50c65c8 autfilt: add support for --highlight-accepting-run
Fixes #381.

* bin/autfilt.cc: Here.
* tests/core/highlightstate.test: Test it.
* NEWS: Mention it.
2019-03-20 21:47:32 +01:00