translate: add a quick syntactic simplification before relabeling

This fixes #412.

* spot/twaalgos/translate.cc: Add the quick syntactic simplification.
* spot/twaalgos/relabel.cc: Do not register old unused APs.
* tests/core/ltl2tgba2.test: Add test case.
* tests/core/bdd.test, tests/python/automata.ipynb: Adjust.
* NEWS: Mention this.
This commit is contained in:
Alexandre Duret-Lutz 2020-07-22 16:31:53 +02:00
parent 1c5468a93a
commit b17376879d
6 changed files with 108 additions and 70 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017, 2018 Laboratoire de Recherche et Développement de
# Copyright (C) 2017, 2018, 2020 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -30,7 +30,7 @@ grep 'spot: BDD package initialized' err
# This value below, which is the number of time we need to garbage
# collect might change if we improve the tool or change the way BuDDy
# is initialized.
test 63 = `grep -c 'spot: BDD GC' err`
test 11 = `grep -c 'spot: BDD GC' err`
# Minimal size for this automaton.
# See also https://www.lrde.epita.fr/dload/spot/mochart10-fixes.pdf
test "147,207" = `autfilt --stats=%s,%e out`

View file

@ -27,7 +27,7 @@
# commonly use as benchmark change, we want to notice it.
set -e
genltl --dac --eh --sb --hkrss --p --format=%F,%L,%f >pos
genltl --dac --eh --sb --hkrss --p --and-fg=32 --format=%F,%L,%f >pos
(cat pos; ltlfilt --negate pos/3 --format='!%<,%f') |
ltlfilt -u -F-/3 >formulas
@ -201,6 +201,7 @@ p-patterns,16, 2,16, 2,16, 2,16, 2,16
p-patterns,17, 3,20, 3,20, 3,20, 3,20
p-patterns,18, 5,36, 5,36, 5,36, 5,36
p-patterns,20, 1,8, 1,8, 3,24, 3,24
and-fg,32, 2,4294967298, 2,4294967298, 2,4294967298, 2,4294967298
!dac-patterns,1, 2,4, 2,4, 2,4, 2,4
!dac-patterns,2, 3,10, 3,10, 3,10, 3,10
!dac-patterns,3, 3,12, 3,12, 3,12, 3,12
@ -357,6 +358,7 @@ p-patterns,20, 1,8, 1,8, 3,24, 3,24
!p-patterns,17, 4,31, 4,31, 4,31, 4,31
!p-patterns,18, 6,43, 6,43, 6,43, 6,43
!p-patterns,20, 3,16, 3,16, 3,16, 3,16
!and-fg,32, 1,4294967296, 1,4294967296, 2,8589934592, 2,8589934592
EOF
diff output expected