twa: add support for prop_complete()
* spot/twa/twa.hh: Add support. Make two constructors for prop_set in order to diagnose constructions with 5 arguments. * spot/parseaut/parseaut.yy: Adjust diagnostics for complete and deterministic. * spot/tl/exclusive.cc, spot/twa/twagraph.cc, spot/twaalgos/alternation.cc, spot/twaalgos/complete.cc, spot/twaalgos/complete.hh, spot/twaalgos/degen.cc, spot/twaalgos/determinize.cc, spot/twaalgos/hoa.cc, spot/twaalgos/isdet.cc, spot/twaalgos/mask.cc, spot/twaalgos/minimize.cc, spot/twaalgos/product.cc, spot/twaalgos/remfin.cc, spot/twaalgos/remprop.cc, spot/twaalgos/sbacc.cc, spot/twaalgos/sccfilter.cc, spot/twaalgos/simulation.cc, spot/twaalgos/strength.cc, spot/twaalgos/stutter.cc, spot/twaalgos/totgba.cc, tests/core/parseaut.test, tests/python/product.ipynb: Adjust. * NEWS, doc/org/concepts.org, doc/org/hoa.org, doc/org/tut21.org: Document it.
This commit is contained in:
parent
90a8a912e0
commit
0de5f50da9
28 changed files with 296 additions and 106 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014, 2015, 2016 Laboratoire de Recherche et
|
||||
# Développement de l'Epita (LRDE).
|
||||
# Copyright (C) 2014-2017 Laboratoire de Recherche et Développement de
|
||||
# l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
#
|
||||
|
|
@ -367,8 +367,23 @@ State: 1 { 1 }
|
|||
State: 2 "sink state" { 0 }
|
||||
2 2 2 2
|
||||
--END--
|
||||
HOA: v1.1
|
||||
name: "GFa"
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 1 "a"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels trans-acc !complete
|
||||
properties: !deterministic stutter-invariant
|
||||
--BODY--
|
||||
State: 0
|
||||
[0] 0 {0}
|
||||
[!0] 0
|
||||
--END--
|
||||
EOF
|
||||
|
||||
err1="this might cause the following errors"
|
||||
expecterr input <<EOF
|
||||
input:9.5-12.7: not enough transitions for this state
|
||||
input:10.7-12.7: these transitions have implicit labels but the automaton is...
|
||||
|
|
@ -377,6 +392,11 @@ input:9.5-12.7: automaton is not complete...
|
|||
input:7.30-37: ... despite 'properties: complete'
|
||||
input:27.8-10: state label used although the automaton was...
|
||||
input:25.13-27: ... declared with 'properties: implicit-labels' here
|
||||
input:37.6-9: we can read HOA v1 but this file uses v1.1; $err1
|
||||
input:46.9-49.6: automaton is complete...
|
||||
input:44.52-60: ... despite 'properties: !complete'
|
||||
input:46.9-49.6: automaton is deterministic...
|
||||
input:45.13-26: ... despite 'properties: !deterministic'
|
||||
EOF
|
||||
|
||||
cat >input<<EOF
|
||||
|
|
@ -1853,6 +1873,15 @@ properties: !inherently-weak weak
|
|||
--BODY--
|
||||
State: 0 0
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 2
|
||||
Start: 0
|
||||
AP: 0
|
||||
Acceptance: 0 t
|
||||
properties: complete
|
||||
--BODY--
|
||||
State: 0 0
|
||||
--END--
|
||||
EOF
|
||||
|
||||
expecterr input <<EOF
|
||||
|
|
@ -1866,6 +1895,8 @@ input:36.36-43: 'properties: terminal' contradicts...
|
|||
input:36.30-34: ... 'properties: !weak' given here
|
||||
input:45.30-33: 'properties: weak' contradicts...
|
||||
input:45.13-28: ... 'properties: !inherently-weak' given here
|
||||
input:50.1-9: state 1 has no definition...
|
||||
input:54.13-20: ... despite 'properties: complete'
|
||||
EOF
|
||||
|
||||
|
||||
|
|
@ -2051,7 +2082,6 @@ State: 0
|
|||
--END--
|
||||
EOF
|
||||
|
||||
err1="this might cause the following errors"
|
||||
expecterr input<<EOF
|
||||
input:11.9-11: universal branch used despite previous declaration...
|
||||
input:7.13-26: ... here
|
||||
|
|
|
|||
|
|
@ -1,7 +1,23 @@
|
|||
{
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"signature": "sha256:08e64ee189c19ed7e56e5f1c841f51faac25e0bd5e4a6b838856ba8b6f2b5344"
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.5.3"
|
||||
},
|
||||
"name": ""
|
||||
},
|
||||
"nbformat": 3,
|
||||
"nbformat_minor": 0,
|
||||
|
|
@ -367,7 +383,7 @@
|
|||
"output_type": "pyout",
|
||||
"prompt_number": 2,
|
||||
"text": [
|
||||
"<IPython.core.display.HTML at 0x7ff45181d390>"
|
||||
"<IPython.core.display.HTML object>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -711,7 +727,7 @@
|
|||
"metadata": {},
|
||||
"output_type": "display_data",
|
||||
"text": [
|
||||
"<IPython.core.display.HTML at 0x7ff444140860>"
|
||||
"<IPython.core.display.HTML object>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -1066,7 +1082,7 @@
|
|||
"metadata": {},
|
||||
"output_type": "display_data",
|
||||
"text": [
|
||||
"<IPython.core.display.HTML at 0x7ff451801208>"
|
||||
"<IPython.core.display.HTML object>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -1487,7 +1503,7 @@
|
|||
"metadata": {},
|
||||
"output_type": "display_data",
|
||||
"text": [
|
||||
"<IPython.core.display.HTML at 0x7ff44409ef98>"
|
||||
"<IPython.core.display.HTML object>"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1664,7 +1680,7 @@
|
|||
" result.set_state_names(names)\n",
|
||||
" \n",
|
||||
" # Loop over all the properties we want to preserve if they hold in both automata\n",
|
||||
" for p in ('prop_deterministic', 'prop_weak', 'prop_inherently_weak', \n",
|
||||
" for p in ('prop_deterministic', 'prop_complete', 'prop_weak', 'prop_inherently_weak', \n",
|
||||
" 'prop_terminal', 'prop_stutter_invariant', 'prop_state_acc'):\n",
|
||||
" if getattr(left, p)() and getattr(right, p)():\n",
|
||||
" getattr(result, p)(True)\n",
|
||||
|
|
@ -1991,7 +2007,7 @@
|
|||
"metadata": {},
|
||||
"output_type": "display_data",
|
||||
"text": [
|
||||
"<IPython.core.display.HTML at 0x7ff44408aa58>"
|
||||
"<IPython.core.display.HTML object>"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -2026,7 +2042,7 @@
|
|||
"output_type": "stream",
|
||||
"stream": "stdout",
|
||||
"text": [
|
||||
"1000 loops, best of 3: 342 \u00b5s per loop\n"
|
||||
"1000 loops, best of 3: 206 \u00b5s per loop\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -2045,7 +2061,8 @@
|
|||
"output_type": "stream",
|
||||
"stream": "stdout",
|
||||
"text": [
|
||||
"100000 loops, best of 3: 6.44 \u00b5s per loop\n"
|
||||
"The slowest run took 6.27 times longer than the fastest. This could mean that an intermediate result is being cached.\n",
|
||||
"100000 loops, best of 3: 4.2 \u00b5s per loop\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue