Commit graph

992 commits

Author SHA1 Message Date
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
b1007a3d03 fix failing tests on Debian unstable
* tests/Makefile.am (ltsmin_modelcheck_LDADD): Add -lpthread as it
seems Debian's libtool does not carries this dependency over from
libspotltsmin.la.  Also using $(LTLIBMULTITHREAD) does not work,
because that would add -pthread which is currently ignored when
linking shared libraries (because libtool adds -nostdlib for some
reason).
2019-09-12 10:48:54 +02:00
Alexandre Duret-Lutz
e52aa8f9eb * tests/python/sum.py: Simplify code. 2019-07-30 16:26:58 +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
1d7ad07c83 product: fix handling of output_aborter
* spot/twaalgos/product.cc: The res pointer should be
passed by reference since we reset it to nullptr when
output_aborter says "too large".
* python/spot/impl.i: Add binding for powerset.hh,
so we can use output_aborter in Python.
* tests/python/prodexpt.py: Test it.
2019-07-09 16:09:20 +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
822fe77891 python: cleanup with autopep8
* tests/python/341.py, tests/python/alarm.py, tests/python/bdddict.py,
tests/python/bddnqueen.py, tests/python/bugdet.py,
tests/python/dualize.py, tests/python/except.py, tests/python/gen.py,
tests/python/genem.py, tests/python/implies.py,
tests/python/interdep.py, tests/python/ipnbdoctest.py,
tests/python/kripke.py, tests/python/ltl2tgba.py,
tests/python/ltlf.py, tests/python/ltlparse.py,
tests/python/ltlsimple.py, tests/python/relabel.py,
tests/python/rs_like.py, tests/python/sccsplit.py,
tests/python/semidet.py, tests/python/setacc.py,
tests/python/setxor.py, tests/python/split.py,
tests/python/streett_totgba.py, tests/python/stutter.py,
tests/python/sum.py, tests/python/toparity.py, tests/python/toweak.py,
tests/python/trival.py, python/spot/__init__.py, python/spot/aux.py,
python/spot/jupyter.py: Reformat with autopep8.

fixup! * spot/tl/simplify.cc: Fix typos in tracing code.
2019-07-05 21:22:29 +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
c66b3d88d0 toparity: revert symmetry-based optimization of LAR
Fixes #390.

* spot/twaalgos/toparity.cc: Revert the relevant part of 516e9536.
* tests/python/toparity.py: Add test case.
* NEWS: Mention the issue.
2019-06-18 19:12:42 +02:00
Alexandre Duret-Lutz
ed52f3c48c re-enable tests incorrectly disabled
These were disabled by mistake in f6575d2ec.

* tests/python/parity.py: Uncomment test cases.
2019-06-18 19:12:42 +02:00
Alexandre Duret-Lutz
8df5f5137e gfguarantee: fix #357 again
The previous patch triggered this issue again, failing
core/ltl2tgba2.test.

* spot/twaalgos/gfguarantee.cc: Separate the replaying of history from
the modification of the automaton.
* NEWS: Mention the bug.
* tests/python/twagraph-internals.ipynb, tests/python/automata.ipynb:
Adjust.
2019-06-18 19:12:36 +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
435fec89b0 Merge branch 'master' into next 2019-06-05 08:12:35 +02:00
Alexandre Duret-Lutz
57e6208e1e Update instructions for divine-ltsmin installation
* tests/ltsmin/README: Here.
* THANKS: Reported by Jiraphapa Jiravaraphan.
2019-06-04 13:58:19 +02:00
Alexandre Duret-Lutz
7d6bfe545f remprop: reset no-terminal property
Reported by Yong Li.

* spot/twaalgos/remprop.cc: Here.
* tests/python/removeap.py: New test case.
* tests/Makefile.am: Add it.
* NEWS: Document the issue.
* THANKS: Add Yong Li.
2019-06-04 13:58:19 +02:00
Alexandre Duret-Lutz
65e8d16f57 tests: add missing copyright blobs
* tests/python/remfin.py, tests/python/tra2tba.py: Here.
2019-06-04 13:58:19 +02:00
Alexandre Duret-Lutz
05b3007885 work around new import statements generated by swig-4.0
Those statements are not compatible with the fact that
libtool-generated modules are in .libs/ until they get installed.

* python/spot/__init__.py: Add sys.path to __path__ if SPOT_BUILD is
  set.
* tests/run.in: Set SPOT_BUILD.
2019-06-04 11:32:46 +02:00
Alexandre Duret-Lutz
bdd5a0b981 test: add missing copyright boilerplate
* tests/python/genem.py: Here.
2019-06-04 11:32:24 +02:00
Alexandre Duret-Lutz
11e8f9592f 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-06-04 11:27:47 +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
74786324f4 remprop: reset no-terminal property
Reported by Yong Li.

* spot/twaalgos/remprop.cc: Here.
* tests/python/removeap.py: New test case.
* tests/Makefile.am: Add it.
* NEWS: Document the issue.
* THANKS: Add Yong Li.
2019-06-02 09:00:08 +02:00
Alexandre Duret-Lutz
03b8db0fed tests: add missing copyright blobs
* tests/python/remfin.py, tests/python/tra2tba.py: Here.
2019-06-02 08:33:13 +02:00
Alexandre Duret-Lutz
72d6527b6c work around new import statements generated by swig-4.0
Those statements are not compatible with the fact that
libtool-generated modules are in .libs/ until they get installed.

* python/spot/__init__.py: Add sys.path to __path__ if SPOT_BUILD is
  set.
* tests/run.in: Set SPOT_BUILD.
2019-05-31 21:16:45 +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
5c3a33f720 test: add missing copyright boilerplate
* tests/python/genem.py: Here.
2019-05-24 23:26:49 +02:00
Alexandre Duret-Lutz
36d20696bf word: introduce use_all_aps()
This allows fixing issue #388 reported by Victor Khomenko.

* spot/twaalgos/word.cc, spot/twaalgos/word.hh (use_all_aps): New
method.
* tests/python/stutter-inv.ipynb: Use it.
* tests/python/stutter.py: New file, with Victor's test case.
* tests/Makefile.am: Add python/stutter.py.
2019-05-24 23:26:43 +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
066133b829 tl: implement relabel_apply()
* spot/tl/relabel.hh, spot/tl/relabel.cc: Here.
* NEWS: Mention it.
* tests/python/relabel.py: Use it.
2019-05-18 11:22:52 +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
4d16c0760f 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:40:21 +02:00