dot: allow extra configuration via environment

* src/tgbaalgos/dotty.cc, src/taalgos/dotty.cc: Honnor the SPOT_DOTEXTRA
environement variable.
* src/tgbatest/readsave.test, wrap/python/tests/automata.ipynb: Test it.
* NEWS, src/bin/man/spot-x.x: Document it.
This commit is contained in:
Alexandre Duret-Lutz 2015-03-16 17:19:37 +01:00
parent b6762b7dc9
commit 7caf2b83d6
6 changed files with 77 additions and 45 deletions

View file

@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:6c1898261f2fab59f18fc3b6d75fe387d6f811b02935833fc74fa5e476796d4c"
"signature": "sha256:5d2a4f77c6bcffce3121cc011949d340222f35788edaf95171ae9917ea3794d6"
},
"nbformat": 3,
"nbformat_minor": 0,
@ -12,7 +12,9 @@
"cell_type": "code",
"collapsed": false,
"input": [
"import spot"
"import spot\n",
"import os\n",
"os.environ['SPOT_DOTEXTRA'] = 'node[style=filled,fillcolor=\"#88ddff\"]'"
],
"language": "python",
"metadata": {},
@ -47,7 +49,7 @@
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g id=\"node2\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"65\" cy=\"-69\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"65\" cy=\"-69\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-65.3\" font-family=\"Times,serif\" font-size=\"14.00\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
@ -63,7 +65,7 @@
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node3\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"200\" cy=\"-109\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"200\" cy=\"-109\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"200\" cy=\"-109\" rx=\"31\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"200\" y=\"-105.3\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
"</g>\n",
@ -75,7 +77,7 @@
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node4\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"200\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"200\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"200\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">4</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;4 -->\n",
@ -92,7 +94,7 @@
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node5\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"453\" cy=\"-99\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"453\" cy=\"-99\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"453\" y=\"-95.3\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
@ -103,7 +105,7 @@
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node6\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"326\" cy=\"-99\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"326\" cy=\"-99\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"326\" y=\"-95.3\" font-family=\"Times,serif\" font-size=\"14.00\">3</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
@ -152,7 +154,7 @@
"</svg>\n"
],
"text": [
"<spot_impl.tgba_digraph; proxy of <Swig Object of type 'std::shared_ptr< spot::tgba_digraph > *' at 0x7f79a4a46090> >"
"<spot_impl.tgba_digraph; proxy of <Swig Object of type 'std::shared_ptr< spot::tgba_digraph > *' at 0x7fd82431b0f0> >"
]
}
],
@ -188,7 +190,7 @@
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
"<ellipse cx=\"56\" cy=\"-44\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"56\" cy=\"-44\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-40.3\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
@ -204,7 +206,7 @@
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node3\"><title>1</title>\n",
"<ellipse cx=\"173\" cy=\"-151\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"173\" cy=\"-151\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"173\" cy=\"-151\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"173\" y=\"-147.3\">1</text>\n",
"</g>\n",
@ -216,7 +218,7 @@
"</g>\n",
"<!-- 4 -->\n",
"<g class=\"node\" id=\"node6\"><title>4</title>\n",
"<ellipse cx=\"173\" cy=\"-34\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"173\" cy=\"-34\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"173\" y=\"-30.3\">4</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;4 -->\n",
@ -233,7 +235,7 @@
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
"<ellipse cx=\"281.5\" cy=\"-178\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"281.5\" cy=\"-178\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"281.5\" y=\"-174.3\">3</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
@ -244,7 +246,7 @@
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node5\"><title>2</title>\n",
"<ellipse cx=\"391\" cy=\"-178\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"391\" cy=\"-178\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"391\" y=\"-174.3\">2</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
@ -293,7 +295,7 @@
"</svg>"
],
"text": [
"<IPython.core.display.SVG at 0x7f79a5729400>"
"<IPython.core.display.SVG at 0x7fd82694b470>"
]
}
],
@ -350,7 +352,7 @@
"<!-- I -->\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"65\" cy=\"-22\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"65\" cy=\"-22\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-18.3\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- I&#45;&gt;1 -->\n",
@ -366,7 +368,7 @@
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"166\" cy=\"-22\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"166\" cy=\"-22\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"166\" cy=\"-22\" rx=\"31\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"166\" y=\"-18.3\" font-family=\"Times,serif\" font-size=\"14.00\">0</text>\n",
"</g>\n",
@ -386,7 +388,7 @@
"</svg>\n"
],
"text": [
"<spot_impl.tgba_digraph; proxy of <Swig Object of type 'std::shared_ptr< spot::tgba_digraph > *' at 0x7f79a4aa1810> >"
"<spot_impl.tgba_digraph; proxy of <Swig Object of type 'std::shared_ptr< spot::tgba_digraph > *' at 0x7fd8242f2870> >"
]
}
],
@ -420,7 +422,7 @@
"<!-- I -->\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"65\" cy=\"-22\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"65\" cy=\"-22\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-18.3\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- I&#45;&gt;1 -->\n",
@ -436,7 +438,7 @@
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"166\" cy=\"-22\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"166\" cy=\"-22\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"166\" cy=\"-22\" rx=\"31\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"166\" y=\"-18.3\" font-family=\"Times,serif\" font-size=\"14.00\">0</text>\n",
"</g>\n",
@ -456,7 +458,7 @@
"</svg>\n"
],
"text": [
"<spot_impl.tgba_digraph; proxy of <Swig Object of type 'std::shared_ptr< spot::tgba_digraph > *' at 0x7f79a4aa1930> >"
"<spot_impl.tgba_digraph; proxy of <Swig Object of type 'std::shared_ptr< spot::tgba_digraph > *' at 0x7fd8242f2ab0> >"
]
}
],
@ -490,7 +492,7 @@
"<!-- I -->\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"65\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"65\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- I&#45;&gt;1 -->\n",
@ -506,7 +508,7 @@
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"162\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
"<ellipse fill=\"#88ddff\" stroke=\"black\" cx=\"162\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"162\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">0</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
@ -525,7 +527,7 @@
"</svg>\n"
],
"text": [
"<spot_impl.tgba_digraph; proxy of <Swig Object of type 'std::shared_ptr< spot::tgba_digraph > *' at 0x7f79a4aa18a0> >"
"<spot_impl.tgba_digraph; proxy of <Swig Object of type 'std::shared_ptr< spot::tgba_digraph > *' at 0x7fd8242f2900> >"
]
}
],
@ -575,7 +577,7 @@
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
"<ellipse cx=\"109\" cy=\"-113\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"109\" cy=\"-113\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"109\" y=\"-109.3\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
@ -585,7 +587,7 @@
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node3\"><title>1</title>\n",
"<ellipse cx=\"22\" cy=\"-22\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"22\" cy=\"-22\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"22\" cy=\"-22\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"22\" y=\"-18.3\">1</text>\n",
"</g>\n",
@ -597,7 +599,7 @@
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node4\"><title>2</title>\n",
"<ellipse cx=\"109\" cy=\"-22\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"109\" cy=\"-22\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"109\" cy=\"-22\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"109\" y=\"-18.3\">2</text>\n",
"</g>\n",
@ -609,7 +611,7 @@
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node5\"><title>3</title>\n",
"<ellipse cx=\"196\" cy=\"-22\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"196\" cy=\"-22\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"196\" cy=\"-22\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"196\" y=\"-18.3\">3</text>\n",
"</g>\n",
@ -641,7 +643,7 @@
"</svg>"
],
"text": [
"<IPython.core.display.SVG at 0x7f798ea6e9b0>"
"<IPython.core.display.SVG at 0x7fd81c2fa898>"
]
}
],
@ -659,7 +661,7 @@
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 12,
"prompt_number": 10,
"svg": [
"<svg height=\"280pt\" viewBox=\"0.00 0.00 591.82 280.00\" width=\"592pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 276)\">\n",
@ -668,7 +670,7 @@
"<!-- I -->\n",
"<!-- 6 -->\n",
"<g class=\"node\" id=\"node2\"><title>6</title>\n",
"<ellipse cx=\"277.821\" cy=\"-212\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"277.821\" cy=\"-212\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"277.821\" cy=\"-212\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"277.821\" y=\"-208.3\">6</text>\n",
"</g>\n",
@ -685,7 +687,7 @@
"</g>\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node3\"><title>0</title>\n",
"<ellipse cx=\"96.8206\" cy=\"-22\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"96.8206\" cy=\"-22\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"96.8206\" cy=\"-22\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"96.8206\" y=\"-18.3\">0</text>\n",
"</g>\n",
@ -697,7 +699,7 @@
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node4\"><title>1</title>\n",
"<ellipse cx=\"323.821\" cy=\"-22\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"323.821\" cy=\"-22\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"323.821\" cy=\"-22\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"323.821\" y=\"-18.3\">1</text>\n",
"</g>\n",
@ -709,7 +711,7 @@
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node5\"><title>2</title>\n",
"<ellipse cx=\"475.821\" cy=\"-22\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"475.821\" cy=\"-22\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"475.821\" cy=\"-22\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"475.821\" y=\"-18.3\">2</text>\n",
"</g>\n",
@ -721,7 +723,7 @@
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node6\"><title>3</title>\n",
"<ellipse cx=\"104.821\" cy=\"-117\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"104.821\" cy=\"-117\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"104.821\" cy=\"-117\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"104.821\" y=\"-113.3\">3</text>\n",
"</g>\n",
@ -733,7 +735,7 @@
"</g>\n",
"<!-- 4 -->\n",
"<g class=\"node\" id=\"node7\"><title>4</title>\n",
"<ellipse cx=\"429.821\" cy=\"-117\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"429.821\" cy=\"-117\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"429.821\" cy=\"-117\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"429.821\" y=\"-113.3\">4</text>\n",
"</g>\n",
@ -745,7 +747,7 @@
"</g>\n",
"<!-- 5 -->\n",
"<g class=\"node\" id=\"node8\"><title>5</title>\n",
"<ellipse cx=\"216.821\" cy=\"-117\" fill=\"none\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"216.821\" cy=\"-117\" fill=\"#88ddff\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<ellipse cx=\"216.821\" cy=\"-117\" fill=\"none\" rx=\"22\" ry=\"22\" stroke=\"black\"/>\n",
"<text font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"216.821\" y=\"-113.3\">5</text>\n",
"</g>\n",
@ -831,11 +833,19 @@
"</svg>"
],
"text": [
"<IPython.core.display.SVG at 0x7f798e982eb8>"
"<IPython.core.display.SVG at 0x7fd81c2fa7b8>"
]
}
],
"prompt_number": 12
"prompt_number": 10
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}