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 @@ ...@@ -23,6 +23,8 @@
#include "reachiter.hh" #include "reachiter.hh"
#include "misc/escape.hh" #include "misc/escape.hh"
#include "misc/bareword.hh" #include "misc/bareword.hh"
#include <cstdlib>
#include <cstring>
namespace spot namespace spot
{ {
...@@ -30,10 +32,83 @@ namespace spot ...@@ -30,10 +32,83 @@ namespace spot
{ {
class dotty_bfs : public ta_reachable_iterator_breadth_first 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: 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) ta_reachable_iterator_breadth_first(a), os_(os)
{ {
parse_opts(opt ? opt : ".");
} }
void void
...@@ -41,6 +116,16 @@ namespace spot ...@@ -41,6 +116,16 @@ namespace spot
{ {
os_ << "digraph G {\n"; 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, // Always copy the environment variable into a static string,
// so that we (1) look it up once, but (2) won't crash if the // so that we (1) look it up once, but (2) won't crash if the
// environment is changed. // environment is changed.
...@@ -120,8 +205,12 @@ namespace spot ...@@ -120,8 +205,12 @@ namespace spot
if (label.empty()) if (label.empty())
label = "{}"; label = "{}";
label += "\n"; if (!opt_hide_sets_)
label += t_automata_->acc().format(si->current_acceptance_conditions()); {
label += "\n";
label += t_automata_->acc().
format(si->current_acceptance_conditions());
}
os_ << " " << in << " -> " << out << " [label=\""; os_ << " " << in << " -> " << out << " [label=\"";
escape_str(os_, label); escape_str(os_, label);
...@@ -131,14 +220,19 @@ namespace spot ...@@ -131,14 +220,19 @@ namespace spot
private: private:
std::ostream& os_; std::ostream& os_;
spot::state* artificial_initial_state_; spot::state* artificial_initial_state_;
bool opt_horizontal_ = true;
bool opt_circles_ = false;
bool opt_hide_sets_ = false;
std::string opt_font_;
}; };
} }
std::ostream& 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(); d.run();
return os; return os;
} }
......
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2010, 2013, 2014 Laboratoire de Recherche et Développement // Copyright (C) 2010, 2013, 2014, 2015 Laboratoire de Recherche et
// de l'Epita (LRDE). // Développement de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
// //
...@@ -25,5 +25,6 @@ ...@@ -25,5 +25,6 @@
namespace spot namespace spot
{ {
SPOT_API std::ostream& 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 ...@@ -410,7 +410,8 @@ namespace spot
build_ta(const ta_explicit_ptr& ta, bdd atomic_propositions_set_, build_ta(const ta_explicit_ptr& ta, bdd atomic_propositions_set_,
bool degeneralized, bool degeneralized,
bool single_pass_emptiness_check, bool single_pass_emptiness_check,
bool artificial_livelock_state_mode) bool artificial_livelock_state_mode,
bool no_livelock)
{ {
std::stack<state_ta_explicit*> todo; std::stack<state_ta_explicit*> todo;
...@@ -517,6 +518,9 @@ namespace spot ...@@ -517,6 +518,9 @@ namespace spot
delete tgba_succ_it; delete tgba_succ_it;
} }
if (no_livelock)
return ta;
state_ta_explicit* artificial_livelock_acc_state = 0; state_ta_explicit* artificial_livelock_acc_state = 0;
trace << "*** build_ta: artificial_livelock_acc_state_mode = ***" trace << "*** build_ta: artificial_livelock_acc_state_mode = ***"
...@@ -541,8 +545,10 @@ namespace spot ...@@ -541,8 +545,10 @@ namespace spot
ta_explicit_ptr ta_explicit_ptr
tgba_to_ta(const const_tgba_ptr& tgba_, bdd atomic_propositions_set_, tgba_to_ta(const const_tgba_ptr& tgba_, bdd atomic_propositions_set_,
bool degeneralized, bool artificial_initial_state_mode, bool degeneralized, bool artificial_initial_state_mode,
bool single_pass_emptiness_check, bool artificial_livelock_state_mode) bool single_pass_emptiness_check,
bool artificial_livelock_state_mode,
bool no_livelock)
{ {
ta_explicit_ptr ta; ta_explicit_ptr ta;
...@@ -563,7 +569,8 @@ namespace spot ...@@ -563,7 +569,8 @@ namespace spot
// build ta automaton // build ta automaton
build_ta(ta, atomic_propositions_set_, degeneralized, 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 // (degeneralized=true) => TA
if (degeneralized) if (degeneralized)
...@@ -607,7 +614,7 @@ namespace spot ...@@ -607,7 +614,7 @@ namespace spot
// build a Generalized TA automaton involving a single_pass_emptiness_check // build a Generalized TA automaton involving a single_pass_emptiness_check
// (without an artificial livelock state): // (without an artificial livelock state):
auto ta = tgta->get_ta(); 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; trace << "***tgba_to_tgbta: POST build_ta***" << std::endl;
......
// -*- coding: utf-8 -*- // -*- 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). // Développement de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
...@@ -75,6 +75,9 @@ namespace spot ...@@ -75,6 +75,9 @@ namespace spot
/// Buchi-accepting state, then s has no successors. A STA product requires /// Buchi-accepting state, then s has no successors. A STA product requires
/// only one-pass emptiness check algorithm (see spot::ta_check::check) /// 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 /// \return A spot::ta_explicit that recognizes the same language as the
/// TGBA \a tgba_to_convert. /// TGBA \a tgba_to_convert.
...@@ -83,7 +86,8 @@ namespace spot ...@@ -83,7 +86,8 @@ namespace spot
bool degeneralized = true, bool degeneralized = true,
bool artificial_initial_state_mode = true, bool artificial_initial_state_mode = true,
bool single_pass_emptiness_check = false, 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 /// \ingroup tgba_ta
/// \brief Build a spot::tgta_explicit* (TGTA) from an LTL formula. /// \brief Build a spot::tgta_explicit* (TGTA) from an LTL formula.
......
...@@ -381,6 +381,7 @@ namespace spot ...@@ -381,6 +381,7 @@ namespace spot
return g_.new_transition(src, dst, cond); return g_.new_transition(src, dst, cond);
} }
#ifndef SWIG
auto out(unsigned src) const auto out(unsigned src) const
SPOT_RETURN(g_.out(src)); SPOT_RETURN(g_.out(src));
auto out(unsigned src) auto out(unsigned src)
...@@ -403,6 +404,7 @@ namespace spot ...@@ -403,6 +404,7 @@ namespace spot
auto is_dead_transition(const graph_t::trans_storage_t& t) const auto is_dead_transition(const graph_t::trans_storage_t& t) const
SPOT_RETURN(g_.is_dead_transition(t)); SPOT_RETURN(g_.is_dead_transition(t));
#endif
virtual bdd compute_support_conditions(const state* s) const virtual bdd compute_support_conditions(const state* s) const
{ {
......
...@@ -46,6 +46,7 @@ def _render_automaton_as_svg(a, opt=None): ...@@ -46,6 +46,7 @@ def _render_automaton_as_svg(a, opt=None):
return _ostream_to_svg(ostr) return _ostream_to_svg(ostr)
tgba._repr_svg_ = _render_automaton_as_svg tgba._repr_svg_ = _render_automaton_as_svg
ta._repr_svg_ = _render_automaton_as_svg
def _render_formula_as_svg(a): def _render_formula_as_svg(a):
# Load the SVG function only if we need it. This way the bindings # Load the SVG function only if we need it. This way the bindings
...@@ -56,13 +57,14 @@ def _render_formula_as_svg(a): ...@@ -56,13 +57,14 @@ def _render_formula_as_svg(a):
dotty(ostr, a) dotty(ostr, a)
return SVG(_ostream_to_svg(ostr)) 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 # Load the SVG function only if we need it. This way the bindings
# can still be used outside of IPython if IPython is not # can still be used outside of IPython if IPython is not
# installed. # installed.
from IPython.display import SVG from IPython.display import SVG
return SVG(_render_automaton_as_svg(a, opt)) 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): def _formula_str_ctor(self, str):
self.this = parse_formula(str) self.this = parse_formula(str)
......
...@@ -135,6 +135,7 @@ namespace std { ...@@ -135,6 +135,7 @@ namespace std {
#include "tgbaalgos/isdet.hh" #include "tgbaalgos/isdet.hh"
#include "tgbaalgos/simulation.hh" #include "tgbaalgos/simulation.hh"
#include "tgbaalgos/postproc.hh" #include "tgbaalgos/postproc.hh"
#include "tgbaalgos/product.hh"
#include "tgbaalgos/stutter.hh" #include "tgbaalgos/stutter.hh"
#include "tgbaalgos/translate.hh" #include "tgbaalgos/translate.hh"
#include "tgbaalgos/hoa.hh" #include "tgbaalgos/hoa.hh"
...@@ -225,7 +226,14 @@ using namespace spot; ...@@ -225,7 +226,14 @@ using namespace spot;
%include "ltlparse/public.hh" %include "ltlparse/public.hh"
/* these must come before apcollect.hh */
%include "tgba/bdddict.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/apcollect.hh"
%include "ltlvisit/dotty.hh" %include "ltlvisit/dotty.hh"
...@@ -243,21 +251,9 @@ using namespace spot; ...@@ -243,21 +251,9 @@ using namespace spot;
// Help SWIG with namespace lookups. // Help SWIG with namespace lookups.
#define ltl spot::ltl #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/taatgba.hh"
%include "tgba/tgbaproduct.hh" %include "tgba/tgbaproduct.hh"
%include "tgba/tgbagraph.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
{
};
}
// Should come after the definition of tgba_digraph // Should come after the definition of tgba_digraph
...@@ -280,6 +276,7 @@ namespace spot { ...@@ -280,6 +276,7 @@ namespace spot {
%include "tgbaalgos/isdet.hh" %include "tgbaalgos/isdet.hh"
%include "tgbaalgos/simulation.hh" %include "tgbaalgos/simulation.hh"
%include "tgbaalgos/postproc.hh" %include "tgbaalgos/postproc.hh"
%include "tgbaalgos/product.hh"
%include "tgbaalgos/stutter.hh" %include "tgbaalgos/stutter.hh"
%include "tgbaalgos/translate.hh" %include "tgbaalgos/translate.hh"
%include "tgbaalgos/hoa.hh" %include "tgbaalgos/hoa.hh"
......
...@@ -47,4 +47,5 @@ TESTS = \ ...@@ -47,4 +47,5 @@ TESTS = \
piperead.ipynb \ piperead.ipynb \
randaut.ipynb \ randaut.ipynb \
randltl.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",