ltsmin: add accessors for variable names and types

* spot/ltsmin/ltsmin.hh, spot/ltsmin/ltsmin.cc: Expose more of the
ltsmin interface.
* python/spot/ltsmin.i: Add some helper functions on top of this
new interface.
* tests/python/ltsmin.ipynb: Test them.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2016-01-25 18:00:08 +01:00
parent 907b72fbfb
commit db1e842a67
5 changed files with 127 additions and 20 deletions

View file

@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:eba4457368b676284d4696dd7afe5596d865c6f9f6f44b5fd5dc7c6585757c89"
"signature": "sha256:f568358fc00acf6332b52560daa1a34f21cb30c73d81197ab7c5c015de11e12e"
},
"nbformat": 3,
"nbformat_minor": 0,
@ -70,12 +70,37 @@
"output_type": "pyout",
"prompt_number": 3,
"text": [
"<spot.ltsmin.model; proxy of <Swig Object of type 'spot::ltsmin_model *' at 0x7f6990bd44e0> >"
"ltsmin model with the following variables:\n",
" P: ['x']\n",
" P.a: int\n",
" P.b: int"
]
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"m.info()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 4,
"text": [
"{'state_size': 3,\n",
" 'types': [('P', ['x']), ('int', [])],\n",
" 'variables': [('P', 0), ('P.a', 1), ('P.b', 1)]}"
]
}
],
"prompt_number": 4
},
{
"cell_type": "code",
"collapsed": false,
@ -89,7 +114,7 @@
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 4,
"prompt_number": 5,
"svg": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
@ -331,11 +356,11 @@
"</svg>\n"
],
"text": [
"<spot.impl.kripke; proxy of <Swig Object of type 'std::shared_ptr< spot::kripke > *' at 0x7f6990bd4600> >"
"<spot.impl.kripke; proxy of <Swig Object of type 'std::shared_ptr< spot::kripke > *' at 0x7f54f809d9c0> >"
]
}
],
"prompt_number": 4
"prompt_number": 5
},
{
"cell_type": "code",
@ -349,7 +374,7 @@
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 5,
"prompt_number": 6,
"svg": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
@ -401,11 +426,11 @@
"</svg>\n"
],
"text": [
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f6990bd4c90> >"
"<spot.impl.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f54f809dde0> >"
]
}
],
"prompt_number": 5
"prompt_number": 6
},
{
"cell_type": "code",
@ -419,7 +444,7 @@
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 6,
"prompt_number": 7,
"svg": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
@ -531,11 +556,11 @@
"</svg>\n"
],
"text": [
"<spot.impl.twa_product; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_product > *' at 0x7f6990bd49c0> >"
"<spot.impl.twa_product; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_product > *' at 0x7f54f809d7e0> >"
]
}
],
"prompt_number": 6
"prompt_number": 7
}
],
"metadata": {}