* spot/twaalgos/dot.cc: Here. * NEWS: Mention the change. * tests/core/alternating.test, tests/core/det.test, tests/core/dstar.test, tests/core/monitor.test, tests/core/neverclaimread.test, tests/core/readsave.test, tests/core/sccdot.test, tests/core/tgbagraph.test, tests/python/_altscc.ipynb, tests/python/_autparserr.ipynb, tests/python/alternation.ipynb, tests/python/atva16-fig2a.ipynb, tests/python/atva16-fig2b.ipynb, tests/python/automata-io.ipynb, tests/python/automata.ipynb, tests/python/decompose.ipynb, tests/python/gen.ipynb, tests/python/highlighting.ipynb, tests/python/ltsmin-dve.ipynb, tests/python/ltsmin-pml.ipynb, tests/python/parity.ipynb, tests/python/product.ipynb, tests/python/randaut.ipynb, tests/python/satmin.ipynb, tests/python/stutter-inv.ipynb, tests/python/testingaut.ipynb, tests/python/word.ipynb: Adjust test cases.
691 lines
40 KiB
Text
691 lines
40 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 tmpqado0fcz.pml...\n",
|
|
"Parsing tmpqado0fcz.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/tmpqado0fcz.pml.spins.c\n",
|
|
"Compiled C code to PINS library tmpqado0fcz.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 0x7f0cd1edc630> >"
|
|
]
|
|
},
|
|
"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`.\n",
|
|
"\n",
|
|
"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": 5,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"!rm -rf test1.pml"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"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": 7,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"model2 = spot.ltsmin.load('test1.pml')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"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": 8,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"model2"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"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
|
|
}
|