{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "8bca10b8",
"metadata": {},
"outputs": [],
"source": [
"import spot\n",
"spot.setup()"
]
},
{
"cell_type": "markdown",
"id": "c73e997a",
"metadata": {},
"source": [
"Test the Mealy printer."
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "f8eff7ed",
"metadata": {},
"outputs": [],
"source": [
"g = spot.ltl_to_game('G((a|c) <-> (b|d))', [\"b\", \"d\"])"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "ad3c80bc",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.solve_game(g)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "50130d85",
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
" *' at 0x7f32ec50ce40> >"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.highlight_strategy(g)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "3d56cda6",
"metadata": {},
"outputs": [],
"source": [
"x = spot.solved_game_to_separated_mealy(g)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "c24548a1",
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
" *' at 0x7f32ec571c30> >"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"x"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "88f2c0e0",
"metadata": {},
"outputs": [],
"source": [
"x.merge_edges()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "e626997e",
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
" *' at 0x7f32ec571c30> >"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"x"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.9.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}