* 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.
1379 lines
88 KiB
Text
1379 lines
88 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import spot\n",
|
|
"import spot.ltsmin\n",
|
|
"# The following line causes the notebook to exit with 77 if spins is not \n",
|
|
"# installed, therefore skipping this test in the test suite.\n",
|
|
"spot.ltsmin.require('spins')\n",
|
|
"spot.setup()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"There are two ways to load a Promela model: from a file or from a cell. \n",
|
|
"\n",
|
|
"Loading from a cell\n",
|
|
"-------------------\n",
|
|
"\n",
|
|
"Using the `%%pml` magic will save the model in a temporary file, call `spins` to compile it, load the resulting shared library, and store the result into an object whose name is passed as an argument to `%%pml`."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stderr",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"SpinS Promela Compiler - version 1.1 (3-Feb-2015)\n",
|
|
"(C) University of Twente, Formal Methods and Tools group\n",
|
|
"\n",
|
|
"Parsing tmps8i1kbv6.pml...\n",
|
|
"Parsing tmps8i1kbv6.pml done (0.0 sec)\n",
|
|
"\n",
|
|
"Optimizing graphs...\n",
|
|
" StateMerging changed 0 states/transitions.\n",
|
|
" RemoveUselessActions changed 2 states/transitions.\n",
|
|
" RemoveUselessGotos changed 2 states/transitions.\n",
|
|
" RenumberAll changed 1 states/transitions.\n",
|
|
"Optimization done (0.0 sec)\n",
|
|
"\n",
|
|
"Generating next-state function ...\n",
|
|
" Instantiating processes\n",
|
|
" Statically binding references\n",
|
|
" Creating transitions\n",
|
|
"Generating next-state function done (0.0 sec)\n",
|
|
"\n",
|
|
"Creating state vector\n",
|
|
"Creating state labels\n",
|
|
"Generating transitions/state dependency matrices (2 / 3 slots) ... \n",
|
|
"\n",
|
|
" [.......... ]\n",
|
|
" [.................... ]\n",
|
|
" [.............................. ]\n",
|
|
" [........................................ ]\n",
|
|
" [..................................................]\n",
|
|
" Found 5 / 15 ( 33.3%) Guard/slot reads \n",
|
|
"\n",
|
|
" [......................... ]\n",
|
|
" [..................................................]\n",
|
|
" Found 6 / 6 (100.0%) Transition/slot tests \n",
|
|
"\n",
|
|
" [........ ]\n",
|
|
" [................ ]\n",
|
|
" [......................... ]\n",
|
|
" [................................. ]\n",
|
|
" [......................................... ]\n",
|
|
" [..................................................]\n",
|
|
" Found 2, 4, 4 / 18 ( 11.1%, 22.2%, 22.2%) Actions/slot r,W,w \n",
|
|
"\n",
|
|
" [......................... ]\n",
|
|
" [..................................................]\n",
|
|
" Found 2, 4, 4 / 6 ( 33.3%, 66.7%, 66.7%) Atomics/slot r,W,w \n",
|
|
"\n",
|
|
" [......................... ]\n",
|
|
" [..................................................]\n",
|
|
" Found 6, 4, 4 / 6 (100.0%, 66.7%, 66.7%) Transition/slot r,W,w \n",
|
|
"Generating transition/state dependency matrices done (0.0 sec)\n",
|
|
"\n",
|
|
"Generating guard dependency matrices (5 guards) ...\n",
|
|
"\n",
|
|
" [.... ]\n",
|
|
" [........ ]\n",
|
|
" [............ ]\n",
|
|
" [................ ]\n",
|
|
" [.................... ]\n",
|
|
" [......................... ]\n",
|
|
" [............................. ]\n",
|
|
" [................................. ]\n",
|
|
" [..................................... ]\n",
|
|
" [......................................... ]\n",
|
|
" Found 3 / 12 ( 25.0%) Guard/guard dependencies \n",
|
|
"\n",
|
|
" [..... ]\n",
|
|
" [.......... ]\n",
|
|
" [............... ]\n",
|
|
" [.................... ]\n",
|
|
" [......................... ]\n",
|
|
" [.............................. ]\n",
|
|
" [................................... ]\n",
|
|
" [........................................ ]\n",
|
|
" [............................................. ]\n",
|
|
" [..................................................]\n",
|
|
" Found 8 / 10 ( 80.0%) Transition/guard writes \n",
|
|
"\n",
|
|
" Found 4 / 4 (100.0%) Transition/transition writes \n",
|
|
"\n",
|
|
" [.... ]\n",
|
|
" [........ ]\n",
|
|
" [............ ]\n",
|
|
" [................ ]\n",
|
|
" [.................... ]\n",
|
|
" [......................... ]\n",
|
|
" [............................. ]\n",
|
|
" [................................. ]\n",
|
|
" [..................................... ]\n",
|
|
" [......................................... ]\n",
|
|
" Found 2 / 12 ( 16.7%) !MCE guards \n",
|
|
"\n",
|
|
" [......................... ]\n",
|
|
" Found 1 / 2 ( 50.0%) !MCE transitions \n",
|
|
"\n",
|
|
" [.. ]\n",
|
|
" [.... ]\n",
|
|
" [...... ]\n",
|
|
" [........ ]\n",
|
|
" [.......... ]\n",
|
|
" [............ ]\n",
|
|
" [.............. ]\n",
|
|
" [................ ]\n",
|
|
" [.................. ]\n",
|
|
" [.................... ]\n",
|
|
" [...................... ]\n",
|
|
" [........................ ]\n",
|
|
" [.......................... ]\n",
|
|
" [............................ ]\n",
|
|
" [.............................. ]\n",
|
|
" [................................ ]\n",
|
|
" [.................................. ]\n",
|
|
" [.................................... ]\n",
|
|
" [...................................... ]\n",
|
|
" [........................................ ]\n",
|
|
" [.......................................... ]\n",
|
|
" [............................................ ]\n",
|
|
" [.............................................. ]\n",
|
|
" [................................................ ]\n",
|
|
" [..................................................]\n",
|
|
" Found 7 / 25 ( 28.0%) !ICE guards \n",
|
|
"\n",
|
|
" [..... ]\n",
|
|
" [.......... ]\n",
|
|
" [............... ]\n",
|
|
" [.................... ]\n",
|
|
" [......................... ]\n",
|
|
" [.............................. ]\n",
|
|
" [................................... ]\n",
|
|
" [........................................ ]\n",
|
|
" [............................................. ]\n",
|
|
" [..................................................]\n",
|
|
" Found 10 / 10 (100.0%) !NES guards \n",
|
|
"\n",
|
|
" [............ ]\n",
|
|
" [......................... ]\n",
|
|
" [..................................... ]\n",
|
|
" [..................................................]\n",
|
|
" Found 4 / 4 (100.0%) !NES transitions \n",
|
|
"\n",
|
|
" [..... ]\n",
|
|
" [.......... ]\n",
|
|
" [............... ]\n",
|
|
" [.................... ]\n",
|
|
" [......................... ]\n",
|
|
" [.............................. ]\n",
|
|
" [................................... ]\n",
|
|
" [........................................ ]\n",
|
|
" [............................................. ]\n",
|
|
" [..................................................]\n",
|
|
" Found 8 / 10 ( 80.0%) !NDS guards \n",
|
|
"\n",
|
|
" [..... ]\n",
|
|
" [.......... ]\n",
|
|
" [............... ]\n",
|
|
" [.................... ]\n",
|
|
" [......................... ]\n",
|
|
" [.............................. ]\n",
|
|
" [................................... ]\n",
|
|
" [........................................ ]\n",
|
|
" [............................................. ]\n",
|
|
" [..................................................]\n",
|
|
" Found 0 / 10 ( 0.0%) MDS guards \n",
|
|
"\n",
|
|
" [..... ]\n",
|
|
" [.......... ]\n",
|
|
" [............... ]\n",
|
|
" [.................... ]\n",
|
|
" [......................... ]\n",
|
|
" [.............................. ]\n",
|
|
" [................................... ]\n",
|
|
" [........................................ ]\n",
|
|
" [............................................. ]\n",
|
|
" [..................................................]\n",
|
|
" Found 4 / 10 ( 40.0%) MES guards \n",
|
|
"\n",
|
|
" [............ ]\n",
|
|
" [......................... ]\n",
|
|
" [..................................... ]\n",
|
|
" [..................................................]\n",
|
|
" Found 0 / 4 ( 0.0%) !NDS transitions \n",
|
|
"\n",
|
|
" [......................... ]\n",
|
|
" Found 0 / 2 ( 0.0%) !DNA transitions \n",
|
|
"\n",
|
|
" [......................... ]\n",
|
|
" [..................................................]\n",
|
|
" [..................................................]\n",
|
|
" Found 2 / 2 (100.0%) Commuting actions \n",
|
|
"Generating guard dependency matrices done (0.0 sec)\n",
|
|
"\n",
|
|
"Written C code to /home/adl/git/spot/tests/python/tmps8i1kbv6.pml.spins.c\n",
|
|
"Compiled C code to PINS library tmps8i1kbv6.pml.spins\n",
|
|
"\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%pml model\n",
|
|
"active proctype P() {\n",
|
|
"int a = 0;\n",
|
|
"int b = 0;\n",
|
|
"x: if\n",
|
|
" :: d_step {a < 3 && b < 3; a = a + 1; } goto x;\n",
|
|
" :: d_step {a < 3 && b < 3; b = b + 1; } goto x;\n",
|
|
"fi;\n",
|
|
"}"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Yes, the `spins` compiler is quite verbose. Printing the resulting `model` object will show information about the variables in that model. "
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 3,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"ltsmin model with the following variables:\n",
|
|
" P_0._pc: pc\n",
|
|
" P_0.a: int\n",
|
|
" P_0.b: int"
|
|
]
|
|
},
|
|
"execution_count": 3,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"model"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"To instantiate a Kripke structure, one should provide a list of atomic proposition to observe."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 4,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
|
|
" -->\n",
|
|
"<!-- Pages: 1 -->\n",
|
|
"<svg width=\"734pt\" height=\"120pt\"\n",
|
|
" viewBox=\"0.00 0.00 734.00 119.62\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(.3401 .3401) rotate(0) translate(4 347.7401)\">\n",
|
|
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-347.7401 2154.2299,-347.7401 2154.2299,4 -4,4\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"1072.115\" y=\"-328.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">t</text>\n",
|
|
"<text text-anchor=\"start\" x=\"1064.115\" y=\"-313.5401\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">[all]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g id=\"node2\" class=\"node\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"197.5132\" cy=\"-152.8701\" rx=\"160.5265\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"108.0132\" y=\"-156.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=0, P_0.b=0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"92.0132\" y=\"-141.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g id=\"edge1\" class=\"edge\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1.0652,-152.8701C3.5704,-152.8701 14.2226,-152.8701 29.3716,-152.8701\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"36.6353,-152.8701 29.6353,-156.0202 33.1353,-152.8701 29.6353,-152.8702 29.6353,-152.8702 29.6353,-152.8702 33.1353,-152.8701 29.6352,-149.7202 36.6353,-152.8701 36.6353,-152.8701\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g id=\"node3\" class=\"node\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"554.5397\" cy=\"-188.8701\" rx=\"160.5265\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"465.0397\" y=\"-192.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=1, P_0.b=0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"449.0397\" y=\"-177.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g id=\"edge2\" class=\"edge\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M335.0383,-166.7371C359.4429,-169.1979 384.928,-171.7676 409.5322,-174.2485\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"416.7908,-174.9804 409.51,-177.4122 413.3084,-174.6293 409.8261,-174.2781 409.8261,-174.2781 409.8261,-174.2781 413.3084,-174.6293 410.1421,-171.144 416.7908,-174.9804 416.7908,-174.9804\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g id=\"node4\" class=\"node\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"554.5397\" cy=\"-116.8701\" rx=\"160.5265\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"465.0397\" y=\"-120.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=0, P_0.b=1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"449.0397\" y=\"-105.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g id=\"edge3\" class=\"edge\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M335.0383,-139.003C359.4429,-136.5422 384.928,-133.9725 409.5322,-131.4916\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"416.7908,-130.7597 410.1421,-134.5961 413.3084,-131.1109 409.8261,-131.462 409.8261,-131.462 409.8261,-131.462 413.3084,-131.1109 409.51,-128.3279 416.7908,-130.7597 416.7908,-130.7597\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g id=\"node5\" class=\"node\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"914.3946\" cy=\"-224.8701\" rx=\"163.1835\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"824.8946\" y=\"-228.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=2, P_0.b=0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"806.8946\" y=\"-213.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g id=\"edge4\" class=\"edge\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M692.3828,-202.6599C717.0352,-205.1262 742.8043,-207.7041 767.6945,-210.1941\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"774.6899,-210.894 767.4111,-213.3314 771.2073,-210.5455 767.7247,-210.1971 767.7247,-210.1971 767.7247,-210.1971 771.2073,-210.5455 768.0383,-207.0627 774.6899,-210.894 774.6899,-210.894\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g id=\"node6\" class=\"node\">\n",
|
|
"<title>4</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"914.3946\" cy=\"-152.8701\" rx=\"160.5265\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"824.8946\" y=\"-156.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=1, P_0.b=1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"808.8946\" y=\"-141.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g id=\"edge5\" class=\"edge\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M692.3828,-175.0802C717.579,-172.5596 743.9417,-169.9222 769.3404,-167.3813\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"776.4768,-166.6674 769.8251,-170.4987 772.9941,-167.0159 769.5115,-167.3643 769.5115,-167.3643 769.5115,-167.3643 772.9941,-167.0159 769.1979,-164.2299 776.4768,-166.6674 776.4768,-166.6674\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g id=\"edge6\" class=\"edge\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M692.3828,-130.6599C717.579,-133.1806 743.9417,-135.8179 769.3404,-138.3588\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"776.4768,-139.0727 769.1979,-141.5102 772.9941,-138.7243 769.5115,-138.3758 769.5115,-138.3758 769.5115,-138.3758 772.9941,-138.7243 769.8251,-135.2415 776.4768,-139.0727 776.4768,-139.0727\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 5 -->\n",
|
|
"<g id=\"node7\" class=\"node\">\n",
|
|
"<title>5</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"914.3946\" cy=\"-80.8701\" rx=\"158.2839\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"824.8946\" y=\"-84.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=0, P_0.b=2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"810.3946\" y=\"-69.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">"P_0.a < 2" & "P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->5 -->\n",
|
|
"<g id=\"edge7\" class=\"edge\">\n",
|
|
"<title>2->5</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M692.3828,-103.0802C717.9415,-100.5233 744.7006,-97.8463 770.4361,-95.2717\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"777.6659,-94.5484 771.0142,-98.3797 774.1832,-94.8969 770.7006,-95.2453 770.7006,-95.2453 770.7006,-95.2453 774.1832,-94.8969 770.387,-92.111 777.6659,-94.5484 777.6659,-94.5484\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 6 -->\n",
|
|
"<g id=\"node8\" class=\"node\">\n",
|
|
"<title>6</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"1277.078\" cy=\"-260.8701\" rx=\"160.5265\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"1187.578\" y=\"-264.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=3, P_0.b=0</text>\n",
|
|
"<text text-anchor=\"start\" x=\"1171.578\" y=\"-249.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!"P_0.a < 2" & !"P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->6 -->\n",
|
|
"<g id=\"edge8\" class=\"edge\">\n",
|
|
"<title>3->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1054.358,-238.7628C1079.6981,-241.2781 1106.1768,-243.9064 1131.6687,-246.4367\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1138.8307,-247.1476 1131.5538,-249.5907 1135.3479,-246.8019 1131.865,-246.4561 1131.865,-246.4561 1131.865,-246.4561 1135.3479,-246.8019 1132.1762,-243.3215 1138.8307,-247.1476 1138.8307,-247.1476\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 7 -->\n",
|
|
"<g id=\"node9\" class=\"node\">\n",
|
|
"<title>7</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"1277.078\" cy=\"-188.8701\" rx=\"163.1835\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"1187.578\" y=\"-192.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=2, P_0.b=1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"1169.578\" y=\"-177.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->7 -->\n",
|
|
"<g id=\"edge9\" class=\"edge\">\n",
|
|
"<title>3->7</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1054.358,-210.9773C1079.1512,-208.5163 1105.0344,-205.9471 1130.0168,-203.4674\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1137.0375,-202.7705 1130.3829,-206.5966 1133.5546,-203.1162 1130.0718,-203.462 1130.0718,-203.462 1130.0718,-203.462 1133.5546,-203.1162 1129.7606,-200.3274 1137.0375,-202.7705 1137.0375,-202.7705\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 4->7 -->\n",
|
|
"<g id=\"edge10\" class=\"edge\">\n",
|
|
"<title>4->7</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1052.5443,-166.5828C1077.8871,-169.0983 1104.4249,-171.7325 1130.0173,-174.2728\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1137.2088,-174.9866 1129.9318,-177.4297 1133.7259,-174.6409 1130.243,-174.2951 1130.243,-174.2951 1130.243,-174.2951 1133.7259,-174.6409 1130.5542,-171.1605 1137.2088,-174.9866 1137.2088,-174.9866\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 8 -->\n",
|
|
"<g id=\"node10\" class=\"node\">\n",
|
|
"<title>8</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"1277.078\" cy=\"-116.8701\" rx=\"158.2839\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"1187.578\" y=\"-120.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=1, P_0.b=2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"1173.078\" y=\"-105.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">"P_0.a < 2" & "P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->8 -->\n",
|
|
"<g id=\"edge11\" class=\"edge\">\n",
|
|
"<title>4->8</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1052.5443,-139.1573C1078.9142,-136.5398 1106.5779,-133.7939 1133.1241,-131.1589\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1140.2123,-130.4554 1133.5577,-134.2815 1136.7294,-130.8011 1133.2465,-131.1469 1133.2465,-131.1469 1133.2465,-131.1469 1136.7294,-130.8011 1132.9354,-128.0123 1140.2123,-130.4554 1140.2123,-130.4554\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 5->8 -->\n",
|
|
"<g id=\"edge12\" class=\"edge\">\n",
|
|
"<title>5->8</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1051.2512,-94.4545C1077.9653,-97.1061 1106.0521,-99.894 1132.9925,-102.5681\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1140.1856,-103.2821 1132.9086,-105.7252 1136.7027,-102.9363 1133.2198,-102.5906 1133.2198,-102.5906 1133.2198,-102.5906 1136.7027,-102.9363 1133.531,-99.456 1140.1856,-103.2821 1140.1856,-103.2821\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 9 -->\n",
|
|
"<g id=\"node11\" class=\"node\">\n",
|
|
"<title>9</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"1277.078\" cy=\"-26.8701\" rx=\"155.627\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"1187.578\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=0, P_0.b=3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"1175.078\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">"P_0.a < 2" & "P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->9 -->\n",
|
|
"<g id=\"edge13\" class=\"edge\">\n",
|
|
"<title>5->9</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1033.653,-63.1136C1071.554,-57.4706 1113.5698,-51.2148 1151.8774,-45.5112\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1158.9853,-44.4529 1152.5256,-48.5995 1155.5235,-44.9684 1152.0617,-45.4838 1152.0617,-45.4838 1152.0617,-45.4838 1155.5235,-44.9684 1151.5977,-42.3682 1158.9853,-44.4529 1158.9853,-44.4529\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 6->6 -->\n",
|
|
"<g id=\"edge14\" class=\"edge\">\n",
|
|
"<title>6->6</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1210.756,-285.7868C1205.3261,-296.5364 1227.4334,-305.7401 1277.078,-305.7401 1315.0871,-305.7401 1336.9543,-300.3451 1342.6798,-292.9918\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1343.3999,-285.7868 1345.8381,-293.0654 1343.0518,-289.2694 1342.7037,-292.7521 1342.7037,-292.7521 1342.7037,-292.7521 1343.0518,-289.2694 1339.5693,-292.4388 1343.3999,-285.7868 1343.3999,-285.7868\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 10 -->\n",
|
|
"<g id=\"node12\" class=\"node\">\n",
|
|
"<title>10</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"1636.9329\" cy=\"-224.8701\" rx=\"160.5265\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"1547.4329\" y=\"-228.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=3, P_0.b=1</text>\n",
|
|
"<text text-anchor=\"start\" x=\"1531.4329\" y=\"-213.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!"P_0.a < 2" & !"P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 7->10 -->\n",
|
|
"<g id=\"edge15\" class=\"edge\">\n",
|
|
"<title>7->10</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1416.7223,-202.8401C1441.4626,-205.3151 1467.2739,-207.8973 1492.1524,-210.3862\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1499.143,-211.0855 1491.8642,-213.523 1495.6604,-210.7371 1492.1778,-210.3886 1492.1778,-210.3886 1492.1778,-210.3886 1495.6604,-210.7371 1492.4914,-207.2543 1499.143,-211.0855 1499.143,-211.0855\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 11 -->\n",
|
|
"<g id=\"node13\" class=\"node\">\n",
|
|
"<title>11</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"1636.9329\" cy=\"-152.8701\" rx=\"160.5265\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"1547.4329\" y=\"-156.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=2, P_0.b=2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"1531.4329\" y=\"-141.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!"P_0.a < 2" & "P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 7->11 -->\n",
|
|
"<g id=\"edge16\" class=\"edge\">\n",
|
|
"<title>7->11</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1416.7223,-174.9C1441.4626,-172.425 1467.2739,-169.8428 1492.1524,-167.3539\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1499.143,-166.6546 1492.4914,-170.4858 1495.6604,-167.003 1492.1778,-167.3515 1492.1778,-167.3515 1492.1778,-167.3515 1495.6604,-167.003 1491.8642,-164.2171 1499.143,-166.6546 1499.143,-166.6546\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 8->11 -->\n",
|
|
"<g id=\"edge17\" class=\"edge\">\n",
|
|
"<title>8->11</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1413.6368,-130.5314C1439.1715,-133.0859 1465.9454,-135.7644 1491.7303,-138.3439\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1498.9748,-139.0687 1491.696,-141.5062 1495.4922,-138.7202 1492.0096,-138.3718 1492.0096,-138.3718 1492.0096,-138.3718 1495.4922,-138.7202 1492.3232,-135.2374 1498.9748,-139.0687 1498.9748,-139.0687\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 12 -->\n",
|
|
"<g id=\"node14\" class=\"node\">\n",
|
|
"<title>12</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"1636.9329\" cy=\"-62.8701\" rx=\"155.627\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"1547.4329\" y=\"-66.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=1, P_0.b=3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"1534.9329\" y=\"-51.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">"P_0.a < 2" & "P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 8->12 -->\n",
|
|
"<g id=\"edge18\" class=\"edge\">\n",
|
|
"<title>8->12</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1395.9052,-99.0388C1433.2942,-93.4282 1474.6775,-87.2182 1512.4482,-81.5503\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1519.457,-80.4985 1513.002,-84.6525 1515.9957,-81.018 1512.5345,-81.5374 1512.5345,-81.5374 1512.5345,-81.5374 1515.9957,-81.018 1512.067,-78.4223 1519.457,-80.4985 1519.457,-80.4985\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 9->9 -->\n",
|
|
"<g id=\"edge19\" class=\"edge\">\n",
|
|
"<title>9->9</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1211.0018,-51.3317C1204.7088,-62.2753 1226.7342,-71.7401 1277.078,-71.7401 1315.6224,-71.7401 1337.5671,-66.192 1342.9122,-58.6799\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1343.1541,-51.3317 1346.0719,-58.4316 1343.0389,-54.8298 1342.9237,-58.3279 1342.9237,-58.3279 1342.9237,-58.3279 1343.0389,-54.8298 1339.7754,-58.2242 1343.1541,-51.3317 1343.1541,-51.3317\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 10->10 -->\n",
|
|
"<g id=\"edge20\" class=\"edge\">\n",
|
|
"<title>10->10</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1571.3519,-249.7868C1565.9827,-260.5364 1587.843,-269.7401 1636.9329,-269.7401 1674.5173,-269.7401 1696.1402,-264.3451 1701.8018,-256.9918\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1702.5138,-249.7868 1704.96,-257.0627 1702.1696,-253.2698 1701.8253,-256.7529 1701.8253,-256.7529 1701.8253,-256.7529 1702.1696,-253.2698 1698.6906,-256.443 1702.5138,-249.7868 1702.5138,-249.7868\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 13 -->\n",
|
|
"<g id=\"node15\" class=\"node\">\n",
|
|
"<title>13</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"1991.838\" cy=\"-197.8701\" rx=\"158.2839\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"1902.338\" y=\"-201.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=3, P_0.b=2</text>\n",
|
|
"<text text-anchor=\"start\" x=\"1887.838\" y=\"-186.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!"P_0.a < 2" & "P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 11->13 -->\n",
|
|
"<g id=\"edge21\" class=\"edge\">\n",
|
|
"<title>11->13</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1765.0618,-169.1161C1795.1155,-172.9267 1827.2197,-176.9974 1857.5352,-180.8412\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1864.7898,-181.7611 1857.4491,-184.0054 1861.3176,-181.3208 1857.8454,-180.8805 1857.8454,-180.8805 1857.8454,-180.8805 1861.3176,-181.3208 1858.2417,-177.7555 1864.7898,-181.7611 1864.7898,-181.7611\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 14 -->\n",
|
|
"<g id=\"node16\" class=\"node\">\n",
|
|
"<title>14</title>\n",
|
|
"<ellipse fill=\"#ffffaa\" stroke=\"#000000\" cx=\"1991.838\" cy=\"-107.8701\" rx=\"158.2839\" ry=\"26.7407\"/>\n",
|
|
"<text text-anchor=\"start\" x=\"1902.338\" y=\"-111.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">P_0._pc=0, P_0.a=2, P_0.b=3</text>\n",
|
|
"<text text-anchor=\"start\" x=\"1887.838\" y=\"-96.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#000000\">!"P_0.a < 2" & "P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 11->14 -->\n",
|
|
"<g id=\"edge22\" class=\"edge\">\n",
|
|
"<title>11->14</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1765.0618,-136.624C1795.1155,-132.8134 1827.2197,-128.7427 1857.5352,-124.8989\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1864.7898,-123.9791 1858.2417,-127.9846 1861.3176,-124.4194 1857.8454,-124.8597 1857.8454,-124.8597 1857.8454,-124.8597 1861.3176,-124.4194 1857.4491,-121.7347 1864.7898,-123.9791 1864.7898,-123.9791\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 12->12 -->\n",
|
|
"<g id=\"edge23\" class=\"edge\">\n",
|
|
"<title>12->12</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1571.595,-87.3317C1565.3723,-98.2753 1587.1516,-107.7401 1636.9329,-107.7401 1675.0466,-107.7401 1696.7462,-102.192 1702.0315,-94.6799\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1702.2708,-87.3317 1705.1912,-94.4305 1702.1568,-90.8298 1702.0428,-94.328 1702.0428,-94.328 1702.0428,-94.328 1702.1568,-90.8298 1698.8945,-94.2254 1702.2708,-87.3317 1702.2708,-87.3317\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 13->13 -->\n",
|
|
"<g id=\"edge24\" class=\"edge\">\n",
|
|
"<title>13->13</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1926.2571,-222.7868C1920.8879,-233.5364 1942.7482,-242.7401 1991.838,-242.7401 2029.4224,-242.7401 2051.0454,-237.3451 2056.7069,-229.9918\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"2057.419,-222.7868 2059.8652,-230.0627 2057.0747,-226.2698 2056.7304,-229.7529 2056.7304,-229.7529 2056.7304,-229.7529 2057.0747,-226.2698 2053.5957,-229.443 2057.419,-222.7868 2057.419,-222.7868\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 14->14 -->\n",
|
|
"<g id=\"edge25\" class=\"edge\">\n",
|
|
"<title>14->14</title>\n",
|
|
"<path fill=\"none\" stroke=\"#000000\" d=\"M1926.2571,-132.7868C1920.8879,-143.5364 1942.7482,-152.7401 1991.838,-152.7401 2029.4224,-152.7401 2051.0454,-147.3451 2056.7069,-139.9918\"/>\n",
|
|
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"2057.419,-132.7868 2059.8652,-140.0627 2057.0747,-136.2698 2056.7304,-139.7529 2056.7304,-139.7529 2056.7304,-139.7529 2057.0747,-136.2698 2053.5957,-139.443 2057.419,-132.7868 2057.419,-132.7868\"/>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>\n"
|
|
],
|
|
"text/plain": [
|
|
"<spot.impl.kripke; proxy of <Swig Object of type 'std::shared_ptr< spot::kripke > *' at 0x7f44743b5ae0> >"
|
|
]
|
|
},
|
|
"execution_count": 4,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"k = model.kripke(['P_0.a < 2', 'P_0.b > 1']); k"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"And then from this Kripke structure you can do some model checking using the same functions as illustrated in `ltsmin-dve.ipynb`."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"For displaying Kripke structures more compactly, it can be useful to use option `1` to move all state labels in tooltips (mouse over the state to see them):"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"280pt\" viewBox=\"0.00 0.00 454.79 280.00\" width=\"455pt\" 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",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-276 450.7924,-276 450.7924,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"220.3962\" y=\"-256.8\">t</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"212.3962\" y=\"-241.8\">[all]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<g id=\"a_node2\"><a xlink:title=\"P_0._pc=0, P_0.a=0, P_0.b=0\n",
|
|
""P_0.a < 2" & !"P_0.b > 1" & !dead\">\n",
|
|
"<ellipse cx=\"55\" cy=\"-117\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"55\" y=\"-113.3\">0</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1121,-117C4.0448,-117 17.0329,-117 29.5224,-117\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"36.7386,-117 29.7386,-120.1501 33.2386,-117 29.7386,-117.0001 29.7386,-117.0001 29.7386,-117.0001 33.2386,-117 29.7386,-113.8501 36.7386,-117 36.7386,-117\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>1</title>\n",
|
|
"<g id=\"a_node3\"><a xlink:title=\"P_0._pc=0, P_0.a=1, P_0.b=0\n",
|
|
""P_0.a < 2" & !"P_0.b > 1" & !dead\">\n",
|
|
"<ellipse cx=\"127\" cy=\"-144\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"127\" y=\"-140.3\">1</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path d=\"M72.063,-123.3986C81.3884,-126.8956 93.0837,-131.2814 103.284,-135.1065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"110.0595,-137.6473 102.3991,-138.1388 106.7823,-136.4183 103.5052,-135.1894 103.5052,-135.1894 103.5052,-135.1894 106.7823,-136.4183 104.6112,-132.2399 110.0595,-137.6473 110.0595,-137.6473\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>2</title>\n",
|
|
"<g id=\"a_node4\"><a xlink:title=\"P_0._pc=0, P_0.a=0, P_0.b=1\n",
|
|
""P_0.a < 2" & !"P_0.b > 1" & !dead\">\n",
|
|
"<ellipse cx=\"127\" cy=\"-90\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"127\" y=\"-86.3\">2</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M72.063,-110.6014C81.3884,-107.1044 93.0837,-102.7186 103.284,-98.8935\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"110.0595,-96.3527 104.6112,-101.7601 106.7823,-97.5817 103.5052,-98.8106 103.5052,-98.8106 103.5052,-98.8106 106.7823,-97.5817 102.3991,-95.8612 110.0595,-96.3527 110.0595,-96.3527\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>3</title>\n",
|
|
"<g id=\"a_node5\"><a xlink:title=\"P_0._pc=0, P_0.a=2, P_0.b=0\n",
|
|
"!"P_0.a < 2" & !"P_0.b > 1" & !dead\">\n",
|
|
"<ellipse cx=\"199\" cy=\"-171\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"199\" y=\"-167.3\">3</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path d=\"M144.063,-150.3986C153.3884,-153.8956 165.0837,-158.2814 175.284,-162.1065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"182.0595,-164.6473 174.3991,-165.1388 178.7823,-163.4183 175.5052,-162.1894 175.5052,-162.1894 175.5052,-162.1894 178.7823,-163.4183 176.6112,-159.2399 182.0595,-164.6473 182.0595,-164.6473\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g class=\"node\" id=\"node6\">\n",
|
|
"<title>4</title>\n",
|
|
"<g id=\"a_node6\"><a xlink:title=\"P_0._pc=0, P_0.a=1, P_0.b=1\n",
|
|
""P_0.a < 2" & !"P_0.b > 1" & !dead\">\n",
|
|
"<ellipse cx=\"199\" cy=\"-117\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"199\" y=\"-113.3\">4</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path d=\"M144.063,-137.6014C153.3884,-134.1044 165.0837,-129.7186 175.284,-125.8935\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"182.0595,-123.3527 176.6112,-128.7601 178.7823,-124.5817 175.5052,-125.8106 175.5052,-125.8106 175.5052,-125.8106 178.7823,-124.5817 174.3991,-122.8612 182.0595,-123.3527 182.0595,-123.3527\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path d=\"M144.063,-96.3986C153.3884,-99.8956 165.0837,-104.2814 175.284,-108.1065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"182.0595,-110.6473 174.3991,-111.1388 178.7823,-109.4183 175.5052,-108.1894 175.5052,-108.1894 175.5052,-108.1894 178.7823,-109.4183 176.6112,-105.2399 182.0595,-110.6473 182.0595,-110.6473\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 5 -->\n",
|
|
"<g class=\"node\" id=\"node7\">\n",
|
|
"<title>5</title>\n",
|
|
"<g id=\"a_node7\"><a xlink:title=\"P_0._pc=0, P_0.a=0, P_0.b=2\n",
|
|
""P_0.a < 2" & "P_0.b > 1" & !dead\">\n",
|
|
"<ellipse cx=\"199\" cy=\"-63\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"199\" y=\"-59.3\">5</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 2->5 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>2->5</title>\n",
|
|
"<path d=\"M144.063,-83.6014C153.3884,-80.1044 165.0837,-75.7186 175.284,-71.8935\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"182.0595,-69.3527 176.6112,-74.7601 178.7823,-70.5817 175.5052,-71.8106 175.5052,-71.8106 175.5052,-71.8106 178.7823,-70.5817 174.3991,-68.8612 182.0595,-69.3527 182.0595,-69.3527\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 6 -->\n",
|
|
"<g class=\"node\" id=\"node8\">\n",
|
|
"<title>6</title>\n",
|
|
"<g id=\"a_node8\"><a xlink:title=\"P_0._pc=0, P_0.a=3, P_0.b=0\n",
|
|
"!"P_0.a < 2" & !"P_0.b > 1" & dead\">\n",
|
|
"<ellipse cx=\"271\" cy=\"-198\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"271\" y=\"-194.3\">6</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 3->6 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->6</title>\n",
|
|
"<path d=\"M216.063,-177.3986C225.3884,-180.8956 237.0837,-185.2814 247.284,-189.1065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"254.0595,-191.6473 246.3991,-192.1388 250.7823,-190.4183 247.5052,-189.1894 247.5052,-189.1894 247.5052,-189.1894 250.7823,-190.4183 248.6112,-186.2399 254.0595,-191.6473 254.0595,-191.6473\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 7 -->\n",
|
|
"<g class=\"node\" id=\"node9\">\n",
|
|
"<title>7</title>\n",
|
|
"<g id=\"a_node9\"><a xlink:title=\"P_0._pc=0, P_0.a=2, P_0.b=1\n",
|
|
"!"P_0.a < 2" & !"P_0.b > 1" & !dead\">\n",
|
|
"<ellipse cx=\"271\" cy=\"-144\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"271\" y=\"-140.3\">7</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 3->7 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\">\n",
|
|
"<title>3->7</title>\n",
|
|
"<path d=\"M216.063,-164.6014C225.3884,-161.1044 237.0837,-156.7186 247.284,-152.8935\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"254.0595,-150.3527 248.6112,-155.7601 250.7823,-151.5817 247.5052,-152.8106 247.5052,-152.8106 247.5052,-152.8106 250.7823,-151.5817 246.3991,-149.8612 254.0595,-150.3527 254.0595,-150.3527\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 4->7 -->\n",
|
|
"<g class=\"edge\" id=\"edge10\">\n",
|
|
"<title>4->7</title>\n",
|
|
"<path d=\"M216.063,-123.3986C225.3884,-126.8956 237.0837,-131.2814 247.284,-135.1065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"254.0595,-137.6473 246.3991,-138.1388 250.7823,-136.4183 247.5052,-135.1894 247.5052,-135.1894 247.5052,-135.1894 250.7823,-136.4183 248.6112,-132.2399 254.0595,-137.6473 254.0595,-137.6473\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 8 -->\n",
|
|
"<g class=\"node\" id=\"node10\">\n",
|
|
"<title>8</title>\n",
|
|
"<g id=\"a_node10\"><a xlink:title=\"P_0._pc=0, P_0.a=1, P_0.b=2\n",
|
|
""P_0.a < 2" & "P_0.b > 1" & !dead\">\n",
|
|
"<ellipse cx=\"271\" cy=\"-90\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"271\" y=\"-86.3\">8</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 4->8 -->\n",
|
|
"<g class=\"edge\" id=\"edge11\">\n",
|
|
"<title>4->8</title>\n",
|
|
"<path d=\"M216.063,-110.6014C225.3884,-107.1044 237.0837,-102.7186 247.284,-98.8935\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"254.0595,-96.3527 248.6112,-101.7601 250.7823,-97.5817 247.5052,-98.8106 247.5052,-98.8106 247.5052,-98.8106 250.7823,-97.5817 246.3991,-95.8612 254.0595,-96.3527 254.0595,-96.3527\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 5->8 -->\n",
|
|
"<g class=\"edge\" id=\"edge12\">\n",
|
|
"<title>5->8</title>\n",
|
|
"<path d=\"M216.063,-69.3986C225.3884,-72.8956 237.0837,-77.2814 247.284,-81.1065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"254.0595,-83.6473 246.3991,-84.1388 250.7823,-82.4183 247.5052,-81.1894 247.5052,-81.1894 247.5052,-81.1894 250.7823,-82.4183 248.6112,-78.2399 254.0595,-83.6473 254.0595,-83.6473\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 9 -->\n",
|
|
"<g class=\"node\" id=\"node11\">\n",
|
|
"<title>9</title>\n",
|
|
"<g id=\"a_node11\"><a xlink:title=\"P_0._pc=0, P_0.a=0, P_0.b=3\n",
|
|
""P_0.a < 2" & "P_0.b > 1" & dead\">\n",
|
|
"<ellipse cx=\"271\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"271\" y=\"-14.3\">9</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 5->9 -->\n",
|
|
"<g class=\"edge\" id=\"edge13\">\n",
|
|
"<title>5->9</title>\n",
|
|
"<path d=\"M214.2693,-53.4567C224.4395,-47.1003 237.9581,-38.6512 249.2477,-31.5952\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"255.2549,-27.8407 250.9884,-34.2219 252.2869,-29.6957 249.3189,-31.5507 249.3189,-31.5507 249.3189,-31.5507 252.2869,-29.6957 247.6494,-28.8795 255.2549,-27.8407 255.2549,-27.8407\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 6->6 -->\n",
|
|
"<g class=\"edge\" id=\"edge14\">\n",
|
|
"<title>6->6</title>\n",
|
|
"<path d=\"M259.2435,-212.0417C254.8468,-222.9126 258.7656,-234 271,-234 280.5581,-234 285.0408,-227.2328 284.4481,-219.0885\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"282.7565,-212.0417 287.4535,-218.1131 283.5735,-215.4451 284.3905,-218.8484 284.3905,-218.8484 284.3905,-218.8484 283.5735,-215.4451 281.3275,-219.5837 282.7565,-212.0417 282.7565,-212.0417\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 10 -->\n",
|
|
"<g class=\"node\" id=\"node12\">\n",
|
|
"<title>10</title>\n",
|
|
"<g id=\"a_node12\"><a xlink:title=\"P_0._pc=0, P_0.a=3, P_0.b=1\n",
|
|
"!"P_0.a < 2" & !"P_0.b > 1" & dead\">\n",
|
|
"<ellipse cx=\"346.4481\" cy=\"-178\" fill=\"#ffffaa\" rx=\"21.3963\" ry=\"21.3963\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"346.4481\" y=\"-174.3\">10</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 7->10 -->\n",
|
|
"<g class=\"edge\" id=\"edge15\">\n",
|
|
"<title>7->10</title>\n",
|
|
"<path d=\"M287.7444,-151.5457C297.3075,-155.8552 309.5081,-161.3533 320.3065,-166.2195\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"326.8127,-169.1515 319.1366,-169.1474 323.6218,-167.7135 320.4308,-166.2755 320.4308,-166.2755 320.4308,-166.2755 323.6218,-167.7135 321.725,-163.4036 326.8127,-169.1515 326.8127,-169.1515\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 11 -->\n",
|
|
"<g class=\"node\" id=\"node13\">\n",
|
|
"<title>11</title>\n",
|
|
"<g id=\"a_node13\"><a xlink:title=\"P_0._pc=0, P_0.a=2, P_0.b=2\n",
|
|
"!"P_0.a < 2" & "P_0.b > 1" & !dead\">\n",
|
|
"<ellipse cx=\"346.4481\" cy=\"-117\" fill=\"#ffffaa\" rx=\"21.3963\" ry=\"21.3963\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"346.4481\" y=\"-113.3\">11</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 7->11 -->\n",
|
|
"<g class=\"edge\" id=\"edge16\">\n",
|
|
"<title>7->11</title>\n",
|
|
"<path d=\"M288.1203,-137.8733C297.3932,-134.5549 309.062,-130.3791 319.5215,-126.636\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"326.1829,-124.2521 320.6536,-129.5766 322.8875,-125.4315 319.5922,-126.6108 319.5922,-126.6108 319.5922,-126.6108 322.8875,-125.4315 318.5308,-123.645 326.1829,-124.2521 326.1829,-124.2521\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 8->11 -->\n",
|
|
"<g class=\"edge\" id=\"edge17\">\n",
|
|
"<title>8->11</title>\n",
|
|
"<path d=\"M288.1203,-96.1267C297.3932,-99.4451 309.062,-103.6209 319.5215,-107.364\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"326.1829,-109.7479 318.5308,-110.355 322.8875,-108.5685 319.5922,-107.3892 319.5922,-107.3892 319.5922,-107.3892 322.8875,-108.5685 320.6536,-104.4234 326.1829,-109.7479 326.1829,-109.7479\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 12 -->\n",
|
|
"<g class=\"node\" id=\"node14\">\n",
|
|
"<title>12</title>\n",
|
|
"<g id=\"a_node14\"><a xlink:title=\"P_0._pc=0, P_0.a=1, P_0.b=3\n",
|
|
""P_0.a < 2" & "P_0.b > 1" & dead\">\n",
|
|
"<ellipse cx=\"346.4481\" cy=\"-38\" fill=\"#ffffaa\" rx=\"21.3963\" ry=\"21.3963\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"346.4481\" y=\"-34.3\">12</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 8->12 -->\n",
|
|
"<g class=\"edge\" id=\"edge18\">\n",
|
|
"<title>8->12</title>\n",
|
|
"<path d=\"M285.9061,-79.7265C296.3653,-72.5179 310.5728,-62.7258 322.5961,-54.4391\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"328.653,-50.2646 324.677,-56.8307 325.7712,-52.2509 322.8894,-54.2371 322.8894,-54.2371 322.8894,-54.2371 325.7712,-52.2509 321.1018,-51.6434 328.653,-50.2646 328.653,-50.2646\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 9->9 -->\n",
|
|
"<g class=\"edge\" id=\"edge19\">\n",
|
|
"<title>9->9</title>\n",
|
|
"<path d=\"M259.2435,-32.0417C254.8468,-42.9126 258.7656,-54 271,-54 280.5581,-54 285.0408,-47.2328 284.4481,-39.0885\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"282.7565,-32.0417 287.4535,-38.1131 283.5735,-35.4451 284.3905,-38.8484 284.3905,-38.8484 284.3905,-38.8484 283.5735,-35.4451 281.3275,-39.5837 282.7565,-32.0417 282.7565,-32.0417\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 10->10 -->\n",
|
|
"<g class=\"edge\" id=\"edge20\">\n",
|
|
"<title>10->10</title>\n",
|
|
"<path d=\"M333.6706,-195.4405C330.3374,-206.6551 334.5965,-217.4481 346.4481,-217.4481 355.7071,-217.4481 360.3321,-210.8606 360.3231,-202.631\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"359.2256,-195.4405 363.3958,-201.885 359.7537,-198.9004 360.2819,-202.3603 360.2819,-202.3603 360.2819,-202.3603 359.7537,-198.9004 357.1679,-202.8357 359.2256,-195.4405 359.2256,-195.4405\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 13 -->\n",
|
|
"<g class=\"node\" id=\"node15\">\n",
|
|
"<title>13</title>\n",
|
|
"<g id=\"a_node15\"><a xlink:title=\"P_0._pc=0, P_0.a=3, P_0.b=2\n",
|
|
"!"P_0.a < 2" & "P_0.b > 1" & dead\">\n",
|
|
"<ellipse cx=\"425.3443\" cy=\"-157\" fill=\"#ffffaa\" rx=\"21.3963\" ry=\"21.3963\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"425.3443\" y=\"-153.3\">13</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 11->13 -->\n",
|
|
"<g class=\"edge\" id=\"edge21\">\n",
|
|
"<title>11->13</title>\n",
|
|
"<path d=\"M365.9505,-126.8876C376.1735,-132.0706 388.8216,-138.4832 399.8153,-144.0569\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"406.0662,-147.2261 398.3983,-146.8702 402.9445,-145.6434 399.8228,-144.0607 399.8228,-144.0607 399.8228,-144.0607 402.9445,-145.6434 401.2472,-141.2511 406.0662,-147.2261 406.0662,-147.2261\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 14 -->\n",
|
|
"<g class=\"node\" id=\"node16\">\n",
|
|
"<title>14</title>\n",
|
|
"<g id=\"a_node16\"><a xlink:title=\"P_0._pc=0, P_0.a=2, P_0.b=3\n",
|
|
"!"P_0.a < 2" & "P_0.b > 1" & dead\">\n",
|
|
"<ellipse cx=\"425.3443\" cy=\"-78\" fill=\"#ffffaa\" rx=\"21.3963\" ry=\"21.3963\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"425.3443\" y=\"-74.3\">14</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 11->14 -->\n",
|
|
"<g class=\"edge\" id=\"edge22\">\n",
|
|
"<title>11->14</title>\n",
|
|
"<path d=\"M365.9505,-107.3595C376.0779,-102.3534 388.5854,-96.1707 399.5066,-90.7721\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"406.0662,-87.5296 401.1869,-93.4554 402.9286,-89.0806 399.791,-90.6316 399.791,-90.6316 399.791,-90.6316 402.9286,-89.0806 398.3951,-87.8077 406.0662,-87.5296 406.0662,-87.5296\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 12->12 -->\n",
|
|
"<g class=\"edge\" id=\"edge23\">\n",
|
|
"<title>12->12</title>\n",
|
|
"<path d=\"M333.6706,-55.4405C330.3374,-66.6551 334.5965,-77.4481 346.4481,-77.4481 355.7071,-77.4481 360.3321,-70.8606 360.3231,-62.631\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"359.2256,-55.4405 363.3958,-61.885 359.7537,-58.9004 360.2819,-62.3603 360.2819,-62.3603 360.2819,-62.3603 359.7537,-58.9004 357.1679,-62.8357 359.2256,-55.4405 359.2256,-55.4405\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 13->13 -->\n",
|
|
"<g class=\"edge\" id=\"edge24\">\n",
|
|
"<title>13->13</title>\n",
|
|
"<path d=\"M412.0083,-174.03C408.2544,-185.3902 412.6998,-196.4481 425.3443,-196.4481 435.3216,-196.4481 440.194,-189.5633 439.9613,-181.0776\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"438.6803,-174.03 443.0315,-180.3538 439.3063,-177.4736 439.9323,-180.9172 439.9323,-180.9172 439.9323,-180.9172 439.3063,-177.4736 436.833,-181.4805 438.6803,-174.03 438.6803,-174.03\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 14->14 -->\n",
|
|
"<g class=\"edge\" id=\"edge25\">\n",
|
|
"<title>14->14</title>\n",
|
|
"<path d=\"M412.0083,-95.03C408.2544,-106.3902 412.6998,-117.4481 425.3443,-117.4481 435.3216,-117.4481 440.194,-110.5633 439.9613,-102.0776\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"438.6803,-95.03 443.0315,-101.3538 439.3063,-98.4736 439.9323,-101.9172 439.9323,-101.9172 439.9323,-101.9172 439.3063,-98.4736 436.833,-102.4805 438.6803,-95.03 438.6803,-95.03\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"execution_count": 5,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"k.show('.1')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Another option is to use option `K` to disable to state-labeling (that is enabled by default for Kripke structure) and use transition-labeling instead. Combining with `1`, this will preserve the state's data as a tooltip."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"145pt\" viewBox=\"0.00 0.00 734.00 144.84\" width=\"734pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(.4584 .4584) rotate(0) translate(4 312)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-312 1597.3443,-312 1597.3443,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"793.6721\" y=\"-292.8\">t</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"785.6721\" y=\"-277.8\">[all]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<g id=\"a_node2\"><a xlink:title=\"P_0._pc=0, P_0.a=0, P_0.b=0\">\n",
|
|
"<ellipse cx=\"56\" cy=\"-124\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-120.3\">0</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-124C4.178,-124 17.9448,-124 30.9241,-124\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-124 30.9808,-127.1501 34.4807,-124 30.9807,-124.0001 30.9807,-124.0001 30.9807,-124.0001 34.4807,-124 30.9807,-120.8501 37.9807,-124 37.9807,-124\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>1</title>\n",
|
|
"<g id=\"a_node3\"><a xlink:title=\"P_0._pc=0, P_0.a=1, P_0.b=0\">\n",
|
|
"<ellipse cx=\"339\" cy=\"-151\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"339\" y=\"-147.3\">1</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 0->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->1</title>\n",
|
|
"<path d=\"M74.1334,-125.73C123.0527,-130.3973 257.8131,-143.2543 313.9471,-148.6098\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"321.0176,-149.2844 313.75,-151.7552 317.5334,-148.9519 314.0492,-148.6194 314.0492,-148.6194 314.0492,-148.6194 317.5334,-148.9519 314.3484,-145.4837 321.0176,-149.2844 321.0176,-149.2844\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-150.8\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>2</title>\n",
|
|
"<g id=\"a_node4\"><a xlink:title=\"P_0._pc=0, P_0.a=0, P_0.b=1\">\n",
|
|
"<ellipse cx=\"339\" cy=\"-97\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"339\" y=\"-93.3\">2</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M72.0948,-115.8947C78.1791,-113.2081 85.2627,-110.5184 92,-109 171.3469,-91.1175 268.5282,-93.1308 313.6908,-95.3859\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"320.7377,-95.7614 313.58,-98.5344 317.2426,-95.5751 313.7476,-95.3889 313.7476,-95.3889 313.7476,-95.3889 317.2426,-95.5751 313.9152,-92.2433 320.7377,-95.7614 320.7377,-95.7614\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-112.8\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>3</title>\n",
|
|
"<g id=\"a_node5\"><a xlink:title=\"P_0._pc=0, P_0.a=2, P_0.b=0\">\n",
|
|
"<ellipse cx=\"622\" cy=\"-181\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"622\" y=\"-177.3\">3</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path d=\"M356.4916,-155.3657C362.3452,-156.6984 368.9261,-158.0587 375,-159 455.4345,-171.4653 551.7818,-177.518 596.6674,-179.8309\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"603.9277,-180.1953 596.7785,-182.9904 600.4321,-180.0199 596.9365,-179.8444 596.9365,-179.8444 596.9365,-179.8444 600.4321,-180.0199 597.0944,-176.6983 603.9277,-180.1953 603.9277,-180.1953\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"375\" y=\"-182.8\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4 -->\n",
|
|
"<g class=\"node\" id=\"node6\">\n",
|
|
"<title>4</title>\n",
|
|
"<g id=\"a_node6\"><a xlink:title=\"P_0._pc=0, P_0.a=1, P_0.b=1\">\n",
|
|
"<ellipse cx=\"622\" cy=\"-124\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"622\" y=\"-120.3\">4</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 1->4 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->4</title>\n",
|
|
"<path d=\"M356.8799,-147.1161C362.6418,-145.974 369.0706,-144.814 375,-144 455.5833,-132.938 551.8597,-127.3067 596.6979,-125.1182\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"603.9503,-124.7725 597.1082,-128.2523 600.4543,-124.9392 596.9582,-125.1059 596.9582,-125.1059 596.9582,-125.1059 600.4543,-124.9392 596.8082,-121.9594 603.9503,-124.7725 603.9503,-124.7725\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"375\" y=\"-147.8\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->4 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>2->4</title>\n",
|
|
"<path d=\"M357.011,-95.3125C398.2549,-91.9674 502.4344,-86.4773 586,-107 590.6903,-108.1519 595.5022,-109.9415 600.0199,-111.9348\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"606.3799,-114.9506 598.7053,-114.7976 603.2174,-113.451 600.0549,-111.9514 600.0549,-111.9514 600.0549,-111.9514 603.2174,-113.451 601.4046,-109.1051 606.3799,-114.9506 606.3799,-114.9506\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"375\" y=\"-110.8\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5 -->\n",
|
|
"<g class=\"node\" id=\"node7\">\n",
|
|
"<title>5</title>\n",
|
|
"<g id=\"a_node7\"><a xlink:title=\"P_0._pc=0, P_0.a=0, P_0.b=2\">\n",
|
|
"<ellipse cx=\"622\" cy=\"-67\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"622\" y=\"-63.3\">5</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 2->5 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>2->5</title>\n",
|
|
"<path d=\"M353.1631,-85.4308C359.459,-80.9825 367.2023,-76.3987 375,-74 453.0699,-49.9845 551.6427,-57.82 597.0346,-63.4126\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"604.1083,-64.3198 596.7644,-66.5536 600.6368,-63.8745 597.1652,-63.4292 597.1652,-63.4292 597.1652,-63.4292 600.6368,-63.8745 597.566,-60.3048 604.1083,-64.3198 604.1083,-64.3198\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"375\" y=\"-77.8\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6 -->\n",
|
|
"<g class=\"node\" id=\"node8\">\n",
|
|
"<title>6</title>\n",
|
|
"<g id=\"a_node8\"><a xlink:title=\"P_0._pc=0, P_0.a=3, P_0.b=0\">\n",
|
|
"<ellipse cx=\"909\" cy=\"-219\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"909\" y=\"-215.3\">6</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 3->6 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->6</title>\n",
|
|
"<path d=\"M638.076,-189.5095C644.1584,-192.3605 651.2455,-195.255 658,-197 738.4394,-217.7818 837.6774,-219.8367 883.5454,-219.513\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"890.6971,-219.4397 883.7298,-222.6614 887.1973,-219.4756 883.6975,-219.5116 883.6975,-219.5116 883.6975,-219.5116 887.1973,-219.4756 883.6651,-216.3618 890.6971,-219.4397 890.6971,-219.4397\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"658\" y=\"-222.8\">!"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 7 -->\n",
|
|
"<g class=\"node\" id=\"node9\">\n",
|
|
"<title>7</title>\n",
|
|
"<g id=\"a_node9\"><a xlink:title=\"P_0._pc=0, P_0.a=2, P_0.b=1\">\n",
|
|
"<ellipse cx=\"909\" cy=\"-162\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"909\" y=\"-158.3\">7</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 3->7 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\">\n",
|
|
"<title>3->7</title>\n",
|
|
"<path d=\"M640.3897,-179.7826C690.0004,-176.4982 826.6656,-167.4507 883.593,-163.682\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"890.7634,-163.2073 883.9868,-166.8129 887.2711,-163.4385 883.7787,-163.6698 883.7787,-163.6698 883.7787,-163.6698 887.2711,-163.4385 883.5706,-160.5267 890.7634,-163.2073 890.7634,-163.2073\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"658\" y=\"-181.8\">!"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 4->7 -->\n",
|
|
"<g class=\"edge\" id=\"edge10\">\n",
|
|
"<title>4->7</title>\n",
|
|
"<path d=\"M640.024,-123.3352C681.7908,-122.2601 788.1123,-122.2066 873,-145 877.6644,-146.2525 882.4646,-148.0877 886.9789,-150.0943\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"893.3392,-153.1089 885.6646,-152.9573 890.1765,-151.6099 887.0137,-150.1108 887.0137,-150.1108 887.0137,-150.1108 890.1765,-151.6099 888.3629,-147.2643 893.3392,-153.1089 893.3392,-153.1089\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"660\" y=\"-148.8\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 8 -->\n",
|
|
"<g class=\"node\" id=\"node10\">\n",
|
|
"<title>8</title>\n",
|
|
"<g id=\"a_node10\"><a xlink:title=\"P_0._pc=0, P_0.a=1, P_0.b=2\">\n",
|
|
"<ellipse cx=\"909\" cy=\"-105\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"909\" y=\"-101.3\">8</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 4->8 -->\n",
|
|
"<g class=\"edge\" id=\"edge11\">\n",
|
|
"<title>4->8</title>\n",
|
|
"<path d=\"M637.5264,-114.2792C643.6636,-110.9702 650.9305,-107.6838 658,-106 738.7126,-86.7765 838.2097,-95.5949 883.9018,-101.3765\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"891.0201,-102.3085 883.6704,-104.523 887.5497,-101.8541 884.0793,-101.3997 884.0793,-101.3997 884.0793,-101.3997 887.5497,-101.8541 884.4883,-98.2763 891.0201,-102.3085 891.0201,-102.3085\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"660\" y=\"-109.8\">"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 5->8 -->\n",
|
|
"<g class=\"edge\" id=\"edge12\">\n",
|
|
"<title>5->8</title>\n",
|
|
"<path d=\"M639.7767,-63.9238C681.906,-57.4113 790.4721,-45.2204 873,-76 879.5163,-78.4303 885.746,-82.5382 891.1365,-86.9095\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"896.6303,-91.6892 889.2816,-89.471 893.9898,-89.3919 891.3492,-87.0945 891.3492,-87.0945 891.3492,-87.0945 893.9898,-89.3919 893.4168,-84.7181 896.6303,-91.6892 896.6303,-91.6892\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"661.5\" y=\"-79.8\">"P_0.a < 2" & "P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 9 -->\n",
|
|
"<g class=\"node\" id=\"node11\">\n",
|
|
"<title>9</title>\n",
|
|
"<g id=\"a_node11\"><a xlink:title=\"P_0._pc=0, P_0.a=0, P_0.b=3\">\n",
|
|
"<ellipse cx=\"909\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"909\" y=\"-14.3\">9</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 5->9 -->\n",
|
|
"<g class=\"edge\" id=\"edge13\">\n",
|
|
"<title>5->9</title>\n",
|
|
"<path d=\"M634.3491,-53.39C640.7594,-47.2624 649.1032,-40.6067 658,-37 735.4952,-5.5841 837.3723,-10.5169 883.8873,-15.0122\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"891.1273,-15.7526 883.8432,-18.1741 887.6455,-15.3965 884.1637,-15.0404 884.1637,-15.0404 884.1637,-15.0404 887.6455,-15.3965 884.4841,-11.9067 891.1273,-15.7526 891.1273,-15.7526\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"661.5\" y=\"-40.8\">"P_0.a < 2" & "P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 6->6 -->\n",
|
|
"<g class=\"edge\" id=\"edge14\">\n",
|
|
"<title>6->6</title>\n",
|
|
"<path d=\"M892.517,-226.9571C874.8006,-239.3082 880.2949,-255 909,-255 934.1169,-255 941.4632,-242.986 931.0386,-231.7082\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"925.483,-226.9571 932.8503,-229.1127 928.143,-229.2319 930.803,-231.5066 930.803,-231.5066 930.803,-231.5066 928.143,-229.2319 928.7557,-233.9006 925.483,-226.9571 925.483,-226.9571\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"803.5\" y=\"-258.8\">!"P_0.a < 2" & !"P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 10 -->\n",
|
|
"<g class=\"node\" id=\"node12\">\n",
|
|
"<title>10</title>\n",
|
|
"<g id=\"a_node12\"><a xlink:title=\"P_0._pc=0, P_0.a=3, P_0.b=1\">\n",
|
|
"<ellipse cx=\"1199.4481\" cy=\"-209\" fill=\"#ffffaa\" rx=\"21.3963\" ry=\"21.3963\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"1199.4481\" y=\"-205.3\">10</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 7->10 -->\n",
|
|
"<g class=\"edge\" id=\"edge15\">\n",
|
|
"<title>7->10</title>\n",
|
|
"<path d=\"M925.1091,-170.3858C931.1951,-173.2234 938.276,-176.141 945,-178 1024.8004,-200.0622 1123.0007,-206.4301 1170.7095,-208.2629\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"1177.9224,-208.5198 1170.8147,-211.4186 1174.4246,-208.3952 1170.9268,-208.2705 1170.9268,-208.2705 1170.9268,-208.2705 1174.4246,-208.3952 1171.039,-205.1225 1177.9224,-208.5198 1177.9224,-208.5198\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"945\" y=\"-210.8\">!"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 11 -->\n",
|
|
"<g class=\"node\" id=\"node13\">\n",
|
|
"<title>11</title>\n",
|
|
"<g id=\"a_node13\"><a xlink:title=\"P_0._pc=0, P_0.a=2, P_0.b=2\">\n",
|
|
"<ellipse cx=\"1199.4481\" cy=\"-148\" fill=\"#ffffaa\" rx=\"21.3963\" ry=\"21.3963\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"1199.4481\" y=\"-144.3\">11</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 7->11 -->\n",
|
|
"<g class=\"edge\" id=\"edge16\">\n",
|
|
"<title>7->11</title>\n",
|
|
"<path d=\"M927.1688,-161.1242C976.1181,-158.7648 1111.0587,-152.2605 1170.5891,-149.391\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"1177.8009,-149.0434 1170.9607,-152.5269 1174.305,-149.212 1170.809,-149.3805 1170.809,-149.3805 1170.809,-149.3805 1174.305,-149.212 1170.6573,-146.2342 1177.8009,-149.0434 1177.8009,-149.0434\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"945\" y=\"-162.8\">!"P_0.a < 2" & !"P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 8->11 -->\n",
|
|
"<g class=\"edge\" id=\"edge17\">\n",
|
|
"<title>8->11</title>\n",
|
|
"<path d=\"M927.2917,-105.0114C969.1809,-105.4423 1075.0035,-108.8384 1160,-131 1164.4515,-132.1607 1169.0483,-133.7491 1173.4618,-135.4917\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"1180.1992,-138.3177 1172.5256,-138.5149 1176.9716,-136.9639 1173.744,-135.61 1173.744,-135.61 1173.744,-135.61 1176.9716,-136.9639 1174.9625,-132.7052 1180.1992,-138.3177 1180.1992,-138.3177\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"948.5\" y=\"-134.8\">"P_0.a < 2" & "P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 12 -->\n",
|
|
"<g class=\"node\" id=\"node14\">\n",
|
|
"<title>12</title>\n",
|
|
"<g id=\"a_node14\"><a xlink:title=\"P_0._pc=0, P_0.a=1, P_0.b=3\">\n",
|
|
"<ellipse cx=\"1199.4481\" cy=\"-54\" fill=\"#ffffaa\" rx=\"21.3963\" ry=\"21.3963\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"1199.4481\" y=\"-50.3\">12</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 8->12 -->\n",
|
|
"<g class=\"edge\" id=\"edge18\">\n",
|
|
"<title>8->12</title>\n",
|
|
"<path d=\"M924.6522,-95.7427C930.8049,-92.4906 938.0495,-89.122 945,-87 1024.2629,-62.8012 1122.707,-56.3459 1170.5891,-54.6249\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"1177.8291,-54.3873 1170.9362,-57.7653 1174.331,-54.5022 1170.8329,-54.617 1170.8329,-54.617 1170.8329,-54.617 1174.331,-54.5022 1170.7295,-51.4687 1177.8291,-54.3873 1177.8291,-54.3873\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"948.5\" y=\"-90.8\">"P_0.a < 2" & "P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 9->9 -->\n",
|
|
"<g class=\"edge\" id=\"edge19\">\n",
|
|
"<title>9->9</title>\n",
|
|
"<path d=\"M892.517,-25.9571C874.8006,-38.3082 880.2949,-54 909,-54 934.1169,-54 941.4632,-41.986 931.0386,-30.7082\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"925.483,-25.9571 932.8503,-28.1127 928.143,-28.2319 930.803,-30.5066 930.803,-30.5066 930.803,-30.5066 928.143,-28.2319 928.7557,-32.9006 925.483,-25.9571 925.483,-25.9571\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"807\" y=\"-57.8\">"P_0.a < 2" & "P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 10->10 -->\n",
|
|
"<g class=\"edge\" id=\"edge20\">\n",
|
|
"<title>10->10</title>\n",
|
|
"<path d=\"M1180.523,-219.5036C1165.296,-232.716 1171.6043,-248.4481 1199.4481,-248.4481 1223.5938,-248.4481 1231.5447,-236.6174 1223.3006,-224.8585\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"1218.3731,-219.5036 1225.431,-222.5217 1220.7431,-222.0791 1223.113,-224.6547 1223.113,-224.6547 1223.113,-224.6547 1220.7431,-222.0791 1220.795,-226.7876 1218.3731,-219.5036 1218.3731,-219.5036\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"1093.9481\" y=\"-252.2481\">!"P_0.a < 2" & !"P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 13 -->\n",
|
|
"<g class=\"node\" id=\"node15\">\n",
|
|
"<title>13</title>\n",
|
|
"<g id=\"a_node15\"><a xlink:title=\"P_0._pc=0, P_0.a=3, P_0.b=2\">\n",
|
|
"<ellipse cx=\"1489.3443\" cy=\"-188\" fill=\"#ffffaa\" rx=\"21.3963\" ry=\"21.3963\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"1489.3443\" y=\"-184.3\">13</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 11->13 -->\n",
|
|
"<g class=\"edge\" id=\"edge21\">\n",
|
|
"<title>11->13</title>\n",
|
|
"<path d=\"M1220.7649,-150.9413C1272.1766,-158.0351 1403.0149,-176.0882 1460.9717,-184.0851\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"1467.9963,-185.0544 1460.6314,-187.2179 1464.5291,-184.576 1461.062,-184.0975 1461.062,-184.0975 1461.062,-184.0975 1464.5291,-184.576 1461.4926,-180.9771 1467.9963,-185.0544 1467.9963,-185.0544\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"1238.8962\" y=\"-185.8\">!"P_0.a < 2" & "P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 14 -->\n",
|
|
"<g class=\"node\" id=\"node16\">\n",
|
|
"<title>14</title>\n",
|
|
"<g id=\"a_node16\"><a xlink:title=\"P_0._pc=0, P_0.a=2, P_0.b=3\">\n",
|
|
"<ellipse cx=\"1489.3443\" cy=\"-94\" fill=\"#ffffaa\" rx=\"21.3963\" ry=\"21.3963\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"1489.3443\" y=\"-90.3\">14</text>\n",
|
|
"</a>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"<!-- 11->14 -->\n",
|
|
"<g class=\"edge\" id=\"edge22\">\n",
|
|
"<title>11->14</title>\n",
|
|
"<path d=\"M1219.7032,-140.0131C1225.8015,-137.8264 1232.5586,-135.6162 1238.8962,-134 1318.0725,-113.808 1414.0628,-101.8713 1460.8858,-96.8318\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"1467.9683,-96.082 1461.3389,-99.9515 1464.4878,-96.4505 1461.0072,-96.819 1461.0072,-96.819 1461.0072,-96.819 1464.4878,-96.4505 1460.6756,-93.6865 1467.9683,-96.082 1467.9683,-96.082\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"1238.8962\" y=\"-137.8\">!"P_0.a < 2" & "P_0.b > 1" & !dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 12->12 -->\n",
|
|
"<g class=\"edge\" id=\"edge23\">\n",
|
|
"<title>12->12</title>\n",
|
|
"<path d=\"M1180.523,-64.5036C1165.296,-77.716 1171.6043,-93.4481 1199.4481,-93.4481 1223.5938,-93.4481 1231.5447,-81.6174 1223.3006,-69.8585\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"1218.3731,-64.5036 1225.431,-67.5217 1220.7431,-67.0791 1223.113,-69.6547 1223.113,-69.6547 1223.113,-69.6547 1220.7431,-67.0791 1220.795,-71.7876 1218.3731,-64.5036 1218.3731,-64.5036\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"1097.4481\" y=\"-97.2481\">"P_0.a < 2" & "P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 13->13 -->\n",
|
|
"<g class=\"edge\" id=\"edge24\">\n",
|
|
"<title>13->13</title>\n",
|
|
"<path d=\"M1470.4192,-198.5036C1455.1922,-211.716 1461.5005,-227.4481 1489.3443,-227.4481 1513.49,-227.4481 1521.4409,-215.6174 1513.1968,-203.8585\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"1508.2693,-198.5036 1515.3272,-201.5217 1510.6393,-201.0791 1513.0092,-203.6547 1513.0092,-203.6547 1513.0092,-203.6547 1510.6393,-201.0791 1510.6912,-205.7876 1508.2693,-198.5036 1508.2693,-198.5036\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"1385.3443\" y=\"-231.2481\">!"P_0.a < 2" & "P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"<!-- 14->14 -->\n",
|
|
"<g class=\"edge\" id=\"edge25\">\n",
|
|
"<title>14->14</title>\n",
|
|
"<path d=\"M1470.4192,-104.5036C1455.1922,-117.716 1461.5005,-133.4481 1489.3443,-133.4481 1513.49,-133.4481 1521.4409,-121.6174 1513.1968,-109.8585\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"1508.2693,-104.5036 1515.3272,-107.5217 1510.6393,-107.0791 1513.0092,-109.6547 1513.0092,-109.6547 1513.0092,-109.6547 1510.6393,-107.0791 1510.6912,-111.7876 1508.2693,-104.5036 1508.2693,-104.5036\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"1385.3443\" y=\"-137.2481\">!"P_0.a < 2" & "P_0.b > 1" & dead</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"execution_count": 6,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"k.show('.1K')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Loading from a `*.pml` file\n",
|
|
"---------------------------\n",
|
|
"\n",
|
|
"Another option is to use `ltsmin.load()` to load a Promela file directly. In order for this test-case to be self-contained, we are going to write the Promela file first, but in practice you probably already have your model."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"!rm -rf test1.pml"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Writing test1.pml\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%file test1.pml\n",
|
|
"active proctype P() {\n",
|
|
"int a = 0;\n",
|
|
"int b = 0;\n",
|
|
"x: if\n",
|
|
" :: d_step {a < 3 && b < 3; a = a + 1; } goto x;\n",
|
|
" :: d_step {a < 3 && b < 3; b = b + 1; } goto x;\n",
|
|
"fi;\n",
|
|
"}"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Now load it:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"model2 = spot.ltsmin.load('test1.pml')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 10,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"ltsmin model with the following variables:\n",
|
|
" P_0._pc: pc\n",
|
|
" P_0.a: int\n",
|
|
" P_0.b: int"
|
|
]
|
|
},
|
|
"execution_count": 10,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"model2"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 11,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"!rm -f test1.pml test1.pml.spins.c test1.pml.spins"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"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.6.5"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|