gf_guarantee_to_ba: save states using histories

This improves gf_guarantee_to_ba() on formulas GF(φ) where the
automaton for F(φ) as several leading transiant SCCs.  E.g.,
GF(a <-> XXXa) where we know get results that are as good as
those of delag without loosing on the cases where delag's technique
would actually produce two big automata.

* spot/twaalgos/gfguarantee.cc: Implement this.
* spot/twaalgos/gfguarantee.hh, NEWS: Document it.
* tests/core/ltl2tgba2.test, tests/core/ltl3ba.test: Add test cases.
This commit is contained in:
Alexandre Duret-Lutz 2018-06-08 15:09:10 +02:00
parent 730c6bbca2
commit 7e9325866f
5 changed files with 221 additions and 26 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2016, 2017 Laboratoire de Recherche et Développement
# Copyright (C) 2016, 2017, 2018 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -39,8 +39,15 @@ export SPOT_HOA_TOLERANT
# compatible with Spin's syntax.
(
echo _x
# Some formula used by Spot's GF(guarantee) translation.
cat <<EOF
GF((a & XXa) | (!a & XX!a))
GF((a & XXXa) | (!a & XXX!a))
GF(((a & Xb) | XXc) & Xd)
GF((b | Fa) & (b R Xb))
EOF
randltl -n 30 2
) | ltlcross 'ltl3ba -H1' 'ltl3ba -H2' 'ltl3ba -H3' \
) | ltlcross -D 'ltl3ba -H1' 'ltl3ba -H2' 'ltl3ba -H3' ltl2tgba \
--ambiguous --strength --csv=output.csv
grep _x output.csv && exit 1