hoa: add support for controllable-AP

* doc/spot.bib (perez.19.hoa): New entry.
* spot/parseaut/public.hh: Mention it.
* spot/parseaut/parseaut.yy, spot/parseaut/scanaut.ll: Learn to parse
the controllable-AP header.
* spot/twaalgos/hoa.cc: Print it.
* tests/core/ltlsynt.test, tests/core/parseaut.test,
tests/core/readsave.test, tests/python/_synthesis.ipynb,
tests/python/except.py, tests/python/games.ipynb,
tests/python/mealy.py, tests/python/synthesis.py: Adjust or augment
test cases.
This commit is contained in:
Alexandre Duret-Lutz 2022-01-03 18:04:29 +01:00
parent 7cefe30d97
commit 8c33f959a3
14 changed files with 134 additions and 15 deletions

View file

@ -1,6 +1,6 @@
#! /bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017, 2019-2021 Laboratoire de Recherche et
# Copyright (C) 2017, 2019-2022 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -373,6 +373,7 @@ AP: 1 "p0"
acc-name: all
Acceptance: 0 t
properties: trans-labels explicit-labels state-acc deterministic
controllable-AP: 0
--BODY--
State: 0
[t] 1
@ -394,6 +395,7 @@ AP: 1 "p0"
acc-name: all
Acceptance: 0 t
properties: trans-labels explicit-labels state-acc deterministic
controllable-AP: 0
--BODY--
State: 0
[!0] 0
@ -529,6 +531,7 @@ AP: 3 "a" "b" "c"
acc-name: all
Acceptance: 0 t
properties: trans-labels explicit-labels state-acc deterministic
controllable-AP: 2
--BODY--
State: 0
[!0&!2 | !1&!2] 0

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2018, 2020-2021 Laboratoire de Recherche et
# Copyright (C) 2014-2018, 2020-2022 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -165,6 +165,7 @@ HOA: v1
AP: 1 "a"
States: 0
AP: 2 "a" "b"
controllable-AP: 3 2
Acceptance: 0 t
--BODY--
--END--
@ -184,7 +185,11 @@ EOF
expecterr input <<EOF
input:4.1-3: ignoring this redeclaration of APs...
input:2.1-5: ... previously declared here.
input:14.15-17: unknown acceptance 'Foo', expected Fin or Inf
input:5.18: controllable AP number is larger than the number of APs...
input:2.1-5: ... declared here.
input:5.20: controllable AP number is larger than the number of APs...
input:2.1-5: ... declared here.
input:15.15-17: unknown acceptance 'Foo', expected Fin or Inf
EOF
cat >input <<EOF
@ -528,6 +533,7 @@ cat >input <<EOF
Acceptance: 2 (Inf(0) & Inf(1))
Alias: @a 0
Alias: @bc 1 & 2
controllable-AP: 2
--BODY--
State: 0
[!@a & !@bc] 0
@ -564,8 +570,9 @@ input:11.17-25: ... declaration of state-based acceptance.
input:16.12-14: unknown alias @bc
input:17.11-13: unknown alias @bc
input:26.18: atomic proposition used in Alias without AP declaration
input:40.16: AP number is larger than the number of APs...
input:41.1-3: ... declared here
input:27.3-18: controllable-AP without AP declaration
input:41.16: AP number is larger than the number of APs...
input:42.1-3: ... declared here
EOF
cat >input <<EOF

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2009, 2010, 2012, 2014-2021 Laboratoire de
# Copyright (C) 2009, 2010, 2012, 2014-2022 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
@ -34,6 +34,7 @@ AP: 3 "a" "b" "F\\G"
acc-name: generalized-Buchi 2
Acceptance: 2 Inf(0)&Inf(1)
properties: trans-labels explicit-labels state-acc deterministic
controllable-AP: 0 2
--BODY--
State: 0 {0 1}
[0&!1] 1
@ -66,6 +67,7 @@ AP: 2 "a" "b"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels trans-acc
controllable-AP: /* empty */
--BODY--
State: 0
[0&1] 1 {0}
@ -86,6 +88,7 @@ AP: 2 "a" "b"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels trans-acc
controllable-AP:
--BODY--
State: 0
[!1] 1