contains: generalize second argument to a twa
This was triggered by a question from Pierre Ganty on the mailing list. * spot/twaalgos/contains.hh, spot/twaalgos/contains.cc (contains): Generalize second argument to const_twa_ptr instead of const_twa_graph_ptr. * NEWS: Mention this. * tests/python/ltsmin-pml.ipynb: Show that it work. * THANKS: Mention Pierre.
This commit is contained in:
parent
be28365db4
commit
288b1c7958
5 changed files with 56 additions and 18 deletions
|
|
@ -40,8 +40,8 @@
|
|||
"SpinS Promela Compiler - version 1.1 (3-Feb-2015)\n",
|
||||
"(C) University of Twente, Formal Methods and Tools group\n",
|
||||
"\n",
|
||||
"Parsing tmprn9_nun3.pml...\n",
|
||||
"Parsing tmprn9_nun3.pml done (0.1 sec)\n",
|
||||
"Parsing tmpwot5yb9c.pml...\n",
|
||||
"Parsing tmpwot5yb9c.pml done (0.0 sec)\n",
|
||||
"\n",
|
||||
"Optimizing graphs...\n",
|
||||
" StateMerging changed 0 states/transitions.\n",
|
||||
|
|
@ -84,8 +84,8 @@
|
|||
" 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/tmprn9_nun3.pml.spins.c\n",
|
||||
"Compiled C code to PINS library tmprn9_nun3.pml.spins\n",
|
||||
"Written C code to /home/adl/git/spot/tests/python/tmpwot5yb9c.pml.spins.c\n",
|
||||
"Compiled C code to PINS library tmpwot5yb9c.pml.spins\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
|
|
@ -419,7 +419,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.impl.kripke; proxy of <Swig Object of type 'std::shared_ptr< spot::kripke > *' at 0x7fb7d8049450> >"
|
||||
"<spot.impl.kripke; proxy of <Swig Object of type 'std::shared_ptr< spot::kripke > *' at 0x7f7f9849ee20> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
|
|
@ -1120,6 +1120,33 @@
|
|||
"k.show('.1K')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Since a kripke structure is a `twa`, can be used on the right-hand side of `contains`. Here we show that every path of `k` contains a step where `P_0.a < 2`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"True"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"spot.contains('F\"P_0.a < 2\"', k)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
|
|
@ -1132,7 +1159,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
|
@ -1141,7 +1168,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
|
@ -1173,7 +1200,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
|
@ -1239,7 +1266,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
|
@ -1251,7 +1278,7 @@
|
|||
" P_0.b: int"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -1262,7 +1289,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
|
@ -1286,7 +1313,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.2"
|
||||
"version": "3.10.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue