minimize_obligation: complement very weak automata if needed

Fixes #379.

* spot/twaalgos/minimize.cc: Here.
* tests/core/optba.test: Add test case provided by Rüdiger Ehlers.
* NEWS: Mention the improvement.
This commit is contained in:
Alexandre Duret-Lutz 2019-03-20 22:02:02 +01:00
parent ef106e2860
commit 01edf4f8e1
3 changed files with 32 additions and 5 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2015, 2017 Laboratoire de Recherche et Développement
# Copyright (C) 2015, 2017, 2019 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -160,3 +160,14 @@ test `autfilt --exclusive-ap=c1,c2 --high --small --stats=%s input` = 18
# But we should have 19 with Büchi acceptance, not 20.
test `autfilt --exclusive-ap=c1,c2 --high --small -B --stats=%s input` = 19
# This should be reduced to a 3-state minimal WDBA if we
# correctly recognize that this is an obligation. Issue #379.
cat >in <<EOF
HOA: v1 Start: 0 States: 4 Acceptance: 1 Inf(0)
AP: 2 "v0" "v1" --BODY-- State: 0 "T3_init" [t] 0 [!0 & !1] 1
State: 1 "T2" [0&1] 1 [0&1] 2 [!0&!1] 2 [0&1] 3 [!0&!1] 1
State: 2 "T1" {0} [0&1] 2 State: 3 "all" {0} [t] 3 --END--
EOF
test '3,6' = `autfilt --small in --stats=%s,%e`