Commit graph

461 commits

Author SHA1 Message Date
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
c0e1b3e52a cleanacc: keep acceptance order when removing complementary colors
* spot/twaalgos/cleanacc.cc (remove_compl_rec): Rewrite to preserve
the original order of the acceptance condition while rewriting it.
* tests/core/sccdot.test, tests/python/merge.py,
tests/python/simplacc.py, tests/python/toparity.py: Adjust test cases.
2020-04-18 23:02:11 +02:00
Florian Renkin
262b24e6d7 unit_propagation: Correct result when multiple colors are possible
* spot/twa/acc.cc: Here.
* tests/core/acc.cc, tests/core/acc.test, tests/core/remfin.test:
Update tests.
2020-04-18 22:11:21 +02:00
Alexandre Duret-Lutz
102ef04364 simplify_acc: loop over the simplifications
* spot/twaalgos/cleanacc.cc (simplify_acceptance_here): Run the
simplifications in a loop until the condition does not change anymore.
* tests/python/simplacc.py, tests/core/accsimpl.test,
tests/core/remfin.test, tests/python/merge.py,
tests/python/simplacc.py, tests/python/toparity.py: Update expected
results.
* tests/python/automata.ipynb: Update the failing example to a more
interesting one, matching the one in doc/org/autfilt.org.
2020-04-17 21:54:12 +02:00
Florian Renkin
142f1afab2 unit_propagation: Add a test with multiple unit clauses
* tests/core/acc.cc, tests/core/acc.test: here.
2020-04-17 13:38:46 +02:00
Alexandre Duret-Lutz
fe642bc9ad acc: make sure unit_propagate preserve the number of sets
* spot/twa/acc.hh: Here.
* tests/core/accsimpl.test, tests/core/ltl2tgba2.test: Add test cases.
2020-04-16 08:37:59 +02:00
Florian Renkin
630b8333fe Impove simplify_acceptance
* spot/twaalgos/cleanacc.cc: Use cleanup_acceptance if
propagate_fin_inf was useful.
* spot/twa/acc.hh: Avoid to reverse the order of the condition in
propagate_fin_inf.
* tests/core/accsimpl.test, tests/core/remfin.test,
tests/python/merge.py, tests/python/automata.ipynb: Update tests.
* tests/python/toparity.py: Update tests and add tests to check the
number of states.
2020-04-12 18:31:28 +02:00
Alexandre Duret-Lutz
a1a5334d5e relabel_bse: improve handling of n-ary operators
* spot/tl/relabel.cc: Here.
* tests/core/ltlrel.test: Add test cases, and update existing ones.
* NEWS: Mention it.
2020-04-12 11:55:53 +02:00
Alexandre Duret-Lutz
33289f5166 relabel_bse: fix incorrect detection of common APs
Based on a report by Jean Kreber.

* spot/tl/relabel.cc (cut_points): Really connect children of Boolean
operators using undirected edges, not directed ones.
* tests/core/ltlrel.test: Add test cases.
* NEWS: Mention the bug.
2020-04-11 23:50:07 +02:00
Alexandre Duret-Lutz
0b25820211 ignore false edges in emptiness checks and scc_info
Based on reports by Florian Renkin and Jens Kreber.

* spot/twaalgos/bfssteps.cc, spot/twaalgos/couvreurnew.cc,
spot/twaalgos/gtec/gtec.cc, spot/twaalgos/gv04.cc,
spot/twaalgos/magic.cc, spot/twaalgos/sccinfo.cc
spot/twaalgos/se05.cc, spot/twaalgos/tau03.cc: Ignore bddfalse edges.
* spot/twaalgos/gtec/gtec.hh: Remove debugging function.
* tests/core/neverclaimread.test: Adjust.
* tests/python/ecfalse.py: New test file.
* tests/Makefile.am: Add it.
* NEWS: Mention the bug.
2020-04-11 11:24:55 +02:00
Alexandre Duret-Lutz
67fa19cb08 relabel: generalize 9365f8de1 to remove more false edges
* spot/twaalgos/relabel.cc: Detect false edges as they are created,
even as the result of multiple renamings.
* tests/core/ltl2tgba2.test: More test cases, reported by Jens Kreber.
* NEWS: Mention the bug.
* THANKS: Add Jens.
2020-04-10 10:52:40 +02:00
Alexandre Duret-Lutz
b5d688dc97 stutter: fix sl, sl2 to never accept on added self-loop
Fixes #401, reported by Victor Khomenko.

* spot/twaalgos/stutter.cc (sl, sl2): If {} is accepting, upgrade the
acceptance condition.
* tests/core/stutter-tgba.test, tests/python/stutter.py: Add test cases.
2020-03-12 21:54:13 +01:00
Alexandre Duret-Lutz
150f815c87 sccinfo: fix generation of self-loop accepting runs
Reported by Juraj Major.

* spot/twaalgos/sccinfo.cc (scc_info::get_accepting_run): Do not
assume TRACK_STATES is enabled.
* tests/core/autcross5.test: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the bug.
2020-03-12 17:06:03 +01:00
Alexandre Duret-Lutz
124de77925 autfilt: fix -u
Fixes #399.

* bin/autfilt.cc: Fix it.
* tests/core/isomorph.test: Add test case.
* NEWS: Mention the issue.
2020-03-11 23:05:15 +01:00
Alexandre Duret-Lutz
c3d7e942d3 ltlfilt, autfilt: add support for --nth
* bin/autfilt.cc, bin/ltlfilt.cc: Implement it.
* NEWS: Mention it.
* tests/core/genaut.test, tests/core/genltl.test: Add test cases.
2020-03-11 11:42:31 +01:00
Alexandre Duret-Lutz
4e99518da7 ltlcross: do not use remove_fin anymore
* bin/ltlcross.cc: Since is_empty() now works with arbitrary
acceptance conditions, calling remove_fin() is not necessary anymore.
* tests/core/ltlcrossce.test: Adjust.
* NEWS: Mention the change.
2020-03-09 17:51:44 +01:00
Alexandre Duret-Lutz
addaf7f5b0 ltlcross: detect write errors for --save-bogus, --grind, etc
* bin/ltlcross.cc: Explicitly close those file to check for
error conditions.
* tests/core/full.test: Add one test.
2020-03-08 09:15:06 +01:00
Alexandre Duret-Lutz
3805b63e24 ltlcross: add option --save-inclusion-products
* NEWS: Mention it.
* bin/ltlcross.cc: Implement it.
* tests/core/ltlcross3.test: Test it.
2020-03-08 09:15:06 +01:00
Alexandre Duret-Lutz
b5e464e05a autfilt add support for --partial-degeneralize
* bin/autfilt.cc: Add a --partial-degeneralize option.
* NEWS: Mention it.
* spot/twaalgos/degen.cc: Do not restrict partial_degeneralize() to
deterministic automata.
* spot/twaalgos/degen.hh: Adjust documentation.
* tests/core/pdegen.test: New test case.
* tests/Makefile.am: Add it.
* tests/python/pdegen.py: Adjust.
2020-02-15 10:31:28 +01:00
Alexandre Duret-Lutz
bf42b19eff fix is_generalized_rabin() and is_generalized_streett()
* spot/twa/acc.cc: Fix detection of single-pairs gen-Rabin and
gen-Streett.
* tests/core/randaut.test: Add test case.
* NEWS: Mention this issue.
2020-02-15 10:05:27 +01:00
Alexandre Duret-Lutz
443f638b9c relabel: do not create automata with false labels
* spot/twaalgos/relabel.cc: Remove false transitions if
some of the propositions are equivalent to true or false.
* NEWS: Mention the bug.
* tests/core/ltl2tgba2.test: Test it.
2020-02-10 12:05:36 +01:00
Alexandre Duret-Lutz
50c0f880dc Inf(i)|Inf(j) -> Inf(k) and Fin(i)&Fin(j) -> Fin(k)
Implement those rules in simplify_acceptance_here().

* NEWS: Mention the change.
* spot/twa/acc.cc,
spot/twa/acc.hh (acc_cond::acc_code::used_once_sets): New method.
* spot/twaalgos/cleanacc.cc, spot/twaalgos/cleanacc.hh:
Implement the above rule.
* tests/core/remfin.test: Adjust expected results.
* tests/python/simplacc.py: New file.
* tests/Makefile.am: Add it.
2020-01-28 09:37:28 +01:00
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