Compare commits

..

66 commits

Author SHA1 Message Date
8efea81c75 merge 2025-03-17 16:11:36 +01:00
059c5072df nix: provide package in release tarballs 2025-03-17 16:11:36 +01:00
c5746ef5cf expansions: fix bogus false pairs in linear forms 2025-03-17 16:11:36 +01:00
42221100dd nix: setup Nix Flake file
* flake.nix, flake.lock: here
2025-03-17 16:11:36 +01:00
3d3f311733 expansions: remove unused lambda capture 2025-03-17 16:11:36 +01:00
939942af30 expansions: fix sort behavior
The previous implementation was wrong and led to segfaults when sorting
large expansions
2025-03-17 16:11:36 +01:00
37b814c750 expansions: make signature canonical
Linear forms are now sorted and duplicates are removed
2025-03-17 16:11:36 +01:00
7fa1973613 expansions: fusion can produce false
let's discard the result if it's false
2025-03-17 16:11:36 +01:00
a32431c341 ltl2tgba_fm: setup switch between bdd and exp 2025-03-17 16:11:36 +01:00
dfa828739b translate_aa: setup translation choice 2025-03-17 16:11:36 +01:00
f687ef7bbb ltl2tgba_fm: switch for expansions 2025-03-17 16:11:36 +01:00
7cbf544d33 expansions: split 2025-03-17 16:11:36 +01:00
b15c0818c5 expansions: up variants 2025-03-17 16:11:36 +01:00
ed3d1ef4aa expansions: expose easy expansion in python 2025-03-17 16:11:36 +01:00
90ea02d42a expansions: store as vector of pairs 2025-03-17 16:11:36 +01:00
d760d2cb3b expansions: US order in pipeline configurable 2025-03-17 16:11:36 +01:00
e50be0692d expansions: UniquePrefixSeenOpt 2025-03-17 16:11:36 +01:00
29e0b22c2a expansions: fixes + BDD encode changes + printer 2025-03-17 16:11:36 +01:00
f09c1dd7f3 expansions: simple determinization 2025-03-17 16:11:36 +01:00
931d39e739 expansions: signature merge impl 2025-03-17 16:11:36 +01:00
bbbcdc331a expansions: optimize sigma star encoding 2025-03-17 16:11:36 +01:00
a4091ffc37 expansions: remove multiple old implementations 2025-03-17 16:11:36 +01:00
77d25d87a1 expansions: fix first_match case 2025-03-17 16:11:36 +01:00
382c57923c twaalgos: ltl2tgba_fm: allow disabling SCC trim 2025-03-17 16:11:36 +01:00
b5f11f7366 expansions: allow toggling merge_edges off 2025-03-17 16:11:36 +01:00
518c58fe52 expansions: latest implementation 2025-03-17 16:11:36 +01:00
003230ed19 expansions: multimap version 2025-03-17 16:11:36 +01:00
ce9a94f224 expansions: determinize only once per state 2025-03-17 16:11:36 +01:00
faaefa7424 expansions: fix bdd method 2025-03-17 16:11:36 +01:00
12a8d5382d expansions: add BDD method 2025-03-17 16:11:36 +01:00
9361116431 expansions: multiple implementations 2025-03-17 16:11:36 +01:00
3c6929829d expansions: split-off OrRat case 2025-03-17 16:11:36 +01:00
1240fec39b expansions: first_match deterministic 2025-03-17 16:11:36 +01:00
b9f461c025 expansions: draft 2025-03-17 16:11:36 +01:00
0fdd3c31f4 derive: add options to control distribution 2025-03-17 16:11:36 +01:00
89543e6a73 derive: option for some optimisations 2025-03-17 16:11:36 +01:00
e80c98751d sere_to_tgba: produce state-names 2025-03-17 16:11:36 +01:00
7b936819cc ltl2aa: handle edge case in UConcat
If SERE recognizes false, then combined with UConcat the property is
always true.
2025-03-17 16:11:36 +01:00
07a283498f alternation: fix bug introduced in oe_combiner
turns out sometimes we want to account for bddfalse
2025-03-17 16:11:36 +01:00
465b135f44 ltl2aa: implement EConcat 2025-03-17 16:11:36 +01:00
e5d7ba9e22 ltl2aa: comment 2025-03-17 16:11:36 +01:00
dec854ee07 ltl2aa: finalize UConcat 2025-03-17 16:11:36 +01:00
0957c11c94 ltl2aa: finish SERE aut merging with rhs outedges 2025-03-17 16:11:36 +01:00
eca0bd4590 ltl2aa: fix two bugs in SERE aut merge 2025-03-17 16:11:36 +01:00
93c50e1610 ltl2aa: place new state in var_to_state map 2025-03-17 16:11:36 +01:00
58965475fb ltl2aa: implem closure 2025-03-17 16:11:36 +01:00
4153ce0655 ltl2aa: share dict between sere and final aut 2025-03-17 16:11:36 +01:00
0c76e6dd21 ltl2aa: fix bdd manipulation in UConcat 2025-03-17 16:11:36 +01:00
8e8e44c5f9 ltl2aa: fix R & M operators handling 2025-03-17 16:11:36 +01:00
7b376a212c Add ltl2aa binary to tests/core 2025-03-17 16:11:36 +01:00
ffd60219b5 psl not working 2025-03-17 16:11:36 +01:00
43ed07d283 ltl2aa: factorize self-loop creation 2025-03-17 16:11:36 +01:00
e4bfebf36f twaalgos: add LTL to AA translation 2025-03-17 16:11:36 +01:00
6ebbb93024 twaalgos: filter accepting sinks in oe combiner 2025-03-17 16:11:36 +01:00
00ad02070b graph: filter accepting sinks in univ_dest_mapper 2025-03-17 16:11:36 +01:00
a046a4983c derive: use first 2025-03-17 16:11:36 +01:00
1925910f4a derive: handle AndNLM 2025-03-17 16:11:36 +01:00
eea35cdb31 derive: extract AndNLM rewriting 2025-03-17 16:11:36 +01:00
5b3b292b10 derive: no nullptr handling 2025-03-17 16:11:36 +01:00
2df8e200d8 derive: use from_finite 2025-03-17 16:11:36 +01:00
3b3ec16b20 twaalgos: add from_finite
* spot/twaalgos/remprop.cc, spot/twaalgos/remprop.hh: add a from_finite
  function to perform the opposite operation to to_finite
2025-03-17 16:11:36 +01:00
175012b919 twaalgos: extract internal sere2dfa 2025-03-17 16:11:36 +01:00
4a646e5aa0 tl: implement SERE derivation 2025-03-17 16:11:36 +01:00
2ae9da1bc6 twagraph: merge_edges supports finite automata
* spot/twa/twagraph.cc: don't remove false-labeled edges if the
  automaton uses state-based acceptance and the edge is a self loop
2025-03-17 16:11:36 +01:00
Alexandre Duret-Lutz
b6e782589e bin: handle '--parity=X --colored-parity' like '--colored-parity=X'
Fixes #602.

* bin/common_post.cc (-P, -p): Do not overwrite an existing parity
specification if none were given.
* tests/core/parity2.test: Test this.
2025-03-11 14:19:30 +01:00
Alexandre Duret-Lutz
1dd2ce3ae2 sanity: improve bin.test
* tests/sanity/bin.test: Add missing exit status on error,
and report manpage and binaries missing from spot.spec.in.
* spot.spec.in: Add ltlmix and ltlmix.1.
* bin/ltlsynt.cc: Fix formating for --algo.
2025-03-11 14:19:30 +01:00
5 changed files with 104 additions and 15 deletions

View file

@ -231,7 +231,14 @@ parse_opt_post(int key, char* arg, struct argp_state*)
if (arg) if (arg)
type = XARGMATCH(key == 'P' ? "--parity" : "--colored-parity", type = XARGMATCH(key == 'P' ? "--parity" : "--colored-parity",
arg, parity_args, parity_types); arg, parity_args, parity_types);
else else if (!(type & spot::postprocessor::Parity))
// If no argument was given, we just require Parity.
// However, if a Parity condition was already set before,
// don't overwrite it. This way if someone mistakenly write
// `--parity='max even' --colored` without realizing that
// `--colored` is just the abbreviation for
// `--colored-parity=...` with the default argument, we
// won't reset the 'max even' setting.
type = spot::postprocessor::Parity; type = spot::postprocessor::Parity;
if (key == 'p') if (key == 'p')
colored = spot::postprocessor::Colored; colored = spot::postprocessor::Colored;

View file

@ -91,17 +91,15 @@ static const argp_option options[] =
/**************************************************/ /**************************************************/
{ nullptr, 0, nullptr, 0, "Fine tuning:", 10 }, { nullptr, 0, nullptr, 0, "Fine tuning:", 10 },
{ "algo", OPT_ALGO, "sd|ds|ps|lar|lar.old|acd", 0, { "algo", OPT_ALGO, "sd|ds|ps|lar|lar.old|acd", 0,
"choose the algorithm for synthesis:" "choose the algorithm for synthesis:\n"
" \"sd\": translate to tgba, split, then determinize;" " sd: translate to TGBA, split, determinize\n"
" \"ds\": translate to tgba, determinize, then split;" " ds: translate to TGBA, determinize, split\n"
" \"ps\": translate to dpa, then split;" " ps: translate to DPA, split\n"
" \"lar\": translate to a deterministic automaton with arbitrary" " lar: translate to a deterministic TELA, convert to DPA"
" acceptance condition, then use LAR to turn to parity," " with LAR, split (default)\n"
" then split (default);" " lar.old: old version of LAR, for benchmarking;\n"
" \"lar.old\": old version of LAR, for benchmarking;" " acd: translate to a deterministic TELA, convert to DPA"
" \"acd\": translate to a deterministic automaton with arbitrary" " with ACD, split", 0 },
" acceptance condition, then use ACD to turn to parity,"
" then split.\n", 0 },
{ "bypass", OPT_BYPASS, "yes|no", 0, { "bypass", OPT_BYPASS, "yes|no", 0,
"whether to try to avoid to construct a parity game " "whether to try to avoid to construct a parity game "
"(enabled by default)", 0}, "(enabled by default)", 0},

View file

@ -38,6 +38,7 @@ logic (LTL & PSL).
%{_bindir}/ltldo %{_bindir}/ltldo
%{_bindir}/ltlfilt %{_bindir}/ltlfilt
%{_bindir}/ltlgrind %{_bindir}/ltlgrind
%{_bindir}/ltlmix
%{_bindir}/ltlsynt %{_bindir}/ltlsynt
%{_bindir}/randaut %{_bindir}/randaut
%{_bindir}/randltl %{_bindir}/randltl
@ -52,11 +53,12 @@ logic (LTL & PSL).
%{_mandir}/man1/ltldo.1* %{_mandir}/man1/ltldo.1*
%{_mandir}/man1/ltlfilt.1* %{_mandir}/man1/ltlfilt.1*
%{_mandir}/man1/ltlgrind.1* %{_mandir}/man1/ltlgrind.1*
%{_mandir}/man1/ltlmix.1*
%{_mandir}/man1/ltlsynt.1* %{_mandir}/man1/ltlsynt.1*
%{_mandir}/man1/randaut.1* %{_mandir}/man1/randaut.1*
%{_mandir}/man1/randltl.1* %{_mandir}/man1/randltl.1*
%{_mandir}/man7/spot-x.7*
%{_mandir}/man7/spot.7* %{_mandir}/man7/spot.7*
%{_mandir}/man7/spot-x.7*
%license COPYING %license COPYING
%doc AUTHORS COPYING NEWS README THANKS %doc AUTHORS COPYING NEWS README THANKS

View file

@ -26,7 +26,19 @@ for x in P 'Pmin odd' 'Pmax even' p 'pmin odd' 'pmax even'; do
autfilt --name=%M --high "-$x" >>res2 autfilt --name=%M --high "-$x" >>res2
ltl2tgba -D "-$x" FGa 'GFa & GFb' '(p0 W XXGp0) & GFp1 & FGp2' >>res3 ltl2tgba -D "-$x" FGa 'GFa & GFb' '(p0 W XXGp0) & GFp1 & FGp2' >>res3
ltl2tgba FGa 'GFa & GFb' '(p0 W XXGp0) & GFp1 & FGp2' | ltl2tgba FGa 'GFa & GFb' '(p0 W XXGp0) & GFp1 & FGp2' |
autfilt -D --name=%M --high "-$x" >>res4 autfilt -D --name=%M --high "-$x" >>res4
(
## --colored is normally short for --colored-parity=any
## But in case someone types something like
## --parity='max odd' --colored
## let's make sure we handle it like --colored-parity='max odd'.
echo "=== -$x ==="
ltl2tgba FGa 'GFa & GFb' '(p0 W XXGp0) & GFp1 & FGp2' \
"-$x" --stats='%[]g'
echo "=== -$x --colored ==="
ltl2tgba FGa 'GFa & GFb' '(p0 W XXGp0) & GFp1 & FGp2' \
"-$x" --colored --stats='%[]g'
) >> res5
done done
cat >expected<<EOF cat >expected<<EOF
@ -1423,6 +1435,58 @@ State: 4
EOF EOF
diff expected4 res4 diff expected4 res4
cat >expected5 <<EOF
=== -P ===
co-Buchi
Buchi
Rabin 1
=== -P --colored ===
parity max even 2
Streett 1
parity min odd 3
=== -Pmin odd ===
co-Buchi
Rabin 1
Rabin 1
=== -Pmin odd --colored ===
Rabin 1
parity min odd 3
parity min odd 3
=== -Pmax even ===
parity max even 2
Buchi
parity max even 2
=== -Pmax even --colored ===
parity max even 2
parity max even 3
parity max even 4
=== -p ===
parity max even 2
Streett 1
parity min odd 3
=== -p --colored ===
parity max even 2
Streett 1
parity min odd 3
=== -pmin odd ===
Rabin 1
parity min odd 3
parity min odd 3
=== -pmin odd --colored ===
Rabin 1
parity min odd 3
parity min odd 3
=== -pmax even ===
parity max even 2
parity max even 3
parity max even 4
=== -pmax even --colored ===
parity max even 2
parity max even 3
parity max even 4
EOF
diff expected5 res5
ltlcross 'ltl2tgba -P' 'ltl2tgba -P"odd max"' 'ltl2tgba -P"even min"' \ ltlcross 'ltl2tgba -P' 'ltl2tgba -P"odd max"' 'ltl2tgba -P"even min"' \
'ltl2tgba -p' 'ltl2tgba -p"odd max"' 'ltl2tgba -p"even min"' \ 'ltl2tgba -p' 'ltl2tgba -p"odd max"' 'ltl2tgba -p"even min"' \
-f FGa -f 'GFa&GFb' -f 'GF(a <-> XXXb)' -f '(p0 W XXGp0) & GFp1 & FGp2' -f FGa -f 'GFa&GFb' -f 'GF(a <-> XXXb)' -f '(p0 W XXGp0) & GFp1 & FGp2'

View file

@ -52,6 +52,11 @@ do
echo "bin/man/$manpage is not listed in man/Makefile.am" echo "bin/man/$manpage is not listed in man/Makefile.am"
exit_status=2 exit_status=2
fi fi
if ! grep -q "%{_mandir}/man./$manpage\*\$" $top_srcdir/spot.spec.in;
then
echo "$manpage is not listed in spot.spec.in"
exit_status=2
fi
fi fi
case $binary in case $binary in
@ -74,7 +79,7 @@ do
;; ;;
esac esac
# All man pages # All tools
case $manpage in case $manpage in
*.1) *.1)
if ! test -f $top_srcdir/doc/org/$binary.org; then if ! test -f $top_srcdir/doc/org/$binary.org; then
@ -94,8 +99,20 @@ do
echo "$binary does not occur in doc/org/arch.tex" echo "$binary does not occur in doc/org/arch.tex"
exit_status=2 exit_status=2
fi fi
if ! grep -q "%{_bindir}/$binary\$" $top_srcdir/spot.spec.in; then
echo "$binary does is not listed in spot.spec.in";
exit_status=2
fi
esac esac
if test -f $top_srcdir/bin/.gitignore; then
if ! grep -q "^$binary\$" $top_srcdir/bin/.gitignore; then
echo "$binary is not listed in bin/.gitignore"
exit_status=2
fi
fi
# Check --help text. Set a high rmargin to workaround some # Check --help text. Set a high rmargin to workaround some
# bug in argp where an extra line it sometimes added if the end # bug in argp where an extra line it sometimes added if the end
# of the document string fall right into the rmargin. # of the document string fall right into the rmargin.
@ -107,6 +124,7 @@ do
echo "bin/$binary --help has options after blank line;" \ echo "bin/$binary --help has options after blank line;" \
"missing section header?" "missing section header?"
cat help-err cat help-err
exit_status=2
fi fi
rm -f help-$binary.tmp help-err rm -f help-$binary.tmp help-err