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:
parent
2274308cad
commit
5ddac258e1
11 changed files with 1372 additions and 138 deletions
|
|
@ -48,6 +48,7 @@
|
|||
"source": [
|
||||
"si = spot.synthesis_info()\n",
|
||||
"si.s = spot.synthesis_info.algo_LAR # Use LAR algorithm\n",
|
||||
"si.sp = spot.synthesis_info.splittype_EXPL\n",
|
||||
"game = spot.ltl_to_game(\"G((F(i0) && F(i1))->(G(i1<->(X(o0)))))\", [\"o0\"], si)\n",
|
||||
"spot.solve_game(game)"
|
||||
]
|
||||
|
|
@ -787,7 +788,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8777750> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c292280> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
|
|
@ -930,7 +931,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8777750> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c292280> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
|
|
@ -1149,7 +1150,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8777660> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c290c30> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
|
|
@ -1158,7 +1159,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"a_s = spot.split_2step(a, True)\n",
|
||||
"a_s = spot.split_2step(a, True, spot.synthesis_info.splittype_EXPL)\n",
|
||||
"print(a.acc())\n",
|
||||
"a_s"
|
||||
]
|
||||
|
|
@ -1322,7 +1323,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8774840> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c293a20> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 11,
|
||||
|
|
@ -1618,7 +1619,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8774930> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94fe9f090> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 12,
|
||||
|
|
@ -1627,7 +1628,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"a_snc = spot.split_2step(a, False)\n",
|
||||
"a_snc = spot.split_2step(a, False, spot.synthesis_info.splittype_EXPL)\n",
|
||||
"print(a_snc.acc())\n",
|
||||
"a_snc"
|
||||
]
|
||||
|
|
@ -2006,7 +2007,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8776f10> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c292880> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 13,
|
||||
|
|
@ -2015,7 +2016,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"a_s = spot.split_2step(a, True)\n",
|
||||
"a_s = spot.split_2step(a, True, spot.synthesis_info.splittype_EXPL)\n",
|
||||
"print(a_s.acc())\n",
|
||||
"a_s"
|
||||
]
|
||||
|
|
@ -2289,7 +2290,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a9ff0db0> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c2910b0> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 14,
|
||||
|
|
@ -2531,7 +2532,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a9ff0db0> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c2910b0> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 15,
|
||||
|
|
@ -2803,7 +2804,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8775800> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c293720> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 16,
|
||||
|
|
@ -3046,7 +3047,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8775800> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c293720> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 17,
|
||||
|
|
@ -3757,7 +3758,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a876e310> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c290600> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 18,
|
||||
|
|
@ -4015,7 +4016,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a876e310> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c290600> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 19,
|
||||
|
|
@ -4298,7 +4299,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8776850> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c290f90> >"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
|
|
@ -6066,7 +6067,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a9ff1350> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c2901b0> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 20,
|
||||
|
|
@ -6101,7 +6102,7 @@
|
|||
"\n",
|
||||
"display(aut)\n",
|
||||
"\n",
|
||||
"aut = spot.split_2step(aut, x, False)\n",
|
||||
"aut = spot.split_2step(aut, x, False, spot.synthesis_info.splittype_EXPL)\n",
|
||||
"\n",
|
||||
"display(aut.show_storage())\n",
|
||||
"aut"
|
||||
|
|
@ -6975,7 +6976,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a9ff1350> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c2901b0> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 21,
|
||||
|
|
@ -7219,7 +7220,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8776970> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c290ea0> >"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
|
|
@ -8107,7 +8108,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8775620> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c291b60> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 22,
|
||||
|
|
@ -8141,7 +8142,7 @@
|
|||
"\n",
|
||||
"display(aut)\n",
|
||||
"\n",
|
||||
"aut = spot.split_2step(aut, x, False)\n",
|
||||
"aut = spot.split_2step(aut, x, False, spot.synthesis_info.splittype_EXPL)\n",
|
||||
"\n",
|
||||
"display(aut.show_storage())\n",
|
||||
"aut"
|
||||
|
|
@ -8529,7 +8530,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a8775620> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c291b60> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 23,
|
||||
|
|
@ -8679,7 +8680,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a876e100> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c291ad0> >"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
|
|
@ -8858,7 +8859,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a876e100> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c291ad0> >"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
|
|
@ -9062,7 +9063,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a876f570> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c27bde0> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 25,
|
||||
|
|
@ -9072,6 +9073,7 @@
|
|||
],
|
||||
"source": [
|
||||
"si = spot.synthesis_info()\n",
|
||||
"si.sp = spot.synthesis_info.splittype_EXPL\n",
|
||||
"\n",
|
||||
"aut = spot.ltl_to_game(\"(a|b|c|d)->x\", [\"x\"], si)\n",
|
||||
"aut"
|
||||
|
|
@ -9268,7 +9270,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f08a876fae0> >"
|
||||
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x75e94c290210> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 27,
|
||||
|
|
@ -9582,7 +9584,7 @@
|
|||
"</svg>\n"
|
||||
],
|
||||
"text/plain": [
|
||||
"<spot.aig; proxy of <Swig Object of type 'std::shared_ptr< spot::aig > *' at 0x7f08a876f2a0> >"
|
||||
"<spot.aig; proxy of <Swig Object of type 'std::shared_ptr< spot::aig > *' at 0x75e94c292b80> >"
|
||||
]
|
||||
},
|
||||
"execution_count": 28,
|
||||
|
|
@ -9594,14 +9596,6 @@
|
|||
"aig = spot.mealy_machine_to_aig(ctrl, \"ite\")\n",
|
||||
"aig"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "eb81b7d3",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
|
@ -9620,7 +9614,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.7"
|
||||
"version": "3.11.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue