translate: speed up some -G -D cases

When gf-guarentee works and produce a deterministic automaton, use it
right away without comparing it with the automaton produced by the
regular translation.  This used to be the case for all -D scenarios
except -G -D.

Reported by Florian Renkin.

* spot/twaalgos/translate.cc: Use the result of
gf_guarantee_to_ba_maybe() or fg_safety_to_dca_maybe() whenever -D is
used.
* spot/twaalgos/postproc.cc: Call remove_unused_ap() in finalize(), to
iron out some slight output differences.
* tests/core/ltl2tgba2.test, tests/python/toparity.py: Lower expected
results in the test cases.
* tests/python/automata.ipynb, tests/core/prodor.test: Adjust to new
order.
This commit is contained in:
Alexandre Duret-Lutz 2021-01-27 11:03:11 +01:00
parent 238a9ffc1d
commit 93d8f43285
6 changed files with 50 additions and 54 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2020 Laboratoire de Recherche et Développement de
# Copyright (C) 2009-2021 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
@ -376,8 +376,8 @@ cat >formulas <<EOF
GF((a & XXa) | (!a & XX!a)), 4,8, 4,8, 6,14, 7,14, 4,8
GF((a & XXXa) | (!a & XXX!a)), 7,14, 8,16, 8,18, 15,30, 8,16
GF(((a & Xb) | XXc) & Xd), 3,58, 4,64, 3,58, 5,80, 4,64
GF((b | Fa) & (b R Xb)), 2,4, 2,4, 3,6, 3,12, 2,4
G(F(a & Xa) & F(a & X!a)), 2,4, 2,4, 4,8, 4,8, 3,6
GF((b | Fa) & (b R Xb)), 2,4, 2,4, 3,6, 3,6, 2,4
G(F(a & Xa) & F(a & X!a)), 2,4, 2,4, 4,8, 4,8, 2,4
G(!p0 & F(p1 & XG!p1)), 1,0, 1,0, 1,0, 1,0, 1,0
FG(a | Fb), 3,15, 3,15, 3,15, 3,15, 1,4
FG(a & Fb), 2,7, 2,7, 3,9, 3,9, 1,4

View file

@ -1,7 +1,7 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2015, 2017, 2018 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
# Copyright (C) 2015, 2017-2018, 2021 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
@ -63,21 +63,21 @@ properties: trans-labels explicit-labels trans-acc complete
properties: stutter-invariant
--BODY--
State: 0
[!0] 0
[0] 0 {0}
[!0] 0
[0&1] 1 {0}
[!0&1] 1
[0&1] 1 {0}
State: 1
[!0&1] 1 {0}
[0&1] 1 {0}
[!0&!1] 2 {0}
[!0&1] 1 {0}
[0&!1] 2 {0}
[!0&!1] 2 {0}
State: 2
[!0] 2
[0] 2 {0}
[!0] 2
--END--
EOF
diff por.hoa exp
diff -u por.hoa exp
test 2 = `autfilt -c --intersect por.hoa gfa.hoa fgb.hoa`
@ -94,13 +94,13 @@ Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels trans-acc stutter-invariant
--BODY--
State: 0
[!0] 0
[0] 0
[!0&1] 1
[!0] 0
[0&1] 1
State: 1
[!0&1] 1
State: 1
[0&1] 1 {0}
[!0&1] 1
--END--
EOF
diff pand.hoa exp