Commit 16204e8e authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

python: better bindings for testing automata

* src/taalgos/dotty.cc, src/taalgos/dotty.hh: Add an interface
similar to that of tgba/dotty.hh, even if we have to ignore
most options.
* src/taalgos/tgba2ta.cc, src/taalgos/tgba2ta.hh: Add an option
to display the intermediate automaton with explicit stuttering
transitions, for the purpose of making demonstrations.
* src/tgba/tgbagraph.hh: Tweak the file so that SWIG can
read it.
* wrap/python/spot.py: Add wrappers for testing automata.
* wrap/python/spot_impl.i: Fix support for
atomic_prop_collect_as_bdd, and include a few more files.
* wrap/python/tests/testingaut.ipynb: New file.
* wrap/python/tests/Makefile.am: Add it.
parent 7bb183b9
......@@ -23,6 +23,8 @@
#include "reachiter.hh"
#include "misc/escape.hh"
#include "misc/bareword.hh"
#include <cstdlib>
#include <cstring>
namespace spot
{
......@@ -30,10 +32,83 @@ namespace spot
{
class dotty_bfs : public ta_reachable_iterator_breadth_first
{
void
parse_opts(const char* options)
{
const char* orig = options;
while (char c = *options++)
switch (c)
{
case '.':
{
// Copy the value in a string, so future calls to
// parse_opts do not fail if the environment has
// changed. (This matters particularly in an ipython
// notebook, where it is tempting to redefine
// SPOT_DOTDEFAULT.)
static std::string def = []()
{
auto s = getenv("SPOT_DOTDEFAULT");
return s ? s : "";
}();
// Prevent infinite recursions...
if (orig == def.c_str())
throw std::runtime_error
(std::string("SPOT_DOTDEFAULT should not contain '.'"));
if (!def.empty())
parse_opts(def.c_str());
break;
}
case 'A':
opt_hide_sets_ = true;
break;
case 'c':
opt_circles_ = true;
break;
case 'h':
opt_horizontal_ = true;
break;
case 'f':
if (*options != '(')
throw std::runtime_error
(std::string("invalid font specification for dotty()"));
{
auto* end = strchr(++options, ')');
if (!end)
throw std::runtime_error
(std::string("invalid font specification for dotty()"));
opt_font_ = std::string(options, end - options);
options = end + 1;
}
break;
case 'v':
opt_horizontal_ = false;
break;
case 'a':
case 'b':
case 'n':
case 'N':
case 'r':
case 'R':
case 's':
case 't':
// All these options are implemented by dotty() on TGBA,
// but are not implemented here. We simply ignore them,
// because raising an exception if they are in
// SPOT_DEFAULT would be annoying.
break;
default:
throw std::runtime_error
(std::string("unknown option for dotty(): ") + c);
}
}
public:
dotty_bfs(std::ostream& os, const const_ta_ptr& a) :
dotty_bfs(std::ostream& os, const const_ta_ptr& a,
const char* opt) :
ta_reachable_iterator_breadth_first(a), os_(os)
{
parse_opts(opt ? opt : ".");
}
void
......@@ -41,6 +116,16 @@ namespace spot
{
os_ << "digraph G {\n";
if (opt_horizontal_)
os_ << " rankdir=LR\n";
if (opt_circles_)
os_ << " node [shape=\"circle\"]\n";
if (!opt_font_.empty())
os_ << " fontname=\"" << opt_font_
<< "\"\n node [fontname=\"" << opt_font_
<< "\"]\n edge [fontname=\"" << opt_font_
<< "\"]\n";
// Always copy the environment variable into a static string,
// so that we (1) look it up once, but (2) won't crash if the
// environment is changed.
......@@ -120,8 +205,12 @@ namespace spot
if (label.empty())
label = "{}";
label += "\n";
label += t_automata_->acc().format(si->current_acceptance_conditions());
if (!opt_hide_sets_)
{
label += "\n";
label += t_automata_->acc().
format(si->current_acceptance_conditions());
}
os_ << " " << in << " -> " << out << " [label=\"";
escape_str(os_, label);
......@@ -131,14 +220,19 @@ namespace spot
private:
std::ostream& os_;
spot::state* artificial_initial_state_;
bool opt_horizontal_ = true;
bool opt_circles_ = false;
bool opt_hide_sets_ = false;
std::string opt_font_;
};
}
std::ostream&
dotty_reachable(std::ostream& os, const const_ta_ptr& a)
dotty_reachable(std::ostream& os, const const_ta_ptr& a, const char* opt)
{
dotty_bfs d(os, a);
dotty_bfs d(os, a, opt);
d.run();
return os;
}
......
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2013, 2014 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2010, 2013, 2014, 2015 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
......@@ -25,5 +25,6 @@
namespace spot
{
SPOT_API std::ostream&
dotty_reachable(std::ostream& os, const const_ta_ptr& a);
dotty_reachable(std::ostream& os, const const_ta_ptr& a,
const char* opt = nullptr);
}
......@@ -410,7 +410,8 @@ namespace spot
build_ta(const ta_explicit_ptr& ta, bdd atomic_propositions_set_,
bool degeneralized,
bool single_pass_emptiness_check,
bool artificial_livelock_state_mode)
bool artificial_livelock_state_mode,
bool no_livelock)
{
std::stack<state_ta_explicit*> todo;
......@@ -517,6 +518,9 @@ namespace spot
delete tgba_succ_it;
}
if (no_livelock)
return ta;
state_ta_explicit* artificial_livelock_acc_state = 0;
trace << "*** build_ta: artificial_livelock_acc_state_mode = ***"
......@@ -541,8 +545,10 @@ namespace spot
ta_explicit_ptr
tgba_to_ta(const const_tgba_ptr& tgba_, bdd atomic_propositions_set_,
bool degeneralized, bool artificial_initial_state_mode,
bool single_pass_emptiness_check, bool artificial_livelock_state_mode)
bool degeneralized, bool artificial_initial_state_mode,
bool single_pass_emptiness_check,
bool artificial_livelock_state_mode,
bool no_livelock)
{
ta_explicit_ptr ta;
......@@ -563,7 +569,8 @@ namespace spot
// build ta automaton
build_ta(ta, atomic_propositions_set_, degeneralized,
single_pass_emptiness_check, artificial_livelock_state_mode);
single_pass_emptiness_check, artificial_livelock_state_mode,
no_livelock);
// (degeneralized=true) => TA
if (degeneralized)
......@@ -607,7 +614,7 @@ namespace spot
// build a Generalized TA automaton involving a single_pass_emptiness_check
// (without an artificial livelock state):
auto ta = tgta->get_ta();
build_ta(ta, atomic_propositions_set_, false, true, false);
build_ta(ta, atomic_propositions_set_, false, true, false, false);
trace << "***tgba_to_tgbta: POST build_ta***" << std::endl;
......
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2012, 2013, 2014 Laboratoire de Recherche et
// Copyright (C) 2010, 2012, 2013, 2014, 2015 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
......@@ -75,6 +75,9 @@ namespace spot
/// Buchi-accepting state, then s has no successors. A STA product requires
/// only one-pass emptiness check algorithm (see spot::ta_check::check)
///
/// \param no_livelock when set, this disable the replacement of
/// stuttering components by livelock states. Use this flag to
/// demonstrate an intermediate step of the construction.
///
/// \return A spot::ta_explicit that recognizes the same language as the
/// TGBA \a tgba_to_convert.
......@@ -83,7 +86,8 @@ namespace spot
bool degeneralized = true,
bool artificial_initial_state_mode = true,
bool single_pass_emptiness_check = false,
bool artificial_livelock_state_mode = false);
bool artificial_livelock_state_mode = false,
bool no_livelock = false);
/// \ingroup tgba_ta
/// \brief Build a spot::tgta_explicit* (TGTA) from an LTL formula.
......
......@@ -381,6 +381,7 @@ namespace spot
return g_.new_transition(src, dst, cond);
}
#ifndef SWIG
auto out(unsigned src) const
SPOT_RETURN(g_.out(src));
auto out(unsigned src)
......@@ -403,6 +404,7 @@ namespace spot
auto is_dead_transition(const graph_t::trans_storage_t& t) const
SPOT_RETURN(g_.is_dead_transition(t));
#endif
virtual bdd compute_support_conditions(const state* s) const
{
......
......@@ -46,6 +46,7 @@ def _render_automaton_as_svg(a, opt=None):
return _ostream_to_svg(ostr)
tgba._repr_svg_ = _render_automaton_as_svg
ta._repr_svg_ = _render_automaton_as_svg
def _render_formula_as_svg(a):
# Load the SVG function only if we need it. This way the bindings
......@@ -56,13 +57,14 @@ def _render_formula_as_svg(a):
dotty(ostr, a)
return SVG(_ostream_to_svg(ostr))
def _render_tgba_as_svg(a, opt=None):
def _return_automaton_as_svg(a, opt=None):
# Load the SVG function only if we need it. This way the bindings
# can still be used outside of IPython if IPython is not
# installed.
from IPython.display import SVG
return SVG(_render_automaton_as_svg(a, opt))
tgba.show = _render_tgba_as_svg
tgba.show = _return_automaton_as_svg
ta.show = _return_automaton_as_svg
def _formula_str_ctor(self, str):
self.this = parse_formula(str)
......
......@@ -135,6 +135,7 @@ namespace std {
#include "tgbaalgos/isdet.hh"
#include "tgbaalgos/simulation.hh"
#include "tgbaalgos/postproc.hh"
#include "tgbaalgos/product.hh"
#include "tgbaalgos/stutter.hh"
#include "tgbaalgos/translate.hh"
#include "tgbaalgos/hoa.hh"
......@@ -225,7 +226,14 @@ using namespace spot;
%include "ltlparse/public.hh"
/* these must come before apcollect.hh */
%include "tgba/bdddict.hh"
%include "tgba/bddprint.hh"
%include "tgba/fwd.hh"
%feature("flatnested") spot::acc_cond::mark_t;
%feature("flatnested") spot::acc_cond::acc_code;
%include "tgba/acc.hh"
%include "tgba/tgba.hh"
%include "ltlvisit/apcollect.hh"
%include "ltlvisit/dotty.hh"
......@@ -243,21 +251,9 @@ using namespace spot;
// Help SWIG with namespace lookups.
#define ltl spot::ltl
%include "tgba/bddprint.hh"
%include "tgba/fwd.hh"
%feature("flatnested") spot::acc_cond::mark_t;
%include "tgba/acc.hh"
%include "tgba/tgba.hh"
%include "tgba/taatgba.hh"
%include "tgba/tgbaproduct.hh"
// We won't parse tgba_digraph, so just pretend it is a subclass of tgba.
%nodefaultctor spot::tgba_digraph;
namespace spot {
class tgba_digraph: public tgba
{
};
}
%include "tgba/tgbagraph.hh"
// Should come after the definition of tgba_digraph
......@@ -280,6 +276,7 @@ namespace spot {
%include "tgbaalgos/isdet.hh"
%include "tgbaalgos/simulation.hh"
%include "tgbaalgos/postproc.hh"
%include "tgbaalgos/product.hh"
%include "tgbaalgos/stutter.hh"
%include "tgbaalgos/translate.hh"
%include "tgbaalgos/hoa.hh"
......
......@@ -47,4 +47,5 @@ TESTS = \
piperead.ipynb \
randaut.ipynb \
randltl.ipynb \
setxor.py
setxor.py \
testingaut.ipynb
{
"metadata": {
"name": "",
"signature": "sha256:89d455537d395ae2842b209c6c14a262e15747fd501a731df0cd235f8c95011f"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"import os\n",
"from IPython.display import display, HTML\n",
"# Note that Spot (loaded by the kernel) will store a copy of\n",
"# the environment variables the first time it reads them, so\n",
"# if you change those variables, the new values will be ignored\n",
"# until you restart the kernel.\n",
"os.environ['SPOT_DOTEXTRA'] = 'size=\"10.2,5\" node[style=filled,fillcolor=\"#ffffaa\"] edge[arrowhead=vee, arrowsize=.7]'\n",
"os.environ['SPOT_DOTDEFAULT'] = 'rbcf(Lato)'\n",
"import spot"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To translate a formula into a Testing Automaton\n",
"\n",
"Start by building a Buchi automaton"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"f = spot.formula('a U Gb')\n",
"a = f.translate('ba')\n",
"a"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 2,
"svg": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.38.0 (20140413.2041)\n",
" -->\n",
"<!-- Title: G Pages: 1 -->\n",
"<svg width=\"181pt\" height=\"95pt\"\n",
" viewBox=\"0.00 0.00 180.74 94.74\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 90.7401)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-90.7401 176.74,-90.7401 176.74,4 -4,4\"/>\n",
"<!-- I -->\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-26.8701\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"56\" y=\"-23.1701\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
"</g>\n",
"<!-- I&#45;&gt;1 -->\n",
"<g id=\"edge1\" class=\"edge\"><title>I&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M1.15491,-26.8701C2.79388,-26.8701 17.1543,-26.8701 30.6317,-26.8701\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"37.9419,-26.8701 30.9419,-30.0202 34.4419,-26.8701 30.9419,-26.8702 30.9419,-26.8702 30.9419,-26.8702 34.4419,-26.8701 30.9418,-23.7202 37.9419,-26.8701 37.9419,-26.8701\"/>\n",
"</g>\n",
"<!-- 1&#45;&gt;1 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M49.6208,-43.9074C48.3189,-53.728 50.4453,-62.8701 56,-62.8701 60.166,-62.8701 62.4036,-57.7276 62.7128,-51.0134\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"62.3792,-43.9074 65.8541,-50.7519 62.5434,-47.4035 62.7076,-50.8997 62.7076,-50.8997 62.7076,-50.8997 62.5434,-47.4035 59.561,-51.0474 62.3792,-43.9074 62.3792,-43.9074\"/>\n",
"<text text-anchor=\"start\" x=\"52.5\" y=\"-66.6701\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
"</g>\n",
"<!-- 0 -->\n",
"<g id=\"node3\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"145.87\" cy=\"-26.8701\" rx=\"26.7407\" ry=\"26.7407\"/>\n",
"<text text-anchor=\"start\" x=\"141.37\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
"<text text-anchor=\"start\" x=\"137.87\" y=\"-15.6701\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#5da5da\">\u24ff</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;0 -->\n",
"<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M74.3603,-26.8701C84.98,-26.8701 98.9179,-26.8701 111.595,-26.8701\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"118.879,-26.8701 111.88,-30.0202 115.379,-26.8701 111.879,-26.8702 111.879,-26.8702 111.879,-26.8702 115.379,-26.8701 111.879,-23.7202 118.879,-26.8701 118.879,-26.8701\"/>\n",
"<text text-anchor=\"start\" x=\"92\" y=\"-30.6701\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>0&#45;&gt;0</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M136.949,-52.2401C136.334,-62.7939 139.308,-71.7401 145.87,-71.7401 150.894,-71.7401 153.815,-66.496 154.632,-59.3013\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"154.791,-52.2401 157.783,-59.3092 154.712,-55.7392 154.633,-59.2383 154.633,-59.2383 154.633,-59.2383 154.712,-55.7392 151.484,-59.1674 154.791,-52.2401 154.791,-52.2401\"/>\n",
"<text text-anchor=\"start\" x=\"141.37\" y=\"-75.5401\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text": [
"<spot_impl.tgba_digraph; proxy of <Swig Object of type 'std::shared_ptr< spot::tgba_digraph > *' at 0x7f1eb80416f0> >"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then, gather all the atomic proposition in the formula, and create an automaton with changesets"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"propset = spot.atomic_prop_collect_as_bdd(f, a)\n",
"ta = spot.tgba_to_ta(a, propset, True, True, False, False, True)\n",
"ta.show('.A')"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 3,
"svg": [
"<svg height=\"295pt\" viewBox=\"0.00 0.00 734.00 295.42\" width=\"734pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g class=\"graph\" id=\"graph0\" transform=\"scale(0.749788 0.749788) rotate(0) translate(4 390)\">\n",
"<title>G</title>\n",
"<polygon fill=\"white\" points=\"-4,4 -4,-390 974.944,-390 974.944,4 -4,4\" stroke=\"none\"/>\n",
"<!-- 0 -->\n",
"<!-- 1 -->\n",
"<g class=\"node\" id=\"node2\"><title>1</title>\n",
"<ellipse cx=\"62.6978\" cy=\"-256\" fill=\"#ffffaa\" rx=\"24.8972\" ry=\"24.8972\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"62.6978\" y=\"-252.3\">init</text>\n",
"</g>\n",
"<!-- 0&#45;&gt;1 -->\n",
"<g class=\"edge\" id=\"edge1\"><title>0-&gt;1</title>\n",
"<path d=\"M1.04399,-256C1.93865,-256 16.3331,-256 30.8732,-256\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"37.9642,-256 30.9643,-259.15 34.4642,-256 30.9642,-256 30.9642,-256 30.9642,-256 34.4642,-256 30.9642,-252.85 37.9642,-256 37.9642,-256\" stroke=\"black\"/>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
"<ellipse cx=\"482.365\" cy=\"-190\" fill=\"#ffffaa\" rx=\"37.4533\" ry=\"37.4533\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"482.365\" y=\"-193.8\">1</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"482.365\" y=\"-178.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge2\"><title>1-&gt;2</title>\n",
"<path d=\"M80.0021,-274.105C115.083,-310.768 201.199,-388.632 283.106,-368 356.606,-349.486 378.744,-332.757 424.06,-272 434.518,-257.978 432.39,-251.576 442.06,-237 445.119,-232.388 448.559,-227.709 452.097,-223.181\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"456.612,-217.543 454.696,-224.976 454.424,-220.275 452.237,-223.008 452.237,-223.008 452.237,-223.008 454.424,-220.275 449.778,-221.039 456.612,-217.543 456.612,-217.543\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"264.606\" y=\"-374.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
"<ellipse cx=\"192.751\" cy=\"-152\" fill=\"#ffffaa\" rx=\"35.2113\" ry=\"35.2113\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"192.751\" y=\"-155.8\">1</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"192.751\" y=\"-140.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge3\"><title>1-&gt;3</title>\n",
"<path d=\"M82.3178,-240.878C102.354,-224.605 134.612,-198.406 158.925,-178.66\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"164.609,-174.044 161.161,-180.902 161.892,-176.25 159.175,-178.457 159.175,-178.457 159.175,-178.457 161.892,-176.25 157.189,-176.012 164.609,-174.044 164.609,-174.044\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"122.396\" y=\"-223.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g class=\"node\" id=\"node5\"><title>4</title>\n",
"<ellipse cx=\"338.583\" cy=\"-205\" fill=\"#ffffaa\" rx=\"37.4533\" ry=\"37.4533\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"338.583\" y=\"-208.8\">1</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"338.583\" y=\"-193.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 1&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge4\"><title>1-&gt;4</title>\n",
"<path d=\"M87.1814,-252.544C119.148,-247.749 178.107,-238.579 228.106,-229 250.158,-224.775 274.574,-219.483 294.742,-214.943\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"301.687,-213.372 295.555,-217.989 298.274,-214.145 294.86,-214.917 294.86,-214.917 294.86,-214.917 298.274,-214.145 294.165,-211.844 301.687,-213.372 301.687,-213.372\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"192.751\" y=\"-245.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g class=\"node\" id=\"node6\"><title>5</title>\n",
"<ellipse cx=\"628.025\" cy=\"-158\" fill=\"#ffffaa\" rx=\"35.2259\" ry=\"35.2259\" stroke=\"black\"/>\n",
"<ellipse cx=\"628.025\" cy=\"-158\" fill=\"none\" rx=\"39.2112\" ry=\"39.2112\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"628.025\" y=\"-161.8\">0</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"628.025\" y=\"-146.8\">a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge5\"><title>2-&gt;5</title>\n",
"<path d=\"M519.246,-182.008C538.352,-177.752 562.03,-172.478 582.322,-167.958\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"589.345,-166.393 583.198,-170.99 585.929,-167.154 582.513,-167.915 582.513,-167.915 582.513,-167.915 585.929,-167.154 581.828,-164.84 589.345,-166.393 589.345,-166.393\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"555.67\" y=\"-180.8\">{a}</text>\n",
"</g>\n",
"<!-- 6 -->\n",
"<g class=\"node\" id=\"node7\"><title>6</title>\n",
"<ellipse cx=\"774.857\" cy=\"-158\" fill=\"#ffffaa\" rx=\"37.4556\" ry=\"37.4556\" stroke=\"black\"/>\n",
"<ellipse cx=\"774.857\" cy=\"-158\" fill=\"none\" rx=\"41.4533\" ry=\"41.4533\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"774.857\" y=\"-161.8\">0</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"774.857\" y=\"-146.8\">!a &amp; b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge6\"><title>2-&gt;6</title>\n",
"<path d=\"M514.661,-209.497C551.574,-229.937 614.593,-256.796 667.38,-239 694.942,-229.708 721.017,-210.125 740.465,-192.542\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"745.771,-187.646 742.763,-194.708 743.199,-190.02 740.627,-192.393 740.627,-192.393 740.627,-192.393 743.199,-190.02 738.49,-190.078 745.771,-187.646 745.771,-187.646\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"628.025\" y=\"-248.8\">{}</text>\n",
"</g>\n",
"<!-- 7 -->\n",
"<g class=\"node\" id=\"node8\"><title>7</title>\n",
"<ellipse cx=\"926.639\" cy=\"-61\" fill=\"#ffffaa\" rx=\"37.4556\" ry=\"37.4556\" stroke=\"black\"/>\n",
"<ellipse cx=\"926.639\" cy=\"-61\" fill=\"none\" rx=\"41.4533\" ry=\"41.4533\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"926.639\" y=\"-64.8\">0</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"926.639\" y=\"-49.8\">a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge7\"><title>2-&gt;7</title>\n",
"<path d=\"M510.516,-164.88C530.742,-147.339 559.75,-124.548 588.67,-110 683.063,-62.5163 809.91,-57.452 877.879,-58.7202\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"885.07,-58.8824 878.001,-61.8737 881.571,-58.8034 878.072,-58.7245 878.072,-58.7245 878.072,-58.7245 881.571,-58.8034 878.143,-55.5753 885.07,-58.8824 885.07,-58.8824\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"700.38\" y=\"-80.8\">{a, b}</text>\n",
"</g>\n",
"<!-- 8 -->\n",
"<g class=\"node\" id=\"node9\"><title>8</title>\n",
"<ellipse cx=\"926.639\" cy=\"-289\" fill=\"#ffffaa\" rx=\"40.1285\" ry=\"40.1285\" stroke=\"black\"/>\n",
"<ellipse cx=\"926.639\" cy=\"-289\" fill=\"none\" rx=\"44.111\" ry=\"44.111\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"926.639\" y=\"-292.8\">0</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"926.639\" y=\"-277.8\">!a &amp; !b</text>\n",
"</g>\n",
"<!-- 2&#45;&gt;8 -->\n",
"<g class=\"edge\" id=\"edge8\"><title>2-&gt;8</title>\n",
"<path d=\"M508.636,-216.791C518.105,-225.87 529.33,-235.58 540.67,-243 560.155,-255.749 566.391,-257.228 588.67,-264 693.763,-295.945 724.494,-290.456 834.334,-291 847.667,-291.066 851.002,-291.217 864.334,-291 867.837,-290.943 871.453,-290.867 875.095,-290.779\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"882.106,-290.595 875.191,-293.928 878.607,-290.687 875.108,-290.779 875.108,-290.779 875.108,-290.779 878.607,-290.687 875.026,-287.63 882.106,-290.595 882.106,-290.595\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"700.38\" y=\"-292.8\">{b}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;2 -->\n",
"<g class=\"edge\" id=\"edge14\"><title>3-&gt;2</title>\n",
"<path d=\"M227.758,-145.527C264.685,-139.647 325.2,-133.376 376.06,-144 399.22,-148.838 423.521,-159.065 442.935,-168.65\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"449.323,-171.868 441.655,-171.532 446.198,-170.293 443.072,-168.719 443.072,-168.719 443.072,-168.719 446.198,-170.293 444.489,-165.906 449.323,-171.868 449.323,-171.868\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"338.583\" y=\"-147.8\">{a}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;3 -->\n",
"<g class=\"edge\" id=\"edge13\"><title>3-&gt;3</title>\n",
"<path d=\"M179.627,-185.086C179.558,-196.323 183.933,-205.355 192.751,-205.355 199.64,-205.355 203.817,-199.843 205.282,-192.073\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"205.875,-185.086 208.422,-192.327 205.579,-188.574 205.283,-192.061 205.283,-192.061 205.283,-192.061 205.579,-188.574 202.145,-191.795 205.875,-185.086 205.875,-185.086\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"192.751\" y=\"-209.155\">{}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;4 -->\n",
"<g class=\"edge\" id=\"edge15\"><title>3-&gt;4</title>\n",
"<path d=\"M222.222,-171.683C229.739,-176.234 238.017,-180.702 246.106,-184 261.284,-190.188 278.659,-194.756 294.16,-198.021\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"301.135,-199.43 293.65,-201.131 297.705,-198.737 294.274,-198.044 294.274,-198.044 294.274,-198.044 297.705,-198.737 294.898,-194.956 301.135,-199.43 301.135,-199.43\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"264.606\" y=\"-199.8\">{b}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;5 -->\n",
"<g class=\"edge\" id=\"edge9\"><title>3-&gt;5</title>\n",
"<path d=\"M226.397,-140.622C232.858,-138.77 239.641,-137.1 246.106,-136 366.378,-115.533 510.752,-135.902 582.298,-148.943\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"589.408,-150.259 581.951,-152.082 585.966,-149.622 582.525,-148.985 582.525,-148.985 582.525,-148.985 585.966,-149.622 583.098,-145.887 589.408,-150.259 589.408,-150.259\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"409.06\" y=\"-133.8\">{}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;6 -->\n",
"<g class=\"edge\" id=\"edge10\"><title>3-&gt;6</title>\n",
"<path d=\"M224.377,-135.817C231.353,-132.741 238.851,-129.896 246.106,-128 427.419,-80.611 484.163,-70.6112 667.38,-110 689.822,-114.825 713.237,-124.768 732.376,-134.36\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"738.695,-137.592 731.028,-137.209 735.579,-135.998 732.463,-134.405 732.463,-134.405 732.463,-134.405 735.579,-135.998 733.897,-131.6 738.695,-137.592 738.695,-137.592\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"482.365\" y=\"-91.8\">{a}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;7 -->\n",
"<g class=\"edge\" id=\"edge11\"><title>3-&gt;7</title>\n",
"<path d=\"M207.136,-119.392C227.894,-74.7296 272.369,-0 337.583,-0 337.583,-0 337.583,-0 775.857,-0 815.143,-0 856.228,-18.222 885.41,-34.7474\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"891.821,-38.4592 884.185,-37.6779 888.792,-36.7055 885.763,-34.9518 885.763,-34.9518 885.763,-34.9518 888.792,-36.7055 887.342,-32.2257 891.821,-38.4592 891.821,-38.4592\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"555.67\" y=\"-3.8\">{b}</text>\n",
"</g>\n",
"<!-- 3&#45;&gt;8 -->\n",
"<g class=\"edge\" id=\"edge12\"><title>3-&gt;8</title>\n",
"<path d=\"M209.097,-183.411C215.207,-196.222 222.181,-211.233 228.106,-225 257.834,-294.071 262.386,-354 337.583,-354 337.583,-354 337.583,-354 775.857,-354 814.76,-354 854.998,-335.32 883.959,-317.988\" fill=\"none\" stroke=\"black\"/>\n",
"<polygon fill=\"black\" points=\"889.963,-314.317 885.634,-320.656 886.977,-316.142 883.991,-317.968 883.991,-317.968 883.991,-317.968 886.977,-316.142 882.348,-315.281 889.963,-314.317 889.963,-314.317\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"555.67\" y=\"-357.8\">{a, b}</text>\n",
"</g>\n",
"<!-- 9 -->\n",
"<g class=\"node\" id=\"node10\"><title>9</title>\n",
"<ellipse cx=\"482.365\" cy=\"-286\" fill=\"#ffffaa\" rx=\"40.1111\" ry=\"40.1111\" stroke=\"black\"/>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"482.365\" y=\"-289.8\">1</text>\n",
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"482.365\" y=\"-274.8\">!a &amp; !b</text>\n",
"</g>\n",