simulation: try pulling marks instead of pushing them for sbacc input

Suggested by František Blahoudek.

* spot/twaalgos/simulation.cc: When doing forward simulation with
state-based acceptance as input but transition-based acceptance as
output, pull acceptance marks on incoming edges instead of pushing
them to outgoing edges.
* tests/core/dra2dba.test, tests/core/exclusive-tgba.test,
tests/core/ltlcrossce.test, tests/core/satmin3.test,
tests/core/sim3.test, tests/python/satmin.ipynb: Adjust test cases.
* NEWS: Mention the change.
This commit is contained in:
Alexandre Duret-Lutz 2019-02-26 18:13:42 +01:00
parent e191a0341b
commit 8959eabad6
8 changed files with 588 additions and 474 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2014, 2017 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
# Copyright (C) 2014, 2017, 2019 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
@ -330,4 +330,4 @@ Acc-Sig: +2
EOF
autcross 'dstar2tgba -D' --language-preserved -F in.dra --csv=out.csv
grep '3,23,143,184,1,2,0,0,0$' out.csv
grep '3,18,107,144,1,2,0,0,0$' out.csv

View file

@ -1,7 +1,7 @@
#! /bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2015, 2016, 2018 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
# Copyright (C) 2015-2016, 2018-2019 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
@ -166,13 +166,13 @@ diff out2 expected-simpl
test "6,50,14" = `ltl2tgba -B -f 'F(Ga | (GFb <-> GFc))' --stats='%s,%t,%e'`
test "6,24,12" = `ltl2tgba -B -f 'F(Ga | (GFb <-> GFc))' |
autfilt --exclusive-ap=a,b,c --stats='%s,%t,%e'`
test "5,22,10" = `ltl2tgba -B -f 'F(Ga | (GFb <-> GFc))' |
test "4,18,8" = `ltl2tgba -B -f 'F(Ga | (GFb <-> GFc))' |
autfilt --small --exclusive-ap=a,b,c --stats='%s,%t,%e' --ap=3`
# The final automaton has 3 atomic propositions before
# simplifications, but only 2 after that.
ltl2tgba -B -f 'F(Ga | (GFb <-> GFc))' |
autfilt --small --exclusive-ap=a,b,c --simplify-ex --ap=3 > out
test "5,21,10" = `autfilt out --stats='%s,%t,%e' --ap=2`
test "4,17,8" = `autfilt out --stats='%s,%t,%e' --ap=2`
# Issue #363.

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2013, 2016 Laboratoire de Recherche et
# Copyright (C) 2013, 2016, 2019 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -95,7 +95,7 @@ test `grep '^error:' errors | wc -l` = 4
run 1 ltlcross --verbose -D -f 'G(F(p0) & F(G(!p1))) | (F(G(!p0)) & G(F(p1)))' \
"ltl2tgba --lbtt %f >%T" "./fake %l >%T" 2> errors
cat errors
test `grep 'info: Comp(' errors | wc -l` = 4
test `grep 'info: Comp(' errors | wc -l` = 3
grep 'error: P0\*N1 is nonempty' errors
grep 'error: P1\*N0 is nonempty' errors
grep 'error: P1\*N1 is nonempty' errors

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Laboratoire de Recherche et Développement
# Copyright (C) 2017, 2019 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -24,7 +24,8 @@ set -e
# Make sure the SPOT_SATSOLVER envar works.
# DRA produced by ltl2dstar for GFp0 -> GFp1
# DRA produced by ltl2dstar for GFp0 -> GFp1, but manually modified
# so that simulation-based reduction do not reduce it to 1 state right away.
cat >test.hoa <<EOF
HOA: v1
States: 4
@ -35,7 +36,7 @@ Start: 0
AP: 2 "p0" "p1"
--BODY--
State: 0 {0}
1
1 {1} /* manual addition */
0
3
2

View file

@ -1,6 +1,6 @@
#! /bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2015, 2018 Laboratoire de Recherche et Développement
# Copyright (C) 2015, 2018, 2019 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -47,7 +47,7 @@ State: 6 {0 3}
--END--
EOF
test "`autfilt --small input --stats=%S,%s`" = 7,5
test "`autfilt --small input --stats=%S,%s`" = 7,2
autfilt -S --high --small input -H > out
cat >expected <<EOF

File diff suppressed because it is too large Load diff