Commit 74ec9c54 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

show how to implement product in Python

* wrap/python/tests/product.ipynb: New file.
* wrap/python/tests/Makefile.am, doc/org/tut.org: Add it.
* wrap/python/tests/ipnbdoctest.py: Ignore %timeit results.
* wrap/python/spot_impl.i: Add bindings for
set_state_names()/get_state_names().
* spot/twaalgos/product.cc: Fix computation of properties.
* doc/org/hoa.org: Name.
* NEWS: Update.
parent ad37cacb
......@@ -64,15 +64,25 @@ New in spot 1.99.6a (not yet released)
when calling for instance the Python version of twa_graph::new_edge().
See https://spot.lrde.epita.fr/tut22.html for a demonstration.
* Automaton states can be named via the set_state_names() method.
See https://spot.lrde.epita.fr/ipynb/product.html for an example.
Documentation:
* There is a new page explaining how to compile example programs and
and link them with Spot. https://spot.lrde.epita.fr/compile.html
* Python bindings for manipulating acceptance conditions are
demonstrated by https://spot.lrde.epita.fr/ipynb/acc_cond.html,
and a Python implementation of the product of two automata is
illustrated by https://spot.lrde.epita.fr/ipynb/product.html
Bug fixes:
* twa::ap() would contain duplicates when an atomic proposition
was registered several times.
* product() would incorrectly mark the product of two
sttuter-sensitive automata as stutter-sensitive as well.
New in spot 1.99.6 (2015-12-04)
......
......@@ -584,6 +584,9 @@ labels whenever that is possible. The option is named =k= (i.e., use
is used to describe a Kripke structure.
** Property bits
:PROPERTIES:
:CUSTOM_ID: property-bits
:END:
The =HOA= format supports a number of optional =property:= tokens.
These properties can be useful to speedup certain algorithms: for
......
......@@ -52,6 +52,8 @@ real notebooks instead.
- [[https://spot.lrde.epita.fr/ipynb/accparse.html][accparse.ipynb]] exercises the acceptance condition parser
- [[https://spot.lrde.epita.fr/ipynb/acc_cond.html][acc_cond.ipynb]] documents the interface for manipulating acceptance
conditions
- [[https://spot.lrde.epita.fr/ipynb/product.html][product.ipynb]] shows how to re-implement the product of two automata
in Python
- [[https://spot.lrde.epita.fr/ipynb/randltl.html][randltl.ipynb]] demonstrates a Python-version of [[file:randltl.org][=randltl=]]
- [[https://spot.lrde.epita.fr/ipynb/decompose.html][decompose.ipynb]] illustrates the =decompose_strength()= function
- [[https://spot.lrde.epita.fr/ipynb/testingaut.html][testingaut.ipynb]] shows the step necessary to build a testing
......
......@@ -105,8 +105,16 @@ namespace spot
&& right->prop_deterministic());
res->prop_stutter_invariant(left->prop_stutter_invariant()
&& right->prop_stutter_invariant());
res->prop_stutter_sensitive(left->prop_stutter_sensitive()
&& right->prop_stutter_sensitive());
// The product of X!a and Xa, two stutter-sentive formulas,
// is stutter-invariant.
//res->prop_stutter_sensitive(left->prop_stutter_sensitive()
// && right->prop_stutter_sensitive());
res->prop_inherently_weak(left->prop_inherently_weak()
&& right->prop_inherently_weak());
res->prop_weak(left->prop_weak()
&& right->prop_weak());
res->prop_terminal(left->prop_terminal()
&& right->prop_terminal());
res->prop_state_acc(left->prop_state_acc()
&& right->prop_state_acc());
return res;
......
......@@ -339,6 +339,7 @@ namespace std {
%template(liststr) list<std::string>;
%template(vectorformula) vector<spot::formula>;
%template(vectorunsigned) vector<unsigned>;
%template(vectorstring) vector<string>;
%template(atomic_prop_set) set<spot::formula>;
%template(relabeling_map) map<spot::formula, spot::formula>;
}
......@@ -465,6 +466,18 @@ namespace std {
std::string __str__() { return spot::str_psl(*self); }
}
%extend spot::bdd_dict {
bool operator==(const spot::bdd_dict& b) const
{
return self == &b;
}
bool operator!=(const spot::bdd_dict& b) const
{
return self != &b;
}
}
%extend spot::twa {
void set_name(std::string name)
{
......@@ -475,6 +488,17 @@ namespace std {
{
return self->get_named_prop<std::string>("automaton-name");
}
void set_state_names(std::vector<std::string> names)
{
self->set_named_prop("state-names",
new std::vector<std::string>(std::move(names)));
}
std::vector<std::string>* get_state_names()
{
return self->get_named_prop<std::vector<std::string>>("state-names");
}
}
......
......@@ -49,6 +49,7 @@ TESTS = \
optionmap.py \
parsetgba.py \
piperead.ipynb \
product.ipynb \
randaut.ipynb \
randgen.py \
randltl.ipynb \
......
......@@ -70,6 +70,9 @@ def sanitize(s):
# normalize graphviz version
s = re.sub(r'Generated by graphviz version.*', 'VERSION', s)
# ignore %timeit results
s = re.sub(r'^[0-9]+ loops, best of 3:.*per loop', '', s)
# SVG generated by graphviz may put note at different positions
# depending on the graphviz build. Let's just strip anything that
# look like a position.
......
{
"metadata": {
"name": "",
"signature": "sha256:50d5adbd44f5981c700cec9133b926c8edb75b3ff80a4cf28e7c26cf918fe04a"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"from IPython.display import display, HTML\n",
"import spot\n",
"import buddy\n",
"spot.setup(show_default='.tavb')\n",
"\n",
"def horiz(*args):\n",
" s = '<table><tr>'\n",
" for arg in args:\n",
" s += '<td style=\\\"vertical-align: top;\\\">' + arg.data + '</td>'\n",
" return HTML(s + '</tr></table>')"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Anatomy of a product\n",
"\n",
"In this notebook, we write a Python function that constructs the product of two automata.\n",
"\n",
"This is obviously not a new feature: Spot can already make a product of two automata using its `product()` function. \n",
"For instance:"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"a1 = spot.translate('X(a W b)')\n",
"a2 = spot.translate('G(Fc U b)')\n",
"prod = spot.product(a1, a2)\n",
"horiz(a1.show(), a2.show(), prod.show())"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"<table><tr><td style=\"vertical-align: top;\"><svg height=\"294pt\" viewBox=\"0.00 0.00 99.00 294.00\" width=\"99pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 290)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" points=\"-4,4 -4,-290 95,-290 95,4 -4,4\" stroke=\"none\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"24.5\" y=\"-271.8\">Inf(</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"46.5\" y=\"-271.8\">\u24ff</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"62.5\" y=\"-271.8\">)</text>\n",
"<!-- I -->\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node2\"><title>1</title>\n",
"<ellipse cx=\"18\" cy=\"-207\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"18\" y=\"-203.3\">1</text>\n",
"</g>\n",
"<!-- I&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge1\"><title>I-&gt;1</title>\n",
"<path d=\"M18,-261.845C18,-260.206 18,-245.846 18,-232.368\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"18,-225.058 21.1501,-232.058 18,-228.558 18.0001,-232.058 18.0001,-232.058 18.0001,-232.058 18,-228.558 14.8501,-232.058 18,-225.058 18,-225.058\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node3\"><title>0</title>\n",
"<ellipse cx=\"18\" cy=\"-120\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"18\" y=\"-116.3\">0</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge4\"><title>1-&gt;0</title>\n",
"<path d=\"M18,-188.799C18,-176.356 18,-159.364 18,-145.504\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"18,-138.175 21.1501,-145.175 18,-141.675 18.0001,-145.175 18.0001,-145.175 18.0001,-145.175 18,-141.675 14.8501,-145.175 18,-138.175 18,-138.175\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"22.5\" y=\"-159.8\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge2\"><title>0-&gt;0</title>\n",
"<path d=\"M34.6641,-127.383C44.625,-129.023 54,-126.562 54,-120 54,-115.078 48.7266,-112.463 41.8876,-112.156\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"34.6641,-112.617 41.449,-109.027 38.1569,-112.394 41.6498,-112.171 41.6498,-112.171 41.6498,-112.171 38.1569,-112.394 41.8507,-115.314 34.6641,-112.617 34.6641,-112.617\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"54\" y=\"-123.8\">a &amp; !b</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"64.5\" y=\"-108.8\">\u24ff</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node4\"><title>2</title>\n",
"<ellipse cx=\"18\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"18\" y=\"-14.3\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge3\"><title>0-&gt;2</title>\n",
"<path d=\"M18,-101.581C18,-85.5213 18,-61.5179 18,-43.5228\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"18,-36.2191 21.1501,-43.219 18,-39.7191 18.0001,-43.2191 18.0001,-43.2191 18.0001,-43.2191 18,-39.7191 14.8501,-43.2191 18,-36.2191 18,-36.2191\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"21.5\" y=\"-72.8\">b</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"18\" y=\"-57.8\">\u24ff</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge5\"><title>2-&gt;2</title>\n",
"<path d=\"M33.916,-26.6334C44.1504,-28.8856 54,-26.0078 54,-18 54,-11.869 48.2263,-8.74515 40.9268,-8.6284\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"33.916,-9.36658 40.5477,-5.50081 37.3968,-9.00004 40.8775,-8.6335 40.8775,-8.6335 40.8775,-8.6335 37.3968,-9.00004 41.2074,-11.7662 33.916,-9.36658 33.916,-9.36658\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"57.5\" y=\"-21.8\">1</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"54\" y=\"-6.8\">\u24ff</text>\n",
"</g>\n",
"</g>\n",
"</svg></td><td style=\"vertical-align: top;\"><svg height=\"207pt\" viewBox=\"0.00 0.00 208.07 207.00\" width=\"208pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 203)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" points=\"-4,4 -4,-203 204.071,-203 204.071,4 -4,4\" stroke=\"none\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"53.0356\" y=\"-184.8\">Inf(</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"75.0356\" y=\"-184.8\">\u24ff</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"91.0356\" y=\"-184.8\">)&amp;Inf(</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"127.036\" y=\"-184.8\">\u2776</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"143.036\" y=\"-184.8\">)</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
"<ellipse cx=\"68.0713\" cy=\"-120\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"68.0713\" y=\"-116.3\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge1\"><title>I-&gt;0</title>\n",
"<path d=\"M68.0713,-174.845C68.0713,-173.206 68.0713,-158.846 68.0713,-145.368\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"68.0713,-138.058 71.2214,-145.058 68.0713,-141.558 68.0714,-145.058 68.0714,-145.058 68.0714,-145.058 68.0713,-141.558 64.9214,-145.058 68.0713,-138.058 68.0713,-138.058\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge2\"><title>0-&gt;0</title>\n",
"<path d=\"M85.853,-123.236C95.3862,-123.786 104.071,-122.707 104.071,-120 104.071,-118.012 99.3874,-116.902 93.1234,-116.671\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"85.853,-116.764 92.8119,-113.524 89.3527,-116.719 92.8524,-116.674 92.8524,-116.674 92.8524,-116.674 89.3527,-116.719 92.893,-119.824 85.853,-116.764 85.853,-116.764\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"115.571\" y=\"-123.8\">b</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"104.071\" y=\"-109.8\">\u24ff</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"120.071\" y=\"-109.8\">\u2776</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge3\"><title>0-&gt;0</title>\n",
"<path d=\"M85.6154,-124.955C107.357,-128.472 136.071,-126.82 136.071,-120 136.071,-113.899 113.095,-111.934 92.6855,-114.104\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"85.6154,-115.045 92.139,-110.999 89.0849,-114.583 92.5543,-114.122 92.5543,-114.122 92.5543,-114.122 89.0849,-114.583 92.9696,-117.244 85.6154,-115.045 85.6154,-115.045\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"136.071\" y=\"-123.8\">!b &amp; c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"146.571\" y=\"-108.8\">\u24ff</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node3\"><title>1</title>\n",
"<ellipse cx=\"68.0713\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"68.0713\" y=\"-14.3\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge4\"><title>0-&gt;1</title>\n",
"<path d=\"M50.6907,-114.668C35.6563,-109.899 14.8429,-100.607 5.07128,-84 -1.69043,-72.5084 -1.69043,-65.4916 5.07128,-54 13.4688,-39.7284 30.0209,-30.8587 44.052,-25.6199\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"50.6907,-23.3321 45.0991,-28.591 47.3817,-24.4725 44.0727,-25.6129 44.0727,-25.6129 44.0727,-25.6129 47.3817,-24.4725 43.0464,-22.6348 50.6907,-23.3321 50.6907,-23.3321\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"5.07128\" y=\"-65.3\">!b &amp; !c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge5\"><title>1-&gt;0</title>\n",
"<path d=\"M68.0713,-36.2191C68.0713,-52.2129 68.0713,-76.208 68.0713,-94.2528\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"68.0713,-101.581 64.9214,-94.5813 68.0713,-98.0813 68.0714,-94.5813 68.0714,-94.5813 68.0714,-94.5813 68.0713,-98.0813 71.2214,-94.5814 68.0713,-101.581 68.0713,-101.581\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"68.0713\" y=\"-72.8\">b &amp; c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"69.0713\" y=\"-58.8\">\u24ff</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"85.0713\" y=\"-58.8\">\u2776</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge6\"><title>1-&gt;0</title>\n",
"<path d=\"M82.4143,-28.8784C90.112,-35.0878 98.862,-43.8378 103.071,-54 108.174,-66.3184 108.174,-71.6816 103.071,-84 99.8485,-91.7804 93.9641,-98.733 87.9281,-104.351\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"82.4143,-109.122 85.6472,-102.159 85.0612,-106.832 87.7082,-104.542 87.7082,-104.542 87.7082,-104.542 85.0612,-106.832 89.7691,-106.924 82.4143,-109.122 82.4143,-109.122\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"106.071\" y=\"-72.8\">!b &amp; c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"116.571\" y=\"-57.8\">\u24ff</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge7\"><title>1-&gt;1</title>\n",
"<path d=\"M85.853,-22.4941C95.3862,-23.2578 104.071,-21.7598 104.071,-18 104.071,-15.2389 99.3874,-13.6976 93.1234,-13.3761\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"85.853,-13.5059 92.7956,-10.2313 89.3525,-13.4434 92.8519,-13.3808 92.8519,-13.3808 92.8519,-13.3808 89.3525,-13.4434 92.9082,-16.5303 85.853,-13.5059 85.853,-13.5059\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"104.071\" y=\"-14.3\">!b &amp; !c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge8\"><title>1-&gt;1</title>\n",
"<path d=\"M85.0887,-24.4905C109.42,-29.8803 145.071,-27.7168 145.071,-18 145.071,-9.19415 115.791,-6.59174 92.1916,-10.1928\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"85.0887,-11.5095 91.3972,-7.13627 88.5301,-10.8715 91.9714,-10.2335 91.9714,-10.2335 91.9714,-10.2335 88.5301,-10.8715 92.5456,-13.3307 85.0887,-11.5095 85.0887,-11.5095\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"145.071\" y=\"-21.8\">b &amp; !c</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"155.571\" y=\"-6.8\">\u2776</text>\n",
"</g>\n",
"</g>\n",
"</svg></td><td style=\"vertical-align: top;\"><svg height=\"360pt\" viewBox=\"0.00 0.00 198.30 360.00\" width=\"198pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(0.704501 0.704501) rotate(0) translate(4 507)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" points=\"-4,4 -4,-507 277.475,-507 277.475,4 -4,4\" stroke=\"none\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"63.7375\" y=\"-488.8\">Inf(</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"85.7375\" y=\"-488.8\">\u24ff</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"101.738\" y=\"-488.8\">)&amp;Inf(</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"137.738\" y=\"-488.8\">\u2776</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"153.738\" y=\"-488.8\">)&amp;Inf(</text>\n",
"<text fill=\"#faa43a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"189.738\" y=\"-488.8\">\u2777</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"205.738\" y=\"-488.8\">)</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
"<ellipse cx=\"95.475\" cy=\"-424\" fill=\"#ffffaa\" rx=\"27\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"95.475\" y=\"-420.3\">1,0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge1\"><title>I-&gt;0</title>\n",
"<path d=\"M95.475,-478.845C95.475,-477.206 95.475,-462.846 95.475,-449.368\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"95.475,-442.058 98.6251,-449.058 95.4751,-445.558 95.4751,-449.058 95.4751,-449.058 95.4751,-449.058 95.4751,-445.558 92.3251,-449.058 95.475,-442.058 95.475,-442.058\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node3\"><title>1</title>\n",
"<ellipse cx=\"40.475\" cy=\"-322\" fill=\"#ffffaa\" rx=\"27\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"40.475\" y=\"-318.3\">0,0</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge2\"><title>0-&gt;1</title>\n",
"<path d=\"M72.561,-414.347C61.0631,-408.711 48.1841,-400.12 41.475,-388 34.6672,-375.701 34.2472,-359.983 35.6108,-347.084\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"36.5849,-339.863 38.7708,-347.221 36.117,-343.332 35.6491,-346.8 35.6491,-346.8 35.6491,-346.8 36.117,-343.332 32.5273,-346.379 36.5849,-339.863 36.5849,-339.863\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"52.975\" y=\"-376.8\">b</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"41.475\" y=\"-362.8\">\u2776</text>\n",
"<text fill=\"#faa43a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"57.475\" y=\"-362.8\">\u2777</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge3\"><title>0-&gt;1</title>\n",
"<path d=\"M91.882,-406.124C88.4919,-392.476 82.5581,-373.113 73.475,-358 70.0629,-352.323 65.5975,-346.804 61.059,-341.89\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"56.1519,-336.817 63.2828,-339.658 58.5852,-339.333 61.0186,-341.848 61.0186,-341.848 61.0186,-341.848 58.5852,-339.333 58.7544,-344.038 56.1519,-336.817 56.1519,-336.817\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"85.475\" y=\"-376.8\">!b &amp; c</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"95.975\" y=\"-361.8\">\u2776</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node4\"><title>2</title>\n",
"<ellipse cx=\"114.475\" cy=\"-220\" fill=\"#ffffaa\" rx=\"27\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"114.475\" y=\"-216.3\">0,1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge4\"><title>0-&gt;2</title>\n",
"<path d=\"M109.317,-408.473C114.89,-402.349 121.228,-395.022 126.475,-388 156.696,-347.557 167.568,-335.695 176.475,-286 178.827,-272.876 183.198,-267.515 176.475,-256 169.639,-244.291 157.279,-236.191 145.384,-230.756\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"138.861,-228.005 146.535,-227.823 142.086,-229.365 145.311,-230.725 145.311,-230.725 145.311,-230.725 142.086,-229.365 144.086,-233.628 138.861,-228.005 138.861,-228.005\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"172.475\" y=\"-318.3\">!b &amp; !c</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge5\"><title>1-&gt;1</title>\n",
"<path d=\"M64.0896,-331.146C75.4482,-332.275 85.475,-329.227 85.475,-322 85.475,-316.354 79.3551,-313.258 71.2615,-312.713\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"64.0896,-312.854 71.0262,-309.567 67.589,-312.785 71.0883,-312.716 71.0883,-312.716 71.0883,-312.716 67.589,-312.785 71.1503,-315.865 64.0896,-312.854 64.0896,-312.854\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"85.475\" y=\"-325.8\">a &amp; !b &amp; c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"100.475\" y=\"-311.8\">\u24ff</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"116.475\" y=\"-311.8\">\u2776</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge6\"><title>1-&gt;2</title>\n",
"<path d=\"M61.9369,-310.795C72.4273,-304.855 84.4815,-296.464 92.475,-286 101.567,-274.098 107.035,-258.21 110.246,-245.121\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"111.806,-238.181 113.344,-245.701 111.038,-241.596 110.27,-245.01 110.27,-245.01 110.27,-245.01 111.038,-241.596 107.197,-244.32 111.806,-238.181 111.806,-238.181\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"106.475\" y=\"-274.8\">a &amp; !b &amp; !c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"131.475\" y=\"-259.8\">\u24ff</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node5\"><title>3</title>\n",
"<ellipse cx=\"93.475\" cy=\"-18\" fill=\"#ffffaa\" rx=\"27\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"93.475\" y=\"-14.3\">2,0</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge7\"><title>1-&gt;3</title>\n",
"<path d=\"M28.3704,-305.878C24.4066,-300.02 20.5022,-293.034 18.475,-286 14.7828,-273.188 18.343,-269.333 18.475,-256 19.364,-166.209 -25.7013,-129.778 22.475,-54 31.0924,-40.4456 46.64,-31.9724 60.9938,-26.766\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"67.9087,-24.4646 62.2617,-29.664 64.5878,-25.5699 61.2669,-26.6752 61.2669,-26.6752 61.2669,-26.6752 64.5878,-25.5699 60.2722,-23.6864 67.9087,-24.4646 67.9087,-24.4646\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"29.975\" y=\"-173.8\">b</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"10.475\" y=\"-159.8\">\u24ff</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"26.475\" y=\"-159.8\">\u2776</text>\n",
"<text fill=\"#faa43a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"42.475\" y=\"-159.8\">\u2777</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge8\"><title>2-&gt;1</title>\n",
"<path d=\"M87.9982,-223.68C67.4145,-227.312 40.1371,-235.863 26.475,-256 18.031,-268.446 21.8083,-285.06 27.5543,-298.375\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"30.6842,-304.998 24.8452,-300.015 29.1887,-301.834 27.6932,-298.669 27.6932,-298.669 27.6932,-298.669 29.1887,-301.834 30.5412,-297.323 30.6842,-304.998 30.6842,-304.998\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"26.475\" y=\"-274.8\">a &amp; !b &amp; c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"41.475\" y=\"-260.8\">\u24ff</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"57.475\" y=\"-260.8\">\u2776</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge9\"><title>2-&gt;2</title>\n",
"<path d=\"M138.09,-229.146C149.448,-230.275 159.475,-227.227 159.475,-220 159.475,-214.354 153.355,-211.258 145.261,-210.713\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"138.09,-210.854 145.026,-207.567 141.589,-210.785 145.088,-210.716 145.088,-210.716 145.088,-210.716 141.589,-210.785 145.15,-213.865 138.09,-210.854 138.09,-210.854\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"159.475\" y=\"-223.8\">a &amp; !b &amp; !c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"184.475\" y=\"-208.8\">\u24ff</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge10\"><title>2-&gt;3</title>\n",
"<path d=\"M137.075,-209.51C162.929,-197.264 203.945,-173.257 221.475,-138 228.598,-123.673 226.828,-117.078 221.475,-102 212.278,-76.0968 204.66,-70.2291 182.475,-54 165.44,-41.5381 143.376,-32.8221 125.48,-27.2048\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"118.594,-25.1301 126.205,-24.1336 121.945,-26.1399 125.297,-27.1497 125.297,-27.1497 125.297,-27.1497 121.945,-26.1399 124.388,-30.1657 118.594,-25.1301 118.594,-25.1301\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"232.475\" y=\"-123.8\">b &amp; c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225.475\" y=\"-109.8\">\u24ff</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"241.475\" y=\"-109.8\">\u2776</text>\n",
"<text fill=\"#faa43a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"257.475\" y=\"-109.8\">\u2777</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g class=\"node\" id=\"node6\"><title>4</title>\n",
"<ellipse cx=\"71.475\" cy=\"-120\" fill=\"#ffffaa\" rx=\"27\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"71.475\" y=\"-116.3\">2,1</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge11\"><title>2-&gt;4</title>\n",
"<path d=\"M107.181,-202.376C100.158,-186.37 89.4748,-162.023 81.6234,-144.129\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"78.6617,-137.379 84.3589,-142.523 80.068,-140.584 81.4743,-143.789 81.4743,-143.789 81.4743,-143.789 80.068,-140.584 78.5898,-145.055 78.6617,-137.379 78.6617,-137.379\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"97.475\" y=\"-173.8\">b &amp; !c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"99.975\" y=\"-159.8\">\u24ff</text>\n",
"<text fill=\"#faa43a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"115.975\" y=\"-159.8\">\u2777</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge12\"><title>3-&gt;3</title>\n",
"<path d=\"M119.822,-22.6692C130.008,-22.8767 138.475,-21.3203 138.475,-18 138.475,-15.5098 133.712,-14.0117 127.034,-13.5059\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"119.822,-13.3308 126.896,-10.3517 123.321,-13.4158 126.82,-13.5008 126.82,-13.5008 126.82,-13.5008 123.321,-13.4158 126.743,-16.6499 119.822,-13.3308 119.822,-13.3308\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"157.975\" y=\"-21.8\">b</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"138.475\" y=\"-7.8\">\u24ff</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"154.475\" y=\"-7.8\">\u2776</text>\n",
"<text fill=\"#faa43a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"170.475\" y=\"-7.8\">\u2777</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge13\"><title>3-&gt;3</title>\n",
"<path d=\"M118.238,-25.2458C147.231,-29.6438 186.475,-27.2285 186.475,-18 186.475,-9.49246 153.123,-6.77518 125.198,-9.84815\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"118.238,-10.7542 124.773,-6.72675 121.709,-10.3023 125.18,-9.85039 125.18,-9.85039 125.18,-9.85039 121.709,-10.3023 125.586,-12.974 118.238,-10.7542 118.238,-10.7542\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"186.475\" y=\"-21.8\">!b &amp; c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"188.975\" y=\"-7.8\">\u24ff</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"204.975\" y=\"-7.8\">\u2776</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge14\"><title>3-&gt;4</title>\n",
"<path d=\"M69.0276,-25.7806C55.0894,-31.0394 38.7873,-39.8733 30.475,-54 23.7133,-65.4916 24.8914,-71.8921 30.475,-84 33.8958,-91.4178 39.7499,-97.846 45.9805,-103.097\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"51.7492,-107.583 44.2897,-105.773 48.9863,-105.435 46.2234,-103.286 46.2234,-103.286 46.2234,-103.286 48.9863,-105.435 48.1572,-100.799 51.7492,-107.583 51.7492,-107.583\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"30.475\" y=\"-72.8\">!b &amp; !c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"42.975\" y=\"-57.8\">\u24ff</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge15\"><title>4-&gt;3</title>\n",
"<path d=\"M75.207,-102.036C78.7785,-85.8025 84.2001,-61.1589 88.2101,-42.9316\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"89.7247,-36.0469 91.297,-43.5602 88.9727,-39.4651 88.2206,-42.8834 88.2206,-42.8834 88.2206,-42.8834 88.9727,-39.4651 85.1442,-42.2065 89.7247,-36.0469 89.7247,-36.0469\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92.475\" y=\"-72.8\">b &amp; c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"85.475\" y=\"-58.8\">\u24ff</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"101.475\" y=\"-58.8\">\u2776</text>\n",
"<text fill=\"#faa43a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"117.475\" y=\"-58.8\">\u2777</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge16\"><title>4-&gt;3</title>\n",
"<path d=\"M96.384,-112.762C111.116,-107.651 128.583,-98.7811 137.475,-84 144.348,-72.5749 143.268,-66.0093 137.475,-54 133.632,-46.0326 126.996,-39.32 120.026,-33.9723\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"114.146,-29.8036 121.679,-31.2827 117.001,-31.828 119.857,-33.8524 119.857,-33.8524 119.857,-33.8524 117.001,-31.828 118.035,-36.422 114.146,-29.8036 114.146,-29.8036\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"141.475\" y=\"-72.8\">!b &amp; c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"143.975\" y=\"-58.8\">\u24ff</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"159.975\" y=\"-58.8\">\u2776</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge17\"><title>4-&gt;4</title>\n",
"<path d=\"M97.8216,-124.669C108.008,-124.877 116.475,-123.32 116.475,-120 116.475,-117.51 111.712,-116.012 105.034,-115.506\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"97.8216,-115.331 104.896,-112.352 101.321,-115.416 104.82,-115.501 104.82,-115.501 104.82,-115.501 101.321,-115.416 104.743,-118.65 97.8216,-115.331 97.8216,-115.331\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"116.475\" y=\"-123.8\">!b &amp; !c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"128.975\" y=\"-108.8\">\u24ff</text>\n",
"</g>\n",
"<!-- 4&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge18\"><title>4-&gt;4</title>\n",
"<path d=\"M96.3425,-127.45C123.162,-131.565 157.475,-129.082 157.475,-120 157.475,-111.698 128.806,-108.91 103.396,-111.635\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"96.3425,-112.55 102.879,-108.526 99.8135,-112.1 103.284,-111.65 103.284,-111.65 103.284,-111.65 99.8135,-112.1 103.69,-114.773 96.3425,-112.55 96.3425,-112.55\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"157.475\" y=\"-123.8\">b &amp; !c</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"159.975\" y=\"-109.8\">\u24ff</text>\n",
"<text fill=\"#faa43a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"175.975\" y=\"-109.8\">\u2777</text>\n",
"</g>\n",
"</g>\n",
"</svg></td></tr></table>"
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 2,
"text": [
"<IPython.core.display.HTML at 0x7fc8fd6de160>"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The builtin `spot.product()` function produces an automaton whose language is the intersection of the two input languages. It does so by building an automaton that keeps track of the runs in the two input automata. The states are labeled by pairs of input states so that we can more easily follow what is going on, but those labels are purely cosmetic. The acceptance condition is the conjunction of the two acceptance condition, but the acceptance sets of one input automaton have been shifted to not conflict with the other automaton.\n",
"\n",
"In fact, that automaton printer has an option to shift those sets in its output, and this is perfect for illustrating products. For instance `a.show('+3')` will display `a1` with all its acceptance sets shifted by 3. \n",
"\n",
"Let's define a function for displaying the three automata involved in a product, using this shift option so we can follow what is going on with the acceptance sets."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"def show_prod(a1, a2, res):\n",
" s1 = a1.num_sets()\n",
" display(horiz(a1.show(), a2.show('.tavb+{}'.format(s1)), res.show()))\n",
"\n",
"show_prod(a1, a2, prod)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"<table><tr><td style=\"vertical-align: top;\"><svg height=\"294pt\" viewBox=\"0.00 0.00 99.00 294.00\" width=\"99pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 290)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" points=\"-4,4 -4,-290 95,-290 95,4 -4,4\" stroke=\"none\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"24.5\" y=\"-271.8\">Inf(</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"46.5\" y=\"-271.8\">\u24ff</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"62.5\" y=\"-271.8\">)</text>\n",
"<!-- I -->\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node2\"><title>1</title>\n",
"<ellipse cx=\"18\" cy=\"-207\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"18\" y=\"-203.3\">1</text>\n",
"</g>\n",
"<!-- I&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge1\"><title>I-&gt;1</title>\n",
"<path d=\"M18,-261.845C18,-260.206 18,-245.846 18,-232.368\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"18,-225.058 21.1501,-232.058 18,-228.558 18.0001,-232.058 18.0001,-232.058 18.0001,-232.058 18,-228.558 14.8501,-232.058 18,-225.058 18,-225.058\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node3\"><title>0</title>\n",
"<ellipse cx=\"18\" cy=\"-120\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"18\" y=\"-116.3\">0</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge4\"><title>1-&gt;0</title>\n",
"<path d=\"M18,-188.799C18,-176.356 18,-159.364 18,-145.504\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"18,-138.175 21.1501,-145.175 18,-141.675 18.0001,-145.175 18.0001,-145.175 18.0001,-145.175 18,-141.675 14.8501,-145.175 18,-138.175 18,-138.175\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"22.5\" y=\"-159.8\">1</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge2\"><title>0-&gt;0</title>\n",
"<path d=\"M34.6641,-127.383C44.625,-129.023 54,-126.562 54,-120 54,-115.078 48.7266,-112.463 41.8876,-112.156\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"34.6641,-112.617 41.449,-109.027 38.1569,-112.394 41.6498,-112.171 41.6498,-112.171 41.6498,-112.171 38.1569,-112.394 41.8507,-115.314 34.6641,-112.617 34.6641,-112.617\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"54\" y=\"-123.8\">a &amp; !b</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"64.5\" y=\"-108.8\">\u24ff</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node4\"><title>2</title>\n",
"<ellipse cx=\"18\" cy=\"-18\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"18\" y=\"-14.3\">2</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge3\"><title>0-&gt;2</title>\n",
"<path d=\"M18,-101.581C18,-85.5213 18,-61.5179 18,-43.5228\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"18,-36.2191 21.1501,-43.219 18,-39.7191 18.0001,-43.2191 18.0001,-43.2191 18.0001,-43.2191 18,-39.7191 14.8501,-43.2191 18,-36.2191 18,-36.2191\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"21.5\" y=\"-72.8\">b</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"18\" y=\"-57.8\">\u24ff</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge5\"><title>2-&gt;2</title>\n",
"<path d=\"M33.916,-26.6334C44.1504,-28.8856 54,-26.0078 54,-18 54,-11.869 48.2263,-8.74515 40.9268,-8.6284\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"33.916,-9.36658 40.5477,-5.50081 37.3968,-9.00004 40.8775,-8.6335 40.8775,-8.6335 40.8775,-8.6335 37.3968,-9.00004 41.2074,-11.7662 33.916,-9.36658 33.916,-9.36658\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"57.5\" y=\"-21.8\">1</text>\n",
"<text fill=\"#5da5da\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"54\" y=\"-6.8\">\u24ff</text>\n",
"</g>\n",
"</g>\n",
"</svg></td><td style=\"vertical-align: top;\"><svg height=\"207pt\" viewBox=\"0.00 0.00 208.07 207.00\" width=\"208pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 203)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" points=\"-4,4 -4,-203 204.071,-203 204.071,4 -4,4\" stroke=\"none\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"53.0356\" y=\"-184.8\">Inf(</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"75.0356\" y=\"-184.8\">\u2776</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"91.0356\" y=\"-184.8\">)&amp;Inf(</text>\n",
"<text fill=\"#faa43a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"127.036\" y=\"-184.8\">\u2777</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"143.036\" y=\"-184.8\">)</text>\n",
"<!-- I -->\n",
"<!-- 0 -->\n",
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
"<ellipse cx=\"68.0713\" cy=\"-120\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"68.0713\" y=\"-116.3\">0</text>\n",
"</g>\n",
"<!-- I&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge1\"><title>I-&gt;0</title>\n",
"<path d=\"M68.0713,-174.845C68.0713,-173.206 68.0713,-158.846 68.0713,-145.368\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"68.0713,-138.058 71.2214,-145.058 68.0713,-141.558 68.0714,-145.058 68.0714,-145.058 68.0714,-145.058 68.0713,-141.558 64.9214,-145.058 68.0713,-138.058 68.0713,-138.058\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge2\"><title>0-&gt;0</title>\n",
"<path d=\"M85.853,-123.236C95.3862,-123.786 104.071,-122.707 104.071,-120 104.071,-118.012 99.3874,-116.902 93.1234,-116.671\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"85.853,-116.764 92.8119,-113.524 89.3527,-116.719 92.8524,-116.674 92.8524,-116.674 92.8524,-116.674 89.3527,-116.719 92.893,-119.824 85.853,-116.764 85.853,-116.764\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"115.571\" y=\"-123.8\">b</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"104.071\" y=\"-109.8\">\u2776</text>\n",
"<text fill=\"#faa43a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"120.071\" y=\"-109.8\">\u2777</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g class=\"edge\" id=\"edge3\"><title>0-&gt;0</title>\n",
"<path d=\"M85.6154,-124.955C107.357,-128.472 136.071,-126.82 136.071,-120 136.071,-113.899 113.095,-111.934 92.6855,-114.104\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"85.6154,-115.045 92.139,-110.999 89.0849,-114.583 92.5543,-114.122 92.5543,-114.122 92.5543,-114.122 89.0849,-114.583 92.9696,-117.244 85.6154,-115.045 85.6154,-115.045\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"136.071\" y=\"-123.8\">!b &amp; c</text>\n",
"<text fill=\"#f17cb0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"146.571\" y=\"-108.8\">\u2776</text>\n",