Introduce new ways to split an automaton

The explicit way of splitting suffers if there are
too many input APs, two new ways of splitting
are introduced as well as a heuristic to chose
between them.

* NEWS: update
* spot/twaalgos/synthesis.cc,
spot/twaalgos/synthesis.hh: New fonctions
* bin/ltlsynt.cc: Add corresponding option
* tests/core/gamehoa.test,
tests/core/ltlsynt.test,
tests/python/_partitioned_relabel.ipynb,
tests/python/_synthesis.ipynb,
tests/python/game.py,
tests/python/split.py,
tests/python/synthesis.py: Adjusting and adding test
This commit is contained in:
Philipp Schlehuber 2024-03-03 22:15:27 +01:00
parent 2274308cad
commit 5ddac258e1
11 changed files with 1372 additions and 138 deletions

View file

@ -203,7 +203,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46fc00> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd837fe10> >"
]
},
"execution_count": 2,
@ -411,7 +411,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46fc00> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd837fe10> >"
]
},
"execution_count": 3,
@ -597,7 +597,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46fc00> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd837fe10> >"
]
},
"execution_count": 4,
@ -782,7 +782,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46dfb0> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd8394990> >"
]
},
"metadata": {},
@ -1052,7 +1052,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46dfb0> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd8394990> >"
]
},
"execution_count": 5,
@ -1326,7 +1326,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46dfb0> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd8394990> >"
]
},
"execution_count": 6,
@ -1537,7 +1537,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46e9d0> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd83943c0> >"
]
},
"metadata": {},
@ -1760,7 +1760,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46e9d0> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd83943c0> >"
]
},
"execution_count": 7,
@ -2023,7 +2023,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46e9d0> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd83943c0> >"
]
},
"execution_count": 8,
@ -2055,7 +2055,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 14,
"id": "296a93d3",
"metadata": {},
"outputs": [
@ -2304,7 +2304,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46f4b0> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd8395590> >"
]
},
"metadata": {},
@ -2718,7 +2718,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46eca0> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd837fcf0> >"
]
},
"metadata": {},
@ -3312,7 +3312,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46eca0> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd837fcf0> >"
]
},
"metadata": {},
@ -3346,7 +3346,7 @@
"display(aut)\n",
"\n",
"# Convert to split mealy machine\n",
"auts = spot.split_2step(aut)\n",
"auts = spot.split_2step(aut, True, spot.synthesis_info.splittype_EXPL)\n",
"print(auts.to_str(\"hoa\"))\n",
"display(auts)\n",
"\n",
@ -3951,7 +3951,7 @@
"</svg>\n"
],
"text/plain": [
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f483c46eca0> >"
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f0fd8396b20> >"
]
},
"metadata": {},
@ -4020,7 +4020,7 @@
" for relabel_player in [True, False]:\n",
" for split_env in [True, False]:\n",
" for split_player in [True, False]:\n",
" auts = spot.split_2step(aut)\n",
" auts = spot.split_2step(aut, True, spot.synthesis_info.splittype_EXPL)\n",
" rel_dicts = spot.partitioned_game_relabel_here(auts, relabel_env, relabel_player, split_env, split_player, 10000, 10000)\n",
" spot.relabel_game_here(auts, rel_dicts)\n",
" print(spot.are_equivalent(aut, spot.unsplit_2step(auts)))"
@ -4051,7 +4051,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.11.6"
}
},
"nbformat": 4,