specialized translation for GF(guarantee) and FG(safety)
This is adapted from a proposition in a paper by J. Esparza, J. Křentínský, and S. Sickert, submitted to LICS'18. We should add proper references to the code and documentation once that paper is accepted. * spot/twaalgos/gfguarantee.cc, spot/twaalgos/gfguarantee.hh: New files. * spot/twaalgos/Makefile.am, python/spot/impl.i: Add them. * spot/twa/fwd.hh: Add a forward declaration of bdd_dict_ptr. * spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh: Make it possible to call finalize() from the translator subclass. Constify all the do_* functions while we are there. * spot/twaalgos/translate.cc, spot/twaalgos/translate.hh: Add a "gf-guarantee" option to decide whether to use the new translation. * bin/spot-x.cc: Document it. * tests/core/dca2.test, tests/core/genltl.test, tests/core/ltl2tgba2.test, tests/core/parity2.test, tests/core/satmin.test, tests/python/automata.ipynb, tests/python/sbacc.py: Adjust test cases. * tests/python/except.py: Add a couple more tests.
This commit is contained in:
parent
89f7047925
commit
7a65bdf6bc
19 changed files with 3140 additions and 1932 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -75,3 +75,15 @@ try:
|
|||
a = r.reduce()
|
||||
except RuntimeError as e:
|
||||
assert "empty cycle" in str(e)
|
||||
|
||||
f = spot.formula('GF(a | Gb)')
|
||||
try:
|
||||
spot.gf_guarantee_to_ba(f, spot._bdd_dict)
|
||||
except RuntimeError as e:
|
||||
assert "guarantee" in str(e)
|
||||
|
||||
f = spot.formula('FG(a | Fb)')
|
||||
try:
|
||||
spot.fg_safety_to_dca(f, spot._bdd_dict)
|
||||
except RuntimeError as e:
|
||||
assert "safety" in str(e)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- mode: python; coding: utf-8 -*-
|
||||
# Copyright (C) 2017 Laboratoire de Recherche et Développement de l'Epita
|
||||
# Copyright (C) 2017, 2018 Laboratoire de Recherche et Développement de l'Epita
|
||||
# (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
|
|
@ -50,12 +50,12 @@ h = s.to_str('hoa')
|
|||
assert h == """HOA: v1
|
||||
States: 2
|
||||
Start: 0
|
||||
AP: 2 "b" "a"
|
||||
AP: 2 "a" "b"
|
||||
Acceptance: 2 Inf(0) | Inf(1)
|
||||
properties: trans-labels explicit-labels state-acc deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[1] 1
|
||||
[0] 1
|
||||
State: 1 {1}
|
||||
[t] 1
|
||||
--END--"""
|
||||
|
|
@ -84,13 +84,13 @@ h = d.to_str('hoa')
|
|||
assert h == """HOA: v1
|
||||
States: 2
|
||||
Start: 0
|
||||
AP: 2 "b" "a"
|
||||
AP: 2 "a" "b"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[1] 1
|
||||
[0] 1
|
||||
State: 1 {0}
|
||||
[t] 1
|
||||
--END--"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue