python: upgrade notebook format to v4
Fixes #311. * tests/python/ipnbdoctest.py: Adjust to process the new format, with a lot of inspiration from Vcsn's copy of this file. * tests/python/_altscc.ipynb, tests/python/_aux.ipynb, tests/python/acc_cond.ipynb, tests/python/accparse.ipynb, tests/python/alternation.ipynb, tests/python/atva16-fig2a.ipynb, tests/python/atva16-fig2b.ipynb, tests/python/automata-io.ipynb, tests/python/automata.ipynb, tests/python/decompose.ipynb, tests/python/formulas.ipynb, tests/python/gen.ipynb, tests/python/highlighting.ipynb, tests/python/ltsmin-dve.ipynb, tests/python/ltsmin-pml.ipynb, tests/python/parity.ipynb, tests/python/piperead.ipynb, tests/python/product.ipynb, tests/python/randaut.ipynb, tests/python/randltl.ipynb, tests/python/stutter-inv.ipynb, tests/python/testingaut.ipynb, tests/python/word.ipynb: Upgrade to the new format. * NEWS: Mention the change.
This commit is contained in:
parent
020c981188
commit
58e64e752c
25 changed files with 33431 additions and 33104 deletions
|
|
@ -1,4 +1,157 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import spot\n",
|
||||
"spot.setup()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"(Inf(0) & Fin(1)) | (Inf(2) & Fin(3))"
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"c = spot.acc_code('Inf(0)&Fin(1)|Inf(2)&Fin(3)'); c"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"(Fin(1) & Inf(0)) | (Fin(3) & Inf(2))"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"c.to_dnf()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"(Inf(0) | Inf(2)) & (Inf(0) | Fin(3)) & (Inf(2) | Fin(1)) & (Fin(1)|Fin(3))"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"c.to_cnf()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"all: t\n",
|
||||
"t: t\n",
|
||||
"Buchi: Inf(0)\n",
|
||||
"generalized-Buchi 3: Inf(0)&Inf(1)&Inf(2)\n",
|
||||
"generalized-Buchi 0: t\n",
|
||||
"co-Buchi: Fin(0)\n",
|
||||
"generalized-co-Buchi 3: Fin(0)|Fin(1)|Fin(2)\n",
|
||||
"generalized-co-Buchi 0: f\n",
|
||||
"Rabin 2: (Fin(0) & Inf(1)) | (Fin(2) & Inf(3))\n",
|
||||
"Rabin 0: f\n",
|
||||
"Streett 2: (Fin(0) | Inf(1)) & (Fin(2) | Inf(3))\n",
|
||||
"Streett 0: t\n",
|
||||
"generalized-Rabin 3 1 2 3: (Fin(0) & Inf(1)) | (Fin(2) & (Inf(3)&Inf(4))) | (Fin(5) & (Inf(6)&Inf(7)&Inf(8)))\n",
|
||||
"generalized-Rabin 0: f\n",
|
||||
"parity min even 6: Inf(0) | (Fin(1) & (Inf(2) | (Fin(3) & (Inf(4) | Fin(5)))))\n",
|
||||
"parity max odd 6: Inf(5) | (Fin(4) & (Inf(3) | (Fin(2) & (Inf(1) | Fin(0)))))\n",
|
||||
"parity max even 6: Fin(5) & (Inf(4) | (Fin(3) & (Inf(2) | (Fin(1) & Inf(0)))))\n",
|
||||
"parity min odd 6: Fin(0) & (Inf(1) | (Fin(2) & (Inf(3) | (Fin(4) & Inf(5)))))\n",
|
||||
"parity min even 5: Inf(0) | (Fin(1) & (Inf(2) | (Fin(3) & Inf(4))))\n",
|
||||
"parity max odd 5: Fin(4) & (Inf(3) | (Fin(2) & (Inf(1) | Fin(0))))\n",
|
||||
"parity max even 5: Inf(4) | (Fin(3) & (Inf(2) | (Fin(1) & Inf(0))))\n",
|
||||
"parity min odd 5: Fin(0) & (Inf(1) | (Fin(2) & (Inf(3) | Fin(4))))\n",
|
||||
"parity min even 2: Inf(0) | Fin(1)\n",
|
||||
"parity max odd 2: Inf(1) | Fin(0)\n",
|
||||
"parity max even 2: Fin(1) & Inf(0)\n",
|
||||
"parity min odd 2: Fin(0) & Inf(1)\n",
|
||||
"parity min even 1: Inf(0)\n",
|
||||
"parity max odd 1: Fin(0)\n",
|
||||
"parity max even 1: Inf(0)\n",
|
||||
"parity min odd 1: Fin(0)\n",
|
||||
"parity min even 0: t\n",
|
||||
"parity max odd 0: t\n",
|
||||
"parity max even 0: f\n",
|
||||
"parity min odd 0: f\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"for acc in ['all', 't', \n",
|
||||
" 'Buchi', 'generalized-Buchi 3', 'generalized-Buchi 0',\n",
|
||||
" 'co-Buchi', 'generalized-co-Buchi 3', 'generalized-co-Buchi 0',\n",
|
||||
" 'Rabin 2', 'Rabin 0',\n",
|
||||
" 'Streett 2', 'Streett 0',\n",
|
||||
" 'generalized-Rabin 3 1 2 3', 'generalized-Rabin 0',\n",
|
||||
" 'parity min even 6', 'parity max odd 6', 'parity max even 6', 'parity min odd 6',\n",
|
||||
" 'parity min even 5', 'parity max odd 5', 'parity max even 5', 'parity min odd 5',\n",
|
||||
" 'parity min even 2', 'parity max odd 2', 'parity max even 2', 'parity min odd 2',\n",
|
||||
" 'parity min even 1', 'parity max odd 1', 'parity max even 1', 'parity min odd 1',\n",
|
||||
" 'parity min even 0', 'parity max odd 0', 'parity max even 0', 'parity min odd 0',\n",
|
||||
" ]:\n",
|
||||
" print(acc, ': ', spot.acc_code(acc), sep='')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
|
|
@ -16,161 +169,8 @@
|
|||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.5.3+"
|
||||
},
|
||||
"name": ""
|
||||
},
|
||||
"nbformat": 3,
|
||||
"nbformat_minor": 0,
|
||||
"worksheets": [
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": true,
|
||||
"input": [
|
||||
"import spot\n",
|
||||
"spot.setup()"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"prompt_number": 1
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"c = spot.acc_code('Inf(0)&Fin(1)|Inf(2)&Fin(3)'); c"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"metadata": {},
|
||||
"output_type": "pyout",
|
||||
"prompt_number": 2,
|
||||
"text": [
|
||||
"(Inf(0) & Fin(1)) | (Inf(2) & Fin(3))"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 2
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"c.to_dnf()"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"metadata": {},
|
||||
"output_type": "pyout",
|
||||
"prompt_number": 3,
|
||||
"text": [
|
||||
"(Fin(1) & Inf(0)) | (Fin(3) & Inf(2))"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 3
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"c.to_cnf()"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"metadata": {},
|
||||
"output_type": "pyout",
|
||||
"prompt_number": 4,
|
||||
"text": [
|
||||
"(Inf(0) | Inf(2)) & (Inf(0) | Fin(3)) & (Inf(2) | Fin(1)) & (Fin(1)|Fin(3))"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 4
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"for acc in ['all', 't', \n",
|
||||
" 'Buchi', 'generalized-Buchi 3', 'generalized-Buchi 0',\n",
|
||||
" 'co-Buchi', 'generalized-co-Buchi 3', 'generalized-co-Buchi 0',\n",
|
||||
" 'Rabin 2', 'Rabin 0',\n",
|
||||
" 'Streett 2', 'Streett 0',\n",
|
||||
" 'generalized-Rabin 3 1 2 3', 'generalized-Rabin 0',\n",
|
||||
" 'parity min even 6', 'parity max odd 6', 'parity max even 6', 'parity min odd 6',\n",
|
||||
" 'parity min even 5', 'parity max odd 5', 'parity max even 5', 'parity min odd 5',\n",
|
||||
" 'parity min even 2', 'parity max odd 2', 'parity max even 2', 'parity min odd 2',\n",
|
||||
" 'parity min even 1', 'parity max odd 1', 'parity max even 1', 'parity min odd 1',\n",
|
||||
" 'parity min even 0', 'parity max odd 0', 'parity max even 0', 'parity min odd 0',\n",
|
||||
" ]:\n",
|
||||
" print(acc, ': ', spot.acc_code(acc), sep='')"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stdout",
|
||||
"text": [
|
||||
"all: t\n",
|
||||
"t: t\n",
|
||||
"Buchi: Inf(0)\n",
|
||||
"generalized-Buchi 3: Inf(0)&Inf(1)&Inf(2)\n",
|
||||
"generalized-Buchi 0: t\n",
|
||||
"co-Buchi: Fin(0)\n",
|
||||
"generalized-co-Buchi 3: Fin(0)|Fin(1)|Fin(2)\n",
|
||||
"generalized-co-Buchi 0: f\n",
|
||||
"Rabin 2: (Fin(0) & Inf(1)) | (Fin(2) & Inf(3))\n",
|
||||
"Rabin 0: f\n",
|
||||
"Streett 2: (Fin(0) | Inf(1)) & (Fin(2) | Inf(3))\n",
|
||||
"Streett 0: t\n",
|
||||
"generalized-Rabin 3 1 2 3: (Fin(0) & Inf(1)) | (Fin(2) & (Inf(3)&Inf(4))) | (Fin(5) & (Inf(6)&Inf(7)&Inf(8)))\n",
|
||||
"generalized-Rabin 0: f\n",
|
||||
"parity min even 6: Inf(0) | (Fin(1) & (Inf(2) | (Fin(3) & (Inf(4) | Fin(5)))))\n",
|
||||
"parity max odd 6: Inf(5) | (Fin(4) & (Inf(3) | (Fin(2) & (Inf(1) | Fin(0)))))\n",
|
||||
"parity max even 6: Fin(5) & (Inf(4) | (Fin(3) & (Inf(2) | (Fin(1) & Inf(0)))))\n",
|
||||
"parity min odd 6: Fin(0) & (Inf(1) | (Fin(2) & (Inf(3) | (Fin(4) & Inf(5)))))\n",
|
||||
"parity min even 5: Inf(0) | (Fin(1) & (Inf(2) | (Fin(3) & Inf(4))))\n",
|
||||
"parity max odd 5: Fin(4) & (Inf(3) | (Fin(2) & (Inf(1) | Fin(0))))\n",
|
||||
"parity max even 5: Inf(4) | (Fin(3) & (Inf(2) | (Fin(1) & Inf(0))))\n",
|
||||
"parity min odd 5: Fin(0) & (Inf(1) | (Fin(2) & (Inf(3) | Fin(4))))\n",
|
||||
"parity min even 2: Inf(0) | Fin(1)\n",
|
||||
"parity max odd 2: Inf(1) | Fin(0)\n",
|
||||
"parity max even 2: Fin(1) & Inf(0)\n",
|
||||
"parity min odd 2: Fin(0) & Inf(1)\n",
|
||||
"parity min even 1: Inf(0)\n",
|
||||
"parity max odd 1: Fin(0)\n",
|
||||
"parity max even 1: Inf(0)\n",
|
||||
"parity min odd 1: Fin(0)\n",
|
||||
"parity min even 0: t\n",
|
||||
"parity max odd 0: t\n",
|
||||
"parity max even 0: f\n",
|
||||
"parity min odd 0: f\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 5
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"prompt_number": 5
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue