python: implicit str->formula conversion

* python/spot/impl.i, python/spot/__init__.py: Implement it.
* NEWS: Mention it.
* tests/python/atva16-fig2a.ipynb, tests/python/atva16-fig2b.ipynb,
tests/python/formulas.ipynb, tests/python/ltsmin-dve.ipynb,
tests/python/ltsmin-pml.ipynb, tests/python/stutter-inv.ipynb,
doc/org/tut02.org: Modernize.
This commit is contained in:
Alexandre Duret-Lutz 2018-05-15 16:07:14 +02:00
parent 5c1d9c492c
commit 6a808492c1
10 changed files with 168 additions and 210 deletions

View file

@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This example is the left part of Fig.2 in our ATVA'16 paper titled \"*Spot 2.0 — a framework for LTL and ω-automata manipulation*\"."
"This example is the left part of Fig.2 in our ATVA'16 paper titled [\"*Spot 2.0 — a framework for LTL and ω-automata manipulation*\"](https://www.lrde.epita.fr/~adl/dl/adl/duret.16.atva2.pdf), slightly updated to the current version of Spot."
]
},
{
@ -14,7 +14,7 @@
"outputs": [],
"source": [
"import spot\n",
"spot.setup(show_default='.abr')"
"spot.setup(show_default='.b')"
]
},
{
@ -155,7 +155,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f3264654bd0> >"
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f81a85ea1e0> >"
]
},
"execution_count": 3,
@ -175,7 +175,7 @@
"source": [
"def implies(f, g):\n",
" f = spot.formula(f)\n",
" g = spot.formula_Not(spot.formula(g))\n",
" g = spot.formula.Not(g)\n",
" return spot.product(f.translate(), g.translate()).is_empty()\n",
"def equiv(f, g):\n",
" return implies(f, g) and implies(g, f)"