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.
This commit is contained in:
parent
066133b829
commit
b726d78cbd
6 changed files with 129 additions and 36 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2017 Laboratoire de Recherche et Développement de
|
||||
# Copyright (C) 2017, 2019 Laboratoire de Recherche et Développement de
|
||||
# l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
|
|
@ -28,28 +28,34 @@ set -e
|
|||
# The following cases were found with
|
||||
#
|
||||
# % randltl -n -1 3 | ltl2tgba | autfilt --acc-sets=3.. |
|
||||
# autfilt -B --stats='%C,%c,%M' | awk -F, '{ if ($1 < $2) { print $0; } }'
|
||||
#
|
||||
# before patching degeneralize, but today replacing -B by -Bx'!degen-remscc'
|
||||
# should do the same.
|
||||
# autfilt -Bx'!degen-remscc' --stats='%C,%c,%M' |
|
||||
# awk -F, '{ if ($1 < $2) { print $0; } }'
|
||||
cat >input <<EOF
|
||||
p2 & GF(G(p0 & !p1) | (F!p0 & Fp1))
|
||||
GF((Fp2 & X((p0 & Gp1) | (!p0 & F!p1))) | (G!p2 & X((p0 & F!p1) | (!p0 & Gp1))))
|
||||
GF(p0 | GF((p2 M p1) | (Fp1 & F!p0) | G(p0 & !p1)))
|
||||
((Gp2&FG((Gp1&Xp0)|(F!p1&X!p0)))|(F!p2 & GF((Gp1 & X!p0)|(Xp0 & F!p1)))) W !p0
|
||||
((Gp2&FG((Gp1&Xp0)|(F!p1&X!p0)))|(F!p2 & GF((Gp1 & X!p0) | (Xp0 & F!p1)))) W !p0
|
||||
G(Fp0 & (F!p1 U (G!p2 M !p0)))
|
||||
G(((Fp1 & (p1 W Fp0)) | (G!p1 & (!p1 M G!p0))) M FG!p2)
|
||||
Xp0 R F((p0 & FG(Gp2 U p1)) | (!p0 & GF(F!p2 R !p1)))
|
||||
GF(p0 & (((p1 & Fp2) | (!p1 & G!p2)) M Gp1))
|
||||
F(G!p0 | GF((Gp0 & (!p2 R !p1)) | ((p2 U p1) & F!p0)))
|
||||
p1|X(p1 R F((((p2&G!p0)|(!p2&Fp0))&FGp0)|(((p2 & Fp0) | (!p2 & G!p0)) & GF!p0)))
|
||||
G(!p1 | (!p2 & F!p1) | (GFp2 U p0))
|
||||
X(p1 | GF((Fp2 & F!p1) | G(p1 & !p2)))
|
||||
GF((Fp2&(p0 U((p1&GFp0)|(!p1&FG!p0))))|(G!p2&(!p0 R((p1&FG!p0)|(!p1&GFp0)))))
|
||||
GF((XFp1 & ((p0 & G!p2) | (!p0 & Fp2))) | (XG!p1 & ((p0 & Fp2) | (!p0 & G!p2))))
|
||||
F(!p2 | GF((Fp0 & ((p0 & Gp1)|(!p0&F!p1)))|(G!p0&((p0&F!p1)|(!p0&Gp1)))))
|
||||
G(XF((p2 & F!p1) | (!p2 & Gp1)) | (p1 & Fp0))
|
||||
!p0 | GF((p1 & (Xp2 W Gp2)) | (!p1 & (X!p2 M F!p2)))
|
||||
G!p0 | G((Fp1 U p2) & F!p2)
|
||||
EOF
|
||||
|
||||
# We want to make sure the degeneralized automaton as less SCCs
|
||||
|
||||
|
||||
# We want to make sure the degeneralized automaton has fewer SCCs
|
||||
# (it can be less if the simulation on the BA is lukier than on the TGBA)
|
||||
ltl2tgba < input | autfilt -B --stats=": '%M'; test %C -ge %c" > test.sh
|
||||
sh -x -e test.sh
|
||||
|
||||
# Make sur that this degen-remscc optimizition is actually doing something.
|
||||
# Make sure that this degen-remscc optimizition is actually doing something.
|
||||
# The following test could fail in the future if we improve the translation
|
||||
# of some of these formulas. In that case, regenerate the list of test
|
||||
# formula using the command displayed above.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue