sbacc: fix a typo and remove some useless code
* spot/twaalgos/sbacc.cc: Do not assign to one_in twice, and fix the value of init_acc. * tests/core/sbacc.test: Add a test case. * NEWS: Mention the bug.
This commit is contained in:
parent
1eb5be543d
commit
37fc948be4
3 changed files with 40 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2015, 2016 Laboratoire de Recherche et Développement
|
||||
# Copyright (C) 2015, 2016, 2017 Laboratoire de Recherche et Développement
|
||||
# de l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
|
|
@ -76,6 +76,22 @@ State: 1 {0}
|
|||
State: 2
|
||||
[0] 0 {1}
|
||||
--END--
|
||||
/* The following example used to be converted into a
|
||||
3-state automaton instead of just 2 states, due to
|
||||
a typo in the code. */
|
||||
HOA: v1
|
||||
States: 2
|
||||
Start: 1
|
||||
AP: 2 "a" "b"
|
||||
Acceptance: 2 Fin(0) & Inf(1)
|
||||
--BODY--
|
||||
State: 0
|
||||
[t] 0 {0}
|
||||
State: 1
|
||||
[1] 0
|
||||
[0&!1] 1 {1}
|
||||
--END--
|
||||
|
||||
EOF
|
||||
|
||||
run 0 $autfilt --state-based-acceptance in.hoa -H > out.hoa
|
||||
|
|
@ -96,6 +112,20 @@ State: 1 {0}
|
|||
State: 2 {0 1}
|
||||
[0] 0
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 2
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: Rabin 1
|
||||
Acceptance: 2 Fin(0) & Inf(1)
|
||||
properties: trans-labels explicit-labels state-acc deterministic
|
||||
--BODY--
|
||||
State: 0 {1}
|
||||
[0&!1] 0
|
||||
[1] 1
|
||||
State: 1
|
||||
[t] 1
|
||||
--END--
|
||||
EOF
|
||||
|
||||
diff out.hoa expected
|
||||
|
|
@ -103,7 +133,7 @@ diff out.hoa expected
|
|||
$autfilt --sba -H expected > out.hoa
|
||||
diff out.hoa expected
|
||||
|
||||
$autfilt --strip-acc -H expected > out.hoa
|
||||
$autfilt --strip-acc -H expected -n1 > out.hoa
|
||||
cat >expected <<EOF
|
||||
HOA: v1
|
||||
States: 3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue