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,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