{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "99baf49c",
"metadata": {},
"outputs": [],
"source": [
"import spot\n",
"spot.setup()"
]
},
{
"cell_type": "markdown",
"id": "066489fd",
"metadata": {},
"source": [
"Test the Mealy printer."
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "08d7d512",
"metadata": {},
"outputs": [],
"source": [
"g = spot.ltl_to_game('G((a|c) <-> (b|d))', [\"b\", \"d\"])"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "4e5b66f4",
"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": "ce2ff962",
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
" *' at 0x7f3d8c04f720> >"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.highlight_strategy(g)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "3bcbeef2",
"metadata": {},
"outputs": [],
"source": [
"x = spot.apply_strategy(g, True, False)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "47d298f0",
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
" *' at 0x7f3d8c04f630> >"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"x"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "f0d098ac",
"metadata": {},
"outputs": [],
"source": [
"x.merge_edges()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "adf92ac7",
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
" *' at 0x7f3d8c04f630> >"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"x"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "6e8cd892",
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
" *' at 0x7f3d76e561e0> >"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spot.apply_strategy(g, True, True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5948f923",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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
}