Website release v0.2-M1.

Generated from commit c6a03a80423d9800eb4656ec872eabc7dcd73bb9
diff --git a/v0.2-M1/chi/eclipse-escet-incubation-chi-manual.pdf b/v0.2-M1/chi/eclipse-escet-incubation-chi-manual.pdf
new file mode 100644
index 0000000..a2aac40
--- /dev/null
+++ b/v0.2-M1/chi/eclipse-escet-incubation-chi-manual.pdf
Binary files differ
diff --git a/v0.2-M1/chi/eclipse-incubation.png b/v0.2-M1/chi/eclipse-incubation.png
new file mode 100644
index 0000000..5fccef5
--- /dev/null
+++ b/v0.2-M1/chi/eclipse-incubation.png
Binary files differ
diff --git a/v0.2-M1/chi/favicon.png b/v0.2-M1/chi/favicon.png
new file mode 100644
index 0000000..7ffa2e9
--- /dev/null
+++ b/v0.2-M1/chi/favicon.png
Binary files differ
diff --git a/v0.2-M1/chi/index.html b/v0.2-M1/chi/index.html
new file mode 100644
index 0000000..63c7f8e
--- /dev/null
+++ b/v0.2-M1/chi/index.html
@@ -0,0 +1,13521 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="UTF-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="generator" content="Asciidoctor 2.0.12">
+<meta name="author" content="Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation">
+<link rel="icon" type="image/png" href="favicon.png">
+<title>Chi documentation (Incubation)</title>
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
+<style>
+/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
+/* Uncomment @import statement to use as custom stylesheet */
+/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
+article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}
+audio,video{display:inline-block}
+audio:not([controls]){display:none;height:0}
+html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
+a{background:none}
+a:focus{outline:thin dotted}
+a:active,a:hover{outline:0}
+h1{font-size:2em;margin:.67em 0}
+abbr[title]{border-bottom:1px dotted}
+b,strong{font-weight:bold}
+dfn{font-style:italic}
+hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
+mark{background:#ff0;color:#000}
+code,kbd,pre,samp{font-family:monospace;font-size:1em}
+pre{white-space:pre-wrap}
+q{quotes:"\201C" "\201D" "\2018" "\2019"}
+small{font-size:80%}
+sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
+sup{top:-.5em}
+sub{bottom:-.25em}
+img{border:0}
+svg:not(:root){overflow:hidden}
+figure{margin:0}
+fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
+legend{border:0;padding:0}
+button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
+button,input{line-height:normal}
+button,select{text-transform:none}
+button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
+button[disabled],html input[disabled]{cursor:default}
+input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
+button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
+textarea{overflow:auto;vertical-align:top}
+table{border-collapse:collapse;border-spacing:0}
+*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
+html,body{font-size:100%}
+body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
+a:hover{cursor:pointer}
+img,object,embed{max-width:100%;height:auto}
+object,embed{height:100%}
+img{-ms-interpolation-mode:bicubic}
+.left{float:left!important}
+.right{float:right!important}
+.text-left{text-align:left!important}
+.text-right{text-align:right!important}
+.text-center{text-align:center!important}
+.text-justify{text-align:justify!important}
+.hide{display:none}
+img,object,svg{display:inline-block;vertical-align:middle}
+textarea{height:auto;min-height:50px}
+select{width:100%}
+.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
+div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
+a{color:#2156a5;text-decoration:underline;line-height:inherit}
+a:hover,a:focus{color:#1d4b8f}
+a img{border:0}
+p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
+p aside{font-size:.875em;line-height:1.35;font-style:italic}
+h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
+h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
+h1{font-size:2.125em}
+h2{font-size:1.6875em}
+h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
+h4,h5{font-size:1.125em}
+h6{font-size:1em}
+hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
+em,i{font-style:italic;line-height:inherit}
+strong,b{font-weight:bold;line-height:inherit}
+small{font-size:60%;line-height:inherit}
+code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
+ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
+ul,ol{margin-left:1.5em}
+ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
+ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
+ul.square{list-style-type:square}
+ul.circle{list-style-type:circle}
+ul.disc{list-style-type:disc}
+ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
+dl dt{margin-bottom:.3125em;font-weight:bold}
+dl dd{margin-bottom:1.25em}
+abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
+abbr{text-transform:none}
+blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
+blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
+blockquote cite::before{content:"\2014 \0020"}
+blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
+blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
+@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
+h1{font-size:2.75em}
+h2{font-size:2.3125em}
+h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
+h4{font-size:1.4375em}}
+table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede;word-wrap:normal}
+table thead,table tfoot{background:#f7f8f7}
+table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
+table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
+table tr.even,table tr.alt{background:#f8f8f7}
+table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
+h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
+h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
+.center{margin-left:auto;margin-right:auto}
+.stretch{width:100%}
+.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
+.clearfix::after,.float-group::after{clear:both}
+:not(pre).nobreak{word-wrap:normal}
+:not(pre).nowrap{white-space:nowrap}
+:not(pre).pre-wrap{white-space:pre-wrap}
+:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
+pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
+pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
+pre>code{display:block}
+pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
+em em{font-style:normal}
+strong strong{font-weight:400}
+.keyseq{color:rgba(51,51,51,.8)}
+kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
+.keyseq kbd:first-child{margin-left:0}
+.keyseq kbd:last-child{margin-right:0}
+.menuseq,.menuref{color:#000}
+.menuseq b:not(.caret),.menuref{font-weight:inherit}
+.menuseq{word-spacing:-.02em}
+.menuseq b.caret{font-size:1.25em;line-height:.8}
+.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
+b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
+b.button::before{content:"[";padding:0 3px 0 2px}
+b.button::after{content:"]";padding:0 2px 0 3px}
+p a>code:hover{color:rgba(0,0,0,.9)}
+#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
+#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
+#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
+#content{margin-top:1.25em}
+#content::before{content:none}
+#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
+#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
+#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
+#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
+#header .details span:first-child{margin-left:-.125em}
+#header .details span.email a{color:rgba(0,0,0,.85)}
+#header .details br{display:none}
+#header .details br+span::before{content:"\00a0\2013\00a0"}
+#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
+#header .details br+span#revremark::before{content:"\00a0|\00a0"}
+#header #revnumber{text-transform:capitalize}
+#header #revnumber::after{content:"\00a0"}
+#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
+#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
+#toc>ul{margin-left:.125em}
+#toc ul.sectlevel0>li>a{font-style:italic}
+#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
+#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
+#toc li{line-height:1.3334;margin-top:.3334em}
+#toc a{text-decoration:none}
+#toc a:active{text-decoration:underline}
+#toctitle{color:#7a2518;font-size:1.2em}
+@media screen and (min-width:768px){#toctitle{font-size:1.375em}
+body.toc2{padding-left:15em;padding-right:0}
+#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
+#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
+#toc.toc2>ul{font-size:.9em;margin-bottom:0}
+#toc.toc2 ul ul{margin-left:0;padding-left:1em}
+#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
+body.toc2.toc-right{padding-left:0;padding-right:15em}
+body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
+@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
+#toc.toc2{width:20em}
+#toc.toc2 #toctitle{font-size:1.375em}
+#toc.toc2>ul{font-size:.95em}
+#toc.toc2 ul ul{padding-left:1.25em}
+body.toc2.toc-right{padding-left:0;padding-right:20em}}
+#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
+#content #toc>:first-child{margin-top:0}
+#content #toc>:last-child{margin-bottom:0}
+#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
+#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
+#content{margin-bottom:.625em}
+.sect1{padding-bottom:.625em}
+@media screen and (min-width:768px){#content{margin-bottom:1.25em}
+.sect1{padding-bottom:1.25em}}
+.sect1:last-child{padding-bottom:0}
+.sect1+.sect1{border-top:1px solid #e7e7e9}
+#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
+#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
+#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
+#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
+#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
+details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
+details>summary:first-of-type{cursor:pointer;display:list-item;outline:none;margin-bottom:.75em}
+.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
+table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
+.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
+table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit}
+.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
+.admonitionblock>table td.icon{text-align:center;width:80px}
+.admonitionblock>table td.icon img{max-width:none}
+.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
+.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
+.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
+.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
+.exampleblock>.content>:first-child{margin-top:0}
+.exampleblock>.content>:last-child{margin-bottom:0}
+.sidebarblock{border-style:solid;border-width:1px;border-color:#dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;-webkit-border-radius:4px;border-radius:4px}
+.sidebarblock>:first-child{margin-top:0}
+.sidebarblock>:last-child{margin-bottom:0}
+.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
+.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
+.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
+@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
+@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
+.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
+.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
+.listingblock>.content{position:relative}
+.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
+.listingblock:hover code[data-lang]::before{display:block}
+.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
+.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
+.listingblock pre.highlightjs{padding:0}
+.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
+.listingblock pre.prettyprint{border-width:0}
+.prettyprint{background:#f7f7f8}
+pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
+pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
+pre.prettyprint li code[data-lang]::before{opacity:1}
+pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
+table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
+table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
+table.linenotable td.code{padding-left:.75em}
+table.linenotable td.linenos{border-right:1px solid currentColor;opacity:.35;padding-right:.5em}
+pre.pygments .lineno{border-right:1px solid currentColor;opacity:.35;display:inline-block;margin-right:.75em}
+pre.pygments .lineno::before{content:"";margin-right:-.125em}
+.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
+.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
+.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
+.quoteblock blockquote{margin:0;padding:0;border:0}
+.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
+.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
+.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
+.verseblock{margin:0 1em 1.25em}
+.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
+.verseblock pre strong{font-weight:400}
+.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
+.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
+.quoteblock .attribution br,.verseblock .attribution br{display:none}
+.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
+.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
+.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
+.quoteblock.abstract{margin:0 1em 1.25em;display:block}
+.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
+.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
+.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
+.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
+.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}
+p.tableblock:last-child{margin-bottom:0}
+td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
+td.tableblock>.content>:last-child{margin-bottom:-1.25em}
+table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
+table.grid-all>*>tr>*{border-width:1px}
+table.grid-cols>*>tr>*{border-width:0 1px}
+table.grid-rows>*>tr>*{border-width:1px 0}
+table.frame-all{border-width:1px}
+table.frame-ends{border-width:1px 0}
+table.frame-sides{border-width:0 1px}
+table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
+table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
+table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
+table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
+table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7}
+th.halign-left,td.halign-left{text-align:left}
+th.halign-right,td.halign-right{text-align:right}
+th.halign-center,td.halign-center{text-align:center}
+th.valign-top,td.valign-top{vertical-align:top}
+th.valign-bottom,td.valign-bottom{vertical-align:bottom}
+th.valign-middle,td.valign-middle{vertical-align:middle}
+table thead th,table tfoot th{font-weight:bold}
+tbody tr th{background:#f7f8f7}
+tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
+p.tableblock>code:only-child{background:none;padding:0}
+p.tableblock{font-size:1em}
+ol{margin-left:1.75em}
+ul li ol{margin-left:1.5em}
+dl dd{margin-left:1.125em}
+dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
+ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
+ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
+ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
+ul.unstyled,ol.unstyled{margin-left:0}
+ul.checklist{margin-left:.625em}
+ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
+ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
+ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
+ul.inline>li{margin-left:1.25em}
+.unstyled dl dt{font-weight:400;font-style:normal}
+ol.arabic{list-style-type:decimal}
+ol.decimal{list-style-type:decimal-leading-zero}
+ol.loweralpha{list-style-type:lower-alpha}
+ol.upperalpha{list-style-type:upper-alpha}
+ol.lowerroman{list-style-type:lower-roman}
+ol.upperroman{list-style-type:upper-roman}
+ol.lowergreek{list-style-type:lower-greek}
+.hdlist>table,.colist>table{border:0;background:none}
+.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
+td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
+td.hdlist1{font-weight:bold;padding-bottom:1.25em}
+td.hdlist2{word-wrap:anywhere}
+.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
+.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
+.colist td:not([class]):first-child img{max-width:none}
+.colist td:not([class]):last-child{padding:.25em 0}
+.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
+.imageblock.left{margin:.25em .625em 1.25em 0}
+.imageblock.right{margin:.25em 0 1.25em .625em}
+.imageblock>.title{margin-bottom:0}
+.imageblock.thumb,.imageblock.th{border-width:6px}
+.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
+.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
+.image.left{margin-right:.625em}
+.image.right{margin-left:.625em}
+a.image{text-decoration:none;display:inline-block}
+a.image object{pointer-events:none}
+sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
+sup.footnote a,sup.footnoteref a{text-decoration:none}
+sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
+#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
+#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
+#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
+#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
+#footnotes .footnote:last-of-type{margin-bottom:0}
+#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
+.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
+.gist .file-data>table td.line-data{width:99%}
+div.unbreakable{page-break-inside:avoid}
+.big{font-size:larger}
+.small{font-size:smaller}
+.underline{text-decoration:underline}
+.overline{text-decoration:overline}
+.line-through{text-decoration:line-through}
+.aqua{color:#00bfbf}
+.aqua-background{background:#00fafa}
+.black{color:#000}
+.black-background{background:#000}
+.blue{color:#0000bf}
+.blue-background{background:#0000fa}
+.fuchsia{color:#bf00bf}
+.fuchsia-background{background:#fa00fa}
+.gray{color:#606060}
+.gray-background{background:#7d7d7d}
+.green{color:#006000}
+.green-background{background:#007d00}
+.lime{color:#00bf00}
+.lime-background{background:#00fa00}
+.maroon{color:#600000}
+.maroon-background{background:#7d0000}
+.navy{color:#000060}
+.navy-background{background:#00007d}
+.olive{color:#606000}
+.olive-background{background:#7d7d00}
+.purple{color:#600060}
+.purple-background{background:#7d007d}
+.red{color:#bf0000}
+.red-background{background:#fa0000}
+.silver{color:#909090}
+.silver-background{background:#bcbcbc}
+.teal{color:#006060}
+.teal-background{background:#007d7d}
+.white{color:#bfbfbf}
+.white-background{background:#fafafa}
+.yellow{color:#bfbf00}
+.yellow-background{background:#fafa00}
+span.icon>.fa{cursor:default}
+a span.icon>.fa{cursor:inherit}
+.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
+.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
+.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
+.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
+.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
+.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
+.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
+.conum[data-value] *{color:#fff!important}
+.conum[data-value]+b{display:none}
+.conum[data-value]::after{content:attr(data-value)}
+pre .conum[data-value]{position:relative;top:-.125em}
+b.conum *{color:inherit!important}
+.conum:not([data-value]):empty{display:none}
+dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
+h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
+p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
+p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
+p{margin-bottom:1.25rem}
+.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
+.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
+.print-only{display:none!important}
+@page{margin:1.25cm .75cm}
+@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
+html{font-size:80%}
+a{color:inherit!important;text-decoration:underline!important}
+a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
+a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
+abbr[title]::after{content:" (" attr(title) ")"}
+pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
+thead{display:table-header-group}
+svg{max-width:100%}
+p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
+h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
+#header,#content,#footnotes,#footer{max-width:none}
+#toc,.sidebarblock,.exampleblock>.content{background:none!important}
+#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
+body.book #header{text-align:center}
+body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
+body.book #header .details{border:0!important;display:block;padding:0!important}
+body.book #header .details span:first-child{margin-left:0!important}
+body.book #header .details br{display:block}
+body.book #header .details br+span::before{content:none!important}
+body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
+body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
+.listingblock code[data-lang]::before{display:block}
+#footer{padding:0 .9375em}
+.hide-on-print{display:none!important}
+.print-only{display:block!important}
+.hide-for-print{display:none!important}
+.show-for-print{display:inherit!important}}
+@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem}
+.sect1{padding:0!important}
+.sect1+.sect1{border:0}
+#footer{background:none}
+#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
+@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
+</style>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<style>
+.menu, .submenu, .menuitem, .menuref {
+    background-color: Menu;
+}
+
+.button {
+    border: 1px solid ButtonFace;
+    /*
+    Styling too similar to a real button is considered bad practice, see https://github.com/asciidoctor/asciidoctor/issues/1881#issuecomment-250702085
+    border: 2px outset ButtonFace;
+    background-color: ButtonFace;
+    */
+    padding-left: 0.5ex;
+    padding-right: 0.5ex;
+    font-weight: normal;
+    font-family: "Segoe UI","Open Sans","DejaVu Sans",sans-serif;
+    white-space: nowrap;
+}
+.button:before {
+    content: none !important;
+}
+.button:after {
+    content: none !important;
+}
+
+#footer-text, #footer-text a {
+    color: rgba(255,255,255,.8)
+}
+</style>
+</head>
+<body class="book toc2 toc-left">
+<div id="header">
+<h1>Chi documentation (Incubation)</h1>
+<div class="details">
+<span id="author" class="author">Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation</span><br>
+<span id="revnumber">version 0.2.0.20210521-133237</span>
+</div>
+<div id="toc" class="toc2">
+<div id="toctitle">Table of Contents</div>
+<ul class="sectlevel1">
+<li><a href="#tut-chapter-chi-tutorial">Chi Tutorial</a>
+<ul class="sectlevel2">
+<li><a href="#tut-chapter-introduction">Introduction</a></li>
+<li><a href="#tut-chapter-data-types">Data types</a></li>
+<li><a href="#tut-chapter-statements">Statements</a></li>
+<li><a href="#tut-chapter-functions">Functions</a></li>
+<li><a href="#tut-chapter-input-and-output">Input and output</a></li>
+<li><a href="#tut-chapter-stochastic-behavior">Modeling stochastic behavior</a></li>
+<li><a href="#tut-chapter-processes">Processes</a></li>
+<li><a href="#tut-chapter-channels">Channels</a></li>
+<li><a href="#tut-chapter-buffers">Buffers</a></li>
+<li><a href="#tut-chapter-servers-with-time">Servers with time</a></li>
+<li><a href="#tut-chapter-conveyors">Conveyors</a></li>
+<li><a href="#tut-chapter-simulation-and-experiments">Simulations and experiments</a></li>
+<li><a href="#tut-chapter-svg-visualization">SVG visualization</a></li>
+<li><a href="#tut-chapter-svg-example">SVG visualization example</a></li>
+</ul>
+</li>
+<li><a href="#ref-chapter-reference-manual">Chi Reference Manual</a>
+<ul class="sectlevel2">
+<li><a href="#ref-chapter-global-definitions">Global definitions</a></li>
+<li><a href="#ref-chapter-statements">Statements</a></li>
+<li><a href="#ref-chapter-expressions">Expressions</a></li>
+<li><a href="#ref-chapter-standard-library">Standard library functions</a></li>
+<li><a href="#ref-chapter-distributions">Distributions</a></li>
+<li><a href="#ref-chapter-types">Types</a></li>
+<li><a href="#ref-chapter-lexical-syntax">Lexical syntax</a></li>
+<li><a href="#ref-chapter-migration">Model migration</a></li>
+<li><a href="#ref-chapter-svg-visualization">SVG visualization</a></li>
+</ul>
+</li>
+<li><a href="#tool-chapter-tool-manual">Chi Tool Manual</a>
+<ul class="sectlevel2">
+<li><a href="#tool-chapter-software-operation">Software operation</a></li>
+<li><a href="#tool-chapter-command-line">Command line options</a></li>
+</ul>
+</li>
+<li><a href="#release-notes-chapter-index">Chi release notes</a>
+<ul class="sectlevel2">
+<li><a href="#version-0-2">Version 0.2</a></li>
+<li><a href="#version-0-1">Version 0.1</a></li>
+</ul>
+</li>
+<li><a href="#legal-chapter-index">Legal</a></li>
+</ul>
+</div>
+</div>
+<div id="content">
+<div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>Chi is a modeling language for describing and analyzing performance of
+discrete event systems by means of simulation.
+It uses a process-based view, and uses synchronous point-to-point
+communication between processes. A process is written as an imperative
+program, with a syntax much inspired by the well-known Python language.</p>
+</div>
+<div class="paragraph">
+<p>Chi is one of the tools of the Eclipse ESCET&#8482; project. Visit the
+<a href="https://eclipse.org/escet">project website</a> for downloads,
+installation instructions, source code, general tool usage information,
+information on how to contribute, and more.</p>
+</div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>The Eclipse ESCET project, including the Chi language and toolset,
+is currently in the
+<a href="https://wiki.eclipse.org/Development_Resources/Process_Guidelines/What_is_Incubation">Incubation Phase</a>.</p>
+</div>
+<div class="paragraph">
+<p><span class="image"><img src="./eclipse-incubation.png" alt="eclipse incubation" width="300"></span></p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="admonitionblock tip">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-tip" title="Tip"></i>
+</td>
+<td class="content">
+You can <a href="eclipse-escet-incubation-chi-manual.pdf">download this manual</a>
+as a PDF as well.
+</td>
+</tr>
+</table>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1">Tutorial</dt>
+<dd>
+<p>The <a href="#tut-chapter-chi-tutorial">Chi Tutorial</a>
+teaches the Chi language, and its use in modeling and simulating systems
+to answer your performance questions.</p>
+<div class="paragraph">
+<p>Some interesting topics are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Basics (<a href="#tut-chapter-data-types">Data types</a>, <a href="#tut-chapter-statements">Statements</a>,
+<a href="#tut-chapter-stochastic-behavior">Modeling stochastic behavior</a>)</p>
+</li>
+<li>
+<p>Programming (<a href="#tut-chapter-processes">Processes</a>, <a href="#tut-chapter-channels">Channels</a>)</p>
+</li>
+<li>
+<p>Modeling (<a href="#tut-chapter-buffers">Buffers</a>, <a href="#tut-chapter-servers-with-time">Servers with time</a>,
+<a href="#tut-chapter-conveyors">Conveyors</a>)</p>
+</li>
+</ul>
+</div>
+</dd>
+<dt class="hdlist1">Reference manual</dt>
+<dd>
+<p>The <a href="#ref-chapter-reference-manual">Chi Reference Manual</a>
+describes the Chi language in full detail, for example the top level language
+elements or all statements. It also contains a list with all standard library
+functions and a list with all distribution functions.</p>
+<div class="paragraph">
+<p>Some interesting topics are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#ref-chapter-global-definitions">Global definitions</a> (Top level language elements)</p>
+</li>
+<li>
+<p><a href="#ref-chapter-standard-library">Standard library functions</a> (Standard library functions)</p>
+</li>
+<li>
+<p><a href="#ref-chapter-distributions">Distributions</a> (Available distributions)</p>
+</li>
+</ul>
+</div>
+</dd>
+<dt class="hdlist1">Tool manual</dt>
+<dd>
+<p>The <a href="#tool-chapter-tool-manual">Tool manual</a>
+describes the Chi simulator software.
+Use of the software to create and simulate Chi programs is also explained.</p>
+</dd>
+<dt class="hdlist1">Release notes</dt>
+<dd>
+<p>The <a href="#release-notes-chapter-index">Release notes</a> provides information on
+all Chi releases.</p>
+</dd>
+<dt class="hdlist1">Legal</dt>
+<dd>
+<p>See <a href="#legal-chapter-index">Legal</a> for copyright and licensing information.</p>
+</dd>
+</dl>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="tut-chapter-chi-tutorial">Chi Tutorial</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This manual explains using the Chi modeling language.</p>
+</div>
+<div class="paragraph">
+<p><em>Topics</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tut-chapter-introduction">Introduction</a> (global description of the aims of the language)</p>
+</li>
+<li>
+<p><em>Basics</em>: Elementary knowledge needed for writing and understanding Chi
+programs. <em>Start here to learn the language!</em></p>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tut-chapter-data-types">Data types</a> (explanation of all kinds of data and their
+operations)</p>
+</li>
+<li>
+<p><a href="#tut-chapter-statements">Statements</a> (available process statements)</p>
+</li>
+<li>
+<p><a href="#tut-chapter-functions">Functions</a> (how to use functions)</p>
+</li>
+<li>
+<p><a href="#tut-chapter-input-and-output">Input and output</a> (reading/writing files, displaying output)</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p><em>Programming</em>: How to specify parallel executing processes using the Chi
+language.</p>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tut-chapter-stochastic-behavior">Modeling stochastic behavior</a> (how to model varying behavior)</p>
+</li>
+<li>
+<p><a href="#tut-chapter-processes">Processes</a> (creating and running processes)</p>
+</li>
+<li>
+<p><a href="#tut-chapter-channels">Channels</a> (connecting processes with each other)</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p><em>Modeling</em>: Modeling a real system with Chi.</p>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tut-chapter-buffers">Buffers</a> (modeling temporary storage of items)</p>
+</li>
+<li>
+<p><a href="#tut-chapter-servers-with-time">Servers</a> (modeling machines)</p>
+</li>
+<li>
+<p><a href="#tut-chapter-conveyors">Conveyors</a> (modeling conveyor belts)</p>
+</li>
+<li>
+<p><a href="#tut-chapter-simulation-and-experiments">Experiments</a> (performing simulation experiments)</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p><em>Visualization</em>: Making an animated graphical display of a system with the
+Chi simulator.</p>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tut-chapter-svg-visualization">SVG visualization</a> (how to attach an SVG visualization)</p>
+</li>
+<li>
+<p><a href="#tut-chapter-svg-example">SVG example</a> (an SVG example)</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-introduction">Introduction</h3>
+<div class="paragraph">
+<p>The topic is modeling of the operation of (manufacturing) systems, e.g.
+semiconductor factories, assembly and packaging lines, car manufacturing
+plants, steel foundries, metal processing shops, beer breweries, health care
+systems, warehouses, order-picking systems.
+For a proper functioning of these systems, these systems are controlled by
+operators and electronic devices, e.g. computers.</p>
+</div>
+<div class="paragraph">
+<p>During the design process, engineers make use of (analytical) mathematical
+models, e.g. algebra and probability theory, to get answers about the
+operation of the system.
+For complex systems, (numerical) mathematical models are used, and computers
+perform simulation experiments, to analyze the operation of the system.
+Simulation studies give answers to questions like:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>What is the throughput of the system?</p>
+</li>
+<li>
+<p>What is the effect of set-up time in a machine?</p>
+</li>
+<li>
+<p>How will the batch size of an order influence the flow time of the
+product-items?</p>
+</li>
+<li>
+<p>What is the effect of more surgeons in a hospital?</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+The operation of a system can be described, e.g. in terms of or operating
+processes.</p>
+</div>
+<div class="paragraph">
+<p>An example of a system with parallel operating processes is a manufacturing
+line, with a number of manufacturing machines, where product-items go from
+machine to machine.
+A surgery room in a hospital is a system where patients are treated by teams
+using medical equipment and sterile materials.
+A biological system can be described by a number of parallel processes, where,
+e.g. processes transform sugars into water and carbon-dioxide producing
+energy.
+In all these examples, processes operate in parallel to complete a task, and
+to achieve a goal.
+Concurrency is the dominant aspect in these type of systems, and as a
+consequence this holds too for their models.</p>
+</div>
+<div class="paragraph">
+<p>The operating behavior of parallel processes can be described by different
+formalisms, e.g. automata, Petri-nets or parallel processes. This text uses
+the programming language Chi, which is an instance of a parallel processes
+formalism.</p>
+</div>
+<div class="paragraph">
+<p>A system is abstracted into a model, with cooperating processes, where
+processes are connected to each other via channels.
+The channels are used for exchanging material and information.
+Models of the above mentioned examples consist of a number of concurrent
+processes connected by channels, denoting the flow of products, patients or
+personnel.</p>
+</div>
+<div class="paragraph">
+<p>In Chi, communication takes place in a synchronous manner.
+This means that communication between a sending process, and a receiving
+process takes place only when both processes are able to communicate.
+Processes and channels can dynamically be altered.
+To model times, like inter-arrival times and server processing times, the
+language has a notation of time.</p>
+</div>
+<div class="paragraph">
+<p>The rationale behind the language is that models for the analysis of a system should be</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>formal (exactly one interpretation, every reader attaches the same meaning to the model),</p>
+</li>
+<li>
+<p>easily writable (write the essence of the system in a compact way),</p>
+</li>
+<li>
+<p>easily readable (non-experts should be able to understand the model),</p>
+</li>
+<li>
+<p>and easily extensible (adding more details in one part should not affect other parts).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Verification of the models to investigate the properties of the model should
+be relatively effortless. (A model has to preserve some properties of the real system
+otherwise results from the simulation study have no relation with the system
+being modeled. The language must allow this verification to take place in a
+simple manner.)</p>
+</div>
+<div class="paragraph">
+<p>Experiments should be performed in an straightforward manner. (Minimizing the
+effort in doing simulation studies, in particular for large systems, makes the
+language useful.)</p>
+</div>
+<div class="paragraph">
+<p>Finally, the used models should be usable for the supervisory (logic) control
+of the systems (simulation studies often provide answers on how to control a
+system in a better way, these answers should also work for the modeled
+system).</p>
+</div>
+<div class="sect3">
+<h4 id="tut-chi-in-a-nutshell">Chi in a nutshell</h4>
+<div class="paragraph">
+<p>During the past decades, the ancestors of Chi have been used with success,
+for the analysis of a variety of (industrial) systems.
+Based on this experience, the language Chi has been completely redesigned,
+keeping the strong points of the previous versions, while making it more
+powerful for advanced users, and easier to access for non-experts.</p>
+</div>
+<div class="paragraph">
+<p>Its features are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>A system (and its control) is modeled as a collection of parallel running
+processes, communicating with each other using channels.</p>
+</li>
+<li>
+<p>Processes do not share data with other processes and channels are
+synchronous (sending and receiving is always done together at the same
+time), making reasoning about process behavior easier.</p>
+</li>
+<li>
+<p>Processes and channels are dynamic, new processes can be created as needed,
+and communication channels can be created or rerouted.</p>
+</li>
+<li>
+<p>Variables can have elementary values such as <em>boolean</em>, <em>integer</em> or <em>real</em>
+numbers, to high level structured collections of data like <em>lists</em>, <em>sets</em>
+and <em>dictionaries</em> to model the data of the system. If desired, processes
+and channels can also be part of that data.</p>
+</li>
+<li>
+<p>A small generic set of statements to describe algorithms, assignment, <em>if</em>,
+<em>while</em>, and <em>for</em> statements. This set is relatively easy to explain to
+non-experts, allowing them to understand the model, and participate in the
+discussions.</p>
+</li>
+<li>
+<p>Tutorials and manuals demonstrate use of the language for effective modeling
+of system processes. More detailed modeling of the processes, or custom
+tailoring them to the real situation, has no inherent limits.</p>
+</li>
+<li>
+<p>Time and (quasi-) random number generation distributions are available for
+modeling behavior of the system in time.</p>
+</li>
+<li>
+<p>Likewise, measurements to derive performance indicators of the modeled
+system are integrated in the model. Tutorials and manuals show basic use.
+The integration allows for custom solutions to obtain the needed data in the
+wanted form.</p>
+</li>
+<li>
+<p>Input and output facilities from and to the file system exists to support
+large simulation experiments.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-exercises">Exercises</h4>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Install the Chi programming environment at your computer.</p>
+</li>
+<li>
+<p>Test your first program.</p>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>Construct the following program in a project in your workspace:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model M():
+    writeln("It works!")
+end</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>Compile, and simulate the model as explained in the tool manual (in
+<a href="#tool-compile-and-simulate">Compile and simulate</a>).</p>
+</li>
+<li>
+<p>Try to explain the result.</p>
+</li>
+</ol>
+</div>
+</li>
+<li>
+<p>Test a program with model parameters.</p>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>Construct the following program in the same manner:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model M(string s):
+    write("%s\n")
+end</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>Simulate the model, where you have to set the <em>Model instance</em> text to
+<code>M("OOPS")</code> in the dialog box of the simulator.</p>
+</li>
+<li>
+<p>Try to explain the result.</p>
+</li>
+</ol>
+</div>
+</li>
+</ol>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-data-types">Data types</h3>
+<div class="paragraph">
+<p>The language is a statically typed language, which means that all variables
+and values in a model have a single fixed type.
+All variables must be declared in the program.
+The declaration of a variable consists of the type, and the name, of the
+variable. The following fragment shows the declaration of two elementary data
+types, integer variable <code>i</code> and real variable <code>r</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">...
+int i;
+real r;
+...</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The ellipsis (<code>...</code>) denotes that non-relevant information is left out from
+the fragment. The syntax for the declaration of variables is similar to the
+language <em>C</em>. All declared variables are initialized, variables <code>i</code> and
+<code>r</code> are both initialized to zero.</p>
+</div>
+<div class="paragraph">
+<p>An expression, consisting of operators, e.g. plus (<code>+</code>), times (<code>*</code>), and
+operands, e.g. <code>i</code> and <code>r</code>, is used to calculate a new value. The new
+value can be assigned to a variable by using an <em>assignment</em> statement. An
+example with four variables, two expressions and assignment statements is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">...
+int  i = 2, j;
+real r = 1.50, s;
+
+j = 2 * i + 1;
+s = r / 2;
+...</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The value of variable <code>j</code> becomes <code>5</code>, and the value of <code>s</code> becomes
+<code>0.75</code>.
+Statements are described in <a href="#tut-chapter-statements">Statements</a>.</p>
+</div>
+<div class="paragraph">
+<p>Data types are categorized in five different groups: <em>elementary</em> types,
+<em>tuple</em> types, <em>container</em> types, <em>custom</em> types, and <em>distribution</em> types.
+Elementary types are types such as Boolean, integer, real or string.
+Tuple types contain at least one element, where each element can be of
+different type. In other languages tuple types are called records (Pascal) or
+structures (C).
+Variables with a container type (a list, set, or dictionary) contain many
+elements, where each element is of the same type.
+Custom types are created by the user to enhance the readability of the model.
+Distributions types are types used for the generation of distributions from
+(pseudo-) random numbers.
+They are covered in <a href="#tut-chapter-stochastic-behavior">Modeling stochastic behavior</a>.</p>
+</div>
+<div class="sect3">
+<h4 id="tut-elementary-types">Elementary types</h4>
+<div class="paragraph">
+<p>The elementary data types are Booleans, numbers and strings.
+The language provides the elementary data types:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>bool</code> for booleans, with values <code>false</code> and <code>true</code>.</p>
+</li>
+<li>
+<p><code>enum</code> for enumeration types, for example
+<code>enum FlagColors = {red, white, blue}</code>,</p>
+</li>
+<li>
+<p><code>int</code> for integers, e.g. <code>-7</code>, <code>20</code>, <code>0</code>.</p>
+</li>
+<li>
+<p><code>real</code> for reals, e.g. <code>3.14</code>, <code>7.0e9</code>.</p>
+</li>
+<li>
+<p><code>string</code> for text strings, e.g. <code>"Hello"</code>, <code>"world"</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="sect4">
+<h5 id="tut-booleans">Booleans</h5>
+<div class="paragraph">
+<p>A boolean value has two possible values, the truth values.
+These truth values are <code>false</code> and <code>true</code>.
+The value <code>false</code> means that a property is not fulfilled.
+A value <code>true</code> means the presence of a property.
+Boolean variables are initialized with the value <code>false</code>.</p>
+</div>
+<div class="paragraph">
+<p>In mathematics, various symbols are used for unary and binary boolean
+operators.
+These operators are also present in Chi.
+The most commonly used boolean operators are <code>not</code>, <code>and</code>, and <code>or</code>.
+The names of the operators, the symbols in mathematics and the symbols in the
+language are presented in <a href="#tut-table-boolsymbols">Table with boolean symbols</a>.</p>
+</div>
+<table id="tut-table-boolsymbols" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 1. Table with boolean symbols</caption>
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Operator</th>
+<th class="tableblock halign-left valign-top">Math</th>
+<th class="tableblock halign-left valign-top">Chi</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">boolean not</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">¬</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">boolean and</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">∧</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>and</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">boolean or</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">∨</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>or</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Examples of boolean expressions are the following.
+If <code>z</code> equals <code>true</code>, then the value of <code>(not z)</code> equals <code>false</code>.
+If <code>s</code> equals <code>false</code>, and <code>t</code> equals <code>true</code>, then the value of the
+expression <code>(s or t)</code> becomes <code>true</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+The result of the unary <code>not</code>, the binary
+<code>and</code> and <code>or</code> operators, for two variables <code>p</code> and <code>q</code> is given in
+<a href="#tut-table-truthtable">Truth table for  <code>not</code>, <code>and</code> and <code>or</code> operators</a>.</p>
+</div>
+<table id="tut-table-truthtable" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 2. Truth table for  <code>not</code>, <code>and</code> and <code>or</code> operators</caption>
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><code>p</code></th>
+<th class="tableblock halign-left valign-top"><code>q</code></th>
+<th class="tableblock halign-left valign-top"><code>not p</code></th>
+<th class="tableblock halign-left valign-top"><code>p and q</code></th>
+<th class="tableblock halign-left valign-top"><code>p or q</code></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+<td class="tableblock halign-left valign-top"></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>If <code>p = true</code> and <code>q = false</code>, we find for <code>p or q</code> the value <code>true</code>
+(third line in <a href="#tut-table-truthtable">Truth table for  <code>not</code>, <code>and</code> and <code>or</code> operators</a>).</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-enumerations">Enumerations</h5>
+<div class="paragraph">
+<p>Often there are several variants of entities, like types of products,
+available resources, available machine types, and so on.</p>
+</div>
+<div class="paragraph">
+<p>One way of coding them is give each a unique number, which results in code
+with a lot of small numbers that are not actually numbers, but refer to one
+variant.</p>
+</div>
+<div class="paragraph">
+<p>Another way is to give each variant a name (which often already exists), and
+use those names instead.</p>
+</div>
+<div class="paragraph">
+<p>For example, to model a traffic light:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">enum TrafficColor = {RED, ORANGE, GREEN};
+
+TrafficColor light = RED;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>enum TrafficColor</code> line lists the available traffic colors. With this
+definition, a new type <code>TrafficColor</code> is created, which you can use like any
+other type. The line <code>TrafficColor light = RED;</code> creates a new variable
+called <code>light</code> and initializes it to the value <code>RED</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-numbers">Numbers</h5>
+<div class="paragraph">
+<p>In the language, two types of numbers are available: integer numbers and real
+numbers. Integer numbers are whole numbers, denoted by type <code>int</code> e.g.
+<code>3</code>, <code>-10</code>, <code>0</code>. Real numbers are used to present numbers with a
+fraction, denoted by type <code>real</code>. E.g. <code>3.14</code>, <code>2.7e6</code> (the scientific
+notation for 2.7 million). Note that real numbers <em>must</em> either have a
+fraction or use the scientific notation, to let the computer know you mean a
+real number (instead of an integer number). Integer variables are initialized
+with <code>0</code>. Real variables are initialized with <code>0.0</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+For numbers, the normal arithmetic operators are defined.
+Expressions can be constructed with these operators.
+The arithmetic operators for numbers are listed in <a href="#tut-table-aritoper">The arithmetic operators</a>.</p>
+</div>
+<table id="tut-table-aritoper" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 3. The arithmetic operators</caption>
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Operator name</th>
+<th class="tableblock halign-left valign-top">Notation</th>
+<th class="tableblock halign-left valign-top">Comment</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">unary plus</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+ x</code></p></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">unary minus</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>- x</code></p></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">raising to the power</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x ^ y</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Always a <code>real</code> result.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">multiplication</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x * y</code></p></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real division</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x / y</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Always a <code>real</code> result.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">division</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x div y</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">For <code>int</code> only.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">modulo</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x mod y</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">For <code>int</code> only.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">addition</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x + y</code></p></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">subtraction</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x - y</code></p></td>
+<td class="tableblock halign-left valign-top"></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The priority of the operators is given from high to low.
+The unary operators have the strongest binding, and the <code>+</code> and <code>-</code> the
+weakest binding. So, <code>-3^2</code> is read as <code>(-3)^2</code> and not <code>-(3^2)</code>,
+because the priority rules say that the unary operator binds stronger than the
+raising to the power operator. Binding in expressions can be changed by the
+use of parentheses.</p>
+</div>
+<div class="paragraph">
+<p>The integer division, denoted by <code>div</code>, gives the biggest integral number
+smaller or equal to <code>x / y</code>. The integer remainder, denoted by <code>mod</code>,
+gives the remainder after division <code>x - y * (x div y)</code>. So, <code>7 div 3</code>
+gives <code>2</code> and <code>-7 div 3</code> gives <code>-3</code>, <code>7 mod 3</code> gives <code>1</code> and <code>-7
+mod 3</code> gives <code>2</code>.</p>
+</div>
+<div class="paragraph">
+<p>The rule for the result of an operation is as follows. The real division and
+raising to the power operations always produce a value of type <code>real</code>.
+Otherwise, if both operands (thus <code>x</code> and <code>y</code>) are of type <code>int</code>, the
+result of the operation is of type <code>int</code>. If one of the operands is of type
+<code>real</code>, the result of the operation is of type <code>real</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+Conversion functions exist to convert a real into an integer.
+The function <code>ceil</code> converts a real to the
+smallest integer value not less than the real, the
+function <code>floor</code> gives the biggest
+integer value smaller than or equal to the real, and the
+function <code>round</code> rounds the real to the nearest integer
+value (or up, if it ends on <code>.5</code>).</p>
+</div>
+<div class="paragraph">
+<p>
+
+Between two numbers a relational operation can be defined.
+If for example variable <code>x</code> is smaller than variable <code>y</code>, the expression
+<code>x &lt; y</code> equals <code>true</code>. The relational operators, with well-known
+semantics, are listed in <a href="#tut-table-reloper">The relational operators</a>.</p>
+</div>
+<table id="tut-table-reloper" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 4. The relational operators</caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Name</th>
+<th class="tableblock halign-left valign-top">Operator</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">less than</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x &lt;  y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">at most</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x &lt;= y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">equals</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x == y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">differs from</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x != y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">at least</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x &gt;= y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">greater than</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x &gt;  y</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-strings">Strings</h5>
+<div class="paragraph">
+<p>Variables of type string contains a sequence of characters.
+A string is enclosed by double quotes.
+An example is <code>"Manufacturing line"</code>.
+Strings can be composed from different strings.
+The concatenation operator (<code>+</code>) adds one string to another, for
+example <code>"One" + " " + "string"</code> gives <code>"One string"</code>.
+Moreover the relational operators (<code>&lt;</code>, <code>&lt;=</code>, <code>==</code>, <code>!=</code> <code>&gt;=</code>,
+and <code>&gt;</code>) can be used to compare strings alphabetically,
+e.g. <code>"a" &lt; "aa" &lt; "ab" &lt; "b"</code>.
+String variables are initialized with the empty string <code>""</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-tuple-types">Tuple types</h4>
+<div class="paragraph">
+<p>
+
+
+
+Tuple types are used for keeping several (related) kinds of data together in
+one variable, e.g. the name and the age of a person.
+A tuple variable consists of a number of fields
+inside the tuple, where the types of these fields may be different.
+The number of fields is fixed. One operator, the projection operator
+denoted by a dot (<code>.</code>), is defined for tuples. It selects a field in the
+tuple for reading or assigning.</p>
+</div>
+<div class="sect4">
+<h5 id="tut-notation">Notation</h5>
+<div class="paragraph">
+<p>A type <code>person</code> is a tuple with two fields, a 'name' field of type
+<code>string</code>, and an 'age' field of type <code>int</code>, is denoted by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type person = tuple(string name; int age)</code></pre>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-operator">Operator</h5>
+<div class="paragraph">
+<p>A projection operator fetches a field from a tuple.
+We define two persons:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">person eva  = ("eva" , 29),
+       adam = ("adam", 27);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>And we can speak of <code>eva.name</code> and <code>adam.age</code>, denoting the name of
+<code>eva</code> (<code>"eva"</code>) and the age of <code>adam</code> (<code>27</code>).
+We can assign a field in a tuple to another variable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">ae = eva.age;
+eva.age = eva.age + 1;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This means that the age of <code>eva</code> is assigned tot variable <code>ae</code>, and the
+new age of <code>eva</code> becomes <code>eva.age + 1</code>.</p>
+</div>
+<div class="paragraph">
+<p>By using a multi assignment statement all values of a tuple can be copied into
+separate variables:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">string name;
+int age;
+
+name, age = eva</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This assignment copies the name of <code>eva</code> into variable <code>name</code> of type
+<code>string</code> and her age into <code>age</code> of type <code>int</code>.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-container-types">Container types</h4>
+<div class="paragraph">
+<p>Lists, sets and dictionaries are container types.
+A variable of this type contains zero or more identical elements.
+Elements can be added or removed in variables of these types.
+Variables of a container type are initialized with zero elements.</p>
+</div>
+<div class="paragraph">
+<p>Sets are unordered collections of elements. Each element value either exists
+in a set, or it does not exist in a set.
+Each element value is unique, duplicate elements are silently discarded.
+A list is an ordered collection of elements, that is, there is a first and a last
+element (in a non-empty list). A list also allows duplicate element values.
+Dictionaries are unordered and have no duplicate value, just like sets, but
+you can associate a value (of a different type) with each element value.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+Lists are denoted by a pair of (square) brackets.
+For example, <code>[7, 8, 3]</code> is a list with three integer elements. Since a list
+is ordered, <code>[8, 7, 3]</code> is a different list.
+With empty lists, the computer has to know the type of the elements, e.g.
+<code>&lt;int&gt;[]</code> is an empty list with integer elements.
+The prefix <code>&lt;int&gt;</code> is required in this case.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+Sets are denoted by a
+pair of (curly) braces, e.g. <code>{7, 8, 3}</code> is a set with three integer
+elements.
+As with lists, for an empty set a prefix is required, for example
+<code>&lt;string&gt;{}</code> is an empty set with strings.
+A set is an unordered collection of elements.
+The set <code>{7, 8, 3}</code> is a set with three integer numbers. Since order of
+the elements does not matter, the same set can also be written as
+<code>{8, 3, 7}</code> (or in one of the four other orders).
+In addition, each element in a set is unique, the set <code>{8, 7, 8, 3}</code> is
+equal to the set <code>{7, 8, 3}</code>.
+For readability, elements in a set are normally written in increasing order,
+for example <code>{3, 7, 8}</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+Dictionaries are denoted by a pair of (curly) braces, whereby an element value
+consists of two parts, a 'key' and a 'value' part.
+The two parts separated by a colon (<code>:</code>).
+For example <code>{"jim" : 32, "john" : 34}</code> is a dictionary with two elements.
+The first element has <code>"jim"</code> as key part and <code>32</code> as value part, the
+second element has <code>"john"</code> as key part and <code>34</code> as value part.
+The key parts of the elements work like a set, they are unordered and
+duplicates are silently discarded. A value part is associated with its key
+part.
+In this example, the key part is the name of a person, while the value part
+keeps the age of that person.
+Empty dictionaries are written with a type prefix just like lists and sets,
+e.g. <code>&lt;string:int&gt;{}</code>.</p>
+</div>
+<div class="paragraph">
+<p>Container types have some built-in functions in common (Functions are
+described in <a href="#tut-chapter-functions">Functions</a>):</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The function <code>size</code> gives the number of elements in a variable, for
+example <code>size([7, 8, 3])</code> yields 3; <code>size({7, 8})</code> results in 2;
+<code>size({"jim":32})</code> gives 1 (an element consists of two parts).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The function <code>empty</code> yields <code>true</code> if there are no elements in variable.
+E.g. <code>empty(&lt;string&gt;{})</code> with an empty set of type <code>string</code> is true.
+(Here the type <code>string</code> is needed to determine the type of the elements
+of the empty set.)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The function <code>pop</code> extracts a value from the provided collection and
+returns a tuple with that value, and the collection minus the value.</p>
+<div class="paragraph">
+<p>
+
+For lists, the first element of the list
+becomes the first field of the tuple. The second field of the tuple becomes
+the list minus the first list element. For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">pop([7, 8, 3]) -&gt; (7, [8, 3])</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>-&gt;</code> above denotes 'yields'.
+The value of the list is split into a 'head' (the first element) and a
+'tail' (the remaining elements).</p>
+</div>
+<div class="paragraph">
+<p>
+
+For sets, the first field of the tuple becomes the
+value of an arbitrary element from the set. The second field of the tuple
+becomes the original set minus the arbitrary element.
+For example, a <code>pop</code> on the set <code>{8, 7, 3}</code> has three possible answers:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">pop({8, 7, 3}) -&gt; (7, {3, 8}) or
+pop({8, 7, 3}) -&gt; (3, {7, 8}) or
+pop({8, 7, 3}) -&gt; (8, {3, 7})</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+Performing a <code>pop</code> on a dictionary
+follows the same pattern as above, except 'a value from the collection' are
+actually a key item and a value item. In this case, the <code>pop</code> function
+gives a three-tuple as result. The first field of the tuple becomes the key
+of the extracted element, the second field of the tuple becomes the value of
+the element, and the third field of the tuple contains the dictionary except
+for the extracted element. Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">pop({"a" : 32, "b" : 34}) -&gt; ("a", 32, {"b" : 34}) or
+pop({"a" : 32, "b" : 34}) -&gt; ("b", 34, {"a" : 32})</code></pre>
+</div>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="sect4">
+<h5 id="tut-lists">Lists</h5>
+<div class="paragraph">
+<p>A list is an ordered collection of elements of the same type.
+They are useful to model anything where duplicate values may occur or where
+order of the values is significant. Examples are waiting customers in a shop,
+process steps in a recipe, or products stored in a warehouse. Various
+operations are defined for lists.</p>
+</div>
+<div class="paragraph">
+<p>An element can be fetched by <em>indexing</em>.
+This indexing operation does not change the content of the variable.
+The first element of a list has index <code>0</code>.
+The last element of a list has index <code>size(xs) - 1</code>.
+A negative index, say <code>m</code>, starts from the back of the list, or
+equivalently, at offset <code>size(xs) + m</code> from the front.
+You cannot index non-existing elements.
+Some examples, with <code>xs = [7, 8, 3, 5, 9]</code> are:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">xs[0]  -&gt; 7
+xs[3]  -&gt; 5
+xs[5]  -&gt; ERROR (there is no element at position 5)
+xs[-1] -&gt; xs[5 - 1] -&gt; xs[4] -&gt; 9
+xs[-2] -&gt; xs[5 - 2] -&gt; xs[3] -&gt; 5</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+In <a href="#tut-figure-list-with-indices">A list with indices</a> the list with indices is visualized.
+A common name for the first element of a list
+(i.e., <code>x[0]</code>) is the <em>head</em> of a list.
+Similarly, the last element of a list
+(<code>xs[-1]</code>) is also known as <em>head right</em>.</p>
+</div>
+<div id="tut-figure-list-with-indices" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/list_with_indices.png" alt="list with indices">
+</div>
+<div class="title">Figure 1. A list with indices</div>
+</div>
+<div class="paragraph">
+<p>A part of a list can be fetched by <em>slicing</em>.
+The slicing operation does not change the content of the list, it copies a
+contiguous sequence of a list.
+The result of a slice operation is again a list, even if the slice contains
+just one element.</p>
+</div>
+<div class="paragraph">
+<p>Slicing is denoted by <code>xs[i:j]</code>.
+The slice of <code>xs[i:j]</code> is defined as the sequence of elements with index
+<code>k</code> such that <code>i &lt;= k &lt; j</code>. Note the upper bound <code>j</code> is noninclusive.
+If <code>i</code> is omitted use <code>0</code>.
+If <code>j</code> is omitted use <code>size(xs)</code>. If <code>i</code> is greater than or equal to
+<code>j</code>, the slice is empty. If <code>i</code> or <code>j</code> is negative, the index is
+relative to the end of the list: <code>size(xs) + i</code> or <code>size(xs) + j</code> is
+substituted. Some examples with <code>xs = [7, 8, 3, 5, 9]</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">xs[1:3] -&gt; [8, 3]
+xs[:2]  -&gt; [7, 8]
+xs[1:]  -&gt; [8, 3, 5, 9]
+xs[:-1] -&gt; [7, 8, 3, 5]
+xs[:-3] -&gt; [7, 8]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+The list of all but the first elements (<code>xs[1:]</code>) is often called <em>tail</em>
+and <code>xs[:-1]</code> is also known as <em>tail right</em>.
+In <a href="#tut-figure-list-with-slices">A list with indices and slices</a> the slicing operator is visualized.</p>
+</div>
+<div id="tut-figure-list-with-slices" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/list_with_slices.png" alt="list with slices">
+</div>
+<div class="title">Figure 2. A list with indices and slices</div>
+</div>
+<div class="paragraph">
+<p>
+
+Two lists can be 'glued' together into a new list.
+The glue-ing or concatenation of a list with elements <code>7</code>, <code>8</code>, <code>3</code> and a
+list with elements <code>5</code>, and <code>9</code> is denoted by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">[7, 8, 3] + [5, 9] -&gt; [7, 8, 3, 5, 9]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>An element can be added to a list at the rear or at the front.
+The action is performed by transforming the element into a list and then
+concatenate these two lists. In the next example the value <code>5</code> is added to
+the rear, respectively the front, of a list:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">[7, 8, 3] + [5] -&gt; [7, 8, 3, 5]
+[5] + [7, 8, 3] -&gt; [5, 7, 8, 3]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+Elements also can be removed from a list.
+The <code>del</code> function removes by position, e.g. <code>del(xs, 2)</code> returns the list
+<code>xs</code> without its third element (since positions start at index 0).
+Removing a value by value can be performed by the subtraction operator <code>-</code>.
+For instance, consider the following subtractions:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">[1, 4, 2, 4, 5] - [2] -&gt; [1, 4, 4, 5]
+[1, 4, 2, 4, 5] - [4] -&gt; [1, 2, 4, 5]
+[1, 4, 2, 4, 5] - [8] -&gt; [1, 4, 2, 4, 5]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Every element in the list at the right is searched in the list at the left,
+and if found, the <em>first</em> occurrence is removed.
+In the first example, element <code>2</code> is removed. In the second example, only
+the first value <code>4</code> is removed and the second value (at position 3) is kept.
+In the third example, nothing is removed, since value <code>8</code> is not in the list
+at the left.</p>
+</div>
+<div class="paragraph">
+<p>When the list at the right is longer than one element, the operation is repeated.
+For example, consider <code>xs - ys</code>, whereby <code>xs = [1, 2, 3, 4, 5]</code> and
+<code>ys = [6, 4, 2, 3]</code>. The result is computed as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">    [1, 2, 3, 4, 5] - [6, 4, 2, 3]
+-&gt; ([1, 2, 3, 4, 5] - [6]) - [4, 2, 3]
+-&gt;  [1, 2, 3, 4, 5] - [4, 2, 3]
+-&gt; ([1, 2, 3, 4, 5] - [4]) - [2, 3]
+-&gt;  [1, 2, 3,    5] - [2, 3]
+-&gt; ([1, 2, 3,    5] - [2]) - [3]
+-&gt;  [1,    3,    5] - [3]
+-&gt; [1,5]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Lists have two relational operators, the equal operator and the not-equal operator.
+The equal operator (<code>==</code>) compares two lists. If the lists have the same
+number of elements and all the elements are pair-wise the same, the result of
+the operation is <code>true</code>, otherwise <code>false</code>.
+The not-equal operator (<code>!=</code>) does the same check, but with an opposite result.
+Some examples, with <code>xs = [7, 8, 3]</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">xs == [7, 8, 3] -&gt; true
+xs == [7, 7, 7] -&gt; false</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The membership operator (<code>in</code>) checks if an element is in a list.
+Some examples, with <code>xs = [7, 8, 3]</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">6 in xs -&gt; false
+7 in xs -&gt; true
+8 in xs -&gt; true</code></pre>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-initialization">Initialization</h5>
+<div class="paragraph">
+<p>A list variable is initialized with a list with zero elements, for example in:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list int xs;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The initial value of <code>xs</code> equals <code>&lt;int&gt;[]</code>.</p>
+</div>
+<div class="paragraph">
+<p>A list can be initialized with a number, denoting the number of elements in the list:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list(2) int ys</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This declaration creates a list with <code>2</code> elements, whereby each element of
+type <code>int</code> is initialized.
+The initial value of <code>ys</code> equals <code>[0, 0]</code>.
+Another example with a list of lists:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list(4) list(2) int zm</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This declaration initializes variable <code>zm</code> with the value
+<code>[ [0, 0], [0, 0], [0, 0], [0, 0] ]</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-sets">Sets</h5>
+<div class="paragraph">
+<p>Set operators for union, intersection and difference are present.
+<a href="#tut-table-set-operations">Table with set operations</a> gives the name, the mathematical notation and
+the notation in the Chi language.</p>
+</div>
+<table id="tut-table-set-operations" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 5. Table with set operations</caption>
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Operator</th>
+<th class="tableblock halign-left valign-top">Math</th>
+<th class="tableblock halign-left valign-top">Chi</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set union</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">∪</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set intersection</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">∩</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>*</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set difference</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">∖</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>-</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The union of two sets merges the values of both sets into one, that is, the
+result is the collection of values that appear in at least one of the
+arguments of the union operation. Some examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">{3, 7, 8} + {5, 9} -&gt; {3, 5, 7, 8, 9}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>All permutations with the elements <code>3</code>, <code>5</code>, <code>7</code>, <code>8</code> and <code>9</code> are
+correct (sets have no order, all permutations are equivalent). To keep sets
+readable the elements are sorted in increasing order in this tutorial.</p>
+</div>
+<div class="paragraph">
+<p>Values that occur in both arguments, appear only one time in the result (sets
+silently discard duplicate elements). For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">{3, 7, 8} + {7, 9} -&gt; {3, 7, 8, 9}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The intersection of two sets gives a set with the common elements, that is,
+all values that occur in <em>both</em> arguments.
+Some examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">{3, 7, 8} * {5, 9} -&gt; &lt;int&gt;{}   # no common element
+{3, 7, 8} * {7, 9} -&gt; {7}       # only 7 in common</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Set difference works much like subtraction on lists, except elements occur at
+most one time (and have no order). The operation computes 'remaining
+elements'. The result is a new set containing all values from the first set
+which are not in the second set.
+Some examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">{3, 7, 8} - {5, 9} -&gt; {3, 7, 8}
+{3, 7, 8} - {7, 9} -&gt; {3, 9}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The membership operator <code>in</code> works on sets too:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">3 in {3, 7, 8} -&gt; true
+9 in {3, 7, 8} -&gt; false</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-dictionaries">Dictionaries</h5>
+<div class="paragraph">
+<p>Elements of dictionaries are stored according to a key, while lists elements
+are ordered by a (relative) position, and set elements are not ordered at all.
+A dictionary can grow and shrink by adding or removing elements respectively,
+like a list or a set.
+An element of a dictionary is accessed by the key of the element.</p>
+</div>
+<div class="paragraph">
+<p>The dictionary variable <code>d</code> of type <code>dict(string : int)</code> is given by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">dict (string : int) d =
+    {"jim"  : 32,
+     "john" : 34,
+     "adam" : 25}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Retrieving values of the dictionary by using the key:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">d["john"] -&gt; 34
+d["adam"] -&gt; 25</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Using a non-existing key to retrieve a value results in a error message.</p>
+</div>
+<div class="paragraph">
+<p>A new value can be assigned to the variable by selecting the key of the element:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">d["john"] = 35</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This assignment changes the value of the <code>"john"</code> item to <code>35</code>.
+The assignment can also be used to add new items:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">d["lisa"] = 19</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Membership testing of keys in dictionaries can be done with the <code>in</code> operator:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">"jim" in d -&gt; true
+"peter" in d -&gt; false</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Merging two dictionaries is done by adding them together. The value of the
+second dictionary is used when a key exists in both dictionaries:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">{1 : 1, 2 : 2} + {1 : 5, 3 : 3} -&gt; {1 : 5, 2 : 2, 3 : 3}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The left dictionary is copied, and updated with each item of the right dictionary.</p>
+</div>
+<div class="paragraph">
+<p>Removing elements can be done with subtraction, based on key values. Lists and
+sets can also be used to denote which keys should be removed.
+A few examples for <code>p</code> is <code>{1 : 1, 2 : 2}</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">p - {1 : 3, 5 : 5} -&gt; {2 : 2}
+p - {1, 7} -&gt; {2 : 2}
+p - [2, 8] -&gt; {1 : 1}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Subtracting keys that do not exist in the left dictionary is allowed and has
+no effect.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-custom-types">Custom types</h4>
+<div class="paragraph">
+<p>To structure data the language allows the creation of new types. The
+definition can only be done at global level, that is, outside any <code>proc</code>,
+<code>func</code>, <code>model</code>, or <code>xper</code> definition.</p>
+</div>
+<div class="paragraph">
+<p>Types can be used as alias for elementary data types to increase readability,
+for example a variable of type <code>item</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type item = real;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variables of type <code>item</code> are, e.g.:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">item box, product;
+
+box = 4.0; product = 120.5;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This definition creates the possibility to speak about an item.</p>
+</div>
+<div class="paragraph">
+<p>Types also can be used to make combinations of other data types, e.g. a
+recipe:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type step   = tuple(string name; real process_time),
+     recipe = tuple(int id; list step steps);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A type <code>step</code> is defined by a <code>tuple</code> with two fields, a field with
+<code>name</code> of type <code>string</code>, denoting the name of the step, and a field with
+<code>process_time</code> of type <code>real</code>, denoting the duration of the (processing)
+step.
+The <code>step</code> definition is used in the type <code>recipe</code>.
+Type <code>recipe</code> is defined by a <code>tuple</code> with two fields, an <code>id</code> of type
+<code>int</code>, denoting the identification number, and a field <code>steps</code> of type
+<code>list step</code>, denoting a list of single steps.
+Variables of type recipe are, e.g.:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">recipe plate, bread;
+plate = (34, [("s", 10.8), ("w", 13.7), ("s", 25.6)]);
+bread = (90, [("flour", 16.3), ("yeast", 6.9)]);</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-exercises-2">Exercises</h4>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Exercises for integer numbers.
+What is the result of the following expressions:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">-5 ^ 3
+-5 * 3
+5 mod 3</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>Exercises for tuples.
+Given are tuple type <code>box</code> and variable <code>x</code> of type <code>box</code>:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type box = tuple(string name; real weight);
+box x = ("White", 12.5);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>What is the result of the following expressions:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">x.name
+x.real
+x</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>Exercises for lists.
+Given is the list <code>xs = [0,1,2,3,4,5,6]</code>.
+Determine the outcome of:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">xs[0]
+xs[1:]
+size(xs)
+xs + [3]
+[4,5] + xs
+xs - [2,2,3]
+xs - xs[2:]
+xs[0] + (xs[1:])[0]</code></pre>
+</div>
+</div>
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-statements">Statements</h3>
+<div class="paragraph">
+<p>There are several kinds of statements, such as assignment statements, choice
+statements (select and if statements), and loop statements (while and for
+statements).</p>
+</div>
+<div class="paragraph">
+<p>Semicolons are required after statements, except at the end of a sequence
+(that is, just before an <code>end</code> keyword and after the last statement) or
+after the keyword <code>end</code>. In this text semicolons are omitted before <code>end</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect3">
+<h4 id="tut-the-assignment-statement">The assignment statement</h4>
+<div class="paragraph">
+<p>An <em>assignment</em> statement is used to assign values to variables.
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">y = x + 10</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This assignment consists of a name of the variable (<code>y</code>), an assignment
+symbol (<code>=</code>), and an expression (<code>x + 10</code>) yielding a value. For example,
+when <code>x</code> is <code>2</code>, the value of the expression is <code>12</code>.
+Execution of this statement copies the value to the <code>y</code> variable,
+immediately after executing the assignment, the value of the <code>y</code> variable is
+<code>10</code> larger than the value of the <code>x</code> variable at this point of the
+program.
+The value of the <code>y</code> variable will not change until the next assignment to
+<code>y</code>, for example, performing the assignment <code>x = 7</code> has no effect on the
+value of the <code>y</code> variable.</p>
+</div>
+<div class="paragraph">
+<p>An example with two assignment statements:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">i = 2;
+j = j + 1</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The values of <code>i</code> becomes 2, and the value of <code>j</code> is incremented.
+Independent assignments can also be combined in a multi-assignment, for
+example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">i, j = 2, j + 1</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The result is the same as the above described example, the first value goes
+into the first variable, the second value into the second variable, etc.</p>
+</div>
+<div class="paragraph">
+<p>In an assignment statement, first all expression values are computed before
+any assignment is actually done. In the following example the values of <code>x</code>
+and <code>y</code> are swapped:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">x, y = y, x;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-the-if-statement">The <code>if</code> statement</h4>
+<div class="paragraph">
+<p>The <em>if</em> statement is used to express decisions.
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">if x &lt; 0:
+    y = -x
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If the value of <code>x</code> is negative, assign its negated value to <code>y</code>.
+Otherwise, do nothing (skip the <code>y = -x</code> assignment statement).</p>
+</div>
+<div class="paragraph">
+<p>To perform a different statement when the decision fails, an <code>if</code>-statement
+with an <code>else</code> alternative can be used. It has the following form.
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">if a &gt; 0:
+    c = a
+else:
+    c = b
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If <code>a</code> is positive, variable <code>c</code> gets the value of <code>a</code>, otherwise it
+gets the value of <code>b</code>.</p>
+</div>
+<div class="paragraph">
+<p>In some cases more alternatives must be tested. One way of writing it is by
+nesting an <code>if</code>-statement in the <code>else</code> alternative of the previous
+<code>if</code>-statement, like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">if i &lt; 0:
+    writeln("i &lt; 0")
+else:
+    if i == 0:
+        writeln("i = 0")
+    else:
+        if i &gt; 0 and i &lt; 10:
+            writeln("0 &lt; i &lt; 10")
+        else:
+            # i must be greater or equal 10
+            writeln("i &gt;= 10")
+        end
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This tests <code>i &lt; 0</code>. If it fails, the <code>else</code> is chosen, which contains a
+second <code>if</code>-statement with the <code>i == 0</code> test. If that test also fails, the
+third condition <code>i &gt; 0 and i &lt; 10</code> is tested, and one of the <code>writeln</code>
+statements is chosen.</p>
+</div>
+<div class="paragraph">
+<p>The above can be written more compactly by combining an <code>else</code>-part and the
+<code>if</code>-statement that follows, into an <code>elif</code> part. Each <code>elif</code> part
+consists of a boolean expression, and a statement list. Using <code>elif</code> parts
+results in:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">if i &lt; 0:
+    writeln("i &lt; 0")
+elif i == 0:
+    writeln("i = 0")
+elif i &gt; 0 and i &lt; 10:
+    writeln("0 &lt; i &lt; 10")
+else:
+    # i must be greater or equal 10
+    writeln("i &gt;= 10")
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each alternative starts at the same column, instead of having increasing
+indentation.
+The execution of this combined statement is still the same, an alternative is
+only tested when the conditions of all previous alternatives fail.</p>
+</div>
+<div class="paragraph">
+<p>
+Note that the line <code># i must be greater or equal 10</code> is a comment to clarify
+when the alternative is chosen. It is not executed by the simulator. You can
+write comments either at a line by itself like above, or behind program code.
+It is often useful to clarify the meaning of variables, give a more detailed
+explanation of parameters, or add a line of text describing what the purpose
+of a block of code is from a birds-eye view.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-the-while-statement">The <code>while</code> statement</h4>
+<div class="paragraph">
+<p>The <em>while</em> statement is used for repetitive execution of the same statements,
+a so-called <em>loop</em>. A fragment that calculates the sum of <code>10</code> integers,
+<code>10, 9, 8, ..., 3, 2, 1</code>, is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">int i = 10, sum;
+
+while i &gt; 0:
+    sum = sum + i; i = i - 1
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each iteration of a <code>while</code> statement starts with evaluating its condition
+(<code>i &gt; 0</code> above). When it holds, the statements inside the while (the
+<code>sum = sum + i; i = i - 1</code> assignments) are executed (which adds <code>i</code> to the sum
+and decrements <code>i</code>). At the end of the statements, the <code>while</code> is executed
+again by evaluating the condition again. If it still holds, the next iteration
+of the loop starts by executing the assignment statements again, etc.
+When the condition fails (<code>i</code> is equal to <code>0</code>), the <code>while</code> statement
+ends, and execution continues with the statement following <code>end</code>.</p>
+</div>
+<div class="paragraph">
+<p>A fragment with an infinite loop is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">while true:
+    i = i + 1;
+    ...
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The condition in this fragments always holds, resulting in <code>i</code> getting
+incremented 'forever'. Such loops are very useful to model things you switch
+on but never off, e.g. processes in a factory.</p>
+</div>
+<div class="paragraph">
+<p>A fragment to calculate <code>z = x ^ y</code>, where <code>z</code> and <code>x</code> are of type
+<code>real</code>, and <code>y</code> is of type <code>integer</code> with a non-negative value, showing
+the use of two <code>while</code> loops, is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">real x; int y; real z = 1;
+
+while y &gt; 0:
+    while y mod 2 == 0:
+        y = y div 2; x = x * x
+    end;
+    y = y - 1; z = x * z
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A fragment to calculate the greatest common divisor (GCD) of two integer
+numbers <code>j</code> and <code>k</code>, showing the use of <code>if</code> and <code>while</code> statements,
+is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">while j != k:
+    if j &gt; k:
+        j = j - k
+    else:
+        k = k - j
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The symbol <code>!=</code> stands for 'differs from' ('not equal').</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-for-statement">The <code>for</code> statement</h4>
+<div class="paragraph">
+<p>The while statement is useful for looping until a condition fails. The <em>for</em>
+statement is used for iterating over a collection of values. A fragment with
+the calculation of the sum of <code>10</code> integers:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">int sum;
+
+for i in range(1, 11):
+    sum = sum + i
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+The result of the expression <code>range(1, 11)</code>
+is a list whose items are consecutive integers from <code>1</code> (included)
+up to <code>11</code> (excluded): <code>[1, 2, 3, ..., 9, 10]</code>.</p>
+</div>
+<div class="paragraph">
+<p>The following example illustrates the use of the for statement in relation
+with container-type variables. Another way of calculating the sum of a list of
+integer numbers:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list int xs = [1, 2, 3, 5, 7, 11, 13];
+int sum;
+
+for x in xs:
+    sum = sum + x
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This statement iterates over the elements of list <code>xs</code>.
+This is particularly useful when the value of <code>xs</code> may change before the
+<code>for</code> statement.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-notes">Notes</h4>
+<div class="paragraph">
+<p>In this chapter the most used statements are described. Below are a few other
+statements that may be useful some times:</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+. Inside loop statements, the <em>break</em> and <em>continue</em> statements are allowed.
+The <code>break</code> statements allows 'breaking
+out of a loop', that is, abort a while or a for statement.
+The <code>continue</code> statement aborts
+execution of the statements in a loop.
+It 'jumps' to the start of the next iteration.</p>
+</div>
+<div class="paragraph">
+<p>
+
+. A rarely used statement is the <code>pass</code> statement.
+It&#8217;s like an <code>x = x</code> assignment statement, but more clearly
+expresses 'nothing is done here'.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-exercises-3">Exercises</h4>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Study the Chi specification below and explain why, though it works, it is
+not an elegant way of modeling the selection.
+Make a suggestion for a shorter, more elegant version of:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model M():
+    int i = 3;
+
+    if (i &lt;  0) == true:
+        write("%d is a negative number\n", i);
+    elif (i &lt;= 0) == false:
+        write("%d is a positive number\n", i);
+    end
+end</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>Construct a list with the squares of the integers 1 to 10.</p>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>using a <code>for</code> statement, and</p>
+</li>
+<li>
+<p>using a <code>while</code> statement.</p>
+</li>
+</ol>
+</div>
+</li>
+<li>
+<p>Write a program that</p>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>Makes a list with the first 50 prime numbers.</p>
+</li>
+<li>
+<p>Extend the program with computing the sum of the first 7 prime numbers.</p>
+</li>
+<li>
+<p>Extend the program with computing the sum of the last 11 prime numbers.</p>
+</li>
+</ol>
+</div>
+</li>
+</ol>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-functions">Functions</h3>
+<div class="paragraph">
+<p>In a model, computations must be performed to process the information that is
+sent around.
+Short and simple calculations are written as assignments between the other
+statements, but for longer computations or computations that are needed at
+several places in the model, a more encapsulated environment is useful, a
+<em>function</em>.
+In addition, the language comes with a number of built-in functions, such as
+<code>size</code> or <code>empty</code> on container types.
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">func real mean(list int xs):
+    int sum;
+
+    for x in xs:
+        sum = sum + x
+    end;
+    return sum / size(xs)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>func</code> keyword indicates it is a function. The name of the function is
+just before the opening parenthesis, in this example <code>mean</code>. Between the
+parentheses, the input values (the <em>formal parameters</em>) are listed. In this
+example, there is one input value, namely <code>list int</code> which is a list of
+integers. Parameter name <code>xs</code> is used to refer to the input value in the
+body of the function.
+Between <code>func</code> and the name of the function is the type of the computation
+result, in this case, a <code>real</code> value.
+In other words, this <code>mean</code> function takes a list of integers as input, and
+produces a <code>real</code> value as result.</p>
+</div>
+<div class="paragraph">
+<p>
+
+The colon at the end of the first line indicates the start of the computation.
+Below it are new variable declarations (<code>int sum</code>), and statements to
+compute the value, the <em>function algorithm</em>.
+The <code>return</code> statement denotes the end of
+the function algorithm.
+The value of the expression behind it is the result of the calculation.
+This example computes and returns the mean value of the integers of the list.</p>
+</div>
+<div class="paragraph">
+<p>Use of a function (<em>application</em> of a function) is done by using its name,
+followed by the values to be used as input (the <em>actual parameters</em>).
+The above function can be used like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">m = mean([1, 3, 5, 7, 9])</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The actual parameter of this function application is <code>[1, 3, 5, 7, 9]</code>.
+The function result is <code>(1 + 3 + 5 + 7 + 9)/5</code> (which is <code>5.0</code>), and
+variable <code>m</code> becomes <code>5.0</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+A function is a mathematical function: the result of a function is the same
+for the same values of input parameters.
+A function has no <em>side-effect</em>, and it cannot access variables outside the body.
+For example, it cannot access <code>time</code> (explained in
+<a href="#tut-servers-with-time">Servers with time</a>) directly, it has to be passed in through
+the parameter list.</p>
+</div>
+<div class="paragraph">
+<p>A function that calculates the sign of a real number, is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">func int sign(real r):
+    if r &lt; 0:
+        return -1
+    elif r = 0:
+        return  0
+    end;
+    return  1
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The sign function returns:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>if <code>r</code> is smaller than zero, the value minus one;</p>
+</li>
+<li>
+<p>if <code>r</code> equals zero, the value zero; and</p>
+</li>
+<li>
+<p>if <code>r</code> is greater than zero, the value one.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The computation in a function ends when it encounters a <code>return</code> statement.
+The <code>return 1</code> at the end is therefore only executed when both
+<code>if</code> conditions are false.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+<div class="sect3">
+<h4 id="tut-sorted-lists">Sorted lists</h4>
+<div class="paragraph">
+<p>The language allows <em>recursive</em> functions as well as <em>higher-order</em> functions.
+Explaining them in detail is beyond the scope of this tutorial, but these
+functions are useful for making and maintaining sorted lists.
+Such a sorted list is useful for easily getting the smallest (or largest) item
+from a collection, for example the order with the nearest deadline.</p>
+</div>
+<div class="paragraph">
+<p>To sort a list, the first notion that has to be defined is the desired order,
+by making a function of the following form:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">func bool decreasing(int x, y):
+    return x &gt;= y
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The function is called <em>predicate function</em>.
+It takes two values from the list (two integers in this case), and produces a
+boolean value, indicating whether the parameters are in the right order.
+In this case, the function returns <code>true</code> when the first parameter is larger
+or equal than the second parameter, that is, larger values must be before
+smaller values (for equal values, the order does not matter). This results in
+a list with decreasing values.</p>
+</div>
+<div class="paragraph">
+<p>The requirements on <em>any</em> predicate function <code>f</code> are:</p>
+</div>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>If <code>x != y</code>, either <code>f(x, y)</code> must hold or <code>f(y, x)</code> must hold, but
+not both. (Unequal values must have a unique order.)</p>
+</li>
+<li>
+<p>If <code>x == y</code>, both <code>f(x, y)</code> and <code>f(y, x)</code> must hold. (Equal values
+can be placed in arbitrary order.)</p>
+</li>
+<li>
+<p>For values <code>x</code>, <code>y</code>, and <code>z</code>, if <code>f(x, y)</code> holds and <code>f(y, z)</code>
+holds (that is <code>x &gt;= y</code> and <code>y &gt;= z</code>), then <code>f(x, z)</code> must also hold
+(that is, <code>x &gt;= z</code> should also be true).</p>
+</li>
+</ol>
+</div>
+<div class="paragraph">
+<p>(The order between <code>x</code> and <code>z</code> must be stable, even when you compare
+with an intermediate value <code>y</code> between <code>x</code> and <code>z</code>.)</p>
+</div>
+<div class="paragraph">
+<p>These requirements hold for functions that test on <code>&lt;=</code> or <code>&gt;=</code> between
+two values, like above.</p>
+</div>
+<div class="paragraph">
+<p>If you do not provide a proper predicate function, the result may not be
+sorted as you expect, or the simulator may abort when it fails to find a
+proper sorting order.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="tut-sort">Sort</h5>
+<div class="paragraph">
+<p>The first use of such a predicate function is for sorting a list. For example
+list <code>[3, 8, 7]</code> is sorted decreasingly (larger numbers
+before smaller numbers) with the following statement:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">ys = sort([3, 8, 7], decreasing)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Sorting is done with the <em>sort</em> function, it takes two parameters, the list to
+sort, and the predicate <em>function</em>. (There are no parentheses <code>()</code> behind
+<code>decreasing</code>!) The value of list <code>ys</code> becomes <code>[8, 7, 3]</code>.</p>
+</div>
+<div class="paragraph">
+<p>Another sorting example is a list of type <code>tuple(int number, real slack)</code>,
+where field <code>number</code> denotes the number of an item, and field <code>slack</code>
+denotes the slack time of the item. The list should be sorted in ascending
+order of the slack time. The type of the item is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type item = tuple(int number, real slack);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The predicate function <code>spred</code> is defined by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">func bool spred(item x, y):
+    return x.slack &lt;= y.slack
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Function <code>spred</code> returns <code>true</code> if the two elements are in increasing
+order in the list, otherwise <code>false</code>.
+Note, the parameters of the function are of type <code>item</code>.
+Given a variable <code>ps</code> equal to <code>[(7, 21.6), (5, 10.3), (3, 35.8)]</code>.
+The statement denoting the sorting is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">qs = sort(ps, spred)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>variable <code>qs</code> becomes <code>[(5, 10.3), (7, 21.6), (3, 35.8)]</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-insert">Insert</h5>
+<div class="paragraph">
+<p>Adding a new value to a sorted list is the second use of higher-order
+functions. The simplest approach would be to add the new value to the head or
+rear of the list, and sort the list again, but sorting an almost sorted list
+is very expensive.
+It is much faster to find the right position in the already sorted list, and
+insert the new value at that point.
+This function also exists, and is named <code>insert</code>.
+An example is (assume <code>xs</code> initially contains <code>[3,8]</code>):</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">xs = insert(xs, 7, increasing)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>where <code>increasing</code> is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">func bool increasing(int x, y):
+    return x &lt;= y
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>insert</code> call assigns the result <code>[3,7,8]</code> as new value to <code>xs</code>,
+<code>7</code> is inserted in the list.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-input-and-output">Input and output</h3>
+<div class="paragraph">
+<p>A model communicates with the outside world, e.g. screen and files, by the use
+of read statements for input of data, and write statements for output of data.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect3">
+<h4 id="tut-the-read-function">The <code>read</code> function</h4>
+<div class="paragraph">
+<p>Data can be read from the command line or from a file by <em>read</em> functions.
+A read function requires a type value for each parameter to be read.
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">int i; string s;
+
+i = read(int);
+s = read(string);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Two values, an integer value and a string value are read from the command line.
+On the command line the two values are typed:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">1 "This is a string"</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>i</code> becomes <code>1</code>, and string <code>s</code> becomes <code>"This is a string"</code>.
+The double quotes are required! Parameter values are separated by a space or a
+tabular stop. Putting each value on a separate line also works.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reading-from-file">Reading from a file</h4>
+<div class="paragraph">
+<p>Data also can be read from files. An example fragment:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type row = tuple(string name; list int numbers);
+
+file f;
+int i;
+list row rows;
+
+f = open("data_file.txt", "r");
+i = read(f, int);
+rows = read(f, list row);
+close(f)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Before a file can be used, the file has to be declared, <em>and</em> the file has to
+be opened by statement <code>open</code>.
+Statement <code>open</code> has two parameters, the first parameter denotes the file
+name (as a string), and the second parameter describes the way the file is
+used. In this case, the file is opened in a read-only mode, denoted by string
+"r".</p>
+</div>
+<div class="paragraph">
+<p>Reading values works in the same way as before, except you cannot add new text
+in the file while reading it. Instead, the file is processed sequentially from
+begin to end, with values separated from each other by white space (spaces,
+tabs, and new-lines). You can read values of different types from the same
+file, as long as the value in the file matches with the type that you ask.
+For example, the above Chi program could read the following data from
+<code>data_file.txt</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">21
+[("abc", [7,21]),
+ ("def", [8,31,47])]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>After enough values have been read, the file should be closed with the
+statement <code>close</code>, with one parameter, the variable of the file.
+If a file is still open after an experiment, the file is closed automatically
+before the program quits.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-advanced-file-reading">Advanced reading from a file</h4>
+<div class="paragraph">
+<p>When reading from a file, the <code>eof</code> and <code>eol</code> functions can be used to
+obtain information about the white space around the values.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The <code>eof</code> (end of file) function returns <code>true</code> if you have read the
+last value (that is, there are no more values to read).</p>
+</li>
+<li>
+<p>The <code>eol</code> (end of line) function returns <code>true</code> if there are no more
+values at the current line. In particular, the <code>eol</code> function returns
+<code>true</code> when the end of the file has been reached.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>These functions can be used to customize reading of more complicated values.
+As an example, you may want to read the same <code>list row</code> value as above, but
+without having all the comma&#8217;s, quotes, parentheses, and brackets of the
+literal value <code>[("abc", [7,21]), ("def", [8,31,47])]</code>.
+Instead, imagine having a file <code>clean_data.txt</code> with the following layout:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">abc 7 21
+def 8 31 47</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each line is one row. It starts with a one-word string, followed by a list of
+integer numbers.
+By using the <code>eof</code> and <code>eol</code> functions, you can read this file in the
+following way:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">file f;
+list row rows;
+string name;
+list int xs;
+
+f = open("clean_data.txt", "r");
+while not eof(f):
+    name = read(f, string);
+    xs = &lt;int&gt;[];
+    while not eol(f): # Next value is at the same line.
+        xs = xs + [read(f, int)];
+    end
+    rows = rows + [(name, xs)];
+end
+close(f);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each line is processed individually, where <code>eol</code> is used to find out whether
+the last value of a line has been read. The reading loop terminates when
+<code>eof</code> returns <code>true</code>.</p>
+</div>
+<div class="paragraph">
+<p>Note that <code>eol</code> returns whether the current line has no more values. It does
+not tell you how many lines down the next value is. For example, an empty line
+inserted between the  <code>abc 7 21</code> line and the <code>def 8 31 47</code> line is
+skipped silently. If you want that information, you can use the <code>newlines</code>
+function instead.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-the-write-statement">The <code>write</code> statement</h4>
+<div class="paragraph">
+<p>The <em>write</em> statement is used for for output of data to the screen of the
+computer. Data can also be written to a file.</p>
+</div>
+<div class="paragraph">
+<p>The first argument of <code>write</code> (or the second argument if you write to a file,
+see below) Is called the <em>format string</em>. It is a template of the text to
+write, with 'holes' at the point where a data value is to be written.</p>
+</div>
+<div class="paragraph">
+<p>Behind the format string, the data values to write are listed. The first value is
+written in the first 'hole', the second value in the second 'hole' and so
+on. The holes are also called <em>place holders</em>. A place holder starts with
+<code>%</code> optionally followed by numbers or some punctuation (its meaning is
+explained below). A place holder ends with a <em>format specifier</em>, a single
+letter like <code>s</code> or <code>f</code>. An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">int i = 5;
+
+write("i equals %s", i)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this example the text <code>i equals 5</code> is written to the screen by the
+<code>write</code> statement. The <code>"i equals %s"</code> format string defines what output
+is written. All 'normal' characters are copied as-is. The <code>%s</code> place holder
+is not copied. Instead the first data value (in this case <code>i</code>) is inserted.</p>
+</div>
+<div class="paragraph">
+<p>The <code>s</code> in the place holder is the format specifier. It means 'print as
+string'. The <code>%s</code> is a general purpose format specifier, it works with
+almost every type of data. For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list dict(int:real) xs = [{1 : 5.3}];
+
+write("%s", xs)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>will output the contents of <code>xs</code> (<code>{1 : 5.3}</code>).</p>
+</div>
+<div class="paragraph">
+<p>In general, this works nicely, but for numeric values a little more control
+over the output is often useful.
+To this end, there are also format specifiers <code>d</code> for integer numbers, and
+<code>f</code> for real numbers.
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">int i = 5;
+real r = 3.14;
+
+write("%4d/%8.2f", i, r)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This fragment has the effect that the values of <code>i</code> and <code>r</code> are written to
+the screen as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">   5/    3.14</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The value of <code>i</code> is written in <code>d</code> format (as <code>int</code> value), and the
+value of <code>r</code> is written in <code>f</code> format (as <code>real</code> value).
+The symbols <code>d</code> and <code>f</code> originate respectively from 'decimal', and
+'floating point' numbers.
+The numbers <code>4</code> respectively <code>8.2</code> denote that the integer value is
+written four positions wide (that is, 3 spaces and a <code>5</code> character), and
+that the real value is written eight positions wide, with two characters after
+the decimal point (that is, 4 spaces and the text <code>3.14</code>).</p>
+</div>
+<div class="paragraph">
+<p>A list of format specifiers is given in <a href="#tut-table-format-specifiers">Format specifiers</a>.</p>
+</div>
+<table id="tut-table-format-specifiers" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 6. Format specifiers</caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Format specifier</th>
+<th class="tableblock halign-left valign-top">Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>%b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">boolean value (outputs <code>false</code> or <code>true</code>)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>%d</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">integer</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>%10d</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">integer, at least ten characters wide</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>%f</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>%10f</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real, at least ten characters wide</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>%.4f</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real, four characters after the decimal point</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>%10.4f</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real, at least ten characters wide with four characters after the decimal point</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>%s</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">character string <code>s</code>, can also write other types of data</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>%%</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">the character <code>%</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Finally, there are also a few special character sequences called <em>escape
+sequence</em> which allow to write characters like horizontal tab (which means
+'jump to next tab position in the output'), or newline (which means 'go to the
+next line in the output') in a string.
+An escape sequence consists of two characters. First a backslash character
+<code>\</code>, followed by a second character.
+The escape sequence are presented in <a href="#tut-table-escape-sequences">Escape sequences in strings</a>.</p>
+</div>
+<table id="tut-table-escape-sequences" class="tableblock frame-all grid-all stretch">
+<caption class="title">Table 7. Escape sequences in strings</caption>
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Sequence</th>
+<th class="tableblock halign-left valign-top">Meaning</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>\n</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">new line</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>\t</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">horizontal tab</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>\"</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">the character <code>"</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>\\</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">the character <code>\</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>An example is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">int i = 5, j = 10;
+real r = 3.14;
+write("%6d\t%d\n\t%.2f\n", i, j, r)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The result looks like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">     5  10
+        3.14</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The value of <code>j</code> is written at the tab position, the output goes to the next
+line again at the first tab position, and outputs the value of <code>r</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-writing-to-file">Writing to a file</h4>
+<div class="paragraph">
+<p>Data can be written to a file, analog to the read function.
+A file has to be defined first, and opened for writing before the file can be used.
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">file f;
+int i;
+
+f = open("output_file", "w");
+write(f, "%s", i); write(f, "%8.2f", r);
+close(f)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A file, in this case <code>"output_file"</code> is used in write-only mode, denoted by
+the character <code>"w"</code>.
+Opening a file for writing destroys its old contents (if the file already exists).
+In the write statement, the first parameter must be the file, and the second
+parameter must be the format string.</p>
+</div>
+<div class="paragraph">
+<p>After all data has been written, the file is closed by statement <code>close</code>.
+If the file is still open after execution of the program, the file is closed
+automatically.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-stochastic-behavior">Modeling stochastic behavior</h3>
+<div class="paragraph">
+<p>
+
+
+Many processes in the world vary a little bit each time they are performed.
+Setup of machines goes a bit faster or slower, patients taking their medicine
+takes longer this morning, more products are delivered today, or the quality
+of the manufactured product degrades due to a tired operator.
+Modeling such variations is often done with stochastic distributions. A
+distribution has a mean value and a known shape of variation. By matching the
+means and the variation shape with data from the system being modeled, an
+accurate model of the system can be obtained.
+The language has many stochastic distributions available, this chapter
+explains how to use them to model a system, and lists a few commonly used
+distributions. The full list is available in the reference manual at
+<a href="#ref-chapter-distributions">Distributions</a>.</p>
+</div>
+<div class="paragraph">
+<p>The following fragment illustrates the use of the random distribution to model
+a dice.
+Each value of the six-sided dice is equally likely to appear. Every value
+having the same probability of appearing is a property of the integer uniform
+distribution, in this case using interval <code>[1, 7)</code> (inclusive on the left
+side, exclusive on the right side).
+The model is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">dist int dice = uniform(1,7);
+int x, y;
+
+x = sample dice;
+y = sample dice;
+writeln("x=%d, y=%d", x, y);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The variable <code>dice</code> is an integer distribution, meaning that values drawn
+from the distribution are integer numbers. It is assigned an
+uniform distribution.
+A throw of a dice is simulated with the <em>operator</em> <code>sample</code>.
+Each time <code>sample</code> is used, a new sample value is obtained from the
+distribution.
+In the fragment the dice is thrown twice, and the values are assigned to the
+variables <code>x</code>, and <code>y</code>.</p>
+</div>
+<div class="sect3">
+<h4 id="tut-distributions">Distributions</h4>
+<div class="paragraph">
+<p>The language provides <em>constant</em>, <em>discrete</em> and <em>continuous</em> distributions.
+A discrete distribution is a distribution where only specific values can be
+drawn, for example throwing a dice gives an integer number.
+A continuous distribution is a distribution where a value from a continuous
+range can be drawn, for example assembling a product takes a positive amount
+of time.
+The constant distributions are discrete distributions that always return the
+same value. They are useful during the development of the model (see below).</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="tut-constant-distributions">Constant distributions</h5>
+<div class="paragraph">
+<p>When developing a model with stochastic behavior, it is hard to verify whether
+the model behaves correctly, since the stochastic results make it difficult to
+predict the outcome of experiments. As a result, errors in the model may not
+be noticed, they hide in the noise of the stochastic results.
+One solution is to first write a model without stochastic behavior, verify
+that model, and then extend the model with stochastic sampling.
+Extending the model with stochastic behavior is however an invasive change
+that may introduce new errors. These errors are again hard to find due to the
+difficulties to predict the outcome of an experiment.
+The constant distributions aim to narrow the gap by reducing the amount of
+changes that need to be done after verification.</p>
+</div>
+<div class="paragraph">
+<p>With constant distributions, a stochastic model with sampling of distributions
+is developed, but the stochastic behavior is eliminated by temporarily using
+constant distributions. The model performs stochastic sampling of values, but
+with predictable outcome, and thus with predictable experimental results,
+making verification easier. After verifying the model, the constant
+distributions are replaced with the distributions that fit the mean value and
+variation pattern of the modeled system, giving a model with stochastic
+behavior.
+Changing the used distributions is however much less invasive, making it less
+likely to introduce new errors at this stage in the development of the model.</p>
+</div>
+<div class="paragraph">
+<p>Constant distributions produce the same value <code>v</code> with every call of
+<code>sample</code>. There is one constant distribution for each type of sample value:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>constant(bool v)</code>, a <code>bool</code> distribution.</p>
+</li>
+<li>
+<p><code>constant(int v)</code>, an <code>int</code> distribution.</p>
+</li>
+<li>
+<p><code>constant(real v)</code>, a <code>real</code> distribution.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>An example with a constant distribution is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">dist int u = constant(7);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This distribution returns the integer value <code>7</code> with each <code>sample u</code>
+operation.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-discrete-distributions">Discrete distributions</h5>
+<div class="paragraph">
+<p>Discrete distributions return values from a finite fixed set of possible
+values as answer. In Chi, there is one distribution that returns a boolean
+when sampled, and there are several discrete distributions that return an
+integer number.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>dist</code> <code>bool</code> <strong>bernoulli</strong><code>(real p)</code></p>
+<div class="paragraph">
+<p>Outcome of an experiment with chance <code>p</code> <code>(0 &lt;= p &lt;= 1)</code>.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/bernoulli.svg" alt="bernoulli">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>{false, true}</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>p</code> (where <code>false</code> is interpreted as <code>0</code>, and <code>true</code> is interpreted as <code>1</code>)</p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>1 - p</code> (where <code>false</code> is interpreted as <code>0</code>, and <code>true</code> is interpreted as <code>1</code>)</p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>Bernoulli(p), <a href="#law-tut">[law-tut]</a>, page 302</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>int</code> <strong>uniform</strong><code>(int a, b)</code></p>
+<div class="paragraph">
+<p>Integer uniform distribution from <code>a</code> to <code>b</code> excluding the upper bound.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/disc_uni.svg" alt="disc uni">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>{a, a+1, ..., b-1}</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>(a + b - 1) / 2</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>((b - a)\^2 - 1) / 12</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>DU(a, b - 1), <a href="#law-tut">[law-tut]</a>, page 303</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-continuous-distributions">Continuous distributions</h5>
+<div class="paragraph">
+<p>Continuous distributions return a value from a continuous range.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>dist</code> <code>real</code> <strong>uniform</strong><code>(real a, b)</code></p>
+<div class="paragraph">
+<p>Real uniform distribution from <code>a</code> to <code>b</code>, excluding the upper bound.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/cont_uni.svg" alt="cont uni">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>[a, b)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>(a + b) / 2</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>(b - a)^2 / 12</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>U(a,b), <a href="#law-tut">[law-tut]</a>, page 282, except that distribution has an
+inclusive upper bound.</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>gamma</strong><code>(real a, b)</code></p>
+<div class="paragraph">
+<p>Gamma distribution, with shape parameter <code>a &gt; 0</code> and scale parameter <code>b &gt; 0</code>.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/gamma.svg" alt="gamma">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>a * b</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>a * b^2</code></p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-references">References</h5>
+<div class="ulist bibliography">
+<ul class="bibliography">
+<li>
+<p><a id="law-tut"></a>[law-tut] Simulation Modeling &amp; Analysis, fourth edition,
+by Averill M. Law,
+publisher McGraw-Hill, International Edition, 2007,
+ISBN 978-007-125519-6</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-simulating-stochastic-behavior">Simulating stochastic behavior</h4>
+<div class="paragraph">
+<p>In this chapter, the mathematical notion of stochastic distribution is used to
+describe how to model stochastic behavior.
+Simulating a model with stochastic behavior at a computer is however not
+stochastic at all. Computer systems are deterministic machines, and
+have no notion of varying results.</p>
+</div>
+<div class="paragraph">
+<p>A (pseudo-)random number generator is used to create stochastic results
+instead. It starts with an initial <em>seed</em>, an integer number (you can give one
+at the start of the simulation).
+From this seed, a function creates a stream of 'random' values. When looking
+at the values there does not seem to be any pattern.
+It is not truly random however. Using the same seed again gives exactly the
+same stream of numbers. This is the reason to call the function a
+<em>pseudo</em>-random number generator (a true random number generator would never
+produce the exact same stream of numbers).
+A sample of a distribution uses one or more numbers from the stream to compute
+its value.
+The value of the initial seed thus decides the value of all samples drawn in
+the simulation. By default, a different seed is used each time you run a
+simulation (leading to slightly different results each time).
+You can also explicitly state what seed you want to use when running a model,
+see <a href="#tool-compile-and-simulate">Compile and simulate</a>.
+At the end of the simulation, the used
+initial seed of that simulation is printed for reference purposes.</p>
+</div>
+<div class="paragraph">
+<p>While doing a stochastic simulation study, performing several experiments with
+the same initial seed invalidates the results, as it is equivalent to copying
+the outcome of a single experiment a number of times.
+On the other hand, when looking for the cause of a bug in the model,
+performing the exact same experiment is useful as outcomes of previous
+experiments should match exactly.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-exercises-4">Exercises</h4>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>According to the Chi reference manual, for a <code>gamma</code> distribution with
+parameters <code>(a, b)</code>, the mean equals <code>a * b</code>.</p>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>Use a Chi specification to verify whether this is true for at least 3
+different pairs of <code>a</code> and <code>b</code>.</p>
+</li>
+<li>
+<p>How many samples from the distribution are approximately required to
+determine the mean up to three decimals accurate?</p>
+</li>
+</ol>
+</div>
+</li>
+<li>
+<p>Estimate the mean μ and variance σ<sup>2</sup> of a triangular distribution
+<code>triangle(1.0, 2.0, 5.0)</code> by simulating 1000 samples. Recall that the
+variance σ<sup>2</sup> of <em>n</em> samples can be calculated by a function like:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">func real variance(list real samples, real avg):
+    real v;
+
+    for x in samples:
+        v = v + (x - avg)^2;
+    end
+
+    return v / (size(samples) - 1)
+end</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>We would like to build a small game, called <em>Higher or Lower</em>.
+The computer picks a random integer number between 1 and 14. The player
+then has to predict whether the next number will be higher or lower. The
+computer picks the next random number and compares the new number with the
+previous one. If the player guesses right his score is doubled. If the
+player guesses wrong, he looses all and the game is over. Try the following
+specification:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model HoL():
+    dist int u = uniform(1, 15);
+    int sc = 1;
+    bool c = true;
+    int new, oldval;
+    string s;
+
+    new = sample u;
+    write("Your score is %d\n", sc);
+    write("The computer drew %d\n", new);
+
+    while c:
+        writeln("(h)igher or (l)ower:\n");
+        s = read(string);
+        oldval = new;
+        new = sample u;
+        write("The computer drew %d\n", new);
+        if new == oldval:
+            c = false;
+        else:
+            c = (new &gt; oldval) == (s == "h");
+        end;
+
+        if c:
+            sc = 2 * sc;
+        else:
+            sc = 0;
+        end;
+
+        write("Your score is %d\n", sc)
+    end;
+    write("GAME OVER...\n")
+end</code></pre>
+</div>
+</div>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>What is the begin score?</p>
+</li>
+<li>
+<p>What is the maximum end score?</p>
+</li>
+<li>
+<p>What happens, when the drawn sample is equal to the previous drawn
+sample?</p>
+</li>
+<li>
+<p>Extend this game specification with the possibility to stop.</p>
+</li>
+</ol>
+</div>
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-processes">Processes</h3>
+<div class="paragraph">
+<p>
+
+
+
+
+The language has been designed for modeling and analyzing systems with many
+components, all working together to obtain the total system behavior.
+Each component exhibits behavior over time. Sometimes they are busy making
+internal decisions, sometimes they interact with other components.
+The language uses a <em>process</em> to model the behavior of a component (the
+primary interest are the actions of the component rather than its physical
+representation). This leads to models with many processes working in
+<em>parallel</em> (also known as <em>concurrent</em> processes), interacting with each
+other.</p>
+</div>
+<div class="paragraph">
+<p>Another characteristic of these systems is that the parallelism happens at
+different scales at the same time, and each scale can be considered to be a
+collection of co-operating parallel working processes.
+For example, a factory can be seen as a single component, it accepts supplies
+and delivers products.
+However, within a factory, you can have several parallel operating production
+lines, and a line consists of several parallel operating machines.
+A machine again consists of parallel operating parts.
+In the other direction, a factory is a small element in a supply chain. Each
+supply chain is an element in a (distribution) network.
+Depending on the area that needs to be analyzed, and the level of detail, some
+scales are precisely modeled, while others either fall outside the scope of
+the system or are modeled in an abstract way.</p>
+</div>
+<div class="paragraph">
+<p>In all these systems, the interaction between processes is not random, they
+understand each other and exchange information.
+In other words, they <em>communicate</em> with each other. The Chi language uses
+<em>channels</em> to model the communication.
+A channel connects a sending process to a receiving process, allowing the
+sender to pass messages to the receiver.
+This chapter discusses parallel operating processes only, communication
+between processes using channels is discussed in <a href="#tut-chapter-channels">Channels</a>.</p>
+</div>
+<div class="paragraph">
+<p>As discussed above, a process can be seen as a single component with behavior
+over time, or as a wrapper around many processes that work at a smaller scale.
+The Chi language supports both kinds of processes.
+The former is modeled with the statements explained in previous chapters and
+communication that will be explained in <a href="#tut-chapter-channels">Channels</a>.
+The latter (a process as a wrapper around many smaller-scale processes) is
+supported with the <code>run</code> statement.</p>
+</div>
+<div class="sect3">
+<h4 id="tut-a-single-process">A single process</h4>
+<div class="paragraph">
+<p>The simplest form of processes is a model with one process:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P():
+    write("Hello. I am a process.")
+end
+
+model M():
+    run P()
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Similar to a model, a process definition is denoted by the keyword <code>proc</code>
+(<code>proc</code> means process and does not mean procedure!), followed by the name of
+the process, here <code>P</code>, followed by an empty pair of parentheses <code>()</code>,
+meaning that the process has no parameters.
+Process <code>P</code> contains one statement, a <code>write</code> statement to output text to
+the screen.
+Model <code>M</code> contains one statement, a <code>run</code> statement to run a process.
+When simulating this model, the output is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">Hello. I am a process.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+A <code>run</code> statement constructs a process from the process definition (it
+<em>instantiates</em> a process definition) for each of its arguments, and they start
+running.
+This means that the statements inside each process are executed. The <code>run</code>
+statement waits until the statements in its created processes are finished,
+before it ends itself.</p>
+</div>
+<div class="paragraph">
+<p>To demonstrate, below is an example of a model with two processes:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P(int i):
+    write("I am process. %d.\n", i)
+end
+
+model M():
+    run P(1), P(2)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This model instantiates and runs two processes, <code>P(1)</code> and <code>P(2)</code>.
+The processes are running at the same time.
+Both processes can perform a <code>write</code> statement.
+One of them goes first, but there is no way to decide beforehand which one.
+(It may always be the same choice, it may be different on Wednesday, etc, you
+just don&#8217;t know.)
+The output of the model is therefore either:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">I am process 1.
+I am process 2.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>or:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">I am process 2.
+I am process 1.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>After the two processes have finished their activities, the <code>run</code> statement
+in the model finishes, and the simulation ends.</p>
+</div>
+<div class="paragraph">
+<p>
+An important property of statements is that they are executed <em>atomically</em>.
+It means that execution of the statement of one process cannot be interrupted
+by the execution of a statement of another process.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-a-process-in-a-process">A process in a process</h4>
+<div class="paragraph">
+<p>The view of a process being a wrapper around many other processes is supported
+by allowing to use the <code>run</code> statement inside a process as
+well. An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P():
+    while true:
+        write("Hello. I am a process.\n")
+    end
+end
+
+proc DoubleP():
+    run P(), P()
+end
+
+model M():
+    run DoubleP()
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The model instantiates and runs one process <code>DoubleP</code>.
+Process <code>DoubleP</code> instantiates and runs two processes <code>P</code>.
+The relevance becomes clear in models with a lot of processes.
+The concept of 'a process in a process' is very useful in keeping the model
+structured.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-many-processes">Many processes</h4>
+<div class="paragraph">
+<p>Some models consist of many identical processes at a single level. The
+language has an <code>unwind</code> statement to reduce the amount of program text.
+A model with e.g. ten identical processes, and a different parameter value, is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model MRun():
+    run P(0), P(1), P(2), P(3), P(4),
+        P(5), P(6), P(7), P(8), P(9)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>An easier way to write this model is by applying the <code>unwind</code> statement
+inside <code>run</code> with the same effect:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model MP():
+    run unwind j in range(10):
+            P(j)
+        end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>unwind</code> works like a <code>for</code> statement
+(see <a href="#tut-for-statement">The <code>for</code> statement</a>),
+except the <code>unwind</code> expands all values at the same time instead of iterating
+over them one at a time.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-channels">Channels</h3>
+<div class="paragraph">
+<p>
+
+
+In <a href="#tut-chapter-processes">Processes</a> processes have been introduced.
+This chapter describes channels, denoted by the type <code>chan</code>.
+A channel connects two processes and is used for the transfer of data or just
+signals.
+One process is the sending process, the other process is the receiving process.
+Communication between the processes takes place instantly when both processes
+are willing to communicate, this is called <em>synchronous</em> communication.</p>
+</div>
+<div class="sect3">
+<h4 id="tut-a-channel">A channel</h4>
+<div class="paragraph">
+<p>The following example shows the sending of an integer value between two
+processes via a channel.
+<a href="#tut-figure-producer-consumer">A producer and a consumer</a> shows the two processes <code>P</code> and <code>C</code>,
+connected by channel variable <code>a</code>.</p>
+</div>
+<div id="tut-figure-producer-consumer" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/producer_consumer.png" alt="producer consumer">
+</div>
+<div class="title">Figure 3. A producer and a consumer</div>
+</div>
+<div class="paragraph">
+<p>Processes are denoted by circles, and channels are denoted by directed arrows
+in the figure. The arrow denotes the direction of communication.
+Process <code>P</code> is the sender or producer, process <code>C</code> is the receiver or consumer.</p>
+</div>
+<div class="paragraph">
+<p>In this case, the producer sends a finite stream of integer values (5 numbers)
+to the consumer.
+The consumer receives these values and writes them to the screen.
+The model is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P(chan! int a):
+    for i in range(5):
+        a!i
+    end
+end
+
+proc C(chan? int b):
+    int x;
+
+    while true:
+        b?x;
+        write("%d\n",x)
+    end
+end
+
+model M():
+    chan int a;
+
+    run P(a), C(a)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The model instantiates processes <code>P</code> and <code>C</code>.
+The two processes are connected to each other via channel variable <code>a</code> which
+is given as actual parameter in the <code>run</code> statement.
+This value is copied into the local formal parameter <code>a</code> in process <code>P</code>
+and in formal parameter <code>b</code> inside process <code>C</code>.</p>
+</div>
+<div class="paragraph">
+<p>Process <code>P</code> can send a value of type <code>int</code> via the actual channel
+parameter <code>a</code> to process <code>C</code>.
+In this case <code>P</code> first tries to send the value <code>0</code>.
+Process <code>C</code> tries to receive a value of type <code>int</code> via the actual channel
+parameter <code>a</code>.
+Both processes can communicate, so the communication occurs and the value
+<code>0</code> is sent to process <code>C</code>.
+The received value is assigned in process <code>C</code> to variable <code>x</code>.
+The value of <code>x</code> is printed and the cycle starts again.
+This model writes the sequence <code>0, 1, 2, 3, 4</code> to the screen.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-synchronization-channels">Synchronization channels</h4>
+<div class="paragraph">
+<p>Above, process <code>P</code> constructs the numbers and sends them to process <code>C</code>.
+However, since it is known that the number sequence starts at <code>0</code> and
+increments by one each time, there is no actual need to transfer a number.
+Process <code>C</code> could also construct the number by itself after getting a signal
+(a 'go ahead') from process <code>P</code>.
+Such signals are called synchronization signals, transfered by means of a
+synchronization channel. The signal does not carry any data,
+it just synchronizes a send and a receive between different processes.
+(Since there is no actual data transfered, the notion of sender and receiver
+is ambiguous. However, in modeling there is often a notion of 'initiator'
+process that can be conveniently expressed with sending.)</p>
+</div>
+<div class="paragraph">
+<p>The following example shows the use of synchronization signals between
+processes <code>P</code> and <code>C</code>.
+The connecting channel 'transfers' values of type <code>void</code>.
+The type <code>void</code> means that 'non-values' are sent and received;
+the type <code>void</code> is only allowed in combination with channels.
+The iconic model is given in the previous figure,
+<a href="#tut-figure-producer-consumer">A producer and a consumer</a>.
+The model is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P(chan! void a):
+    for i in range(5):
+        a!    # No data is being sent
+    end
+end
+
+proc C(chan? void b):
+    int i;
+
+    while true:
+        b?;   # Nothing is being received
+        write("%d\n", i);
+        i = i + 1
+    end
+end
+
+model M():
+    chan void a;
+
+    run P(a), C(a)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Process <code>P</code> sends a signal (and no value is sent), and process <code>C</code>
+receives a signal (without a value).
+The signal is used by process <code>C</code> to write the value of <code>i</code> and to
+increment variable <code>i</code>.
+The effect of the model is identical to the previous example: the numbers
+<code>0, 1, 2, 3, 4</code> appear on the screen.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-two-channels">Two channels</h4>
+<div class="paragraph">
+<p>A process can have more than one channel, allowing interaction with several
+other processes.</p>
+</div>
+<div class="paragraph">
+<p>The next example shows two channel variables, <code>a</code> and <code>b</code>, and three
+processes, generator <code>G</code>, server <code>S</code> and exit <code>E</code>.
+The iconic model is given in <a href="#tut-figure-generator-server-exit">A generator, a server and an exit</a>.</p>
+</div>
+<div id="tut-figure-generator-server-exit" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/generator_server_exit.png" alt="generator server exit">
+</div>
+<div class="title">Figure 4. A generator, a server and an exit</div>
+</div>
+<div class="paragraph">
+<p>Process <code>G</code> is connected via channel variable <code>a</code> to process <code>S</code> and
+process <code>S</code> is connected via channel variable <code>b</code> to process <code>E</code>.
+The model is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc G(chan! int a):
+    for x in range(5):
+        a!x
+    end
+end
+
+proc S(chan? int a; chan! int b):
+    int x;
+
+    while true:
+        a?x; x = 2 * x; b!x
+    end
+end
+
+proc E(chan int a):
+    int x;
+
+    while true:
+        a?x;
+        write("E %d\n", x)
+    end
+end
+
+model M():
+    chan int a,b;
+
+    run G(a), S(a,b), E(b)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The model contains two channel variables <code>a</code> and <code>b</code>.
+The processes are connected to each other in model <code>M</code>.
+The processes are instantiated and run where the formal parameters are
+replaced by the actual parameters.
+Process <code>G</code> sends a stream of integer values <code>0, 1, 2, 3, 4</code> to another
+process via channel <code>a</code>.
+Process <code>S</code> receives a value via channel <code>a</code>, assigns this value to
+variable <code>x</code>, doubles the value of the variable, and sends the value of the
+variable via <code>b</code> to another process.
+Process <code>E</code> receives a value via channel <code>b</code>, assigns this value to the
+variable <code>x</code>, and prints this value.
+The result of the model is given by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">E   0
+E   2
+E   4
+E   6
+E   8</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>After printing this five lines, process <code>G</code> stops, process <code>S</code> is blocked,
+as well as process <code>E</code>, the model gets blocked, and the model ends.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-more-senders-or-receivers">More senders or receivers</h4>
+<div class="paragraph">
+<p>Channels send a message (or a signal in case of synchronization channels) from
+one sender to one receiver. It is however allowed to give the same channel to
+several sender or receiver processes. The channel selects a sender and a
+receiver before each communication.</p>
+</div>
+<div class="paragraph">
+<p>The following example gives an illustration, see
+<a href="#tut-figure-generator-2servers-exit">A generator, two servers and an exit</a>.</p>
+</div>
+<div id="tut-figure-generator-2servers-exit" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/generator_2servers_exit.png" alt="generator 2servers exit">
+</div>
+<div class="title">Figure 5. A generator, two servers and an exit</div>
+</div>
+<div class="paragraph">
+<p>Suppose that only <code>G</code> and <code>S0</code> want to communicate.
+The channel can select a sender (namely <code>G</code>) and a receiver (process
+<code>S0</code>), and let both processes communicate with each other.
+When sender <code>G</code>, and both receivers (<code>S0</code> and <code>S1</code>), want to
+communicate, the channel selects a sender (<code>G</code> as it is the only sender
+available to the channel), and a receiver (either process <code>S0</code> or process
+<code>S1</code>), and it lets the selected processes communicate with each other.
+This selection process is non-deterministic; a choice is made, but it is
+unknown how the selection takes place and it cannot be influenced.
+Note that a non-deterministic choice is different from a random choice. In the
+latter case, there are known probabilities of selecting a process.</p>
+</div>
+<div class="paragraph">
+<p>Sharing a channel in this way allows to send data to receiving processes where
+the receiving party is not relevant (either server process will do).
+This way of communication is different from <em>broadcasting</em>, where both servers
+receive the same data value.
+Broadcasting is not supported by the Chi language.</p>
+</div>
+<div class="paragraph">
+<p>In case of two senders, <code>S0</code> and <code>S1</code>, and one receiver <code>E</code> the
+selection process is the same.
+If one of the two servers <code>S</code> can communicate with exit <code>E</code>, communication
+between that server and the exit takes place.
+If both servers can communicate, a non-deterministic choice is made.</p>
+</div>
+<div class="paragraph">
+<p>Having several senders and several receivers for a single channel is also
+handled in the same manner.
+A non-deterministic choice is made for the sending process and a
+non-deterministic choice is made for the receiving process before each
+communication.</p>
+</div>
+<div class="paragraph">
+<p>To communicate with several other processes but without non-determinism,
+unique channels must be used.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-notes-2">Notes</h4>
+<div class="ulist">
+<ul>
+<li>
+<p>The direction in channels, denoted by <code>?</code> or <code>!</code>, may be omitted.
+By leaving it out, the semantics of the parameters becomes less clear (the
+direction of communication has to be derived from the process code).
+
+</p>
+</li>
+<li>
+<p>There are a several ways to name channels:
+
+</p>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>Start naming formal channel parameters
+in each new process with <code>a</code>, <code>b</code>, etc.
+The actual names follow from the figure.
+This convention is followed in this chapter.
+For small models this convention is easy and works well, for complicated
+models this convention can be error-prone.
+
+</p>
+</li>
+<li>
+<p>Use the actual names of the channel parameters in the figures as formal
+names in the processes. Start naming in figures with <code>a</code>, <code>b</code>, etc.
+This convention works well, if both figure and code are at hand during
+the design process. If many processes have sub-processes, this convention
+does not really work.</p>
+</li>
+<li>
+<p>Use unique names for the channel parameters for the whole model, and for
+all sub-systems, for example a channel between processes <code>A</code> and <code>B</code>
+is named <code>a2b</code> (the lower-case name of the sending process, followed by
+<code>2</code>, denoting 'to', and the lower-case name of the receiving process).</p>
+<div class="paragraph">
+<p>In this case the formal and actual parameters can be in most cases the same.
+If many identical processes are used, this convention does not really work.</p>
+</div>
+</li>
+</ol>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In the text all three conventions are used, depending on the structure of
+the model.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-exercises-5">Exercises</h4>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Given is the specification of process <code>P</code> and model <code>PP</code>:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P(chan int a, b):
+    int x;
+
+    while true:
+        a?x;
+        x = x + 1;
+        write("%d\n", x);
+        b!x
+    end
+end
+
+model PP():
+    chan int a, b;
+
+    run P(a,b), P(b,a)
+end</code></pre>
+</div>
+</div>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>Study this specification.</p>
+</li>
+<li>
+<p>Why does the model terminate immediately?</p>
+</li>
+</ol>
+</div>
+</li>
+<li>
+<p>Six children have been given the assignment to perform a series of
+calculations on the numbers <code>0, 1, 2, 3, ..., 9</code>, namely add 2, multiply
+by 3, multiply by 2, and add 6 subsequently. They decide to split up the
+calculations and to operate in parallel. They sit down at a table next to
+each other. The first child, the reader <code>R</code>, reads the numbers
+<code>0, 1, 2, 3, ..., 9</code> one by one to the first calculating child <code>C1</code>. Child
+<code>C1</code> adds 2 and tells the result to its right neighbour, child <code>C2</code>. After
+telling the result to child <code>C2</code>, child <code>C1</code> is able to start
+calculating on the next number the reader <code>R</code> tells him. Children <code>C2</code>,
+<code>C3</code>, and <code>C4</code> are analogous to child <code>C1</code>; they each perform a
+different calculation on a number they hear and tell the result to their
+right neighbor. At the end of the table the writer <code>W</code> writes every
+result he hears down on paper. Figure <a href="#tut-figure-sixchilds">Six children working in parallel</a> shows a
+schematic drawing of the children at the table.</p>
+<div id="tut-figure-sixchilds" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/sixchilds.png" alt="sixchilds">
+</div>
+<div class="title">Figure 6. Six children working in parallel</div>
+</div>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>Finish the specification for the reading child <code>R</code>, that reads the
+numbers 0 till 9 one by one:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc R(...):
+    int i;
+
+    while i &lt; 10:
+        ...;
+        ...
+    end
+end</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>Specify the parameterized process <code>Cadd</code> that represents the children
+<code>C1</code> and <code>C4</code>, who perform an addition.</p>
+</li>
+<li>
+<p>Specify the parameterized process <code>Cmul</code> that represents the children
+<code>C2</code> and <code>C3</code>, who perform a multiplication.</p>
+</li>
+<li>
+<p>Specify the process <code>W</code> representing the writing child. Write each
+result to the screen separated by a new line.</p>
+</li>
+<li>
+<p>Make a graphical representation of the model <code>SixChildren</code> that is
+composed of the six children.</p>
+</li>
+<li>
+<p>Specify the model <code>SixChildren</code>. Simulate the model.</p>
+</li>
+</ol>
+</div>
+</li>
+</ol>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-buffers">Buffers</h3>
+<div class="paragraph">
+<p>In the previous chapter, a production system was discussed that passes values
+from one process to the next using channels, in a synchronous manner.
+(Sender and receiver perform the communication at exactly the same moment in
+time, and the communication is instantaneous.)
+In many systems however, processes do not use synchronous communication, they
+use <em>asynchronous</em> communication instead.
+Values (products, packets, messages, simple tokens, and so on) are sent,
+temporarily stored in a buffer, and then received.</p>
+</div>
+<div class="paragraph">
+<p>In fact, the decoupling of sending and receiving is very important, it allows
+compensating temporarily differences between the number of items that are sent
+and received.
+(Under the assumption that the receiver is fast enough to keep up with the
+sender in general, otherwise the buffer will grow forever or overflow.)</p>
+</div>
+<div class="paragraph">
+<p>For example, consider the exchange of items from a producer process <code>P</code> to a
+consumer process <code>C</code> as shown in <a href="#tut-figure-pc2">A producer and a consumer</a>.</p>
+</div>
+<div id="tut-figure-pc2" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/producer_consumer.png" alt="producer consumer">
+</div>
+<div class="title">Figure 7. A producer and a consumer</div>
+</div>
+<div class="paragraph">
+<p>In the unbuffered situation, both processes communicate at the same time.
+This means that when one process is (temporarily) faster than the other, it
+has to wait for the other process before communication can take place.
+With a buffer in-between, the producer can give its item to the buffer, and
+continue with its work.
+Likewise, the consumer can pick up a new item from the buffer at any later
+time (if the buffer has items).</p>
+</div>
+<div class="paragraph">
+<p>In Chi, buffers are not modeled as channels, they are modeled as additional
+processes instead. The result is shown in <a href="#tut-figure-pbc">A producer and a consumer, with an additional buffer process</a>.</p>
+</div>
+<div id="tut-figure-pbc" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/buffered_producer_consumer.png" alt="buffered producer consumer">
+</div>
+<div class="title">Figure 8. A producer and a consumer, with an additional buffer process</div>
+</div>
+<div class="paragraph">
+<p>The producer sends its items synchronously (using channel <code>a</code>) to the buffer
+process. The buffer process keeps the item until it is needed.
+The consumer gets an item synchronously (using channel <code>b</code>) from the buffer
+when it needs a new item (and one is available).</p>
+</div>
+<div class="paragraph">
+<p>In manufacturing networks, buffers, in combination with servers, play a
+prominent role, for buffering items in the network.
+Various buffer types exist in these networks: buffers can have a finite or
+infinite capacity, they have a input/output discipline, for example a
+first-out queuing discipline or a priority-based discipline.
+Buffers can store different kinds of items, for example, product-items,
+information-items, or a combination of both.
+Buffers may also have sorting facilities, etc.</p>
+</div>
+<div class="paragraph">
+<p>In this chapter some buffer types are described, and with the presented
+concepts numerous types of buffer can be designed by the engineer.
+First a simple buffer process with one buffer position is presented, followed
+by more advanced buffer models.
+The producer and consumer processes are not discussed in this chapter.</p>
+</div>
+<div class="sect3">
+<h4 id="tut-a-one-place-buffer">A one-place buffer</h4>
+<div class="paragraph">
+<p>A buffer usually has a receiving channel and a sending channel, for receiving
+and sending items.
+A buffer, buffer <code>B1</code>, is presented in <a href="#tut-figure-oneplacebuffer">A <code>1</code>-place buffer</a>.</p>
+</div>
+<div id="tut-figure-oneplacebuffer" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/one_place_buffer.png" alt="one place buffer">
+</div>
+<div class="title">Figure 9. A <code>1</code>-place buffer</div>
+</div>
+<div class="paragraph">
+<p>The simplest buffer is a one-place buffer, for buffering precisely one item.
+A one-place buffer can be defined by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc B1(chan? item a; chan! item b):
+    item x;
+
+    while true:
+        a?x; b!x
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>where <code>a</code> and <code>b</code> are the receiving and sending channels.
+Item <code>x</code> is buffered in the process.
+A buffer receives an item, stores the item, and sends the item to the next
+process, if the next process is willing to receive the item.
+The buffer is  not willing to receive a second item, as long as the first item
+is still in the buffer.</p>
+</div>
+<div class="paragraph">
+<p>A two-place buffer can be created, by using the one-place buffer process
+twice.
+A two-place buffer is depicted in <a href="#tut-figure-twoplacebuffer">A <code>2</code>-place buffer</a>.</p>
+</div>
+<div id="tut-figure-twoplacebuffer" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/two_place_buffer.png" alt="two place buffer">
+</div>
+<div class="title">Figure 10. A <code>2</code>-place buffer</div>
+</div>
+<div class="paragraph">
+<p>A two-place buffer is defined by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc B2(chan? item a; chan! item b):
+    chan item c;
+
+    run B1(a, c), B1(c, b)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>where two processes <code>B1</code> buffer maximal two items.
+If each process <code>B1</code> contains an item, a third item has to wait in front of
+process <code>B2</code>. This procedure can be extended to create even larger buffers.
+Another, more preferable manner however, is to describe a buffer in a single
+process by using a <em>select</em> statement and a list for storage of the items.
+Such a buffer is discussed in the next section.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-a-single-process-buffer">A single process buffer</h4>
+<div class="paragraph">
+<p>An informal description of the process of a buffer, with an arbitrary number
+of stored items, is the following:</p>
+</div>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>If the buffer has space for an item, <em>and</em> can receive an item from another
+process via channel <code>a</code>, the buffer process receives that item, and
+stores the item in the buffer.</p>
+</li>
+<li>
+<p>If the buffer contains at least one item, <em>and</em> the buffer can send that
+item to another process via channel <code>b</code>, the buffer process sends that
+item, and removes that item from the buffer.</p>
+</li>
+<li>
+<p>If the buffer can both send and receive a value, the buffer process selects
+one of the two possibilities (in a non-deterministic manner).</p>
+</li>
+<li>
+<p>If the buffer cannot receive an item, and cannot send an item, the buffer
+process waits.</p>
+</li>
+</ol>
+</div>
+<div class="paragraph">
+<p>Next to the sending and receiving of items (to and from the buffer process) is
+the question of how to order the stored items.
+A common form is the <em>first-in first-out</em> (fifo) queuing discipline.
+Items that enter the buffer first (first-in) also leave first (first-out), the
+order of items is preserved by the buffer process.</p>
+</div>
+<div class="paragraph">
+<p>In the model of the buffer, an (ordered) list of type <code>item</code> is used for
+storing the received items.
+New item <code>x</code> is added at the rear of list <code>xs</code> by the statement:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">xs = xs + [x]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first item of the list is sent, and then deleted with:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">xs = xs[1:]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>An alternative solution is to swap the function of the rear and the front,
+which can be useful some times.</p>
+</div>
+<div class="paragraph">
+<p>The statement to monitor several channels at the same time is the <code>select</code>
+statement.
+The syntax of the <code>select</code> statement, with two alternatives, is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">select
+    boolean_expression_1, communication statement_1:
+        statement_list_1
+alt
+    boolean_expression_2, communication statement_2:
+        statement_list_2
+...
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>There has to be at least one alternative in a select statement. The statement
+waits, until for one of the alternatives the <code>boolean_expression</code> holds
+<em>and</em> communication using the <code>communication statement</code> is possible.
+(When there are several such alternatives, one of them is
+non-deterministically chosen.)
+For the selected alternative, the communication statement is executed,
+followed by the statements in the <code>statement_list</code> of the alternative.</p>
+</div>
+<div class="paragraph">
+<p>The above syntax is the most generic form, the <code>boolean_expression</code> may
+be omitted when it always holds, or the <code>communication statement</code> may be
+omitted when there is no need to communicate. The <code>,</code> also disappears then.
+(Omitting both the boolean expression and the communication statement is not
+allowed.) Similarly, when the <code>statement_list</code> is empty or just <code>pass</code>, it
+may be omitted (together with the <code>:</code> in front of it).</p>
+</div>
+<div class="paragraph">
+<p>The description (in words) of the core of the buffer, from the start of this
+section, is translated in code, by using a <code>select</code> statement:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">select
+    size(xs) &lt; N, a?x:
+        xs = xs + [x]
+alt
+    size(xs) &gt; 0, b!xs[0]:
+        xs = xs[1:]
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In the first alternative, it is stated that, if the buffer is not full, and
+the buffer can receive an item, an item is received, and that item is added to
+the rear of the list.
+In the second alternative, it is stated that, if the buffer contains at least
+one item, and the buffer can send an item, the first item in the list is sent,
+and the list is updated.
+Please keep in mind that both the condition must hold and the communication
+must be possible <em>at the same moment</em>.</p>
+</div>
+<div class="paragraph">
+<p>The complete description of the buffer is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc B(chan? item a; chan! item b):
+    list item xs; item x;
+
+    while true:
+        select
+            size(xs) &lt; N, a?x:
+                xs = xs + [x]
+        alt
+            size(xs) &gt; 0, b!xs[0]:
+                xs = xs[1:]
+        end
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Instead of boolean expression <code>size(xs) &gt; 0</code>, expression <code>not empty(xs)</code>
+can be used, where <code>empty</code> is a function yielding <code>true</code> if the list is
+empty, otherwise <code>false</code>.
+In case the capacity of the buffer is infinite, expression <code>size(xs) &lt; N</code>
+can be replaced by <code>true</code>, or even omitted (including the comma).</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-infinite-buffer">An infinite buffer</h4>
+<div class="paragraph">
+<p>A buffer with infinite capacity can be written as:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc B(chan? item a; chan! item b):
+    list item xs; item x;
+
+    while true:
+        select
+            a?x:
+                xs = xs + [x]
+        alt
+            not empty(xs), b!xs[0]:
+                xs = xs[1:]
+        end
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A first-in first-out buffer is also called a <em>queue</em>, while a first-in
+last-out buffer (<em>lifo</em> buffer), is called a <em>stack</em>.
+A description of a lifo buffer is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc B(chan? item a; chan! item b):
+    list item xs; item x;
+
+    while true:
+        select
+            a?x:
+                xs = [x] + xs
+        alt
+            not empty(xs), b!xs[0]:
+                xs = xs[1:]
+        end
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The buffer puts the last received item at the head of the list, and gets the
+first item from the list. An alternative is to put the last item at the rear
+of the list, and to get the last item from the list.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-a-token-buffer">A token buffer</h4>
+<div class="paragraph">
+<p>In the next example, signals are buffered instead of items.
+The buffer receives and sends 'empty' items or <em>tokens</em>.
+Counter variable <code>w</code> of type <code>int</code> denotes the difference between the
+number of tokens received and the number of tokens sent.
+If the buffer receives a token, counter <code>w</code> is incremented; if the buffer
+sends a token, counter <code>w</code> is decremented.
+If the number of tokens sent is less than the number of tokens received, there
+are tokens in the buffer, and <code>w &gt; 0</code>.
+A receiving channel variable <code>a</code> of type <code>void</code> is defined for receiving
+tokens. A sending channel variable <code>b</code> of type <code>void</code> is defined for
+sending tokens.
+The buffer becomes:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc B(chan? void a; chan! void b):
+    int w;
+
+    while true:
+        select
+            a?:
+                w = w + 1
+        alt
+            w &gt; 0, b!:
+                w = w - 1
+        end
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Note that variables of type <code>void</code> do not exist.
+Type <code>void</code> only can be used in combination with channels.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-a-priority-buffer">A priority buffer</h4>
+<div class="paragraph">
+<p>A buffer for items with different priority is described in this section. An
+item has a high priority or a normal priority.
+Items with a high priority should leave the buffer first.</p>
+</div>
+<div class="paragraph">
+<p>An item is a tuple with a field <code>prio</code>, denoting the priority, <code>0</code> for
+high priority, and <code>1</code> for normal priority:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type item = tuple(...; int prio);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For the storage of items, two lists are used: a list for high priority items
+and a list for normal priority items.
+The two lists are described by a list with size two:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list(2) list item xs;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>xs[0]</code> contains the high priority items, <code>xs[1]</code> the normal
+priority items.
+The first item in the high priority list is denoted by <code>xs[0][0]</code>, etc.</p>
+</div>
+<div class="paragraph">
+<p>In the model the received items are, on the basis of the value of the
+<code>prio</code>-field in the item, stored in one of the two lists: one list for
+'high' items and one list for 'normal' items.
+The discipline of the buffer is that items with a high priority leave the
+buffer first.
+The model is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc BPrio(chan? item a; chan! item b):
+    list(2) list item xs; item x;
+
+    while true:
+        select
+            a?x:
+                xs[x.prio] = xs[x.prio] + [x]
+        alt
+            not empty(xs[0]), b!xs[0][0]:
+                xs[0] = xs[0][1:]
+        alt
+            empty(xs[0]) and not empty(xs[1]), b!xs[1][0]:
+                xs[1] = xs[1][1:]
+        end
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The buffer has two lists <code>xs[0]</code> and <code>xs[1]</code>. Received items <code>x</code> are
+stored in <code>xs[x.prio]</code> by the statement <code>xs[x.prio] = xs[x.prio] + [x]</code>.</p>
+</div>
+<div class="paragraph">
+<p>If the list high priority items (<code>xs[0]</code>) is not empty, items with high
+priority are sent. The first element in list <code>xs[0]</code> is element
+<code>xs[0][0]</code>. If there are no high priority items (list <code>xs[0]</code> is empty),
+and there are normal priority items (list <code>xs[1]</code> is not empty), the first
+element of list <code>xs[1]</code>, element <code>xs[1][0]</code>, is sent.</p>
+</div>
+<div class="paragraph">
+<p>Note that the order of the alternatives in the select statement does not
+matter, every alternative is treated in the same way.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-buffer-exercises">Exercises</h4>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>To study product flow to and from a factory, a setup as shown in
+<a href="#tut-figure-controlled-factory">A controlled factory</a> is created.</p>
+<div id="tut-figure-controlled-factory" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/controlled_factory.png" alt="controlled factory">
+</div>
+<div class="title">Figure 11. A controlled factory</div>
+</div>
+<div class="paragraph">
+<p><code>F</code> is the factory being studied, generator <code>G</code> sends products into the
+factory, and exit process <code>E</code> retrieves finished products. The factory is
+tightly controlled by controller <code>C</code> that sends a signal to <code>G</code> or <code>E</code>
+before a product may be moved. The model is as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc G(chan! int a; chan? void sg):
+    for i in range(10):
+        sg?;
+        a!i;
+    end
+end
+
+proc F(chan? int a; chan! int b):
+    ...
+end
+
+proc E(chan? int a; chan? void se):
+    int x;
+
+    while true:
+        se?;
+        a?x;
+        write("E received %d\n", x);
+    end
+end
+
+proc C(chan! void sg, se; int low, high):
+    int count;
+
+    while true:
+        while count &lt; high:
+            sg!;
+            count = count + 1;
+        end
+        while count &gt; low:
+            se!;
+            count = count - 1;
+        end
+    end
+end
+
+model M():
+    chan void sg, se;
+    chan int gf, fe;
+
+    run C(sg, se, 0, 1),
+        G(gf, sg), F(gf, fe), E(fe, se);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The number of products inserted by the generator has been limited to allow
+for manual inspection of results.</p>
+</div>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>As a model of the factory, use a FIFO buffer process.
+Run the simulation, and check whether all products are received by the
+exit process.</p>
+</li>
+<li>
+<p>Change the control policy to <code>low = 1</code> and <code>high = 4</code>.
+Predict the outcome, and verify with simulation.</p>
+</li>
+<li>
+<p>The employees of the factory propose to stack the products in the
+factory to reduce the amount of space needed for buffering.
+Replace the factory process with a LIFO buffer process, run the
+experiments again, first with <code>low = 0</code> and <code>high = 1</code> and then with
+<code>low = 1</code> and <code>high = 4</code>.</p>
+</li>
+<li>
+<p>You will notice that some products stay in the factory forever. Why does
+that happen? How should the policy be changed to ensure all products
+eventually leave the factory?</p>
+</li>
+</ol>
+</div>
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-servers-with-time">Servers with time</h3>
+<div class="paragraph">
+<p>
+A manufacturing line contains machines and/or persons that perform a sequence
+of tasks, where each machine or person is responsible for a single task.
+The term <em>server</em> is used for a machine or a person that performs a task.
+Usually the execution of a task takes time, e.g. a drilling process, a welding
+process, the set-up of a machine.
+In this chapter we introduce the concept of <em>time</em>, together with the <em>delay</em>
+statement.</p>
+</div>
+<div class="paragraph">
+<p>Note that here 'time' means the simulated time inside the model.
+For example, assume there are two tasks that have to be performed in sequence
+in the modeled system.
+The first task takes three hours to complete, the second task takes five hours
+to complete. These amounts of time are specified in the model (using the delay
+statement, as will be explained below).
+A simulation of the system should report 'It takes eight hours from start of
+the first task to finish of the second task'.
+However, it generally does not take eight hours to compute that result, a
+computer can calculate the answer much faster.
+When an engineer says ''I had to run the system for a year to reach
+steady-state'', he means that time inside the model has progressed a year.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+</p>
+</div>
+<div class="sect3">
+<h4 id="tut-the-clock">The clock</h4>
+<div class="paragraph">
+<p>The variable <code>time</code> denotes the current time in a model. It is a <em>global</em>
+variable, it can be used in every <code>model</code> and <code>proc</code>.
+The time is a variable of type <code>real</code>. Its initial value is <code>0.0</code>. The
+variable is updated automatically by the model, it cannot be changed by the
+user.
+The unit of the time is however determined by the user, that is, you define
+how long 1 time unit of simulated time is in the model.</p>
+</div>
+<div class="paragraph">
+<p>The value of variable <code>time</code> can be retrieved by reading from the <code>time</code>
+variable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">t = time</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The meaning of this statement is that the current time is copied to variable
+<code>t</code> of type real.</p>
+</div>
+<div class="paragraph">
+<p>A process delays itself to simulate the processing time of an operation with a
+<em>delay</em> statement.
+The process postpones or suspends its own actions until the delay ends.</p>
+</div>
+<div class="paragraph">
+<p>For example, suppose a system has to perform three actions, each action takes
+45 seconds. The unit of time in the model is one minute (that is, progress of
+the modeled time by one time unit means a minute of simulated time has
+passed).
+The model looks like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P():
+    for i in range(3):
+        write("i = %d, time = %f\n", i, time);
+        delay 0.75
+    end
+end
+
+model M():
+    run P()
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>An action takes 45 seconds, which is <code>0.75</code> time units. The <code>delay 0.75</code>
+statement represents performing the action, the process is suspended until
+0.75 units of time has passed.</p>
+</div>
+<div class="paragraph">
+<p>The simulation reports:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">i = 0, time = 0.000000
+i = 1, time = 0.750000
+i = 2, time = 1.500000
+All processes finished at time 2.25</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The three actions are done in 2.25 time units (2.25 minutes).</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-servers-with-time">Servers with time</h4>
+<div class="paragraph">
+<p>Adding time to the model allows answering questions about time, often
+performance questions ('how many products can I make in this situation?'). Two
+things are needed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Servers must model use of time to perform their task.</p>
+</li>
+<li>
+<p>The model must perform measurements of how much time passes.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>By extending models of the servers with time, time passes while tasks are
+being performed. Time measurements then give non-zero numbers (servers that
+can perform actions instantly result in all tasks being done in one moment of
+time, that is 0 time units have passed between start and finish).
+Careful analysis of the measurements should yields answers to questions about
+performance.</p>
+</div>
+<div class="paragraph">
+<p>In this chapter, adding of passing time in a server and how to embed time
+measurements in the model is explained.
+The first case is a small production line with a deterministic server (its
+task takes a fixed amount of time), while the second case uses stochastic
+arrivals (the moment of arrival of new items varies), and a stochastic server
+instead (the duration of the task varies each time).
+In both cases, the question is what the flow time of an item is (the amount of
+time that a single item is in the system), and what the throughput of the
+entire system is (the number of items the production line can manufacture per
+time unit).</p>
+</div>
+<div class="sect4">
+<h5 id="tut-servers-deterministic-system">A deterministic system</h5>
+<div class="paragraph">
+<p>The model of a deterministic system consists of a deterministic generator, a
+deterministic server, and an exit process.
+The line is depicted in <a href="#tut-figure2-generator-server-exit">Generator <code>G</code>, server <code>S</code>, and exit <code>E</code></a>.</p>
+</div>
+<div id="tut-figure2-generator-server-exit" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/generator_server_exit.png" alt="generator server exit">
+</div>
+<div class="title">Figure 12. Generator <code>G</code>, server <code>S</code>, and exit <code>E</code></div>
+</div>
+<div class="paragraph">
+<p>Generator process <code>G</code> sends items, with constant inter-arrival time <code>ta</code>,
+via channel <code>a</code>, to server process <code>S</code>.
+The server processes items with constant processing time <code>ts</code>, and sends
+items, via channel <code>b</code>, to exit process <code>E</code>.</p>
+</div>
+<div class="paragraph">
+<p>An item contains a real value, denoting the creation time of the item, for
+calculating the throughput of the system and flow time (or sojourn time) of an
+item in the system.
+The generator process creates an item (and sets its creation time), the exit
+process <code>E</code> writes the measurements (the moment in time when the item
+arrives in the exit process, and its creation time) to the output.
+From these measurements, throughput and flow time can be calculated.</p>
+</div>
+<div class="paragraph">
+<p>Model <code>M</code> describes the system:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type item = real;
+
+model M(real ta, ts; int N):
+    chan item a, b;
+
+    run G(a, ta),
+        S(a, b, ts),
+        E(b, N)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>item</code> is a real number for storing the creation time.
+Parameter <code>ta</code> denotes the inter-arrival time, and is used in generator <code>G</code>.
+Parameter <code>ts</code> denotes the server processing time, and is used in server <code>S</code>.
+Parameter <code>N</code> denotes the number of items that must flow through the system
+to get a good measurement.</p>
+</div>
+<div class="paragraph">
+<p>Generator <code>G</code> has two parameters, channel <code>a</code>, and inter-arrival time <code>ta</code>.
+The description of process <code>G</code> is given by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc G(chan! item a; real ta):
+    while true:
+        a!time; delay ta
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Process <code>G</code> sends an item, with the current time, and delays for <code>ta</code>,
+before sending the next item to server process <code>S</code>.</p>
+</div>
+<div class="paragraph">
+<p>Server <code>S</code> has three parameters, receiving channel <code>a</code>, sending channel
+<code>b</code>, and server processing time <code>ts</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc S(chan? item a; chan! item b; real ts):
+    item x;
+
+    while true:
+        a?x; delay ts; b!x
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The process receives an item from process <code>G</code>, processes the item during
+<code>ts</code> time units, and sends the item to exit  process <code>E</code>.</p>
+</div>
+<div class="paragraph">
+<p>Exit <code>E</code> has two parameters, receiving channel <code>a</code> and the length of the
+experiment <code>N</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc E(chan item a; int N):
+    item x;
+
+    for i in range(N):
+        a?x; write("%f, %f\n", time, time - x)
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The process writes current time <code>time</code> and item flow time <code>time - x</code> to
+the screen for each received item.
+Analysis of the measurements will show that the system throughput equals
+<code>1 / ta</code>, and that the item flow time equals <code>ts</code> (if <code>ta &gt;= ts</code>).</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-stochastic-system">A stochastic system</h5>
+<div class="paragraph">
+<p>In the next model, the generator produces items with an exponential
+inter-arrival time, and the server processes items with an exponential server
+processing time. To compensate for the variations in time of the generator and
+the server, a buffer process has been added.
+The model is depicted in <a href="#tut-figure-MM1">Generator <code>G</code>, buffer <code>B</code>, server <code>S</code>, and exit <code>E</code></a>.</p>
+</div>
+<div id="tut-figure-MM1" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/generator_buffer_server_exit.png" alt="generator buffer server exit">
+</div>
+<div class="title">Figure 13. Generator <code>G</code>, buffer <code>B</code>, server <code>S</code>, and exit <code>E</code></div>
+</div>
+<div class="paragraph">
+<p>Type <code>item</code> is the same as in the previous situation.
+The model runs the additional buffer process:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model M(real ta, ts; int N):
+    chan item a, b, c;
+
+    run G(a, ta),
+        B(a, b),
+        S(b, c, ts),
+        E(c, N)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Generator <code>G</code> has two parameters, channel variable <code>a</code>, and variable
+<code>ta</code>, denoting the mean inter-arrival time.
+An <code>exponential</code> distribution is used for deciding the inter-arrival time of
+new items:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc G(chan item a; real ta):
+    dist real u = exponential(ta);
+
+    while true:
+        a!time; delay sample u
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The process sends a new item to the buffer, and delays <code>sample u</code> time units.
+Buffer process <code>B</code> is a fifo buffer with infinite capacity, as described at
+<a href="#tut-infinite-buffer">An infinite buffer</a>.
+Server <code>S</code> has three parameters, channel
+variables <code>a</code> and <code>b</code>, for receiving and sending items, and a variable for
+the average processing time <code>ts</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc S(chan item a, b; real ts):
+    dist real u = exponential(ts);
+    item x;
+
+    while true:
+        a?x; delay sample u; b!x
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>An <code>exponential</code> distribution is used for deciding the processing time.
+The process receives an item from process <code>G</code>, processes the item during
+<code>sample u</code> time units, and sends the item to exit process <code>E</code>.</p>
+</div>
+<div class="paragraph">
+<p>Exit process <code>E</code> is the same as previously, see <a href="#tut-servers-deterministic-system">A deterministic system</a>.
+In this case the throughput of the system also equals <code>1 / ta</code>, and the
+<em>mean flow</em> can be obtained by doing an experiment and analysis of the
+resulting measurements (for <code>ta &gt; ts</code>).</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-two-servers">Two servers</h4>
+<div class="paragraph">
+<p>In this section two different types of systems are shown: a serial and a
+parallel system.
+In a serial system the servers are positioned after each other, in a parallel
+system the servers are operating in parallel.
+Both systems use a stochastic generator, and stochastic servers.</p>
+</div>
+<div class="sect4">
+<h5 id="tut-serial-system">Serial system</h5>
+<div class="paragraph">
+<p>The next model describes a <em>serial</em> system, where an item is processed by one
+server, followed by another server.
+The generator and the servers are decoupled by buffers.
+The model is depicted in <a href="#tut-figure-tandem">A generator, two buffers, two servers, and an exit</a>.</p>
+</div>
+<div id="tut-figure-tandem" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/generator_2buffers_2servers_exit.png" alt="generator 2buffers 2servers exit">
+</div>
+<div class="title">Figure 14. A generator, two buffers, two servers, and an exit</div>
+</div>
+<div class="paragraph">
+<p>The model can be described by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model M(real ta, ts; int N):
+    chan item a, b, c, d, e;
+
+    run G(a, ta),
+        B(a, b), S(b, c, ts),
+        B(c, d), S(d, e, ts),
+        E(e, N)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The various processes are equal to those described previously in
+<a href="#tut-stochastic-system">A stochastic system</a>.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-parallel-systems">Parallel systems</h5>
+<div class="paragraph">
+<p>In a parallel system the servers are operating in parallel. Having several
+servers in parallel is useful for enlarging the processing capacity of the
+task being done, or for reducing the effect of break downs of servers (when a
+server breaks down, the other server continues with the task for other items).
+<a href="#tut-figure-two-parallel-servers">A model with two parallel servers</a> depicts the system.</p>
+</div>
+<div id="tut-figure-two-parallel-servers" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/two_parallel_servers.png" alt="two parallel servers">
+</div>
+<div class="title">Figure 15. A model with two parallel servers</div>
+</div>
+<div class="paragraph">
+<p>Generator process <code>G</code> sends items via <code>a</code> to buffer process <code>B</code>, and
+process <code>B</code> sends the items in a first-in first-out manner to the servers
+<code>S</code>. Both servers send the processed items to the exit process <code>E</code> via
+channel <code>c</code>.
+The inter-arrival time and the two process times are assumed to be stochastic,
+and exponentially distributed.
+Items can pass each other, due to differences in processing time between the
+two servers.</p>
+</div>
+<div class="paragraph">
+<p>If a server is free, and the buffer is not empty, an item is sent to a server.
+If both servers are free, one server will get the item, but which one cannot
+be determined beforehand. (How long a server has been idle is not taken into
+account.)
+The model is described by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model M(real ta, ts; int N):
+    chan item a, b, c;
+
+    run G(a, ta),
+        B(a, b),
+        S(b, c, ts), S(b, c, ts),
+        E(c, N)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>To control which server gets the next item, each server must have its own
+channel from the buffer. In addition, the buffer has to know when the server
+can receive a new item.
+The latter is done with a 'request' channel, denoting that a server is free
+and needs a new item.
+The server sends its own identity as request, the requests are administrated
+in the buffer.
+The model is depicted in <a href="#tut-figure-two-parallel-requesting-servers">A model with two parallel requesting servers</a>.</p>
+</div>
+<div id="tut-figure-two-parallel-requesting-servers" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/two_parallel_requesting_servers.png" alt="two parallel requesting servers">
+</div>
+<div class="title">Figure 16. A model with two parallel requesting servers</div>
+</div>
+<div class="paragraph">
+<p>In this model, the servers 'pull' an item through the line.
+The model is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model M(real ta, ts; int N):
+    chan item a; list(2) chan item b; chan item c;
+    chan int r;
+
+    run G(a, ta),
+        B(a, b, r),
+        unwind j in range(2):
+            S(b[j], c, r, ts, j)
+        end,
+        E(c, N)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this model, an <code>unwind</code> statement is used for the initialization and
+running of the two servers.
+Via channel <code>r</code> an integer value, <code>0</code> or <code>1</code>, is sent to the buffer.</p>
+</div>
+<div class="paragraph">
+<p>The items received from generator <code>G</code> are stored in list <code>xs</code>, the
+requests received from the servers are stored in list <code>ys</code>.
+The items and requests are removed form their respective lists in a first-in
+first-out manner.
+Process <code>B</code> is defined by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc B(chan? item a; list chan! item b; chan? int r):
+    list item xs; item x;
+    list int ys; int y;
+
+    while true:
+        select
+            a?x:
+                xs = xs + [x]
+        alt
+            r?y:
+                ys = ys + [y]
+        alt
+            not empty(xs) and not empty(ys), b[ys[0]]!xs[0]:
+                xs = xs[1:]; ys = ys[1:]
+        end
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If, there is an item present, <em>and</em> there is a server demanding for an item,
+the process sends the first item to the longest waiting server.
+The longest waiting server is denoted by variable <code>ys[0]</code>.
+The head of the item list is denoted by <code>xs[0]</code>.
+Assume the value of <code>ys[0]</code> equals <code>1</code>, then the expression
+<code>b[ys[0]]!xs[0]</code>, equals <code>b[1]!xs[0]</code>, indicates that the first item of
+list <code>xs</code>, equals <code>xs[0]</code>, is sent to server <code>1</code>.</p>
+</div>
+<div class="paragraph">
+<p>The server first sends a request via channel <code>r</code> to the buffer, and waits
+for an item. The item is processed, and sent to exit process <code>E</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc S(chan? item b; chan! item c; chan! int r; real ts; int k):
+    dist real u = exponential(ts);
+    item x;
+
+    while true:
+        r!k;
+        b?x;
+        delay sample u;
+        c!x
+    end
+end</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-assembly">Assembly</h4>
+<div class="paragraph">
+<p>In assembly systems, components are assembled into bigger components.
+These bigger components are assembled into even bigger components.
+In this way, products are built, e.g. tables, chairs, computers, or cars.
+In this section some simple assembly processes are described.
+These systems illustrate how assembling can be performed: in industry these
+assembly processes are often more complicated.</p>
+</div>
+<div class="paragraph">
+<p>An assembly work station for two components is shown in
+<a href="#tut-figure-assembly-two-components">Assembly for two components</a>.</p>
+</div>
+<div id="tut-figure-assembly-two-components" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/assembly_two_components.png" alt="assembly two components">
+</div>
+<div class="title">Figure 17. Assembly for two components</div>
+</div>
+<div class="paragraph">
+<p>The assembly process server <code>S</code> is preceded by buffers. The server receives
+an item from each buffer <code>B</code>, before starting assembly. The received items
+are assembled into one new item, a list of its (sub-)items.
+The description of the assembly server is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc S(list chan? item c, chan! list item b):
+    list(2) item v;
+
+    while true:
+        select
+            c[0]?v[0]: c[1]?v[1]
+        alt
+            c[1]?v[1]: c[0]?v[0]
+        end
+        b!v
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The process takes a list of channels <code>c</code> to receive items from the preceding
+buffers.
+The output channel <code>b</code> is used to send the assembled component away to the
+next process.</p>
+</div>
+<div class="paragraph">
+<p>First, the assembly process receives an item from both buffers. All buffers
+are queried at the same time, since it is unknown which buffer has components
+available. If the first buffer reacts first, and sends an item, it is received
+with channel <code>c[0]</code> and stored in <code>v[0]</code> in the first alternative. The
+next step is then to receive the second component from the second buffer, and
+store it (<code>c[1]?v[1]</code>).
+The second alternative does the same, but with the channels and stored items
+swapped.</p>
+</div>
+<div class="paragraph">
+<p>When both components have been received, the assembled product is sent away.</p>
+</div>
+<div class="paragraph">
+<p>A generalized assembly work station for <code>n</code> components is depicted in
+<a href="#tut-figure-assembly-n-components">Assembly for <code>n</code> components, with <code>m = n - 1</code></a>.</p>
+</div>
+<div id="tut-figure-assembly-n-components" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/assembly_n_components.png" alt="assembly n components">
+</div>
+<div class="title">Figure 18. Assembly for <code>n</code> components, with <code>m = n - 1</code></div>
+</div>
+<div class="paragraph">
+<p>The entire work station (the combined buffer processes and the assembly server
+process) is described by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc W(list chan? item a; chan! list item b):
+    list(size(a)) chan item c;
+
+    run unwind i in range(size(a)):
+            B(a[i], c[i])
+        end,
+        S(c,b)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The size of the list of channels <code>a</code> is determined during initialization of
+the workstation.
+This size is used for the generation of the process buffers, and the
+accompanying channels.</p>
+</div>
+<div class="paragraph">
+<p>The assembly server process works in the same way as before, except for a
+generic <code>n</code> components, it is impossible to write a select statement
+explicitly. Instead, an <em>unwind</em> is used to unfold the alternatives:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc S(list chan? item c, chan! list item b):
+    list(size(c)) item v;
+    list int rec;
+
+    while true:
+        rec = range(size(c));
+        while not empty(rec):
+            select
+                unwind i in rec
+                    c[i]?v[i]: rec = rec - [i]
+                end
+            end
+        end;
+        delay ...;
+        b!v
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The received components are again in <code>v</code>. Item <code>v[i]</code> is received from
+channel <code>c[i]</code>. The indices of the channels that have not provided an item
+are in the list <code>rec</code>. Initially, it contains all channels
+<code>0</code> &#8230;&#8203; <code>size(c)</code>, that is, <code>range(size(c))</code>. While <code>rec</code> still has a
+channel index to monitor, the <code>unwind i in rec</code> unfolds all alternatives
+that are in the list. For example, if <code>rec</code> contains <code>[0, 1, 5]</code>,
+the <code>select unwind i in rec ... end</code> is equivalent to:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">select
+    c[0]?v[0]: rec = rec - [0]
+alt
+    c[1]?v[1]: rec = rec - [1]
+alt
+    c[5]?v[5]: rec = rec - [5]
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>After receiving an item, the index of the channel is removed from <code>rec</code> to
+prevent receiving a second item from the same channel.
+When all items have been received, the assembly process starts (modeled with a
+<code>delay</code>, followed by sending the assembled component away with <code>b!v</code>.</p>
+</div>
+<div class="paragraph">
+<p>In practical situations these assembly processes are performed in a more
+cascading manner. Two or three components are 'glued' together in one assemble
+process, followed in the next process by another assembly process.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-exercises-6">Exercises</h4>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>To understand how time and time units relate to each other, change the time
+unit of the model in <a href="#tut-the-clock">The clock</a>.</p>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>Change the model to using time units of one second (that is, one time
+unit means one second of simulated time).</p>
+</li>
+<li>
+<p>Predict the resulting throughput and flow time for a deterministic case
+like in
+<a href="#tut-servers-with-time">Servers with time</a>, with <code>ta = 4</code> and <code>ts = 5</code>.
+Verify the prediction with an experiment, and explain the result.</p>
+</li>
+</ol>
+</div>
+</li>
+<li>
+<p>Extend the model <a href="#tut-figure-controlled-factory">A controlled factory</a>
+in <a href="#tut-buffer-exercises">Buffer exercises</a>
+with a single deterministic server taking
+<code>4.0</code> time units to model the production capacity of the factory.
+Increase the number of products inserted by the generator, and measure the
+average flow time for</p>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>A FIFO buffer with control policy <code>low = 0</code> and <code>high = 1</code>.</p>
+</li>
+<li>
+<p>A FIFO buffer with control policy <code>low = 1</code> and <code>high = 4</code>.</p>
+</li>
+<li>
+<p>A <em>LIFO</em> buffer with control policy <code>low = 1</code> and <code>high = 4</code>.</p>
+</li>
+</ol>
+</div>
+</li>
+</ol>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-conveyors">Conveyors</h3>
+<div class="paragraph">
+<p>A conveyor is a long belt on which items are placed at the starting point of
+the conveyor.
+The items leave the conveyor at the end point, after traveling a certain
+period of time on the conveyor.
+The number of items traveling on the conveyor varies, while each item stays
+the same amount of time on the conveyor. It works like a buffer that provides
+output based on item arrival time instead of based on demand from the next
+process.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+<div class="sect3">
+<h4 id="tut-using-timers">Timers</h4>
+<div class="paragraph">
+<p>
+
+
+
+To model a conveyor, you have to wait until a particular point in time. The
+Chi language has timers to signal such a time-out.
+The timer is started by assigning it a value. From that moment, it
+automatically decrements when time progresses in the model, until it reaches
+zero. The function <code>ready</code> gives the boolean value <code>true</code> if the timer is ready.
+The amount of time left can be obtained by reading from the variable.
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P():
+    timer t;
+
+    delay 10.0;
+    t = timer(5.0); # Get a time-out at time = 15.0
+    for i in range(7):
+        write("%f %f %b\n, time, real(t), ready(t));
+        delay 1.0
+    end
+end
+
+model M():
+    run P()
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Initially, <code>time</code> equals <code>0.0</code>.
+The first action of process <code>P</code> is to delay the time for <code>10.0</code> time units.
+Now the value of <code>time</code> equals <code>10.0</code>. Nothing happens to timer <code>t</code> as
+it was already zero.
+At time <code>10</code> timer <code>t</code> is started with the value <code>5.0</code>.
+The output of the program is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">10.0   5.0    false
+11.0   4.0    false
+12.0   3.0    false
+13.0   2.0    false
+14.0   1.0    false
+15.0   0.0    true
+16.0   0.0    true</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Timer <code>t</code> decrements as time progresses, and it is <code>ready</code> at
+<code>10.0 + 5.0</code> units.
+A process can have more timers active at the same moment.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-a-conveyor">A conveyor</h4>
+<div class="paragraph">
+<p>A conveyor is schematically depicted in <a href="#tut-figure-conveyor">A conveyor with three items</a>.</p>
+</div>
+<div id="tut-figure-conveyor" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/conveyor_3items.png" alt="conveyor 3items">
+</div>
+<div class="title">Figure 19. A conveyor with three items</div>
+</div>
+<div class="paragraph">
+<p>Three items are placed on the conveyor. For simplicity, assume the conveyor is
+<code>60.0</code> meter long and has a speed of <code>1</code> meter per second.
+An item thus stays on the conveyor for <code>60.0</code> seconds.</p>
+</div>
+<div class="paragraph">
+<p>Item <code>0</code> has been placed on the conveyor <code>50.0</code> seconds ago, and will leave
+the conveyor <code>10.0</code> second from now. In the same way, item <code>1</code> will leave
+<code>30.0</code> seconds from now, and <code>2</code> leaves after <code>45.0</code> seconds. Each item
+has a <em>yellow sticker</em> with the time that the item leaves the conveyor. Based
+on this idea, tuple type <code>conv_item</code> has been defined, consisting of a
+field <code>item</code>, denoting the received item, and a timer field <code>t</code>, with the
+remaining time until the item leaves the conveyor:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type conv_item = tuple(item x; timer t);
+
+proc T(chan? item a; chan! item b; real convey_time):
+    list conv_item xst; item x;
+
+    while true:
+        select
+            a?x:
+                xst = xst + [(x, timer(convey_time))]
+        alt
+            not empty(xst) and ready(xst[0].t), b!xst[0].x:
+                xst = xst[1:]
+        end
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The conveyor always accepts new items from channel <code>a</code>, and adds the item
+with the yellow sticker to the list. If the conveyor is not empty, and the
+timer has expired for the first item in the list, it is sent (without sticker)
+to the next process. The conveyor sends items to a process that is always
+willing to a receive an item, this implies that the conveyor is never blocked.
+Blocking implies that the items nevertheless are transported to the end of the
+conveyor.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-a-priority-conveyor">A priority conveyor</h4>
+<div class="paragraph">
+<p>In this example, items are placed on a conveyor, where the time of an item on
+the conveyor varies between items.
+Items arriving at the conveyor process, get inserted in the list with waiting
+items, in ascending order of their remaining time on the conveyor.
+The field <code>tt</code> in the item denotes the traveling time of the item on the
+conveyor:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type item      = tuple(...; real tt; ...),
+     conv_item = tuple(item x; timer t);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The predicate function <code>pred</code> is defined by:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">func bool pred(conv_item x, y):
+    return real(x.t) &lt;= real(y.t)
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The conveyor process becomes:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc T(chan? item a; chan! item b):
+    list conv_item xst; item x;
+
+    while true:
+        select
+            a?x:
+                xst = insert(xst, (x, timer(x.tt)), pred)
+        alt
+            not empty(xst) and ready(xst[0].t), b!xst[0].item:
+                xst = xst[1:]
+        end
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The conveyor process works like before, except the new item is inserted in the
+list according to its remaining time, instead of at the rear of the list.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-exercises-7">Exercises</h4>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Model the system as shown in <a href="#tut-figure-conveyor-system">A conveyor system</a> where <code>T</code>
+is a conveyor process with a capacity of <em>at most</em> three products and
+exponentially distributed conveying times with an average of <code>4.0</code>.</p>
+<div class="paragraph">
+<p>Compute the average flow time of products in the system.</p>
+</div>
+<div id="tut-figure-conveyor-system" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/conveyor_system.png" alt="conveyor system">
+</div>
+<div class="title">Figure 20. A conveyor system</div>
+</div>
+</li>
+<li>
+<p>Model the system as shown in <a href="#tut-figure-three-parallel-servers">A system with three parallel servers</a> with
+exponentially distributed server processing times with an average of
+<code>4.0</code>.</p>
+<div id="tut-figure-three-parallel-servers" class="imageblock">
+<div class="content">
+<img src="./tutorial/pictures/three_parallel_servers.png" alt="three parallel servers">
+</div>
+<div class="title">Figure 21. A system with three parallel servers</div>
+</div>
+<div class="olist loweralpha">
+<ol class="loweralpha" type="a">
+<li>
+<p>Compute the average flow time of products in the system.</p>
+</li>
+<li>
+<p>Are there differences in behavior between both systems? Why (not)?</p>
+</li>
+</ol>
+</div>
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-simulation-and-experiments">Simulations and experiments</h3>
+<div class="paragraph">
+<p>So far, attention has focused on the Chi language, and how to use it for
+modeling a discrete-event system.</p>
+</div>
+<div class="paragraph">
+<p>In this chapter, the focus shifts to performing simulations, in particular for
+systems with infinite behavior. Also, how to perform multiple model
+simulations is explained.</p>
+</div>
+<div class="sect3">
+<h4 id="tut-simulating-finite-systems">Simulating finite systems</h4>
+<div class="paragraph">
+<p>For systems that have simple cyclic behavior, the simulation can be
+'exhaustive', for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc G(chan! real a):
+    a!time
+end
+
+proc M(chan? real a, chan! real b):
+    real x;
+
+    a?x; delay 5.0; b!x
+end
+
+proc E(chan? real a):
+    real x;
+
+    a?x;
+    writeln("Flow time: %.2f", time - x);
+end
+
+model M():
+    chan real gm, me;
+
+    run G(gm), M(gm, me), E(me);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This simulation sends a single product through the line, prints the flow time,
+and exits. (All processes end, which makes that the <code>run</code> statement and the
+model end as well.)</p>
+</div>
+<div class="paragraph">
+<p>In this case, the answer is even obvious without running the simulation.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-exit">Simulating infinite systems</h4>
+<div class="paragraph">
+<p>For other systems, it is much harder to decide when enough has been simulated.
+Typically, a process (<code>E</code> in the example below), collects values of the
+property of interest (for example flow time of products), until it has
+collected enough samples to draw a conclusion, and compute the resulting value.</p>
+</div>
+<div class="paragraph">
+<p>After doing so, the problem arises to let all processes know the simulation
+should be stopped. This can be programmed in the model (such as adding
+channels to
+signal termination of the simulation to all processes). A simpler alternative
+is to use the <code>exit</code> statement, in the following way:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc real E(chan? real a, int N):
+    real total, x;
+
+    for n in range(N):
+        a?x;
+        total = total + time - x;
+    end;
+    exit total / N
+end
+
+model real M(... int N):
+    ...
+
+    run ..., E(..., N);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In process <code>E</code>, the average flow time is calculated and given as
+argument of the <code>exit</code> statement. At the moment this statement is executed,
+the model and all processes are killed, and the computed value becomes the
+exit value (the result) of the simulation. The <code>real</code> type before
+the name <code>E</code> denotes that the process may perform an <code>exit</code> statement
+returning a real value. The model runs the <code>E</code> process, so it may also give
+an exit value as result. These types are called <em>exit type</em>.
+Exit values are printed to the screen by the simulator when it ends the
+model simulation.</p>
+</div>
+<div class="paragraph">
+<p>Another option is to use <code>write</code> to output the computed value, and use
+<code>exit</code> without argument. In that case, the exit value is of type <code>void</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-experiment">Simulating several scenarios</h4>
+<div class="paragraph">
+<p>The above works nicely for single model simulations. The model is started one
+time, and it derives a result for a single scenario.</p>
+</div>
+<div class="paragraph">
+<p>Often however, you want to perform several model simulations. This can be the
+exact same scenario when the model has stochastic behavior, or it can be
+with different parameter values each time (to investigate system behavior
+under different circumstances).
+In such cases, you can use an experiment, like below:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">xper X():
+    real v;
+    int n;
+
+    for n in range(5, 10):
+        v = M(n);
+        write("%2d: %.2f\n", n, v)
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The experiment <code>X</code> looks just like a function, except that it has no
+<code>return</code>
+statement. It can however 'call' a model like a function. In the example above
+<code>M(n)</code> starts a simulation with model <code>M</code> and the given value for <code>n</code>.
+When the model exits by means of the <code>exit</code> statement (this is required!),
+the computed exit
+value of the (model) simulation is assigned to variable <code>v</code>. In the
+experiment, this value can be used for post-processing, or in this case, get
+printed as result value in a table.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-svg-visualization">SVG visualization</h3>
+<div class="paragraph">
+<p>A Chi simulation often produces large amounts of textual output that you have
+to process in order to understand the simulation result. Also for people
+unfamiliar with the details of the simulated system, results are hard to
+understand. A possible solution is to add a visualization of the system to the
+simulator, that displays how the system behaves over time. Generally, it
+looses some of the details, but it makes globally checking, and explaining of
+the simulation much easier.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect3">
+<h4 id="tut-the-svg-file-format">The SVG file format</h4>
+<div class="paragraph">
+<p>
+The <a href="http://www.w3.org/TR/SVG11/">Scalable Vector Graphics</a> (SVG) file
+format is a widely used, royalty-free standard for two-dimensional vector
+graphics, developed by the <a href="http://www.w3.org/">World Wide Web Consortium</a>
+(W3C). SVG images consist of three types of objects: vector graphic shapes
+(rectangles, circles, etc.), raster images, and text. The benefit of vector
+images formats over raster image formats, is that raster images are created
+with a fixed size, while vector images contain a description of the image and
+can be rendered at any size without loss of quality.</p>
+</div>
+<div class="paragraph">
+<p>
+
+SVG image files are stored in an
+<a href="http://en.wikipedia.org/wiki/XML">XML</a>-based file format. This means that
+they can be edited with any text editor. However, it is often more convenient
+to edit them with a drawing program that supports vector graphics, such as
+<a href="http://www.adobe.com/products/illustrator.html">Adobe Illustrator</a>
+or <a href="https://inkscape.org/">Inkscape</a>.
+Most modern web browsers also support display of SVG images.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-visualization">Visualization</h4>
+<div class="paragraph">
+<p>An SVG file has a tree structure; (graphical) elements are drawn in the same
+order as they appear in the file. Elements further down in the file are thus
+drawn on top of earlier elements. Also, each element has a position and size.
+They may have other properties like a color or a gradient as well. There are
+also 'administrative' elements, that can group, scale, or rotate parts of the
+tree. The website of Jakob Jenkov has a very nice
+<a href="http://tutorials.jenkov.com/svg">SVG Tutorial</a>.</p>
+</div>
+<div class="paragraph">
+<p>The SVG visualization by the Chi simulator exploits this structure. You access
+the elements, and literally change the value of their properties or copy part
+of the tree. The
+<a href="http://xmlgraphics.apache.org/batik/">Apache Batik SVG Toolkit</a>
+used for drawing the SVG image at the
+screen notices the changes, and updates the displayed image.</p>
+</div>
+<div class="paragraph">
+<p>By updating the SVG tree every time when the state of the simulation changes,
+you can display how a system evolves over time as an animated image.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-chapter-svg-example">SVG visualization example</h3>
+<div class="paragraph">
+<p>To illustrate how to make an SVG visualization, a simple generator, buffer,
+server, buffer, server, exit (GBSBSE) process line is used.
+Below the generator and exit process definitions, and the model:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc G(chan! real to; real ptime):
+    int n = 0;
+
+    while n &lt; 100:
+        to!time; delay ptime; n = n + 1
+    end
+end
+
+proc E(chan? real from):
+    real x;
+
+    while true:
+        from?x
+    end
+end
+
+model M():
+    list(3) chan real c;
+    list(2) chan real bs;
+
+    run G(c[0], 1.1),
+
+        B(0, c[0], bs[0], 3),
+        S(0, bs[0], c[1], 1.0, exponential(10.0), exponential(4.0)),
+
+        B(1, c[1], bs[1], 3),
+        S(1, bs[1], c[2], 0.9, exponential(10.0), exponential(4.0)),
+
+        E(c[2]);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This system should be visualized, where the number of items in each buffer
+should be displayed, and the state of each server (waiting for input,
+processing, or waiting for output) should also be shown.
+The <a href="./tutorial/gbse.svg">gbse.svg</a>
+SVG file was made for this purpose, which
+looks like</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/sbb.png" alt="sbb">
+</div>
+</div>
+<div class="paragraph">
+<p>in an editor. The black rectangle represents the displayed area when the
+visualization is running. It has two light-green rectangles in it, representing
+the first and second buffer. The darker green rectangles inside will vary in height
+to show the number of items in each buffer.</p>
+</div>
+<div class="paragraph">
+<p>The circle at the left of the displayed area is never displayed in the
+visualization. However, each server makes a copy of it, and places it at an
+appropriate position in the display. While for two servers, one could just as
+well perform the copying beforehand, as was done with the buffer graphics, but
+the copying technique demonstrates how to scale visualizations for displaying
+a larger number of items without a lot of effort.</p>
+</div>
+<div class="sect3">
+<h4 id="tut-buffer-visualization">Buffer visualization</h4>
+<div class="paragraph">
+<p>The left darker green rectangle has an <code>id</code> with value <code>buf0</code>, while the
+right rectangle has an <code>id</code> containing <code>buf1</code>. Through the <code>id</code>, you can
+access the properties, in this case, the height, for example
+<code>attr buf0.height = 50</code>. This will set the <code>height</code> property of the SVG element
+named <code>buf0</code> to <code>50</code>.</p>
+</div>
+<div class="paragraph">
+<p>The SVG visualization is not in the Chi model itself, it is an external
+entity. You access it by opening a 'file', and writing the commands such as
+above, as lines of text.
+The code of the buffer is shown below.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc B(int num; chan? real from; chan! real to; int cap):
+    list real xs;
+    real x;
+    file f = open("SVG:gbse.svg", "w");
+
+    while true:
+        select size(xs) &gt; 0, to!xs[0]:
+            xs = xs[1:];
+        alt size(xs) &lt; cap, from?x:
+            xs = xs + [x]
+        end
+        writeln(f, "attr buf%d.height = %d", num, size(xs) * 50);
+    end
+    close(f);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It is a normal finite buffer process, except for three additional lines. The
+first change is the <code>file f = open("SVG:gbse.svg", "w");</code> line. It creates a
+connection to the SVG visualization due to the <code>SVG:</code> prefix of the file
+name. <code>gbse.svg</code> is the name of the <code>.svg</code> file described above. The
+'file' should be opened for writing (since you will be sending commands to
+it).</p>
+</div>
+<div class="paragraph">
+<p>The second line is the
+<code>writeln(f, "attr buf%d.height = %d", num, size(xs) * 50);</code> line,
+which constructs a line of text to set the height of the darker
+green rectangle to a value proportional to the number of elements in the
+buffer. There is however a <a href="#svg-vertical-trickery">vertical coordinate trick</a>
+needed to make it all work.</p>
+</div>
+<div class="paragraph">
+<p>The third line is the <code>close(f);</code> line at the end of the process. It closes
+the connection to the SVG visualization.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="svg-vertical-trickery">Vertical coordinates trickery</h4>
+<div class="paragraph">
+<p>In SVG, the vertical coordinates run from the top of the screen to the bottom.
+If you just draw a rectangle, its base position <code>(x,y)</code> is at the top-left
+corner, with <code>width</code> going to the right of the screen, and <code>height</code>
+towards the bottom. In other words, if you change the height of a simple
+SVG rectangle by a program like the buffer process, the rectangle will grow
+downwards instead of upwards!</p>
+</div>
+<div class="paragraph">
+<p>To make it grow upwards instead, you can</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>change both the <code>height</code> and the <code>y</code> coordinate of the rectangle at the
+same time (you move the top of the rectangle in opposite direction with its
+growth in height, so it looks like the rectangle grows upwards), or</p>
+</li>
+<li>
+<p>flip the coordinate system of the rectangle by inserting a '180 degrees
+rotation' transformation around the rectangle (you tell SVG to draw the
+rectangle 'upside down', thus if you make it higher, it grows downwards, but
+the flipped coordinate displays it as growth upwards.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-server-process">Server process</h4>
+<div class="paragraph">
+<p>The server process code looks as follows (ignore all the <code>writeln</code> lines for
+now).</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc S(int num; chan? real from; chan! real to; real ptime; dist real up, down):
+    real event, x;
+    file f = open("SVG:gbse.svg", "w");
+
+    writeln(f, "copy server, , _x%d", num);
+    writeln(f, "absmove s_x%d (%d, 325)", num, num*420+150);
+
+    while true:
+        event = time + sample up;
+
+        # Up; process items.
+        while event &gt; time:
+            writeln(f, "attr s_x%d.fill=yellow", num);
+            from?x;
+            writeln(f, "attr s_x%d.fill=green", num);
+            delay ptime;
+            writeln(f, "attr s_x%d.fill=magenta", num);
+            to!x;
+        end
+
+        # Down; repair machine.
+        writeln(f, "attr s_x%d.fill=red", num);
+        delay sample down;
+    end
+    close(f);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The server runs forever, starting with sampling how long it will be up
+(<code>event = time + sample up</code>). Until it has reached that time
+(<code>while event &gt; time:</code>), it cycles through getting a product, processing
+it for <code>uptime</code> time units, and sending the product out again. After a
+few cycles, it has reached the <code>event</code> time, goes down, and waits for repair
+(<code>delay sample down;</code>). Once the machine is repaired it starts again.
+Visualization of the servers is discussed below.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-visualizing-the-server">Visualizing the server</h4>
+<div class="paragraph">
+<p>A server is to be visualized with a circle that changes color depending on
+what the server is doing. Yellow means it is waiting for a product, green
+means processing, magenta means it is waiting to pass the finished product
+to the next station, and red means the machine is down. After repairing, it
+will continue processing.</p>
+</div>
+<div class="paragraph">
+<p>As with the buffer process, the SVG visualization first opens a file
+connection to the visualizer and the SVG file with the
+<code>file f = open("SVG:gbse.svg", "w");</code> line. The filename of the <code>.svg</code> file
+must be the same as with the buffer process (the visualizer can only show
+one SVG file at a time).</p>
+</div>
+<div class="paragraph">
+<p>To display server state in the SVG visualization, we need a circle (called <em>arc</em> in
+SVG) named <code>s_0</code> and <code>s_1</code> (for server 0 and server 1), positioned behind
+its buffer. If there are not too many servers, and their number is fixed, one
+could simply add those arcs to the SVG file and be done with it.
+However, if you have a lot of servers, or you don&#8217;t know in advance how many
+you will have, you cannot add them beforehand, you need to construct the SVG
+elements 'on the fly'.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-copying-svg-elements">Copying SVG elements</h4>
+<div class="paragraph">
+<p>For showing the server states, arcs named <code>s_0</code> and <code>s_1</code> are required in
+SVG, which are created by copying and moving an SVG element. In this case, a
+server is represented by just one SVG element, so you can copy and move that
+one element. In general however, you want to copy several elements at the same
+time (for example you might want to copy graphical elements to display a work
+station, a server with its buffer).</p>
+</div>
+<div class="paragraph">
+<p>SVG has group elements, where you can put any number of (graphical) elements inside.
+When you copy a group, you copy its entire contents. The <code>gbse.svg</code> file as
+a group called <code>server</code>, containing an arc element called <code>s</code>. The server
+group is copied and moved, which causes the arc element to be copied and moved
+as well.</p>
+</div>
+<div class="paragraph">
+<p>Inside an SVG file, each element must have a unique <code>id</code>, that is, each
+element must have a unique name. When making a copy, the copied elements must
+thus also be given a new name. The entire operation is performed with sending
+a <code>copy [node], [prefix], [suffix]</code> command to the SVG visualizer. It
+takes the element named <code>[node]</code>, and makes a full copy of it
+(all elements inside it are also copied). For each copied element the
+<code>[prefix]</code> is added in front of its <code>id</code> name, and the <code>[suffix]</code> is
+added behind it.</p>
+</div>
+<div class="paragraph">
+<p>The <code>writeln(f, "copy server, , _x%d", num);</code> line in the Chi simulation
+performs the copy operation for the servers. It takes the <code>server</code> group
+element (which contains an <code>s</code> arc element), and adds nothing in front of
+the names (there is no text between the first and the second comma). It
+appends the names with <code>_x0</code> for the first server, and <code>_x1</code> for the
+second server. The result is thus a copy of the <code>server</code> group, called
+<code>server_x0</code> or <code>server_x1</code>, containing an arc <code>s_x0</code> respectively
+<code>s_x1</code>.</p>
+</div>
+<div class="paragraph">
+<p>Note that the copy command performs copying, and nothing else. Since the
+copied element is exactly at the same position as the original, you don&#8217;t see
+copies. This is however fixed by a move command explained next.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-moving-svg-elements">Moving SVG elements</h4>
+<div class="paragraph">
+<p>You often want to position an SVG element at some point in the display. The
+simplest way to do that is to change its <code>x</code> and <code>y</code> attributes, much
+like the <code>height</code> attribute of the buffer rectangle was modified. Another
+solution is to perform a relative move, using transform/translate.</p>
+</div>
+<div class="paragraph">
+<p>This works, until you add a transformation element that changes the coordinate
+system. Sometimes you do this consciously, for example adding a 'flip'
+transformation to fix the vertical coordinates. At other times the SVG editor
+may insert one, for example when you rotate or scale some part of the drawing.</p>
+</div>
+<div class="paragraph">
+<p>The Chi SVG visualizer has a <code>absmove [node] ([xpos], [ypos])</code>
+command to handle this case. It computes a transformation to get the top-left
+corner of the element named <code>[node]</code> at position (<code>[xpos]</code>, <code>[ypos]</code>).
+Keep in mind that the vertical coordinate starts at the top, and goes down.</p>
+</div>
+<div class="paragraph">
+<p>There are limitations to this command, in some case it may fail (see the
+<a href="#ref-chapter-svg-visualization">reference manual</a> for details about the
+command). It is recommended to use this command one time on an element to move
+it to a known base position. Once it is at a known position, change the <code>x</code>
+and <code>y</code> coordinates of a child element (to avoid disturbing the base
+position), to move relative to that base position. Another solution is to
+perform a relative move, using transform/translate.</p>
+</div>
+<div class="paragraph">
+<p>In the Chi simulation, the
+<code>writeln(f, "absmove s_x%d (%d, 325)", num, num*420+150);</code> line moves the
+copied <code>s_x0</code> and <code>s_x1</code> arcs to the right
+position in the display.</p>
+</div>
+<div class="paragraph">
+<p>With the arcs in the right position in the display, the servers can display
+their activities by changing the color of the <code>fill</code> attribute.</p>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="ref-chapter-reference-manual">Chi Reference Manual</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This manual explains the allowed Chi language constructs and their semantics.
+Topics discussed here are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#ref-chapter-global-definitions">Global definitions</a></p>
+</li>
+<li>
+<p><a href="#ref-chapter-statements">Statements</a></p>
+</li>
+<li>
+<p><a href="#ref-chapter-expressions">Expressions</a></p>
+</li>
+<li>
+<p><a href="#ref-chapter-standard-library">Standard library functions</a></p>
+</li>
+<li>
+<p><a href="#ref-chapter-distributions">Distributions</a></p>
+</li>
+<li>
+<p><a href="#ref-chapter-types">Types</a></p>
+</li>
+<li>
+<p><a href="#ref-chapter-lexical-syntax">Lexical syntax</a></p>
+</li>
+<li>
+<p><a href="#ref-chapter-migration">Model migration</a></p>
+</li>
+<li>
+<p><a href="#ref-chapter-svg-visualization">SVG visualization</a></p>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="ref-chapter-global-definitions">Global definitions</h3>
+<div class="paragraph">
+<p>At global level, a Chi program is a sequence of definitions, as shown in the
+following diagram</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/program.png" alt="program">
+</div>
+</div>
+<div class="paragraph">
+<p>Each of the definitions is explained below.
+The syntax diagram suggests that a <code>;</code> separator is obligatory between
+definitions. The implementation is more liberal, you may omit the separator
+when a definition ends with the <code>end</code> keyword. Also, it is allowed to use a
+separator after the last definition.</p>
+</div>
+<div class="paragraph">
+<p>The name of each global definition has to be unique.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="sect3">
+<h4 id="ref-enum-definitions">Enumeration definitions</h4>
+<div class="paragraph">
+<p>With enumerations, you create a new enumeration type containing a number of
+names (called enumeration values).
+The syntax is given below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/enumdef.png" alt="enumdef">
+</div>
+</div>
+<div class="paragraph">
+<p>The enumeration definitions start with the keyword <code>enum</code>, followed by a
+sequence of definitions separated with a <code>,</code>. Each definition
+associates an enumeration type name with a set of enumeration value names.
+For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">enum FlagColours  = {red, white, blue},
+     MachineState = {idle, heating, processing};</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The enumeration type names act as normal types, and the enumeration values are
+its values. The values have to be unique words.</p>
+</div>
+<div class="paragraph">
+<p>For example, you can create a variable, and compare values like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">MachineState state = idle;
+...
+while state != processing:
+    ...
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Note that enumeration values have no order, you cannot increment or decrement
+variables with an enumeration type, and you can only compare values with
+equality and inequality.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-type-definitions">Type definitions</h4>
+<div class="paragraph">
+<p>Type definitions allow you to assign a name to a type. By using a name instead
+of the type itself, readability of the program increases.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/typedef.png" alt="typedef">
+</div>
+</div>
+<div class="paragraph">
+<p>A type definition starts with the keyword <code>type</code>, followed by a number of
+'assignments' that associate a type name with a type, separated with a <code>,</code>.
+For further details about type names and types, see <a href="#ref-chapter-types">Types</a>.</p>
+</div>
+<div class="paragraph">
+<p>An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type lot   = real,
+     batch = list lot;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here a <code>lot</code> type name is introduced that is implemented with a real number,
+and a <code>batch</code> type name is created, which is a list of <code>lot</code>.</p>
+</div>
+<div class="paragraph">
+<p>These type names can be used at every place where you can use a type, for
+example in variable declarations:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">batch xs;
+lot x;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Note that you cannot define use a type name in its own definition.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-constant-definitions">Constant definitions</h4>
+<div class="paragraph">
+<p>Constant definitions allow you to give a name to a fixed value to enhance
+readability. It also makes it easier to change a value between different
+experiments. For example, if you have a constant named <code>speed</code>, and you want
+to investigate how its value affects performance, you only have to change
+value in the constant definition, instead of finding and changing numbers in
+the entire program.</p>
+</div>
+<div class="paragraph">
+<p>The syntax of constant definitions is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/constantdef.png" alt="constantdef">
+</div>
+</div>
+<div class="paragraph">
+<p>An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">const real speed = 4.8,
+      dict(string : list int) recipes = { "short" : [1,4,8],
+                                          "long"  : [1,1,2,3,4,5] };</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, a <code>speed</code> real value is defined, and <code>recipes</code> value, a
+dictionary of string to numbers. The constant names can be used at every point
+where you can use an expression. See the <a href="#ref-chapter-expressions">Expressions</a>
+section for details about expressions.</p>
+</div>
+<div class="paragraph">
+<p>Note that you cannot use a constant name in its own definition.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-process-definitions">Process definitions</h4>
+<div class="paragraph">
+<p>A process is an entity that shows behavior over time. A process definition is
+a template for such a process. It is defined as follows</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/procdef.png" alt="procdef">
+</div>
+</div>
+<div class="paragraph">
+<p>The definition starts with the keyword <code>proc</code> optionally followed by an exit
+type. The name of the process definition, and its formal parameters concludes
+the header.
+In the body, the behavior is described using statements.</p>
+</div>
+<div class="paragraph">
+<p>Formal parameters are further explained in <a href="#ref-formal-parameters">Formal parameters</a>,
+statements are explained in the <a href="#ref-chapter-statements">Statements</a> section.</p>
+</div>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P():
+  writeln("Hello");
+  delay 15;
+  writeln("Finished")
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In the example, a process definition with the name <code>P</code> is defined, without
+parameters, that outputs a line of text when starting, and another line of
+text 15 time units later (and then finishes execution).</p>
+</div>
+<div class="paragraph">
+<p>Creating and running a process is done with <a href="#ref-sub-process-statements">Sub-process statements</a>
+(<code>start</code> or <code>run</code>) from another process or from a model.</p>
+</div>
+<div class="paragraph">
+<p>If a process definition has no exit type specified, it may not use the
+<code>exit</code> statement, nor may it start other processes that have an exit type
+(see also <a href="#ref-sub-process-statements">Sub-process statements</a>).
+Process definitions that have an exit type may use the <code>exit</code> statement
+directly (see <a href="#ref-exit-statement">Exit statement</a> for details on the statement), and it
+may start other processes without exit type, or with the same exit type.</p>
+</div>
+<div class="paragraph">
+<p>Since values returned by the <code>exit</code> statement may get printed onto the
+output, you may only use exit types that are printable. These are all the
+'normal' data values, from simple booleans to lists, sets, and dictionaries of
+data values, but not channels, files, etc.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-model-definitions">Model definitions</h4>
+<div class="paragraph">
+<p>A model behaves like a process, the only difference is that a model is run
+as first process. It is the 'starting point' of a simulation.
+As such, a model can only take data values which you can write down as literal
+value. For example, giving it a channel or a process instance is not allowed.</p>
+</div>
+<div class="paragraph">
+<p>Like the process, a model also has a definition. It is defined below</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/modeldef.png" alt="modeldef">
+</div>
+</div>
+<div class="paragraph">
+<p>The syntax is exactly the same as process definitions explained in
+<a href="#ref-process-definitions">Process definitions</a>, except it starts with
+a <code>model</code> keyword instead.
+A model can be started directly in the simulator (see
+<a href="#tool-chapter-software-operation">Software operation</a>), or as part of an experiment, explained in
+<a href="#tut-experiment">Simulating several scenarios</a>, and <a href="#ref-xper-definitions">Experiment definitions</a>.
+If the model definition has no exit type, it may not use the <code>exit</code>
+statement directly, nor may it start other processes that have an exit type.
+If an exit type is specified, the model may use the <code>exit</code> statement
+to end the model simulation (see <a href="#ref-sub-process-statements">Sub-process statements</a> for
+details), and it may start other processes, either without exit type, or with
+a matching exit type.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-function-definitions">Function definitions</h4>
+<div class="paragraph">
+<p>In programs, computations are executed to make decisions. These computations
+can be long and complex. A function definition attaches a name to a
+computation, so it can be moved to a separate place in the file.</p>
+</div>
+<div class="paragraph">
+<p>Another common pattern is that the same computation is needed at several
+places in the program. Rather than duplicating it (which creates consistency
+problems when updating the computation), write it in a function  definition,
+and call it by name when needed.</p>
+</div>
+<div class="paragraph">
+<p>The syntax of a function definition is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/funcdef.png" alt="funcdef">
+</div>
+</div>
+<div class="paragraph">
+<p>In the syntax, the only thing that changes compared with the syntax in
+<a href="#ref-process-definitions">Process definitions</a> or <a href="#ref-model-definitions">Model definitions</a> is the
+additional <code>Type</code> node that defines the type resulting from the computation.</p>
+</div>
+<div class="paragraph">
+<p>However, since a function represents a computation (that is, calculation of an
+output value from input values) rather than having behavior over time, the
+<code>Body</code> part has additional restrictions.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>A computation is performed instantly, no time passes. This means that you
+cannot delay or wait in a function.</p>
+</li>
+<li>
+<p>A computation outputs a result. You cannot have a function that has no
+result.</p>
+</li>
+<li>
+<p>A computation is repeatable. That means if you run the
+same computation again with the same input values, you get the same result
+<em>every time</em>. Also in the environment of the function, there should be no
+changes. This idea is known as <em>mathematical functions</em>.</p>
+<div class="paragraph">
+<p>A consequence of having mathematical functions is that you cannot interact
+with 'outside'. No querying of the current time, no communication, no select
+statement, and no use of distributions.</p>
+</div>
+<div class="paragraph">
+<p>Technically, this would also imply no input/output, but for practical
+reasons this restriction has been lifted. However, as a general rule, avoid
+using it.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-xper-definitions">Experiment definitions</h4>
+<div class="paragraph">
+<p>An experiment can execute one or more model simulations, collect their exit
+values, and combine them into a experiment result.
+Its syntax is shown below</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/xperdef.png" alt="xperdef">
+</div>
+</div>
+<div class="paragraph">
+<p>An experiment definition has some function-like restrictions, like not being
+able to use sub-process statements, no communication, and no use of time. On
+the other hand, it does not return a value, and it can start model
+simulations that have a non-void exit type (<a href="#ref-void-type">Void type</a> discusses the
+void type).</p>
+</div>
+<div class="paragraph">
+<p>The definition is very similar to other definitions. It starts with an
+<code>xper</code> keyword, followed by the name of the definition. The name can be used
+to start an experiment with the simulator (see <a href="#tool-chapter-software-operation">Software operation</a>
+for details on starting the simulator).
+If formal parameters are specified with the experiment definition (see
+<a href="#ref-formal-parameters">Formal parameters</a> below), the experiment can be parameterized with
+values.
+Like models, an experiment can only take data values which you can write down
+as literal value. For example, giving it a channel or a process instance is
+not allowed.</p>
+</div>
+<div class="paragraph">
+<p>The body of an experiment is just like the body of a
+<a href="#ref-function-definitions">Function definitions</a> (no interaction with processes or time).
+Unlike a function, an experiment never returns a value with the
+<a href="#ref-return-statement">Return statement</a>.</p>
+</div>
+<div class="paragraph">
+<p>The primary goal of an <code>xper</code> is to allow you to run one or more model
+simulations that give an exit value. For this purpose, you can 'call' a model
+like a function, for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">xper X():
+    real total;
+    int n;
+
+    while n &lt; 10:
+        total = total + M();
+        n = n + 1
+    end
+
+    writeln("Average is %.2f", total / 10);
+end
+
+model real M():
+    dist real d = exponential(7.5);
+    exit sample d;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The model above is very short to keep the example compact. In practice it will
+be larger, start several concurrent processes, and do a lengthy simulation
+before it decides what the answer should be.
+The experiment <code>X</code> makes ten calls to the model. Each call causes the
+model to be run, until the model or one of its processes executes the <code>exit</code>
+statement. At that point, the model and all its processes are killed, and the
+value supplied with the exit statement becomes the return value of the model
+call, adding it to <code>total</code>.
+After the ten model simulations, the experiment outputs the average value of
+all model simulations.</p>
+</div>
+<div class="paragraph">
+<p>Note that the called model (or one of its started processes) <strong>must</strong> end with
+the <code>exit</code> statement, it is an error when the model ends by finishing its
+last model statement.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-formal-parameters">Formal parameters</h4>
+<div class="paragraph">
+<p>Definitions above often take values as parameter to allow customizing their
+behavior during execution.
+The definition of those parameters are called <em>formal parameters</em>,
+The syntax of formal parameters is shown below</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/formalparms.png" alt="formalparms">
+</div>
+</div>
+<div class="paragraph">
+<p>As you can see, they are just variable declarations (explained in the
+<a href="#ref-variable-declarations">Local variables</a> section), except you may not add an initial
+value, since their values are obtained during use of the definition.</p>
+</div>
+<div class="paragraph">
+<p>To a definition, the formal parameters act like variables. You may
+use them just like other variables.</p>
+</div>
+<div class="paragraph">
+<p>An example, where <code>int x, y; string rel</code> are the formal parameters of
+process definition <code>P</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P(int x, y; string rel):
+    writeln("%d %s %d", x, rel, x-y)
+end
+
+...
+
+run P(2, -1, "is less than");</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The formal parameters introduce additional variables in the process, that can
+be just just like any other variable. Here, they are just printed to the
+screen.
+Elsewhere in the program, the definition gets used (instantiated), and a value
+is supplied for the additional variables. Such values are called
+<em>actual parameters</em>.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="ref-chapter-statements">Statements</h3>
+<div class="paragraph">
+<p>
+
+
+
+Statements express how a process or function in a system works. They define
+what is done and in which order. Many statements use data for their decisions,
+which is stored in local variables. The combined local variables and
+statements are called 'body' with the following syntax.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/body.png" alt="body">
+</div>
+</div>
+<div class="paragraph">
+<p>Data values available to the process are the global constants (see
+<a href="#ref-constant-definitions">Constant definitions</a>) and enumeration values (see
+<a href="#ref-enum-definitions">Enumeration definitions</a>). The formal parameters of the surrounding
+process definition (explained in <a href="#ref-process-definitions">Process definitions</a>) or the
+surrounding function definition (explained in <a href="#ref-function-definitions">Function definitions</a>)
+are added as well.</p>
+</div>
+<div class="paragraph">
+<p>Data storage that can be modified by the process are the local variables,
+defined by the <code>VarDefinitions</code> block in the <code>Body</code> diagram
+above (variable definitions are explained below in
+<a href="#ref-variable-declarations">Local variables</a>).</p>
+</div>
+<div class="paragraph">
+<p>The data values and the modifiable data storage is used by the statements of
+the <code>Body</code> in the path after <code>1</code>. For ease of reference they are grouped
+by kind of statement as shown in the <code>Statement</code> diagram below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/statement.png" alt="statement">
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The <code>AssignmentStatement</code> is used to assign new values to the local
+variables (and explained further in <a href="#ref-assignment-statement">Assignment statement</a>).</p>
+</li>
+<li>
+<p>The <code>IterativeStatement</code> allows repeated execution of the same statements
+by means of the <code>for</code> and <code>while</code> statements (further explained in
+<a href="#ref-iterative-statements">Iterative statements</a>).</p>
+</li>
+<li>
+<p>The <code>ChoiceStatement</code> allows selection on which statement to perform next
+by means of the <code>if</code> statement (explained in <a href="#ref-choice-statement">Choice statement</a>).</p>
+</li>
+<li>
+<p>The <code>run</code> and <code>start</code> statements of the <code>SubProcessStatement</code> group
+(explained in <a href="#ref-sub-process-statements">Sub-process statements</a>) start new processes.</p>
+</li>
+<li>
+<p>Communication with other processes using channels is done with send,
+receive, and <code>select</code> statements in <code>CommunicationStatement</code> (explained
+in <a href="#ref-communication-statements">Communication statements</a>)</p>
+</li>
+<li>
+<p>Finally, the <code>OtherStatements</code> group contains several different
+statements (explained further in <a href="#ref-other-statements">Other statements</a>).
+The more commonly used statements in that group are the <code>delay</code> statement,
+the <code>write</code> statement, and the <code>return</code> statement.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The syntax diagram of <code>Body</code> states that statements are separated from each
+other with a semi colon (<code>;</code>). The compiler allows more freedom. Semicolons
+may be omitted before and after a <code>end</code> keyword, and a semi colon may be
+added after the last statement.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="sect3">
+<h4 id="ref-variable-declarations">Local variables</h4>
+<div class="paragraph">
+<p>Local variables are introduced in a process or function using the following
+syntax</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/vardef.png" alt="vardef">
+</div>
+</div>
+<div class="paragraph">
+<p>Variable definitions start with a <code>Type</code> node (its syntax if explained in
+<a href="#ref-chapter-types">Types</a>), followed by a sequence of variable names where
+each variable may be initialized with a value by means of the <code>= Expression</code>
+path. If no value is assigned, the variable gets the default value of the
+type. Use a semi colon to terminate the sequence of new variables.</p>
+</div>
+<div class="paragraph">
+<p>Next, another set of variables may be defined by going back to the start of
+the diagram, and giving another <code>Type</code> node, or the diagram can be ended,
+and the statements of the process or function can be given.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-assignment-statement">Assignment statement</h4>
+<div class="paragraph">
+<p>An assignment statement assigns one or more values to the local variables.
+Its syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/assignment_statement.png" alt="assignment statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The assignment statement computes the value of every <code>Expression</code> at the
+right. If there is one expression, its value is also the value to assign. If
+there are more expressions, a tuple value is constructed, combining all values
+into one tuple (see <a href="#ref-tuple-expression">Tuple expression</a> for a discussion of tuple
+values).</p>
+</div>
+<div class="paragraph">
+<p>
+At the left, a number of <code>Addressable</code> blocks define where the computed
+value is assigned to.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/addressable.png" alt="addressable">
+</div>
+</div>
+<div class="paragraph">
+<p>An <code>Addressable</code> is a variable. If the variable has a tuple type (see
+<a href="#ref-tuple-type">Tuple type</a>) a field of the tuple may be assigned only using Path 1.
+Similarly, if the variable is a list (see <a href="#ref-list-type">List type</a>) or a
+dictionary (see <a href="#ref-dictionary-type">Dictionary type</a>) assignment is done to one
+element by using Path 2. The <code>Expression</code> here is evaluated before <em>any</em>
+assignment by this statement is performed.
+Since selected elements may also have a type that allows selection, element
+selection can be repeated.</p>
+</div>
+<div class="paragraph">
+<p>After processing the element selections at the left, it is known where
+values are assigned to. If there is exactly one addressable at the left, its
+type must match with the type of the value at the right (which may be a
+constructed tuple value as explained above). The value gets copied into the
+variable (or in its element if one is selected).
+If there are several addressable values at the left, the number of values must
+be equal to the length of the tuple from the expression(s) at the right, and
+each field of the right tuple must pair-wise match with the type of the
+addressed element at the left. In the latter case, all assignments are done at
+the same moment.</p>
+</div>
+<div class="paragraph">
+<p>For a few examples, a number of variable declarations are needed:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">int x, y;
+real r;
+list(10) int xs;
+tuple(real v; int w) t;
+func tuple(real v; int w) (int) f;
+
+...  # Initialization of the variables omitted</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The variable declarations introduce integer variables <code>x</code> and <code>y</code>, a real
+number variable <code>r</code>, a list of 10 integers <code>xs</code>, a tuple <code>t</code> with two
+fields, and a function variable <code>f</code>.</p>
+</div>
+<div class="paragraph">
+<p>For reasons of clarity, initialization of the variables has been omitted.
+Also, expressions at the right are simple values. However, you may use all
+allowed expression operations explained in the next chapter
+(<a href="#ref-chapter-expressions">Expressions</a>) to obtain a value to assign.
+The first assignments show assignment of values to variables where there is
+one explicit value for every assigned variable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">x = 3;
+t = f(y);
+x, y = 4, 5;
+xs[0], t.v = x+x, r;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first assignment statement assigns 3 to <code>x</code>. The second assignment
+assigns the return value of the function call <code>f(y)</code> to tuple <code>t</code>. The
+third assignment assigns 4 to <code>x</code> and 5 to <code>y</code> at the same time. The
+fourth assignment assigns the value of <code>x+x</code> to the first element of the
+list <code>xs</code>, and the value of <code>r</code> to the <code>v</code> field of tuple <code>t</code>.</p>
+</div>
+<div class="paragraph">
+<p>The next assignments show combining or splitting of tuples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">t = r, y;
+r, x = t;
+r, x = f(y);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first assignment assigns a new value to every field of tuple <code>t</code>
+(<code>t.v</code> gets the value of <code>r</code>, while <code>t.w</code> gets the value of <code>y</code>). This
+is called <em>packing</em>, it 'packs' the sequence of values into one tuple. The
+opposite operation is demonstrated in the second assignment. The value of each
+field of <code>t</code> is assigned to a separate variable. The types of the variables
+at the left have to  pair-wise match with the field types of the tuple at the
+right. This assignment is called <em>unpacking</em>, it 'unpacks' a tuple value into
+its separate elements.
+The third assignment does the same as the second assignment, the difference is
+that the value at the right is obtained from a function call. The origin of
+the value is however irrelevant to the assignment statement.</p>
+</div>
+<div class="paragraph">
+<p>To demonstrate the order of evaluation, the following assignment, under the
+assumption that variable <code>x</code> holds value 3:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">x, xs[x-1] = 7, x+2;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The assignment first computes all values at the right. Since there are more
+than one expression, they are combined into a tuple:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">x, xs[x-1] = (7, 5);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Next, the addressable values are calculated:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">x, xs[2] = (7, 5);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Finally the values are assigned, <code>x</code> gets a new value 7, while the third
+element of <code>xs</code> gets the value of expression <code>x+2</code>.</p>
+</div>
+<div class="paragraph">
+<p>The expressions at the right as well as the expressions to select elements in
+lists and dictionaries are always evaluated using values from before the
+assignment.</p>
+</div>
+<div class="paragraph">
+<p>It is forbidden to assign the same variable or selected element more than
+once:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">x, x = 3, 3         # Error, assigned 'x' twice.
+xs[0], xs[1] = 0, 1 # Allowed, different selected elements.
+xs[0], xs[x] = 0, 1 # Allowed if x != 0 .</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-iterative-statements">Iterative statements</h4>
+<div class="paragraph">
+<p>The iterative statements are</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/iterative_statement.png" alt="iterative statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The Chi language has two statements for repeatedly executing a body (a
+sequence of statements), a <code>while</code> statement and a <code>for</code> statement.
+The former is the generic iterative statement, the latter simplifies the
+common case of iterating over a collection of values.</p>
+</div>
+<div class="paragraph">
+<p>The <code>break</code> and <code>continue</code> statements change the flow of control in the
+iterative statements.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="ref-while-loop-statement">While loop statement</h5>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/while_statement.png" alt="while statement">
+</div>
+</div>
+<div class="paragraph">
+<p>A while loop starts with the keyword <code>while</code> with a boolean condition.
+Between the colon and the <code>end</code> keyword, the body of statements is given,
+which is executed repeatedly.</p>
+</div>
+<div class="paragraph">
+<p>Executing an iterative <code>while</code> statement starts with evaluating the boolean
+condition. If it does not hold, the <code>while</code> statement ends (and execution
+continues with the statement following the while statement). If the condition
+holds, the statements in the body are executed from start to end (unless a
+<code>break</code> or <code>continue</code> statement is executed, as explained below).
+After the last statement has been executed, the <code>while</code> statement starts
+again from the beginning, by evaluating the boolean condition again.</p>
+</div>
+<div class="paragraph">
+<p>As an example, consider the following code:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">int s, i;
+
+while i &lt; 10:
+    s = s + i
+    i = i + 1
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>At first, the <code>i &lt; 10</code> condition holds, and the body of the <code>while</code>
+statement (two assignment statements) is executed.
+After the body has finished, <code>i</code> has been incremented, but is still less
+than <code>10</code>. The condition again holds, and the body is again executed, etc.
+This process continues, until the final statement of the body increments <code>i</code>
+to <code>10</code>. The condition does not hold, and execution of the <code>while</code>
+statement ends.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-for-loop-statement">For loop statement</h5>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/for_statement.png" alt="for statement">
+</div>
+</div>
+<div class="paragraph">
+<p>A common case for iterating is to execute some statements for every value in a
+collection, for example a list:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list int xs;
+int x;
+int i;
+
+while i &lt; size(xs):
+    x = xs[i]
+    ...
+    i = i + 1
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>where the <code>...</code> line represents the statements that should be executed for
+each value <code>x</code> of the list. This is a very common case. Chi has a special
+statement for it, the <code>for</code> statement. It looks like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list int xs;
+
+for x in xs:
+    ...
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This code performs the same operation, the statements represented with <code>...</code>
+are executed for each value <code>x</code> from list <code>xs</code>, but it is shorter and
+easier to write.
+The advantages are mainly a reduction in the amount of code that must be
+written.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>No need to create and update the temporary index variable <code>i</code>.</p>
+</li>
+<li>
+<p>Variable <code>x</code> is declared implicitly, no need to write a full variable
+declaration for it.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The behavior is slightly different in some circumstances.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>There is no index variable <code>i</code> that can be accessed afterwards.</p>
+</li>
+<li>
+<p>When the <code>...</code> statements modify the source variable (<code>xs</code> in the
+example), the <code>while</code> statement above uses the changed value. The <code>for</code>
+statement continues to use the original value of the source variable.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Continuing use of the original source value can be an advantage or a
+disadvantage, depending on the case. Using the new value gives more
+flexibility, keeping the old value makes the <code>for</code> statement more
+predictable, for example indices in the source variable stay valid.</p>
+</div>
+<div class="paragraph">
+<p>Besides iterating over a list with <code>for</code>, you can also iterate over element
+values of a set, or over key-value tuples of a dictionary, for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">dict(int:int) d = {1:10, 2:20};
+
+for k, v in d:
+    writeln("%s: %s", k, v);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>When iterating over a set or a dictionary, the order of the elements is
+undefined. In the above example, the first pair is either <code>(1, 10)</code> or
+<code>(2, 20)</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-break-statement">Break statement</h5>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/break_statement.png" alt="break statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>break</code> statement may only be used inside the body of a loop statement.
+When executed, the inner-most loop statement ends immediately, and execution
+continues with the first statement after the inner-most loop statement.
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi"># Get a slice of the xs list, up-to the position of value x in the list
+func get_until(list int xs, int x):
+    int index;
+
+    while index &lt; size(xs):
+        if xs[index] == x:
+            break
+        end;
+        index = index + 1
+    end
+    return xs[:index]
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In the example, elements of the list <code>xs</code> are inspected until an element
+with a value equal to <code>x</code> is found. At that point, the loop ends with the
+<code>break</code> statement, and the function returns a slice of the list.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-continue-statement">Continue statement</h5>
+<div class="paragraph">
+<p>Another common case when executing the body of an inner-most loop is that the
+remaining statements of the body should be skipped this time. It can be
+expressed with an <code>if</code> statement, but a <code>continue</code> statement is often
+easier.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/continue_statement.png" alt="continue statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The syntax of the continue statement is just <code>continue</code>.
+An example to demonstrate its operation:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">int s;
+
+for x in xs:
+    if x mod 5 == 0:
+        continue
+    end
+    s = s + x
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>for</code> statement iterates over every value in list <code>xs</code>. When the value
+is a multiple of 5 (expressed by the condition <code>x mod 5 == 0</code>), the
+<code>continue</code> is executed, which skips the remaining statements of the body of
+the <code>for</code> statement, namely the <code>s = s + x</code> assignment. The result is that
+after executing the <code>for</code> statement, variable <code>s</code> contains the sum of all
+values of the list that are not a multiple of 5.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-choice-statement">Choice statement</h4>
+<div class="paragraph">
+<p>The choice statement, also known as 'if statement', selects one alternative
+from a list based on the current value of a boolean expression. The
+alternatives are tried in turn, until a boolean expression one an alternative
+yields true. The statements of that alternative are executed, and the choice
+statement ends. The choice statement also ends when all boolean expressions
+yield false. The boolean expression of the <code>else</code> alternative always holds.</p>
+</div>
+<div class="paragraph">
+<p>The syntax of the choice statement is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/choice_statement.png" alt="choice statement">
+</div>
+</div>
+<div class="paragraph">
+<p>Processing starts with evaluating the <code>BooleanExpression</code> behind the <code>if</code>.
+If it evaluates to <code>true</code>, the statements behind it are executed, and the
+choice statement ends.</p>
+</div>
+<div class="paragraph">
+<p>If the boolean expression behind the <code>if</code> does not hold, the sequence
+<code>elif</code> alternatives is tried. Starting from the first one, each boolean
+expression is evaluated. If it holds, the statements of that alternative are
+performed, and the choice statement ends. If the boolean expression does not
+hold, the next <code>elif</code> alternative is tried.</p>
+</div>
+<div class="paragraph">
+<p>When there are no <code>elif</code> alternatives or when all boolean expressions of
+the <code>elif</code> alternatives do not hold, and there is an <code>else</code> alternative,
+the statements behind the <code>else</code> are executed and the choice statement ends.
+If there is no <code>else</code> alternative, the choice statement ends without
+choosing any alternative.</p>
+</div>
+<div class="paragraph">
+<p>An example with just one alternative:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">if x == 1:
+    x = 2
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>which tests for <code>x == 1</code>. If it holds, <code>x = 2</code> is performed, else no
+alternative is chosen.</p>
+</div>
+<div class="paragraph">
+<p>An longer example with several alternatives:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">if x == 1:
+     y = 5
+elif x == 2:
+    y = 6; x = 6
+else:
+    y = 7
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This choice statement first tests whether <code>x</code> is equal to <code>1</code>. If it is,
+the <code>y = 5</code> statement is executed, and the choice statement finishes. If the
+first test fails, the test <code>x == 2</code> is computed. If it holds, the statements
+<code>y = 6; x = 6</code> are performed, and the choice statement ends. If the second
+test also fails, the <code>y = 7</code> statement is performed.</p>
+</div>
+<div class="paragraph">
+<p>The essential points of this statement are</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The choice is computed now, you cannot wait for a condition to become true.</p>
+</li>
+<li>
+<p>Each alternative is tried from the top down, until the first expression
+that yields true.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The second point also implies that for an alternative to be chosen, the
+boolean expressions of all previous alternatives have to yield false.</p>
+</div>
+<div class="paragraph">
+<p>In the above example, while executing the <code>y = 7</code> alternative, you
+know that <code>x</code> is neither <code>1</code> nor <code>2</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-sub-process-statements">Sub-process statements</h4>
+<div class="paragraph">
+<p>The sub-process statements deal with creating and managing of new processes.
+The statement may only be used in <a href="#ref-process-definitions">Process definitions</a> and
+<a href="#ref-model-definitions">Model definitions</a>.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/subprocess_statement.png" alt="subprocess statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>RunStartStatement</code> block creates new processes (see
+<a href="#ref-run-and-start-statements">Run and start statements</a> for details), while the <code>FinishStatement</code>
+waits for a process to end (further explanation at <a href="#ref-finish-statement">Finish statement</a>).</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+<div class="sect4">
+<h5 id="ref-run-and-start-statements">Run and start statements</h5>
+<div class="paragraph">
+<p>The <code>run</code> and <code>start</code> commands take a sequence of process instance as
+their argument.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/run_start.png" alt="run start">
+</div>
+</div>
+<div class="paragraph">
+<p>Both statements start all instances listed in the sequence. The <code>start</code>
+statement ends directly after starting the processes, while the <code>run</code>
+statement waits until all the started instances have ended.
+Using <code>run</code> is generally recommended for creating new processes.</p>
+</div>
+<div class="paragraph">
+<p>
+
+A process instance has the following syntax.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/process_instance.png" alt="process instance">
+</div>
+</div>
+<div class="paragraph">
+<p>The elementary process instance is created using Path 1. It consists of a
+process name (which must be one of the names of the
+<a href="#ref-process-definitions">Process definitions</a>), followed by a sequence of actual parameters
+for the process between parentheses. The number of actual parameters and their
+types must match pair-wise with the number and type of the formal parameters
+of the referenced process definition.
+Channel directions of the formal parameters must be a sub-set of the channel
+directions of the actual parameters.</p>
+</div>
+<div class="paragraph">
+<p>The optional assignment of the process to a process variable (which must be of
+type <code>inst</code>, see <a href="#ref-inst-type">Instance type</a>) allows for checking whether the
+started process has ended, or for waiting on that condition in a <code>select</code>
+statement (explained in <a href="#ref-select-statement">Select statement</a>), or with a <code>finish</code>
+statement (explained in <a href="#ref-finish-statement">Finish statement</a>).</p>
+</div>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">chan c;
+inst p, q;
+
+run P(18, c), Q(19, c);
+start p = P(18, c), q = Q(19, c);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>First two processes are completely run, namely the instances <code>P(18, c)</code>, and
+<code>Q(19, c)</code>. When both have ended, the <code>start</code> statement is executed, which
+starts the same processes, and assigned the <code>P</code> process instance to instance
+variable <code>p</code> and the <code>Q</code> process instance to variable <code>q</code>. After
+starting the processes, the <code>start</code> ends. Unless one of started processes
+has already ended, in the statement following the <code>start</code>, three processes
+are running, namely the process that executed the start statement, and the two
+started process instances referenced by variables <code>p</code> and <code>q</code>. (There may
+be more processes of course, created either before the above statements were
+executed, or the <code>P</code> or <code>Q</code> process may have created more processes.)</p>
+</div>
+<div class="paragraph">
+<p>Path 2 of the <code>ProcessInstance</code> diagram is used to construct many new
+processes by means of an <code>unwind</code> loop.
+Each value in the <code>Expression</code> gets assigned to the iterator variable
+sequence of <code>VariableName</code> blocks (and this may be done several times as the
+syntax supports several <code>Expression</code> loops). For each combination of
+assignments, the process instances behind the colon are created. The <code>end</code>
+keyword denotes the end of the <code>unwind</code>.</p>
+</div>
+<div class="paragraph">
+<p>Typical use of <code>unwind</code> is to start many similar processes, for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list int xs = [1, 2]
+
+run
+    unwind i in range(5),
+           j in range(3),
+           x in xs: P(i, j, x)
+    end;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This <code>run</code> statement runs 5*3*2 processes: <code>P(0, 0, 1)</code>,
+<code>P(0, 0, 2)</code>, <code>P(0, 1, 1)</code>, &#8230;&#8203;, <code>P(0, 2, 2)</code>, <code>P(1, 0, 1)</code>, &#8230;&#8203;,
+<code>P(4, 2, 2)</code>.</p>
+</div>
+<div class="paragraph">
+<p>Both the <code>run</code> and the <code>start</code> statements can always instantiate new
+processes that have no exit type specified.
+(see <a href="#ref-process-definitions">Process definitions</a> for details about exit types in process
+definitions). If the definition containing the sub-process statement has an
+exit type, the statements can also instantiate processes with the same exit
+type.</p>
+</div>
+<div class="paragraph">
+<p>This requirement ensures that all exit statements in a model simulation give
+exit values of the same type.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-finish-statement">Finish statement</h5>
+<div class="paragraph">
+<p>The <code>finish</code> statement allows waiting for the end of a process instance.
+The statement may only be used in <a href="#ref-process-definitions">Process definitions</a> and
+<a href="#ref-model-definitions">Model definitions</a>.
+Its syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/finish_statement.png" alt="finish statement">
+</div>
+</div>
+<div class="paragraph">
+<p>Each process variable must be of type <code>inst</code> (see <a href="#ref-inst-type">Instance type</a> for
+details). The statement ends when all referenced process instances have ended.
+For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">chan bool c;
+inst p, q;
+
+start p = P(18, c), q = Q(19, c);
+finish p, q;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>During the <code>start</code> statement (see <a href="#ref-run-and-start-statements">Run and start statements</a>), instance
+variables <code>p</code> and <code>q</code> get a process instance assigned (this may also
+happen in different <code>start</code> statements).
+The <code>finish</code> statement waits until both process instances have ended.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-communication-statements">Communication statements</h4>
+<div class="paragraph">
+<p>Communication with another process is the only means to forward information
+from one process to another processes, making it the primary means to create
+co-operating processes in the modeled system.
+The statement may only be used in <a href="#ref-process-definitions">Process definitions</a> and
+<a href="#ref-model-definitions">Model definitions</a>.</p>
+</div>
+<div class="paragraph">
+<p>All communication is point-to-point (from one sender to one receiver) and
+synchronous (send and receive occur together). A communication often exchanges
+a message (a value), but communication without exchange of data is also
+possible (like waving 'hi' to someone else, the information being sent is 'I
+am here', but that information is already implied by the communication itself).
+The latter form of communication is called <em>synchronization</em>.</p>
+</div>
+<div class="paragraph">
+<p>Send and receive does not specify the remote process directly, instead a
+channel is used (see <a href="#ref-channel-type">Channel type</a> and <a href="#ref-channel-expression">Channel expressions</a>
+sections for more informations about channels and how to create them).
+Using a channel increases flexibility, the same channel can be used by several
+processes (allowing communication with one of them). Channels can also be
+created and exchanged during execution, for even more flexibility.</p>
+</div>
+<div class="paragraph">
+<p>Setting up a communication channel between two processes is often done in the
+following way:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">chan void sync;   # Synchronization channel
+chan int  dch;    # Channel with integer number messages
+
+run P(sync, dch), Q(sync, dch);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In a parent process, two channels are created, a synchronization channel
+<code>sync</code>, and a communication channel with data called <code>dch</code>. The channel
+values are given to processes <code>P</code> and <code>Q</code> through their formal parameters.</p>
+</div>
+<div class="paragraph">
+<p>The communication statements are</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/communication_statement.png" alt="communication statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The elementary communication statements for sending and receiving at a single
+channel are the <a href="#ref-send-statement">Send statement</a> and the <a href="#ref-receive-statement">Receive statement</a>.
+The <a href="#ref-select-statement">Select statement</a> is used for monitoring several channels and
+conditions at the same time, until at least one of them becomes available.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="ref-send-statement">Send statement</h5>
+<div class="paragraph">
+<p>The send statement send signals or data away through a channel.
+The statement may only be used in <a href="#ref-process-definitions">Process definitions</a> and
+<a href="#ref-model-definitions">Model definitions</a>.
+It has the following syntax:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/send_statement.png" alt="send statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The statement takes a channel value (derived from
+<code>ChannelExpression</code>), and waits until another process can receive on the
+same channel. When that happens, and the channel is a synchronization channel,
+a signal 'Communication has occurred' is being sent, if the channel also
+carries data, the <code>Expression</code> value is computed and sent to the other
+process.
+For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc P(chan void a, chan! int b):
+    a!;
+    b!21;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Process <code>P</code> takes two parameters, a synchronization channel locally called
+<code>a</code> and a outgoing channel called <code>b</code> carrying integer values.
+In the process body, it first synchronizes over the channel stored in <code>a</code>,
+and then sends the value <code>21</code> of the channel stored in <code>b</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-receive-statement">Receive statement</h5>
+<div class="paragraph">
+<p>The receive statement receives signals or data from a channel.
+The statement may only be used in <a href="#ref-process-definitions">Process definitions</a> and
+<a href="#ref-model-definitions">Model definitions</a>.
+It has the following syntax:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/receive_statement.png" alt="receive statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The statement takes a channel value (derived from the <code>ChannelExpression</code>),
+and waits until another process can send on the same channel. For
+synchronization channels, it receives just a signal that the communication has
+occurred, for channels carrying data, the data value is received and stored in
+the variable indicated by <code>Addressable</code>.
+For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc Q(chan void a, chan int b):
+    int x;
+
+    a?;
+    b?x;
+    writeln("%s", x);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Process <code>Q</code> takes a synchronization channel called <code>a</code> and a data channel
+for integer values called <code>b</code> as parameters.
+The process first waits for a synchronization over channel <code>a</code>, and then
+waits for receiving an integer value over channel <code>b</code> which is stored in
+local variable <code>x</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-select-statement">Select statement</h5>
+<div class="paragraph">
+<p>The <a href="#ref-send-statement">Send statement</a> and the <a href="#ref-receive-statement">Receive statement</a> wait for
+communication over a single channel. In some cases, it is unknown which
+channel will be ready first. Additionally, there may be time-dependent
+internal activities that must be monitored as well.
+The select statement is the general purpose solution for such cases.
+The statement may only be used in <a href="#ref-process-definitions">Process definitions</a> and
+<a href="#ref-model-definitions">Model definitions</a>.</p>
+</div>
+<div class="paragraph">
+<p>Its syntax is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/select_statement.png" alt="select statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The statement has one or more <code>SelectCondition</code> alternatives that are all
+monitored. The first alternative is prefixed with <code>select</code> to denote it is a
+the start of a select statement, the other alternatives each start with
+<code>alt</code> (which is an abbreviation of 'alternative').</p>
+</div>
+<div class="paragraph">
+<p>The statement monitors all conditions simultaneously, waiting for at least one
+to become possible. At that moment, one of the conditions is selected to be
+executed, and the select statement ends.</p>
+</div>
+<div class="paragraph">
+<p>The syntax of a <code>SelectCondition</code> is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/select_condition.png" alt="select condition">
+</div>
+</div>
+<div class="paragraph">
+<p>In its simplest form, a <code>SelectCondition</code> is a <code>SelectAlternative</code> (taking
+Path 1). At Path 2, the condition is eventually also an <code>SelectAlternative</code>,
+but prefixed with an <code>unwind</code> construct, and with an additional <code>end</code>
+keyword at the end to terminate the unwind.</p>
+</div>
+<div class="paragraph">
+<p>The unwind construct allows for a compact notation of a large number of
+alternatives that must be monitored. Examples are provided below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/select_alternative.png" alt="select alternative">
+</div>
+</div>
+<div class="paragraph">
+<p>Using Path 1, a <code>SelectAlternative</code> can be a <a href="#ref-send-statement">Send statement</a> or a
+<a href="#ref-receive-statement">Receive statement</a>, which may optionally have a
+<code>BooleanExpression</code> condition prefix. Path 2 allows for a condition without
+a send or receive statement.</p>
+</div>
+<div class="paragraph">
+<p>The alternative checks the condition and monitors the channel. If the
+condition holds <em>and</em> the channel has a communication partner, the alternative
+can be chosen by the select statement. (Of course, omitting a condition skips
+the check, and not specifying a send or receive statement skips monitoring of
+the channel.)
+When an alternative is chosen by the select statement, the send or receive
+statement are performed (if it was present). If additional statements were
+given in the alternative using Path 3, they are executed after the
+communication has occurred (if a send or receive was present).</p>
+</div>
+<div class="paragraph">
+<p>A few examples to demonstrate use of the select statement:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">timer t = timer(5.2);
+
+select
+    a?
+alt
+    b!7:
+        writeln("7 sent")
+alt
+    ready(t):
+        writeln("done")
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This select waits until it can receive a signal from channel <code>a</code>, it can
+send value <code>7</code> over channel <code>b</code>, or until <code>ready(t)</code> holds (which
+happens <code>5.2</code> time units after starting the <code>select</code>, see
+<a href="#tut-using-timers">Timers</a> for details). If <code>b!7</code> was selected, the
+<code>writeln("7 sent")</code> is executed after the communication over channel <code>b</code>.
+If the <code>ready(t)</code> alternative is chosen, the <code>writeln("done")</code> is
+executed.</p>
+</div>
+<div class="paragraph">
+<p>A buffer can be specified with:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list int xs;
+int x;
+
+select
+    a?x:
+        xs = xs + [x]
+alt
+    not empty(xs), b!xs[0]:
+        xs = xs[1:]
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The select either receives a value through channel <code>a</code>, or it sends the
+first element of list <code>xs</code> over channel <code>b</code> if the list is not empty (the
+condition must hold and the channel must be able to send an item at the same
+time to select the second alternative).</p>
+</div>
+<div class="paragraph">
+<p>After communication has been performed, the first alternative appends the
+newly received value <code>x</code> to the list (the received value is stored in <code>x</code>
+before the assignment is executed). In the second alternative, the assignment
+statement drops the first element of the list (which just got sent away over
+channel <code>b</code>).</p>
+</div>
+<div class="paragraph">
+<p>The <code>unwind</code> loop 'unwinds' alternatives, for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list(5) chan int cs;
+int x;
+
+select
+    unwind i, c in enumerate(cs):
+        c?x:
+            writeln("Received %s from channel number %d", x, i)
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here <code>cs</code> is a list  of channels, for example <code>list(5) chan int cs</code>. (See
+<a href="#ref-list-type">List type</a> for details about lists.) The <code>unwind</code> iterates over
+the <code>enumerate(cs)</code> (see <a href="#ref-list-expression">List expressions</a> for details about
+<code>enumerate</code>), assigning the index and the channel to local <code>i</code> and <code>c</code>
+variables. The <code>SelectAlternative</code> uses the variables to express the actions
+to perform (wait for a receive, and output some text saying that a value has
+been received).</p>
+</div>
+<div class="paragraph">
+<p>The above is equivalent to (if list <code>cs</code> has length 5):</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">select
+    cs[0]?x:
+        writeln("Received %s from channel number %d", x, 0)
+alt
+    cs[1]?x:
+        writeln("Received %s from channel number %d", x, 1)
+
+...
+
+alt
+    cs[4]?x:
+        writeln("Received %s from channel number %d", x, 4)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>unwind</code> however works for any length of list <code>cs</code>. In addition, the
+<code>unwind</code> allows for nested loops to unfold for example
+<code>list list bool ds</code>, or to send one of several values over one of several
+channels.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-other-statements">Other statements</h4>
+<div class="paragraph">
+<p>Finally, there are a number of other useful statements.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/other_statements.png" alt="other statements">
+</div>
+</div>
+<div class="paragraph">
+<p>The <a href="#ref-delay-statement">Delay statement</a> waits for the given amount of time units,
+the <a href="#ref-write-statement">Write statement</a> outputs text to the screen or a file,
+the <a href="#ref-close-statement">Close statement</a> closes a file,
+the <a href="#ref-return-statement">Return statement</a> returns a value from a function.
+the <a href="#ref-exit-statement">Exit statement</a> ends the execution of all processes, and
+the <a href="#ref-pass-statement">Pass statement</a> does nothing.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="ref-delay-statement">Delay statement</h5>
+<div class="paragraph">
+<p>The <code>delay</code> statement is useful to wait some time.
+The statement may only be used in <a href="#ref-process-definitions">Process definitions</a> and
+<a href="#ref-model-definitions">Model definitions</a>.
+Its syntax is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/delay_statement.png" alt="delay statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>IntegerExpression</code> or <code>RealExpression</code> is evaluated, and is the
+amount of time that the
+statement waits. The value of the expression is computed only at the start, it
+is not evaluated while waiting. Changes in its value has thus no effect.
+A negative value ends the statement immediately, you cannot go back in time.</p>
+</div>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">delay 1.5   # Delay for 1.5 time units.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-write-statement">Write statement</h5>
+<div class="paragraph">
+<p>The write statement is used to output text to the screen or to a file.
+Its syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/write_statement.png" alt="write statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The <em>format string</em> at 2 is a literal string value (further explained at
+<a href="#ref-string-expression">String expressions</a>) which defines what gets written.
+Its text is copied to the output, except for two types of patterns which are
+replaced before being copied. Use of the <code>writeln</code> (write line) keyword
+causes an additional <code>\n</code> to be written afterwards.</p>
+</div>
+<div class="paragraph">
+<p>The first group of pattern are the back-slash patterns. They all start with
+the <code>\</code> character, followed by another character that defines the character
+written to the output. The back-slash patterns are listed in the table below.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Pattern</th>
+<th class="tableblock halign-left valign-top">Replaced by</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>\n</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The new-line character (U+000A)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>\t</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The tab character (U+0009)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>\"</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The double-quote character (U+0022)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>\\</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The back-slash character (U+005C)</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The second group of patterns are the percent patterns. Each percent pattern
+starts with a <code>%</code> character. It is (normally) replaced by the (formatted)
+value of a corresponding expression listed after the format string (the first
+expression is used as replacement for the first percent pattern, the second
+expression for the second pattern, etc). How the value is formatted depends on
+the <em>format specifier</em>, the first letter after the percent character. Between
+the percent character and the format specifier may be a <em>format definition</em>
+giving control on how the value is output.</p>
+</div>
+<div class="paragraph">
+<p>The format definition consists of five parts, each part is optional.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>A <code>-</code> character, denoting alignment of the value to the left. Cannot be
+combined with a <code>0</code>, and needs a <em>width</em>.</p>
+</li>
+<li>
+<p>A <code>+</code> character, denoting the value with always be printed with a sign,
+only for formatting decimal integers, and real numbers.</p>
+</li>
+<li>
+<p>A <code>0</code> character, denoting the value will be prefixed with zeros, only for
+integer numbers. Cannot be combined with <code>-</code>, and needs a <em>width</em>.</p>
+</li>
+<li>
+<p>A <em>width</em> as decimal number, denoting the minimal amount of space used for
+the value. The value will be padded with space (or zeros if the <code>0</code> part
+has been specified).</p>
+</li>
+<li>
+<p>A <code>.</code> and a <em>precision</em> as decimal number, denoting the number of digits
+to use for the fraction, only for real numbers.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The format definition is a single letter, the table below lists them and their
+function.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Definition</th>
+<th class="tableblock halign-left valign-top">Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output boolean value.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>d</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output integer value as decimal number.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x</code>, <code>X</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output integer value as hexadecimal number.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>f</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output real value as number with a fraction.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>e</code>, <code>E</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output real value in exponential notation.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>g</code>, <code>G</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output real value either as <code>f</code> or as <code>e</code> (<code>E</code>) depending on the value</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>s</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output value as a string (works for every printable value)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>%</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output a <code>%</code> character</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-close-statement">Close statement</h5>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/close_statement.png" alt="close statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>close</code> statement takes a value of type <code>file</code> as argument (see
+<a href="#ref-file-type">File type</a> for details about the file type). It closes the given
+file, which means that the file is no longer available for read or write. In
+case data was previously written to the file, the <code>close</code> statement ensures
+that the data ends up in the file itself.</p>
+</div>
+<div class="paragraph">
+<p>Note that a close of a file is global in the system, none of the processes can
+use the file any longer.</p>
+</div>
+<div class="paragraph">
+<p>In <a href="#tut-reading-from-file">Reading from a file</a> and <a href="#tut-writing-to-file">Writing to a file</a>, use of the
+close statement is shown.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-return-statement">Return statement</h5>
+<div class="paragraph">
+<p>The return statement may only be used in a <a href="#ref-function-definitions">Function definitions</a>.
+Its syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/return_statement.png" alt="return statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The statement starts with a <code>return</code> keyword, followed by one or more
+(comma-separated) expressions that form the value to return to the caller of
+the function.</p>
+</div>
+<div class="paragraph">
+<p>The value of the expressions are calculated, and combined to a single return
+value. The type of the value must match with the return type of the function.
+Execution of the function statements stops (even when inside a loop or in an
+alternative of an <code>if</code> statement), and the computed value is returned to the
+caller of the function.</p>
+</div>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">return 4          # Return integer value 4 to the caller.
+
+return true, 3.7  # Return value of type tuple(bool b; real r).</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-exit-statement">Exit statement</h5>
+<div class="paragraph">
+<p>The <code>exit</code> statement may only be used in <a href="#ref-process-definitions">Process definitions</a> and
+<a href="#ref-model-definitions">Model definitions</a>. Its syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/exit_statement.png" alt="exit statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The exit statement allows for immediately stopping the current model
+simulation. The statement may be used in <a href="#ref-process-definitions">Process definitions</a> and
+<a href="#ref-model-definitions">Model definitions</a>. If arguments are provided, they become the exit
+value of the model simulation. Such values can be processed further in an
+<a href="#tut-experiment">Simulating several scenarios</a>, see also <a href="#ref-xper-definitions">Experiment definitions</a> on how to run a
+model in an experiment.</p>
+</div>
+<div class="paragraph">
+<p>The type of the combined arguments must match with the exit type of the
+process or model that uses the statement. If no arguments are given, the exit
+type must be a <code>void</code> type (see also <a href="#ref-void-type">Void type</a>).</p>
+</div>
+<div class="paragraph">
+<p>If an experiment is running, execution continues by returning from the model
+instantiation call. Otherwise, the simulation as a whole is terminated.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-pass-statement">Pass statement</h5>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/pass_statement.png" alt="pass statement">
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>pass</code> statement does nothing. Its purpose is to act as a place holder
+for a statement at a point where there is nothing useful to do (for example to
+make an empty process), or to
+explicitly state nothing is being done at some point:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">if x == 3:
+    pass
+else:
+    x = x + 1
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, <code>pass</code> is used to explicitly state that nothing is done when <code>x == 3</code>.
+Such cases are often a matter of style, usually it is possible to rewrite
+the code and eliminate the <code>pass</code> statement.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="ref-chapter-expressions">Expressions</h3>
+<div class="paragraph">
+<p>Expressions are computations to obtain a value.
+The generic syntax of an expression is shown below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/generic_expression.png" alt="generic expression">
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>As shown in Path 1, a name may be used in an expression. It must refer to a
+value that can be used in an expression.
+Names are explained further at <a href="#ref-lexical-names">Names</a>.</p>
+<div class="paragraph">
+<p>The first four entries are quite normal, function names can be used for
+variables with a function type (see <a href="#ref-function-type">Function type</a>) and process
+names for variables with a process type (see <a href="#ref-process-type">Process type</a>). The
+latter two are mainly useful as actual parameters of functions or processes.</p>
+</div>
+</li>
+<li>
+<p>Path 2 states that you can write parentheses around an expression. Its main
+use is to force a different order of applying the unary and binary operators
+(see <a href="#ref-operator-priorities">Operator priorities</a>). Parentheses may also be used to
+clarify the meaning of a complicated expression.</p>
+</li>
+<li>
+<p>Path 3 gives access to the other parts of expressions.
+<a href="#ref-typed-expression">Typed expressions</a> gives the details about typed expressions.</p>
+</li>
+</ul>
+</div>
+<div class="sect3">
+<h4 id="ref-typed-expression">Typed expressions</h4>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/typed_expression.png" alt="typed expression">
+</div>
+</div>
+<div class="paragraph">
+<p>The number of operators in expressions is quite large. Also, each node has an
+associated type, and the allowed operators depend heavily on the types of the
+sub-expressions. To make expressions easier to access, they have been split.
+If possible the (result) type is leading, but in some cases (like the
+<code>ReadExpression</code> for example) this is not feasible.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The expressions with a boolean type are denoted by the <code>BooleanExpression</code>
+block and explained further in <a href="#ref-boolean-expression">Boolean expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with an integer type are denoted by the <code>IntegerExpression</code>
+block and explained further in <a href="#ref-integer-expression">Integer expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with a real number type are denoted by the <code>RealExpression</code>
+block and explained further in <a href="#ref-real-expression">Real number expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with a string type are denoted by the <code>StringExpression</code>
+block and explained further in <a href="#ref-string-expression">String expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with a list type are denoted by the <code>ListExpression</code>
+block and explained further in <a href="#ref-string-expression">String expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with a set type are denoted by the <code>SetExpression</code>
+block and explained further in <a href="#ref-set-expression">Set expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with a dictionary type are denoted by the
+<code>DictionaryExpression</code> block and explained further in
+<a href="#ref-dictionary-expression">Dictionary expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with a tuple type are denoted by the <code>TupleExpression</code>
+block and explained further in <a href="#ref-tuple-expression">Tuple expression</a>.</p>
+</li>
+<li>
+<p>The expressions with a file handle type are denoted by the
+<code>FileExpression</code> block and explained further in
+<a href="#ref-file-expression">File handle expressions</a>.</p>
+</li>
+<li>
+<p>The function to read values from an external source is shown in the
+<code>ReadExpression</code> block, and further discussed in
+<a href="#ref-read-expression">Read expression</a>.</p>
+</li>
+<li>
+<p>The expressions with a timer type are denoted by the <code>TimerExpression</code>
+block and explained further in <a href="#ref-timer-expression">Timer expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with a channel type are denoted by the <code>ChannelExpression</code>
+block and explained further in <a href="#ref-channel-expression">Channel expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with a distribution type are denoted by the
+<code>DistributionExpression</code> block and explained further
+in <a href="#ref-distribution-expression">Distribution expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with a process type are denoted by the <code>ProcessExpression</code>
+block and explained further in <a href="#ref-process-expression">Process expressions</a>.</p>
+</li>
+<li>
+<p>The expressions with an instance type are denoted by the
+<code>InstanceExpression</code> block and explained further in
+<a href="#ref-instance-expression">Instance expressions</a>.</p>
+</li>
+<li>
+<p>The expressions that convert one type to another are denoted by the
+<code>CastExpression</code> block, and explained further in
+<a href="#ref-cast-expression">Cast expressions</a>.</p>
+</li>
+<li>
+<p>The expressions that perform a function call are denoted by the
+<code>FunctionCallExpression</code> block, and explained further in
+<a href="#ref-functioncall-expression">Function call expressions</a>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-enum-value-expression">Enumeration value</h4>
+<div class="paragraph">
+<p>Enumeration values may be used as literal value in an expression</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/enum_value.png" alt="enum value">
+</div>
+</div>
+<div class="paragraph">
+<p>See <a href="#ref-enum-definitions">Enumeration definitions</a> for a discussion about enumeration definitions
+and enumeration values.</p>
+</div>
+<div class="paragraph">
+<p>There are two binary operators for enumeration values.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>lhs</strong></th>
+<th class="tableblock halign-left valign-top">Type <strong>rhs</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>==</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>E</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>E</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for equality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>!=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>E</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>E</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for inequality</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Two enumeration values from the same enumeration definition <strong>E</strong> can be
+compared against each other for equality (or in-equality).
+Example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">enum FlagColours  = {red, white, blue};
+
+...
+
+bool same = (red == white);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-boolean-expression">Boolean expressions</h4>
+<div class="paragraph">
+<p>The literal values for the boolean data type are</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/bool_expression.png" alt="bool expression">
+</div>
+</div>
+<div class="paragraph">
+<p>The values <code>true</code> and <code>false</code> are also the only available values of the
+boolean data type.</p>
+</div>
+<div class="paragraph">
+<p>The <code>not</code> operation is the only boolean unary operator.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>op</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not</code> <strong>op</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>op</strong> value is inverted.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The <code>and</code>, the <code>or</code>, and the equality tests are available for boolean
+values.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>lhs</strong></th>
+<th class="tableblock halign-left valign-top">Type <strong>rhs</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>and</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Both operands hold</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>or</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">At least one operand holds</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>==</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for equality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>!=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for inequality</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-integer-expression">Integer expressions</h4>
+<div class="paragraph">
+<p>The syntax of an integer literal number is (at character level)</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/literal_integer_number.png" alt="literal integer number">
+</div>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+This diagram works at lexical level (at the level of single
+characters), white space or comments are not allowed between elements in this
+diagram.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>An integer number is either <code>0</code>, or a sequence of decimal digits, starting
+with a non-zero digit.</p>
+</div>
+<div class="paragraph">
+<p>There are two unary operators on integer numbers.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>op</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>-</code> <strong>op</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>op</strong> value is negated.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+</code> <strong>op</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>op</strong> value is copied.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>With the unary <code>-</code> operation, the sign of the operand gets toggled. The
+<code>+</code> unary operation simply copies its argument.</p>
+</div>
+<div class="paragraph">
+<p>There are many binary operations for integer numbers, see the table below.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>lhs</strong></th>
+<th class="tableblock halign-left valign-top">Type <strong>rhs</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>+</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Integer addition</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>-</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Integer subtraction</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>*</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Integer multiplication</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>/</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Real division</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>div</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Integer divide operation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>mod</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Modulo operation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>^</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Power operation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&lt;</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for less than</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&lt;=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for less or equal</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>==</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for equality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>!=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for inequality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&gt;=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for bigger or equal</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&gt;</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for bigger than</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The divide operator <code>/</code> and the power operator <code>^</code> always gives a real
+result, integer division is performed with <code>div</code>. The operation always rounds
+down, that is <strong>a</strong> <code>div</code> <strong>b</strong> == <code>floor</code>(<strong>a</strong> <code>/</code> <strong>b</strong>) for all integer
+values <strong>a</strong> and <strong>b</strong>. The <code>mod</code> operation returns the remainder from the
+<code>div</code>, that is <strong>a</strong> <code>mod</code> <strong>b</strong> == <strong>a</strong> - <strong>b</strong> * (<strong>a</strong> <code>div</code> <strong>b</strong>). The
+table below gives examples. For clarity, the sign of the numbers is explicitly
+added everywhere.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Example</th>
+<th class="tableblock halign-left valign-top">Result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+7 div +4</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">+1</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>floor(+7/+4) = floor(+1.75) = +1</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+7 mod +4</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">+3</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+7 - +4 * (+7 div +4) = +7 - +4 * +1 = +7 - +4 = +3</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+7 div -4</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">-2</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>floor(+7/-4) = floor(-1.75) = -2</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+7 mod -4</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">-1</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+7 - -4 * (+7 div -4) = +7 - -4 * -2 = +7 - +8 = -1</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>-7 div +4</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">-2</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>floor(-7/+4) = floor(-1.75) = -2</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>-7 mod +4</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">+1</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>-7 - +4 * (-7 div +4) = -7 - +4 * -2 = -7 - -8 = +1</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>-7 div -4</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">+1</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>floor(-7/-4) = floor(+1.75) = +1</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>-7 mod -4</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">-3</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>-7 - -4 * (-7 div -4) = -7 - -4 * +1 = -7 - -4 = -3</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The Chi simulator uses 32 bit integer variables, which means that only values
+from -2,147,483,647 to 2,147,483,647 (with an inclusive upper bound) can be
+used. Using a value outside the valid range will yield invalid results.
+Sometimes such values are detected and reported.</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+The technical minimum value for integers is -2,147,483,648, but this
+number cannot be entered as literal value due to parser limitations.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-real-expression">Real number expressions</h4>
+<div class="paragraph">
+<p>Real numbers are an important means to express values in the contiguous domain.
+The type of a real number expression is a <code>real</code> type, see
+<a href="#ref-real-type">Real type</a> for more information about the type.
+The syntax of real number values is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/real_number_values.png" alt="real number values">
+</div>
+</div>
+<div class="paragraph">
+<p>There are two ways to construct real numbers, by writing a literal real
+number, or by using <code>time</code> which returns the current time in the model.</p>
+</div>
+<div class="paragraph">
+<p>The syntax of a literal real number (at character level) is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/lexical_real_number.png" alt="lexical real number">
+</div>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+This diagram works at lexical level (at the level of single
+characters), white space or comments are not allowed between elements in this
+diagram.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>A literal real number starts with one or more digits, and then either a dot or
+an exponent. In the former case, an exponent is allowed as well. Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">3.14
+0.314e1
+314E-2</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A real number <strong>always</strong> has either a dot character, or an exponent notation in
+the number.</p>
+</div>
+<div class="paragraph">
+<p>Many of the integer operations can also be performed on real numbers. The unary
+operators are the same, except for the type of the argument.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>op</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>-</code> <strong>op</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>op</strong> value is negated.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+</code> <strong>op</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>op</strong> value is copied.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>With the unary <code>-</code> operation, the sign of the operand gets toggled. The
+<code>+</code> unary operation simply copies its argument.</p>
+</div>
+<div class="paragraph">
+<p>The binary operators on real numbers is almost the same as the binary operators
+on integer numbers. Only the <code>div</code> and <code>mod</code> operations are not here.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>lhs</strong></th>
+<th class="tableblock halign-left valign-top">Type <strong>rhs</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>+</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Addition</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>-</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Subtraction</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>*</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Multiplication</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>/</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Real division</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>^</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Power operation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&lt;</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for less than</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&lt;=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for less or equal</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>==</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for equality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>!=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for inequality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&gt;=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for bigger or equal</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&gt;</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int,real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for bigger than</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>With these operations, one of the operands has to be a real number value,
+while the other operand can be either an integer value or a real number value.</p>
+</div>
+<div class="paragraph">
+<p>The standard library functions for real numbers contain a lot of math
+functions. They can be found in <a href="#ref-real-stdlib">Real number functions</a>.</p>
+</div>
+<div class="paragraph">
+<p>The Chi simulator uses <a href="http://en.wikipedia.org/wiki/IEEE_floating_point">64-bit IEEE 754 floating point</a>
+numbers to represent real
+number values. Using a value outside the valid range of this format will yield
+invalid results. Sometimes such values are detected and reported.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-string-expression">String expressions</h4>
+<div class="paragraph">
+<p>Strings are sequences of characters. Their most frequent use is to construct
+text to output to the screen. A string literal is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/lexical_string_literal.png" alt="lexical string literal">
+</div>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+This diagram works at lexical level (at the level of single
+characters), white space or comments are not allowed between elements in this
+diagram.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>A string literal starts with a quote character <code>"</code>, and ends with another
+quote character. In between, you may have a sequence of characters. Most
+characters can be written literally (eg write a <code>a</code> to get an 'a' in the
+string). The exceptions are a backslash <code>\</code>, a quote <code>"</code>, a TAB, and a NL
+(newline) character. For those characters, write a backslash, followed by
+<code>\</code>, <code>"</code>, <code>t</code>, or <code>n</code> respectively. (A TAB character moves the cursor
+to the next multiple of 8 positions at a line, a NL moves the cursor to the
+start of the next line.)</p>
+</div>
+<div class="paragraph">
+<p>Strings have the following binary expressions.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>lhs</strong></th>
+<th class="tableblock halign-left valign-top">Type <strong>rhs</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>+</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Concatenation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>[</code> <strong>rhs</strong> <code>]</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Element access</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>[</code> <strong>low</strong> <code>:</code> <strong>high</strong> <code>]</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int, int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Slicing with step <code>1</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>[</code> <strong>low</strong> <code>:</code> <strong>high</strong> <code>:</code> <strong>step</strong> <code>]</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int, int, int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Slicing</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&lt;</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for less than</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&lt;=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for less or equal</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>==</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for equality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>!=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for inequality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&gt;=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for bigger or equal</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>&gt;</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for bigger than</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The <strong>concatenation</strong> operator joins two strings (<code>"a" + "bc"</code> gives <code>"abc"</code>).</p>
+</div>
+<div class="paragraph">
+<p>The <strong>element access</strong> and <strong>slicing</strong> operators use numeric indices to denote a
+character in the string. First character has index value <code>0</code>, second
+character has index <code>1</code>, and so on. Negative indices count from the back of
+the string, for example index value <code>-1</code> points to the last character of a
+string.
+Unlike lists, both the <strong>element access</strong> and the <strong>slicing</strong> operators return a
+string. The former constructs a string with only the indicated character,
+while the latter constructs a sub-string where the first character is at index
+<strong>low</strong>, the second character at index <strong>low</strong> + <strong>step</strong>, and so on, until
+index value <strong>high</strong> is reached or crossed. That final character is not included
+in the result (that it, the <strong>high</strong> boundary is excluded from the result).
+If <strong>low</strong> is omitted, it is 0, if <strong>high</strong> is omitted, it is the length of the
+string (<code>size(</code> <strong>lhs</strong> <code>)</code>). If <strong>step</strong> is omitted, it is <code>1</code>.
+A few examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">string s = "abcdef";
+
+s[4]        # results in "e"
+s[2:4]      # results in "cd"
+s[1::2]     # results in "bdf"
+s[-1:0:-2]  # results in "fdb"
+s[-1:-7:-1] # results in "fedcba"
+s[:4]       # results in "abcd"
+s[-1:]      # results in "f" (from the last character to the end)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In the comparison operations, strings use lexicographical order.</p>
+</div>
+<div class="paragraph">
+<p>There are also a few standard library functions on strings, see
+<a href="#ref-string-stdlib">String functions</a> for details.</p>
+</div>
+<div class="paragraph">
+<p>Note that length of the string is not the same as the number of characters
+needed for writing the string literal:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">size("a")  # results in 1, string is 1 character long (namely 'a').
+size("\n") # results in 1, string contains one NL character.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-list-expression">List expressions</h4>
+<div class="paragraph">
+<p>Lists are very versatile data structures, the Chi language has a large number
+of operations and functions for them.</p>
+</div>
+<div class="paragraph">
+<p>The most elementary list expression is a literal list. It has the following
+syntax.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/literal_list.png" alt="literal list">
+</div>
+</div>
+<div class="paragraph">
+<p>The first line shows the syntax of an empty list. The <code>Type</code> block denotes
+the element type of the list, for example <code>&lt;int&gt;[]</code> is an empty list of
+integer values.</p>
+</div>
+<div class="paragraph">
+<p>The second line shows how to write a non-empty literal list value. It is a
+comma-separated sequence of expressions surrounded by square brackets.
+The type of all expressions must be the same, and this is also the element type
+of the list.</p>
+</div>
+<div class="paragraph">
+<p>Some examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list int xs;
+list int ys = &lt;int&gt;[];
+list int zs = [1, 4, 28];</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>ys</code> is assigned an empty list with integer element type.
+Since an empty list is the default value of a variable, <code>xs</code> has the same
+value. Variable <code>zs</code> is initialized with a list holding three elements.</p>
+</div>
+<div class="paragraph">
+<p>Two list values are equal when they have the same number of element values,
+and each value is pair-wise equal.</p>
+</div>
+<div class="paragraph">
+<p>Lists have no unary operators, the binary operators of lists are</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>lhs</strong></th>
+<th class="tableblock halign-left valign-top">Type <strong>rhs</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>[</code> <strong>rhs</strong> <code>]</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Element access</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>[</code> <strong>low</strong> <code>:</code> <strong>high</strong> <code>]</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int, int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Slicing with step <code>1</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>[</code> <strong>low</strong> <code>:</code> <strong>high</strong> <code>:</code> <strong>step</strong> <code>]</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int, int, int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Slicing</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>+</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Concatenation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>-</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">List subtraction</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>==</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for equality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>!=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for inequality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>in</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Element test</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The <strong>element access</strong> operator '<strong>lhs</strong> <code>[</code> <strong>rhs</strong> <code>]</code> ' indexes with
+zero-based positions, for example <code>xs[0]</code>
+retrieves the first element value, <code>xs[1]</code> retrieves the second value, etc.
+Negative indices count from the back of the list, <code>xs[-1]</code> retrieves the last
+element of the list (that is, <code>xs[size(xs)-1]</code>), <code>xs[-2]</code> gets the second
+to last element, ect. It is not allowed to index positions that do not exist.
+Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list int xs = [4, 7, 18];
+int x;
+
+x = xs[0];  # assigns 4
+x = xs[2];  # assigns 18
+x = xs[-1]; # assigns 18
+x = xs[-2]; # assigns 7
+
+xs[2]  # ERROR, OUT OF BOUNDS
+xs[-4] # ERROR, OUT OF BOUNDS</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <strong>slicing</strong> operator '<strong>lhs</strong> <code>[</code> <strong>low</strong> <code>:</code> <strong>high</strong> <code>]</code> ' extracts
+(sub-)lists from the <strong>lhs</strong> source. The <strong>low</strong> and <strong>high</strong> index expressions may
+be omitted (and default to <code>0</code> respectively <code>size(</code> <strong>lhs</strong> <code>)</code> in that
+case). As with element access, negative indices count from the back of the
+list. The result is the list of values starting at index <strong>low</strong>, and up to but
+not including the index <strong>high</strong>. If the <strong>low</strong> value is higher or equal to
+<strong>high</strong>, the resulting list is empty. For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list int xs = [4, 7, 18];
+list int ys;
+
+ys = xs[0:2];  # assigns [4, 7]
+ys = xs[:2];   # == xs[0:2]
+ys = xs[1:];   # == xs[1:3], assigns [7, 18]
+ys = xs[:];    # == xs[0:3] == xs
+
+ys = xs[1:2];  # assigns [7] (note, it is a list!)
+ys = xs[0:0];  # assigns &lt;int&gt;[]
+ys = xs[2:1];  # assigns &lt;int&gt;[], lower bound too high
+ys = xs[0:-1]; # == xs[0:2]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <strong>slicing</strong> operator with the <strong>step</strong> expression (that is, the expression with
+the form '<strong>lhs</strong> <code>[</code> <strong>low</strong> <code>:</code> <strong>high</strong> <code>:</code> <strong>step</strong> <code>]</code> ') can also
+skip elements (with step values other than <code>1</code>) and traverse lists from back
+to front (with negative step values). Omitting the <strong>step</strong> expression or using
+<code>0</code> as its value, uses the step value <code>1</code>. This extended form does not
+count from the back of the list for negative indices, since the <strong>high</strong> value
+may need to be negative with a negative step size.</p>
+</div>
+<div class="paragraph">
+<p>The first element of the result is at '<strong>lhs</strong> [<strong>low</strong> ]'. The
+second element is at '<strong>lhs</strong> [<strong>low</strong> + <strong>step</strong> ]', the third element at
+'<strong>lhs</strong> [<strong>low</strong> + 2 * <strong>step</strong> ]' and so on. For a positive <strong>step</strong> value,
+the index of the last element is the highest value less than <strong>high</strong>, for a
+negative <strong>step</strong> value, the last element is the smallest index bigger than
+<strong>high</strong> (that is, boundary <strong>high</strong> is excluded from the result).
+The (sub-)list is empty when the first value ('<strong>lhs</strong> [ <strong>low</strong> ]') already
+violates the conditions of the <strong>high</strong> boundary.</p>
+</div>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list int xs = [4, 7, 18];
+list int ys;
+
+ys = xs[::2];  # == xs[0:3:2], assigns [4, 18]
+ys = xs[::-1]; # == xs[2:-1:-1], assigns [18, 7, 4]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>With the latter example, not that the <code>-1</code> end value in <code>xs[2:-1:-1]</code>
+really means index <code>-1</code>, it is <strong>not</strong> rewritten!!</p>
+</div>
+<div class="paragraph">
+<p>The <strong>concatenation</strong> operator <code>+</code> 'glues' two lists together by constructing a
+new list, copying the value of the <strong>lhs</strong> list, and appending the values of the
+<strong>rhs</strong>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">[1, 2] + [3, 4] == [1, 2, 3, 4]
+&lt;int&gt;[] + [1]   == [1]
+[5] + &lt;int&gt;[]   == [5]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <strong>subtraction</strong> operator <code>-</code> subtracts two lists. It copies the <strong>lhs</strong> list,
+and each element in the <strong>rhs</strong> list is searched in the copy, and the left-most
+equal value is deleted. Searched values that do not exist are silently ignored.
+The result of the operation has the same type as the <strong>lhs</strong> list.
+Some examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">[1, 2, 4, 2] - [4]        # results in [1, 2, 2], 4 is removed.
+[1, 2, 4, 2] - [6]        # results in [1, 2, 4 2], 6 does not exist.
+[1, 2, 4, 2] - [1, 4]     # results in [2, 2], 1 and 4 are removed.
+[1, 2, 4, 2] - [2]        # results in [1, 4, 2], first 2 is removed.
+[1, 2, 4, 2] - [2, 2]     # results in [1, 4].
+[1, 2, 4, 2] - [2, 2, 2]  # results in [1, 4], no match for the 3rd '2'.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <strong>element test</strong> operator <code>in</code> tests whether the value <strong>lhs</strong> exists in list
+<strong>rhs</strong>. This operation is expensive to compute, if you need this operation
+frequently, consider using a set instead.
+Some examples of the element test operation:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">1 in [1, 2, 3]          == true
+4 in [1, 2, 3]          == false  # there is no 4 in [1, 2, 3]
+[1] in [[2], [1]]       == true
+[2, 1] in [[1, 2]]      == false  # [2, 1] != [1, 2]
+&lt;int&gt;[] in &lt;list int&gt;[] == false  # empty list contains no values.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>There are also standard library functions for lists, see
+<a href="#ref-list-stdlib">List functions</a> for details.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-set-expression">Set expressions</h4>
+<div class="paragraph">
+<p>Literal sets are written like</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/literal_set.png" alt="literal set">
+</div>
+</div>
+<div class="paragraph">
+<p>The first line shows the syntax of an empty set. The <code>Type</code> block denotes
+the element type of the set, for example <code>&lt;int&gt;{}</code> is an empty set of
+integer values.</p>
+</div>
+<div class="paragraph">
+<p>The second line shows how to write a non-empty literal set value. It is a
+comma-separated sequence of expressions surrounded by curly brackets.
+The type of all expressions must be the same, and this is also the element type
+of the set. The order of the values in the literal is not relevant, and
+duplicate values are silently discarded. For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">set real xr = {1.0, 2.5, -31.28, 1.0}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>assigns the set <code>{-31.28, 1.0, 2.5}</code> (any permutation of the values is
+allowed). By convention, elements are written in increasing order in this
+document.</p>
+</div>
+<div class="paragraph">
+<p>Two set values are equal when they have the same number of element values
+contained, and each value of one set is also in the other set. The order of the
+elements in a set is not relevant, any permutation is equivalent.</p>
+</div>
+<div class="paragraph">
+<p>Like lists, sets have no unary operators. They do have binary operators though,
+which are</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>lhs</strong></th>
+<th class="tableblock halign-left valign-top">Type <strong>rhs</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>+</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Set union</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>-</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Set difference</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>*</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Set intersection</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>==</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for equality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>!=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for inequality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>in</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Element test</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>sub</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Sub-set test</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The <strong>union</strong> of two sets means that the <strong>lhs</strong> elements and the <strong>rhs</strong> elements
+are merged into one set (and duplicates are silently discarded).
+<strong>Set difference</strong> makes a copy of the <strong>lhs</strong> set, and removes all elements that
+are also in the <strong>rhs</strong> operand.
+The result of the operation has the same type as the <strong>lhs</strong> set.
+<strong>Set intersection</strong> works the other way around, its result is a set with
+elements that exist both in <strong>lhs</strong> and in <strong>rhs</strong>. Some examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">set int xr = {1, 3, 7};
+set int yr;
+
+yr = xr + {1, 2};  # assigns {1, 2, 3, 7}
+yr = xs - {1, 2};  # assigns {3, 7}
+yr = xs * {1, 2};  # assigns {1}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <strong>element test</strong> of sets tests whether the value <strong>lhs</strong> is an element in the
+set <strong>rhs</strong>. This operation is very fast.
+The <strong>sub-set test</strong> does the same for every element value in the <strong>lhs</strong> operand.
+It returns <code>true</code> is every value of the left set is also in the right set.
+A few examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">1 in {1, 3, 7}  == true
+9 in {1, 3, 7}  == false
+
+{1} sub {1, 3, 7}       == true
+{9} sub {1, 3, 7}       == false
+{1, 9} sub {1, 3, 7}    == false # All elements must be present.
+{1, 3, 7} sub {1, 3, 7} == true # All sets are a sub-set of themselves.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>There are also standard library functions for sets, see
+<a href="#ref-set-stdlib">Set functions</a> for details.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-dictionary-expression">Dictionary expressions</h4>
+<div class="paragraph">
+<p>Literal dictionaries are written using the syntax shown below</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/literal_dictionary.png" alt="literal dictionary">
+</div>
+</div>
+<div class="paragraph">
+<p>An empty dictionary needs the key and value type prefix, for
+example <code>&lt;string:int&gt;{}</code> is an empty dictionary with strings as key, and
+integer numbers as value.
+Literal values of such a dictionary are:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">dict(string, int) d;  # Initialized with the empty dictionary.
+
+d = {"one": 1, "twenty-three": 23};</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The key-value pairs can be put in any order. Also, the key value must be
+unique. Two dictionaries are equal when they have the same number of keys, each
+key in one dictionary is also in the other dictionary, and the value
+associated with each key also match pair-wise.</p>
+</div>
+<div class="paragraph">
+<p>The binary operators of dictionaries are</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>lhs</strong></th>
+<th class="tableblock halign-left valign-top">Type <strong>rhs</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>[</code> <strong>rhs</strong> <code>]</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">K</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">V</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Element access</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>+</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Update</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>-</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Subtraction</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>-</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list K</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Subtraction</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>-</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set K</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Subtraction</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>==</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for equality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>!=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for inequality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>in</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">K</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Element test</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>sub</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dict(K:V)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Sub-set test</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The <strong>element access</strong> operator accesses the value of a key. Querying the value
+of a non-existing key value is not allowed, however when used at the left side
+of an assignment, it acts as an adding operation. A few examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">dict(int:bool) d = {1:true, 2:false};
+bool b;
+
+b = d[1];     # assigns 'true' (the value of key 1).
+d[1] = false; # updates the value of key '1' to 'false'.
+d[8] = true;  # adds pair 8:true to the dictionary.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>+</code> operation on dictionaries is an <strong>update</strong> operation. It copies the
+<strong>lhs</strong> dictionary, and assigns each key-value pair of the <strong>rhs</strong> dictionary to
+the copy, overwriting values copied from the <strong>lhs</strong>.
+For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">dict(int:bool) d = {1:true, 2:false};
+
+d + {1:false}   # result is {1:false, 2:false}
+d + {3:false}   # result is {1:true, 2:false, 3:false}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <strong>subtraction</strong> operator only takes keys into consideration, that is, it
+makes a copy of the <strong>lhs</strong> dictionary, and removes key-value pairs where the key
+is also in the <strong>rhs</strong> argument (for subtraction of lists and sets, the elements
+are used, instead of the keys):</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">dict(int:bool) d = {1:true, 2:false};
+
+d - {1:false}   # results in {2:false}, value of '1' is not relevant
+d - [1]         # results in {2:false}
+d - {1}         # results in {2:false}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>As with list subtraction and set difference, the type of the result is the
+same as the type of the <strong>lhs</strong> dictionary.</p>
+</div>
+<div class="paragraph">
+<p>The <strong>element test</strong> tests for presence of a key value, and the <strong>sub-set</strong>
+operation tests whether all keys of the <strong>lhs</strong> value are also in the <strong>rhs</strong>
+value. Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">dict(int:bool) d = {1:true, 2:false};
+bool b;
+
+b = 2 in d;  # assigns 'true', 2 is a key in d.
+b = 5 in d;  # assigns 'false', 5 is not a key in d.
+
+{1:false} sub d # results in 'true', all keys are in d.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>There are also standard library functions for dictionaries, see
+<a href="#ref-dictionary-stdlib">Dictionary functions</a> for details.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-tuple-expression">Tuple expression</h4>
+<div class="paragraph">
+<p>A tuple expression is a value of a tuple type (explained in
+<a href="#ref-tuple-type">Tuple type</a>). A tuple expression literal value is written like</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/literal_tuple.png" alt="literal tuple">
+</div>
+</div>
+<div class="paragraph">
+<p>A literal tuple is a comma separated sequence of expressions of length two or
+longer, surrounded by a
+pair of parentheses. The number of expressions and the type of each expression
+decide the tuple type. For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type tup = tuple(bool b; real r);
+
+tup t = (true, 3.48);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The type named <code>tup</code> is a tuple type with a boolean field and a real field.
+The expression <code>(true, 3.48)</code> constructs the same tuple type, thus it can be
+assigned to variable <code>t</code>. Names of the fields are not relevant in this
+matching, for example variable declaration (and initialization)
+<code>tuple(bool z; real w) u = t</code> is allowed, since the types of
+the fields match in a pair-wise manner.</p>
+</div>
+<div class="paragraph">
+<p>A field of a tuple can be accessed both for read and for assignment by the name
+of the field:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">bool c;
+
+c = t.b;     # Read the 'b' field.
+t.b = false; # Assign a new value to the 'b' field.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In the latter case, only the assigned field changes, all other fields keep the
+same value.</p>
+</div>
+<div class="paragraph">
+<p>Tuples can also be packed and unpacked. Packing is assignment to all fields,
+while unpacking is reading of all fields into separate variables:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">real q;
+
+t = false, 3.8; # Packing of values into a tuple.
+
+c, q = t;       # Unpacking into separate variables.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Packing is very closely related to literal tuples above. The difference is
+that packing can be done only like above in an assignment to a tuple value,
+while a literal tuple works everywhere.</p>
+</div>
+<div class="paragraph">
+<p>Unpacking is very useful when the right side (<code>t</code> in the example) is more
+complex, for example, the return value of a function call, as
+in <code>c, q = f();</code>. In such cases you don&#8217;t need to construct an intermediate
+tuple variable.</p>
+</div>
+<div class="paragraph">
+<p>Packing and unpacking is also used in multi-assignment statements:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">a, b = 3, 4;   # Assign 3 to 'a', and 4 to 'b'.
+
+a, b = b, a;   # Swap values of 'a' and 'b'.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The latter works due to the intermediate tuple that is created as part in the
+assignment.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-file-expression">File handle expressions</h4>
+<div class="paragraph">
+<p>Variables of type <code>file</code> are created using a variable declaration with a
+<code>file</code> type, see <a href="#ref-file-type">File type</a> for details about the type.</p>
+</div>
+<div class="paragraph">
+<p>You cannot write a literal value for a file type (nor can you read or write
+values of this type), file values are created by means of the <code>open</code> function
+in the standard library, see <a href="#ref-file-stdlib">File functions</a>.</p>
+</div>
+<div class="paragraph">
+<p>You can test whether two files are the same with the binary <code>==</code> and <code>!=</code>
+operators.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>lhs</strong></th>
+<th class="tableblock halign-left valign-top">Type <strong>rhs</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>==</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">file</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">file</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for equality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>!=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">file</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">file</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for inequality</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Values of type <code>file</code> are used for writing output to a file using the
+<a href="#ref-write-statement">Write statement</a>, or for reading values from a file using the
+<code>read</code> function explained in <a href="#ref-read-expression">Read expression</a>.
+After use, a file should be closed with a <code>close</code> statement explained at
+<a href="#ref-close-statement">Close statement</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-read-expression">Read expression</h4>
+<div class="paragraph">
+<p>The read expression reads a value of a given type from the keyboard or from a
+file. It has two forms:</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code> <strong>read</strong>(<code>T</code>)</dt>
+<dd>
+<p>Read a value of type <code>T</code> from the keyboard.</p>
+</dd>
+<dt class="hdlist1"><code>T</code> <strong>read</strong>(<code>file f, T</code>)</dt>
+<dd>
+<p>Read a value of type <code>T</code> from the file opened for reading by file <code>f</code>
+(see the <code>open</code> function in <a href="#ref-file-stdlib">File functions</a> for details about
+opening files).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>You can read values from types that contain data used for calculation, that is
+values of types <code>bool</code>, <code>int</code>, <code>real</code>, <code>string</code>, <code>list T</code>, <code>set T</code>,
+and <code>dict(K:V)</code>. Types <code>T</code>, <code>K</code>, and <code>V</code> must also be readable types of
+data (that is, get chosen from the above list of types).</p>
+</div>
+<div class="paragraph">
+<p>Reading a value takes a text (with the same syntax as Chi literal values of
+the same type), and converts it into a value that can be manipulated in the Chi
+model. Values read from the text have to be constant, for example the input
+<code>time</code> cannot be interpreted as real number with the same value as the
+current simulation time.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-timer-expression">Timer expressions</h4>
+<div class="paragraph">
+<p>Timers are clocks that count down to 0. They are used to track the amount of
+time you still have to wait.
+Timers can be stored in data of type <code>timer</code> (see <a href="#ref-timer-type">Timer type</a> for
+details of the type).</p>
+</div>
+<div class="paragraph">
+<p>The standard library function <code>ready</code> exists to test whether a timer has
+expired. See <a href="#ref-timer-stdlib">Timer functions</a> for details.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-channel-expression">Channel expressions</h4>
+<div class="paragraph">
+<p>Channels are used to connect processes with each other. See the
+<a href="#ref-channel-type">Channel type</a> for details.</p>
+</div>
+<div class="paragraph">
+<p>Usually, channels are created by variable declarations, as in:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">chan void s;
+chan int c, d;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This creates three channels, one synchronization channel <code>s</code>, and two
+channels (<code>c</code>, and <code>d</code>) communicating integers.</p>
+</div>
+<div class="paragraph">
+<p>There is also a <code>channel</code> function to make new channels:</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>chan T</code> <strong>channel</strong>(<code>T</code>)</dt>
+<dd>
+<p>Construct a new channel communicating data type <code>T</code>. When <code>T</code> is
+<code>void</code>, a synchronization channel is created instead.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>The only binary expressions on channels are equality comparison operations.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>lhs</strong></th>
+<th class="tableblock halign-left valign-top">Type <strong>rhs</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>==</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">chan T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">chan T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for equality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lhs</strong> <code>!=</code> <strong>rhs</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">chan T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">chan T</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Test for inequality</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>where <code>T</code> can be either a normal type, or <code>void</code>.
+There has to be an overlap between the channel directions (that is, you cannot
+compare a receive-only channel with a send-only channel).</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-distribution-expression">Distribution expressions</h4>
+<div class="paragraph">
+<p>A distribution represents a stochastic distribution for drawing random numbers.
+It use a pseudo-random number generator. See
+<a href="#tut-chapter-stochastic-behavior">Modeling stochastic behavior</a> for a discussion how random numbers are
+used.</p>
+</div>
+<div class="paragraph">
+<p>Variables of type distribution (see <a href="#ref-distribution-type">Distribution type</a>) are
+initialized by using a distribution function from the standard library, see
+<a href="#ref-chapter-distributions">Distributions</a> for an overview.</p>
+</div>
+<div class="paragraph">
+<p>There is only one operator for variables with a distribution type, as shown
+below</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Expression</th>
+<th class="tableblock halign-left valign-top">Type <strong>op</strong></th>
+<th class="tableblock halign-left valign-top">Type result</th>
+<th class="tableblock halign-left valign-top">Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sample</code> <strong>op</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dist bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Sample <strong>op</strong> distribution</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sample</code> <strong>op</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dist int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Sample <strong>op</strong> distribution</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sample</code> <strong>op</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">dist real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Sample <strong>op</strong> distribution</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The <code>sample</code> operator draws a random number from a distribution.
+For example rolling a dice:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">model Dice():
+    dist int d = uniform(1, 7);
+
+    # Roll the dice 5 times
+    for i in range(5):
+        writeln("Rolled %d", sample d);
+    end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-process-expression">Process expressions</h4>
+<div class="paragraph">
+<p>A process expression refers to a process definition. It can be used to
+parameterize the process that is being instantiated, by passing such a value
+to a <code>run</code> or <code>start</code> statement. (See <a href="#ref-run-and-start-statements">Run and start statements</a> for
+details on how to create a new process.)
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc A(int x):
+    writeln("A(%d)", x);
+end
+
+proc B(int x):
+    writeln("B(%d)", x);
+end
+
+proc P(proc (int) ab):
+    run ab(3);
+end
+
+model M():
+    run P(A); # Pass 'proc A' into P.
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Formal parameter <code>ab</code> of process <code>P</code> is a process variable that refers to
+a process taking an integer parameter. The given process definition is
+instantiated. Since in the model definition, <code>A</code> is given to process <code>P</code>,
+the output of the above model is <code>A(3)</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-instance-expression">Instance expressions</h4>
+<div class="paragraph">
+<p>Process instances represent running processes in the model. Their use is to
+store a reference to such a running process, to allow testing for finishing.</p>
+</div>
+<div class="paragraph">
+<p>An instance variable is assigned during a <code>start</code> statement. (See
+<a href="#ref-run-and-start-statements">Run and start statements</a> for details on how to start a new process.)</p>
+</div>
+<div class="paragraph">
+<p>The instance variable is used to test for termination of the instantiated
+process, or to wait for it:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">proc Wait():
+    delay 4.52;
+end
+
+model M():
+    inst w;
+
+    start w = Wait();
+
+    delay 1.2;
+    writeln("is Wait finished? %b", finished(w));
+
+    # Wait until the process has finished.
+    finish w;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><code>Wait</code> is a process that waits a while before terminating. In the <code>start</code>
+statement, instance variable <code>w</code> is set up to refer to instantiated process
+<code>Wait</code>. After assignment, you can use the variable for testing whether the
+process has terminated. In the example, the test result is written to the
+screen, but this could also be used as a guard in a select statement (See
+<a href="#ref-select-statement">Select statement</a> for details).</p>
+</div>
+<div class="paragraph">
+<p>The other thing that you can do is to wait for termination of the process by
+means of the <code>finish</code> statement, see also <a href="#ref-finish-statement">Finish statement</a>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-matrix-expression">Matrix expression</h4>
+<div class="paragraph">
+<p>The syntax of a matrix literal value is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/literal_matrix.png" alt="literal matrix">
+</div>
+</div>
+<div class="paragraph">
+<p>The literal starts with a <code>[</code> symbol, and ends with a <code>]</code> symbol.
+In between it has at least two comma-separated lists of real number values,
+separated with a <code>;</code> symbol.</p>
+</div>
+<div class="paragraph">
+<p>Each comma-separated list of real number values is a row of the matrix. The
+number of columns of each row is the same at each row, which means the number
+of real number values must be the same with each list.
+As an example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">matrix(2, 3) m = [1.0, 2.0, 3.0;
+                  4.0, 5.0, 6.0]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><code>m</code> is a matrix with two rows and three columns. A comma separates two
+columns from each other, a semi colon separates two rows.</p>
+</div>
+<div class="paragraph">
+<p>The syntax demands at least one semi colon in a literal matrix value, which
+means you cannot write a matrix literal with a single row directly. Instead,
+write a cast expression that converts a list of real numbers to a matrix with
+a single row. See <a href="#ref-cast-expression">Cast expressions</a> for an explanation of cast
+expressions.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-cast-expression">Cast expressions</h4>
+<div class="paragraph">
+<p>A cast expression converts a value from one type to another. The syntax of a
+cast expression is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/cast_expression.png" alt="cast expression">
+</div>
+</div>
+<div class="paragraph">
+<p>You write the result type, followed by an expression between parentheses.
+The value of the expression is converted to the given type.
+For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">real v = 3.81;
+timer t;
+
+t = timer(v);  # Convert from real to timer (third entry in the table)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The conversion from a list to a matrix (the first entry in the table) is a
+special case in the sense that you also need to specify the size of the
+resulting matrix, as in:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list real xs = [1, 2, 3];
+
+writeln("matrix with one row and three columns: %s", matrix(1, 3, xs));</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The expected number of rows and columns given in the first two arguments must
+be constant. When the conversion is performed, the length of the given list
+must be the same as the number of columns stated in the second argument.</p>
+</div>
+<div class="paragraph">
+<p>The number of available conversions is quite limited, below is a table that
+lists them.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Value type</th>
+<th class="tableblock halign-left valign-top">Result type</th>
+<th class="tableblock halign-left valign-top">Remarks</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">matrix</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Conversion of a list to a matrix with one row</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">list</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">set</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Construct a set from a list</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">timer</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Setting up a timer</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">timer</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Reading the current value of a timer</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Parsing a boolean value from a string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Parsing an integer number from a string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Parsing a real number from a string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">bool</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Converting a boolean to a string representation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Converting an integer to a string representation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Converting a real number to a string representation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">int</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">real</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Widening an integer number to a real number</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The first entry exists for creating matrices with one row (which you cannot
+write syntactically). The second entry constructs a set from a list of values.
+The element type of the list and the resulting set are the same.</p>
+</div>
+<div class="paragraph">
+<p>The pair of conversions between timer
+type and real number type is for setting and reading timers, see
+<a href="#tut-using-timers">Timers</a> for their use.</p>
+</div>
+<div class="paragraph">
+<p>The conversions from string to boolean or numeric allows parsing of a
+string. The other way around is also possible, although this is usually done
+as part of a <strong>write</strong> statement (see <a href="#ref-write-statement">Write statement</a> for details).</p>
+</div>
+<div class="paragraph">
+<p>The final entry is for widening an integer to a real number. The other way
+around (from a real number to an integer number) does not exist as cast, but
+there are stdlib functions <strong>ceil</strong>, <strong>floor</strong>, and <strong>round</strong> available instead
+(explained in <a href="#ref-real-stdlib">Real number functions</a>).</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-functioncall-expression">Function call expressions</h4>
+<div class="paragraph">
+<p>A function call starts a function to compute its result value from the input
+parameters. The syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/func_call_expression.png" alt="func call expression">
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>Expression</code> before the open parenthesis represents the function to
+call. Often this is a simple name like <code>size</code> (the name of one of the
+standard library functions), but you can have more complicated expressions.</p>
+</div>
+<div class="paragraph">
+<p>The sequence of expressions inside the parentheses denote the values of the
+input parameters of the functions. Their type has to match with the type
+stated in the formal parameter at the corresponding position.</p>
+</div>
+<div class="paragraph">
+<p>The result of the function call is a value with the same type as stated in the
+return type of the function definition.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-operator-priorities">Operator priorities</h4>
+<div class="paragraph">
+<p>Operator priorities aim to reduce the number of parentheses needed in
+expressions. They do this by make choices in the order of applying operators on
+their arguments. For example, <code>1 + 2 * 3</code> can be interpreted as
+<code>(1 + 2) * 3</code> (if the addition operation is applied first), or as
+<code>1 + (2 * 3)</code> (if the multiplication operation is performed first).</p>
+</div>
+<div class="paragraph">
+<p>In the following table, the order of applying operators in the Chi language
+is defined.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Priority</th>
+<th class="tableblock halign-left valign-top">Operators</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">1</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">(unary) <code>sample</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">2</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">unary <code>+</code>, unary <code>-</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">3</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>^</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">4</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>*</code>, <code>/</code>, <code>div</code>, <code>mod</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">5</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+</code>, <code>-</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">6</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;</code>, <code>&lt;=</code>, <code>==</code>, <code>!=</code>, <code>&gt;=</code>, <code>&gt;</code>, <code>in</code>, <code>sub</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">7</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">(unary) <code>not</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">8</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>and</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">9</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>or</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Operators with a smaller priority number get applied before operators with a
+higher priority number. Operators with the same priority get applied from left
+to right.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="ref-chapter-standard-library">Standard library functions</h3>
+<div class="paragraph">
+<p>
+The Chi language has many general purpose functions available.
+They are organized by type and kind of use.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#ref-integer-stdlib">Integer functions</a></p>
+</li>
+<li>
+<p><a href="#ref-real-stdlib">Real number functions</a></p>
+</li>
+<li>
+<p><a href="#ref-string-stdlib">String functions</a></p>
+</li>
+<li>
+<p><a href="#ref-list-stdlib">List functions</a></p>
+</li>
+<li>
+<p><a href="#ref-set-stdlib">Set functions</a></p>
+</li>
+<li>
+<p><a href="#ref-dictionary-stdlib">Dictionary functions</a></p>
+</li>
+<li>
+<p><a href="#ref-chapter-distributions">Distributions</a></p>
+</li>
+<li>
+<p><a href="#ref-timer-stdlib">Timer functions</a></p>
+</li>
+<li>
+<p><a href="#ref-file-stdlib">File functions</a></p>
+</li>
+<li>
+<p><a href="#ref-instance-stdlib">Process instance functions</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect3">
+<h4 id="ref-integer-stdlib">Integer functions</h4>
+<div class="paragraph">
+<p>The following standard library functions on integers exist</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>int</code> <strong>abs</strong><code>(int val)</code></p>
+<div class="paragraph">
+<p>Return the absolute value of <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>int</code> <strong>sign</strong><code>(int val)</code></p>
+<div class="paragraph">
+<p>Return <code>-1</code> if val less than zero, <code>1</code> if val more than zero, and
+<code>0</code> otherwise.</p>
+</div>
+</li>
+<li>
+<p><code>int</code> <strong>max</strong><code>(int a, b, ...)</code></p>
+<div class="paragraph">
+<p>Return the biggest value of the parameters.</p>
+</div>
+</li>
+<li>
+<p><code>int</code> <strong>min</strong><code>(int a, b, ...)</code></p>
+<div class="paragraph">
+<p>Return the smallest value of the parameters.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-real-stdlib">Real number functions</h4>
+<div class="paragraph">
+<p>The following standard library functions on real numbers exist</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>real</code> <strong>abs</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Return the absolute value of <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>int</code> <strong>sign</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Return <code>-1</code> if val less than zero, <code>1</code> if val more than zero, and
+<code>0</code> otherwise.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>max</strong><code>(real a, b, ...)</code></p>
+<div class="paragraph">
+<p>Return the biggest value of the parameters. Integer parameters are
+silently promoted to real.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>min</strong><code>(real a, b, ...)</code></p>
+<div class="paragraph">
+<p>Return the smallest value of the parameters. Integer parameters are
+silently promoted to real.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Conversion from real number to integer can be performed in three different
+ways.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>int</code> <strong>ceil</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Return smallest integer bigger or equal to <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>int</code> <strong>floor</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Return biggest integer less or equal to <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>int</code> <strong>round</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Round to nearest integer value (up if distance is <code>0.5</code>).</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following power and logarithmic functions exist.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>real</code> <strong>sqrt</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Return the square root of <code>val</code> (argument must be non-negative).</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>cbrt</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Return the cube root of <code>val</code> (<code>val^(1/3)</code>).</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>exp</strong><code>(real x)</code></p>
+<div class="paragraph">
+<p>Compute <code>e^x</code>.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>ln</strong><code>(real x)</code></p>
+<div class="paragraph">
+<p>Compute the natural logarithm of <code>x</code>.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>log</strong><code>(real x)</code></p>
+<div class="paragraph">
+<p>Compute the base-10 logarithm of <code>x</code>.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Finally, there are trigonometric functions available.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>real</code> <strong>cos</strong><code>(real a)</code></p>
+<div class="paragraph">
+<p>Cosine function of angle <code>a</code> (in radians).</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>sin</strong><code>(real angle)</code></p>
+<div class="paragraph">
+<p>Sine function of angle <code>a</code> (in radians).</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>tan</strong><code>(real angle)</code></p>
+<div class="paragraph">
+<p>Tangent function of angle <code>a</code> (in radians).</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>acos</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Arc cosine function of value <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>asin</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Arc sine function of value <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>atan</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Arc tangent function of value <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>cosh</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Hyperbolic cosine function of value <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>sinh</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Hyperbolic sine function of value <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>tanh</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Hyperbolic tangent function of value <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>acosh</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Inverse hyperbolic cosine function of value <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>asinh</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Inverse hyperbolic sine function of value <code>val</code>.</p>
+</div>
+</li>
+<li>
+<p><code>real</code> <strong>atanh</strong><code>(real val)</code></p>
+<div class="paragraph">
+<p>Inverse hyperbolic tangent function of value <code>val</code>.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-string-stdlib">String functions</h4>
+<div class="paragraph">
+<p>The following string functions exist in the standard library.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>int</code> <strong>size</strong><code>(string s)</code></p>
+<div class="paragraph">
+<p>Get the number of characters in string <code>s</code>.</p>
+</div>
+</li>
+<li>
+<p><code>string</code> <strong>max</strong><code>(string a, b, ...)</code></p>
+<div class="paragraph">
+<p>Return the biggest string of the parameters.</p>
+</div>
+</li>
+<li>
+<p><code>string</code> <strong>min</strong><code>(string a, b, ...)</code></p>
+<div class="paragraph">
+<p>Return the smallest string of the parameters.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-list-stdlib">List functions</h4>
+<div class="paragraph">
+<p>Getting an element out of list can be done in two ways.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>tuple(T value, list T ys)</code> <strong>pop</strong><code>(list T xs)</code></p>
+<div class="paragraph">
+<p>Get the first element of non-empty list <code>xs</code> (with arbitrary element type
+<code>T</code>), and return a tuple with the first element and the list without the
+first element.</p>
+</div>
+</li>
+<li>
+<p><code>list T</code> <strong>del</strong><code>(list T xs, int index)</code></p>
+<div class="paragraph">
+<p>Remove element <code>xs[index]</code> from list <code>xs</code> (with arbitrary type <code>T</code>).
+The index position must exist in the list. Returns a
+list without the removed element.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For getting information about the number of elements in a list, the following
+functions are available.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>bool</code> <strong>empty</strong><code>(list T xs)</code></p>
+<div class="paragraph">
+<p>Is list <code>xs</code> empty (for any element type <code>T</code>)?
+Returns <code>true</code> when <code>xs</code> contains no elements, and <code>false</code> when it has at
+least one element.</p>
+</div>
+</li>
+<li>
+<p><code>int</code> <strong>size</strong><code>(list T xs)</code></p>
+<div class="paragraph">
+<p>Get the number of elements in list <code>xs</code> (for any element type <code>T</code>).</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>List functions mainly useful for using with a <code>for</code> statement (explained in
+<a href="#ref-for-loop-statement">For loop statement</a>) follow next.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>list tuple(int index, T value)</code> <strong>enumerate</strong><code>(list T xs)</code></p>
+<div class="paragraph">
+<p>Construct a copy of the list <code>xs</code> with arbitrary element type <code>T</code>, with
+each element replaced by a tuple containing the index of the element as
+well as the element itself.
+For example, <code>enumerate(["a", "b"])</code> results in the list
+<code>[(0, "a"), (1, "b")]</code>.</p>
+</div>
+</li>
+<li>
+<p><code>list int</code> <strong>range</strong><code>(int end)</code></p>
+<div class="paragraph">
+<p>Construct a list with integer values running from <code>0</code> to (but not including)
+<code>end</code>. For example <code>range(3)</code> produces list <code>[0, 1, 2]</code>.</p>
+</div>
+</li>
+<li>
+<p><code>list int</code> <strong>range</strong><code>(int start, end)</code></p>
+<div class="paragraph">
+<p>Construct a list with integer values running from <code>start</code> to (but not including)
+<code>end</code>. For example, <code>range(3, 7)</code> produces list <code>[3, 4, 5, 6]</code>.</p>
+</div>
+</li>
+<li>
+<p><code>list int</code> <strong>range</strong><code>(int start, end, step)</code></p>
+<div class="paragraph">
+<p>Construct a list with integer values running from <code>start</code> to (but not
+including) <code>end</code>, while incrementing the value with step size <code>step</code>.
+For example <code>range(3, 8, 2)</code> produces <code>list [3, 5, 7]</code>. Negative step sizes
+are also allowed to construct lists with decrementing values, but <code>start</code> has
+to be larger than <code>end</code> in that case.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For occasionally getting the biggest or smallest element of a list, the <code>min</code>
+and <code>max</code> functions are available. These functions take a lot of time, if
+smallest or biggest values are needed often, it may be better to use a sorted
+list.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>T</code> <strong>min</strong><code>(list T xs)</code></p>
+<div class="paragraph">
+<p>Return the smallest element value of type <code>T</code> (<code>T</code> must be type
+int, real, or string) from non-empty list <code>xs</code>.</p>
+</div>
+</li>
+<li>
+<p><code>T</code> <strong>max</strong><code>(list T xs)</code></p>
+<div class="paragraph">
+<p>Return the biggest element value of type <code>T</code> (<code>T</code> must be type
+int, real, or string) from non-empty list <code>xs</code>.</p>
+</div>
+</li>
+<li>
+<p><code>list</code> <code>T</code> <strong>sort</strong><code>(list T xs, func bool pred(T a, b))</code></p>
+<div class="paragraph">
+<p>Sort list <code>xs</code> such that the predicate function <code>pred</code> holds for
+every pair of elements in the list, and return the sorted list.</p>
+</div>
+<div class="paragraph">
+<p>The predicate function <code>pred</code> must implement a total ordering on the
+values. See also the <a href="#tut-sorted-lists">sorted lists</a> discussion
+in the tutorial.</p>
+</div>
+</li>
+<li>
+<p><code>list</code> <code>T</code> <strong>insert</strong><code>(list T xs, T x, func bool pred(T a, b))</code></p>
+<div class="paragraph">
+<p>Given an already sorted list <code>xs</code> with respect to predicate function <code>pred</code>
+(with arbitrary element type <code>T</code>), insert element value <code>x</code> into the list
+such that the predicate function <code>pred</code> again holds for every pair of
+elements in the list. Return the list with the inserted <code>element</code>.</p>
+</div>
+<div class="paragraph">
+<p>The predicate function <code>pred</code> must implement a total ordering on the
+values. See also the <a href="#tut-sorted-lists">sorted lists</a> discussion
+in the tutorial.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-set-stdlib">Set functions</h4>
+<div class="paragraph">
+<p>Similar to lists, there are two functions for getting an element from a set.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>tuple(T val, set T yr)</code> <strong>pop</strong><code>(set T xr)</code></p>
+<div class="paragraph">
+<p>Get an element of non-empty set <code>xr</code> (with arbitrary element type <code>T</code>), and
+return a tuple with the retrieved element and the set without the retrieved
+element. Note that the order of elements in a set has no meaning, and may
+change at any moment.</p>
+</div>
+</li>
+<li>
+<p><code>list tuple(int index, T val)</code> <strong>enumerate</strong><code>(set T xr)</code></p>
+<div class="paragraph">
+<p>Construct a list of tuples with position <code>index</code> and element value <code>val</code>
+from the set <code>xr</code> with arbitrary element type <code>T</code>. Note that the <code>index</code>
+has no meaning in the set.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Removing a single element from a set can be done with the function below.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>set T</code> <strong>del</strong><code>(set T xr, T value)</code></p>
+<div class="paragraph">
+<p>Remove from set <code>xr</code> (with arbitrary element type <code>T</code>) element
+<code>value</code> if it exists in the set. Returns a set without the (possibly)
+removed element.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For getting information about the number of elements in a set, the following
+functions are available.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>bool</code> <strong>empty</strong><code>(set T xr)</code></p>
+<div class="paragraph">
+<p>Is set <code>xr</code> empty (for any element type <code>T</code>)?
+Returns <code>true</code> when <code>xr</code> contains no elements, and <code>false</code> when it has at
+least one element.</p>
+</div>
+</li>
+<li>
+<p><code>int</code> <strong>size</strong><code>(set T xr)</code></p>
+<div class="paragraph">
+<p>Get the number of elements in set <code>xr</code> (for any element type <code>T</code>).</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For occasionally getting the biggest or smallest element of a set, the <code>min</code>
+and <code>max</code> functions are available. These functions take a lot of time, if
+smallest or biggest values are needed often, it may be better to make a sorted
+list.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>T</code> <strong>min</strong><code>(set T xr)</code></p>
+<div class="paragraph">
+<p>Return the smallest element value of type <code>T</code> (<code>T</code> must be type
+<code>int</code>, <code>real</code>, or <code>string</code>) from non-empty set <code>xr</code>.</p>
+</div>
+</li>
+<li>
+<p><code>T</code> <strong>max</strong><code>(set T xr)</code></p>
+<div class="paragraph">
+<p>Return the biggest element value of type <code>T</code> (<code>T</code> must be type
+<code>int</code>, <code>real</code>, or <code>string</code>) from non-empty set <code>xr</code>.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-dictionary-stdlib">Dictionary functions</h4>
+<div class="paragraph">
+<p>Getting a value or a sequence of values from a dictionary can be done with the
+following functions.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>tuple(K key, V val, dict(K:V) e)</code> <strong>pop</strong><code>(dict(K:V) d)</code></p>
+<div class="paragraph">
+<p>Get a key-value pair from non-empty dictionary <code>d</code> (with arbitrary key
+type <code>K</code> and arbitrary value type <code>V</code>), and return a tuple with the
+retrieved key, the retrieved value, and the dictionary without the
+retrieved element.</p>
+</div>
+</li>
+<li>
+<p><code>list tuple(int index, K key, V val)</code> <strong>enumerate</strong><code>(dict(K:V) d)</code></p>
+<div class="paragraph">
+<p>Construct a list of tuples with position <code>index</code>, key <code>key</code> and value
+<code>val</code> from dictionary <code>d</code> (with arbitrary key type <code>K</code> and arbitrary
+value type <code>V</code>). Note that the <code>index</code> has no meaning in the
+dictionary. In combination with a for statement (explained in
+<a href="#ref-for-loop-statement">For loop statement</a>), it is also possible to iterate over the
+dictionary directly.</p>
+</div>
+</li>
+<li>
+<p><code>list K</code> <strong>dictkeys</strong><code>(dict(K:V) d)</code></p>
+<div class="paragraph">
+<p>Return the keys of dictionary <code>d</code> (with any key type <code>K</code> and value type
+<code>V</code>) as a list with element type <code>K</code>. Since a dictionary has no order,
+the order of the elements in the resulting list is also undefined.</p>
+</div>
+</li>
+<li>
+<p><code>list V</code> <strong>dictvalues</strong><code>(dict(K:V) d)</code></p>
+<div class="paragraph">
+<p>Return the values of dictionary <code>d</code> (with any key type <code>K</code> and value type
+<code>V</code>) as a list with element type <code>V</code>. Since a dictionary has no order,
+the order of the elements in the resulting list is also undefined.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Removing a single element from a dictionary can be done with the function below.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>dict(K:V)</code> <strong>del</strong><code>(dict(K:V) d, K key)</code></p>
+<div class="paragraph">
+<p>Remove element <code>key</code> from dictionary <code>d</code> (with arbitrary element key type <code>K</code> and
+arbitrary value type <code>V</code>) if it exists in the dictionary.
+Returns a dictionary without the (possibly) removed element.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The number of keys in a dictionary can be queried with the following
+functions.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>bool</code> <strong>empty</strong><code>(dict(K:V) d)</code></p>
+<div class="paragraph">
+<p>Is dictionary <code>d</code> empty? (with any key type <code>K</code> and value type <code>V</code>)
+Returns <code>true</code> when <code>d</code> contains no elements, and <code>false</code> when it has at
+least one key element.</p>
+</div>
+</li>
+<li>
+<p><code>int</code> <strong>size</strong><code>(dict(K:V) d)</code></p>
+<div class="paragraph">
+<p>Get the number of key elements in dictionary <code>d</code> (with any key type <code>K</code>
+and value type <code>V</code>).</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For occasionally getting the biggest or smallest key value of a dictionary, the
+<code>min</code> and <code>max</code> functions are available. These functions take a lot of
+time, if smallest or biggest keys are needed often, it may be better to use a
+sorted list.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>K</code> <strong>min</strong><code>(dict(K:V) d)</code></p>
+<div class="paragraph">
+<p>Return the smallest key of type <code>K</code> (<code>K</code> must be type
+<code>int</code>, <code>real</code>, or <code>string</code>) from non-empty dictionary <code>d</code>.</p>
+</div>
+</li>
+<li>
+<p><code>K</code> <strong>max</strong><code>(dict(K:V) d)</code></p>
+<div class="paragraph">
+<p>Return the biggest key of type <code>K</code> (<code>K</code> must be type
+<code>int</code>, <code>real</code>, or <code>string</code>) from non-empty dictionary <code>d</code>.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-timer-stdlib">Timer functions</h4>
+<div class="ulist">
+<ul>
+<li>
+<p><code>bool</code> <strong>ready</strong><code>(timer t)</code></p>
+<div class="paragraph">
+<p>Return whether timer <code>t</code> has expired (or was never set). Returns <code>true</code>
+if the timer has reached <code>0</code> or was never set, and <code>false</code> if it is still
+running.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-file-stdlib">File functions</h4>
+<div class="ulist">
+<ul>
+<li>
+<p><code>bool</code> <strong>eof</strong><code>(file handle)</code></p>
+<div class="paragraph">
+<p>For files that are read, this function tests whether the end of the file
+(EOF) has been reached. That is, it tests whether you have read the last
+value in the <code>file</code>.</p>
+</div>
+<div class="paragraph">
+<p>If the call returns <code>true</code>, there are no more values to read. If it
+returns <code>false</code>, another value is still available.
+For an example of how to use <code>eof</code> and <code>eol</code>, see
+<a href="#tut-advanced-file-reading">Advanced reading from a file</a>.</p>
+</div>
+</li>
+<li>
+<p><code>bool</code> <strong>eol</strong><code>(file handle)</code></p>
+<div class="paragraph">
+<p>For files that are read, this function tests whether the end of a line
+(EOL) has been reached. That is, it tests whether you have read the last
+value at the current line.</p>
+</div>
+<div class="paragraph">
+<p>If the call returns <code>true</code>, there are no more values to read at this
+line. If it returns <code>false</code>, another value can be read.
+For an example of how to use <code>eof</code> and <code>eol</code>, see
+<a href="#tut-advanced-file-reading">Advanced reading from a file</a>.</p>
+</div>
+<div class="paragraph">
+<p>Note that 'the same line' is applied only to the leading white space. It
+does not say anything about the number lines that a value itself uses.
+For example, you could spread a list or set with numbers over multiple lines.</p>
+</div>
+</li>
+<li>
+<p><code>int</code> <strong>newlines</strong><code>(file handle)</code></p>
+<div class="paragraph">
+<p>For files that are read, this function returns how many lines down the
+next value can be found. It returns a negative number if the end of the
+file has been reached.</p>
+</div>
+<div class="paragraph">
+<p>For example, executing:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">int i;
+file f = open("data.txt", "r");
+
+i = read(f, int);
+writeln("read %d, eol count is %d", i, newlines(f));
+i = read(f, int);
+writeln("read %d, eol count is %d", i, newlines(f));
+i = read(f, int);
+writeln("read %d, eol count is %d", i, newlines(f));
+close(f);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>where "data.txt" contains:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">123 345
+789</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>produces:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">read 123, eol count is 0
+read 345, eol count is 1
+read 789, eol count is -1</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>After reading <code>123</code>, the next integer is at the same line, which is <code>0</code>
+lines down. After reading <code>345</code>, the next value is at the next line,
+which is <code>1</code> line down. After reading the final value, a negative line
+count is returned to indicate lack of a next value.</p>
+</div>
+<div class="paragraph">
+<p>Note that 'number of lines down' is applied only to the leading white
+space. It does not say anything about the number lines that a value itself
+uses, a set of list could use several lines.</p>
+</div>
+</li>
+<li>
+<p><code>file</code> <strong>open</strong><code>(string filename, string mode)</code></p>
+<div class="paragraph">
+<p>Open the file with name <code>filename</code> using access mode <code>mode</code>.
+When the access mode is <code>"r"</code>, the file should exist and is opened for
+reading. When the access mode is <code>"w"</code>, the file is either created or its
+previous contents is erased. There is no way to append output to an
+existing file.</p>
+</div>
+<div class="paragraph">
+<p>Notice that filename is a normal Chi string, which means that the <code>\</code>
+character needs to be escaped to <code>\\</code>. (That is, use a string like
+<code>"mydir\\myfile.txt"</code> to open the file with the name <code>myfile.txt</code> in
+directory (map) <code>mydir</code>.</p>
+</div>
+<div class="paragraph">
+<p>Alternatively, you may want to use the forward slash <code>/</code> instead as path
+component separator.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-instance-stdlib">Process instance functions</h4>
+<div class="ulist">
+<ul>
+<li>
+<p><code>bool</code> <strong>finished</strong><code>(inst p)</code></p>
+<div class="paragraph">
+<p>Return whether the process stored by process instance <code>p</code> has finished.
+Returns <code>true</code> when the process has finished, and <code>false</code> if it has not ended yet.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="ref-chapter-distributions">Distributions</h3>
+<div class="paragraph">
+<p>
+
+The Chi language has three kinds of distributions:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#ref-constant-distributions">Constant distributions</a>, distributions returning always the same value</p>
+</li>
+<li>
+<p><a href="#ref-discrete-distributions">Discrete distributions</a>, distributions returning a boolean or integer value</p>
+</li>
+<li>
+<p><a href="#ref-continuous-distributions">Continuous distributions</a>, distributions returning a real number value</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The constant distributions are used during creation of the Chi program.
+Before adding stochastic behavior, you want to make sure the program itself
+is correct. It is much easier to verify correctness without stochastic
+behavior, but if you have to change the program again after the verification,
+you may introduce new errors in the process.</p>
+</div>
+<div class="paragraph">
+<p>The constant distributions solve this by allowing you to program with
+stochastic sampling in the code, but it is not doing anything (since you get
+the same predictable value on each sample operation). After verifying
+correctness of the program, you only need to modify the distributions that you
+use to get proper stochastic behavior.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect3">
+<h4 id="ref-constant-distributions">Constant distributions</h4>
+<div class="paragraph">
+<p>The constant distributions have very predictable samples, which makes them
+ideal for testing functioning of the program before adding stochastic
+behavior.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>dist</code> <code>bool</code> <strong>constant</strong><code>(bool b)</code></p>
+<div class="paragraph">
+<p>Distribution always returning <code>b</code>.</p>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>b</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>b</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p>-</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>int</code> <strong>constant</strong><code>(int i)</code></p>
+<div class="paragraph">
+<p>Distribution always returning <code>i</code>.</p>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>i</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>i</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p>-</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>constant</strong><code>(real r)</code></p>
+<div class="paragraph">
+<p>Distribution always returning <code>r</code>.</p>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>r</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>r</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p>-</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-discrete-distributions">Discrete distributions</h4>
+<div class="paragraph">
+<p>The discrete distributions return integer or boolean sample values.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>dist</code> <code>bool</code> <strong>bernoulli</strong><code>(real p)</code></p>
+<div class="paragraph">
+<p>Outcome of an experiment with chance <code>p</code> <code>(0 &lt;= p &lt;= 1)</code>.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/bernoulli.svg" alt="bernoulli">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>{false, true}</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>p</code> (where <code>false</code> is interpreted as <code>0</code>, and <code>true</code> is interpreted as <code>1</code>)</p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>1 - p</code> (where <code>false</code> is interpreted as <code>0</code>, and <code>true</code> is interpreted as <code>1</code>)</p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>Bernoulli(p), <a href="#law-ref">[law-ref]</a>, page 302</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>int</code> <strong>binomial</strong><code>(int n, real p)</code></p>
+<div class="paragraph">
+<p>Number of successes when performing <code>n</code> experiments <code>(n &gt; 0)</code> with chance <code>p</code> <code>(0 &lt;= p &lt;= 1)</code>.</p>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>{0, 1, ..., n}</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>n * p</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>n * p * (1 - p)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>bin(n, p), <a href="#law-ref">[law-ref]</a>, page 304</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>int</code> <strong>geometric</strong><code>(real p)</code></p>
+<div class="paragraph">
+<p>Geometric distribution, number of failures before success for an experiment with chance <code>p</code> <code>(0 &lt; p &lt;= 1)</code>.</p>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>{0, 1, ...}</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>(1 - p) / p</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>(1 - p) / p^2</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>geom(p), <a href="#law-ref">[law-ref]</a>, page 305</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>int</code> <strong>poisson</strong><code>(real lambda)</code></p>
+<div class="paragraph">
+<p>Poisson distribution.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/poisson.svg" alt="poisson">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>{0, 1, ...}</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>lambda</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>lambda</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>Poison(lambda), <a href="#law-ref">[law-ref]</a>, page 308</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>int</code> <strong>uniform</strong><code>(int a, b)</code></p>
+<div class="paragraph">
+<p>Integer uniform distribution from <code>a</code> to <code>b</code> excluding the upper bound.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/disc_uni.svg" alt="disc uni">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>{a, a+1, ..., b-1}</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>(a + b - 1) / 2</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>((b - a)^2 - 1) / 12</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>DU(a, b - 1), <a href="#law-ref">[law-ref]</a>, page 303</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-continuous-distributions">Continuous distributions</h4>
+<div class="ulist">
+<ul>
+<li>
+<p><code>dist</code> <code>real</code> <strong>beta</strong><code>(real p, q)</code></p>
+<div class="paragraph">
+<p>Beta distribution with shape parameters <code>p</code> and <code>q</code>, with <code>p &gt; 0</code> and <code>q &gt; 0</code>.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/beta.svg" alt="beta">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>[0, 1]</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>p / (p + q)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>p * q / ((p + q)^2 * (p + q + 1))</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>Beta(p, q), <a href="#law-ref">[law-ref]</a>, page 291</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>erlang</strong><code>(double m, int k)</code></p>
+<div class="paragraph">
+<p>Erlang distribution with <code>k</code> a positive integer and <code>m &gt; 0</code>.
+Equivalent to <code>gamma(k, m / k)</code>.</p>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>m</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>m * m / k</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>ERL(m, k), <a href="#banks-ref">[banks-ref]</a>, page 153</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>exponential</strong><code>(real m)</code></p>
+<div class="paragraph">
+<p>(Negative) exponential distribution with mean <code>m</code>, with <code>m &gt; 0</code>.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/exponential.svg" alt="exponential">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>[0, infinite)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>m</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>m * m</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>expo(m), <a href="#law-ref">[law-ref]</a>, page 283</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>gamma</strong><code>(real a, b)</code></p>
+<div class="paragraph">
+<p>Gamma distribution, with shape parameter <code>a &gt; 0</code> and scale parameter <code>b &gt; 0</code>.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/gamma.svg" alt="gamma">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>a * b</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>a * b^2</code></p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>lognormal</strong><code>(real m, v2)</code></p>
+<div class="paragraph">
+<p>Log-normal distribution.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/lognormal.svg" alt="lognormal">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>[0, infinite)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>exp(m + v2/2)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>exp(2*m + v2) * (exp(v2) - 1)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>N(m, v2), <a href="#law-ref">[law-ref]</a>, page 290</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>normal</strong><code>(real m, v2)</code></p>
+<div class="paragraph">
+<p>Normal distribution.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/normal.svg" alt="normal">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>(-infinite, infinite)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>m</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>v2</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>N(m, v2), <a href="#law-ref">[law-ref]</a>, page 288</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>random</strong><code>()</code></p>
+<div class="paragraph">
+<p>Random number generator.</p>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>[0, 1)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>0.5</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>1 / 12</code></p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>triangle</strong><code>(real a, b, c)</code></p>
+<div class="paragraph">
+<p>Triangle distribution, with <code>a &lt; b &lt; c</code>.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/triangle.svg" alt="triangle">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>[a, c]</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>(a + b + c) /3</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>(a^2 + c^2 + b^2 - a*b - a*c - b*c) / 18</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>Triangle(a, c, b), <a href="#law-ref">[law-ref]</a>, page 300</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>uniform</strong><code>(real a, b)</code></p>
+<div class="paragraph">
+<p>Real uniform distribution from <code>a</code> to <code>b</code>, excluding upper bound.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/cont_uni.svg" alt="cont uni">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>[a, b)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>(a + b) / 2</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>(b - a)^2 / 12</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>U(a,b), <a href="#law-ref">[law-ref]</a>, page 282, except that distribution has an inclusive upper bound.</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+<li>
+<p><code>dist</code> <code>real</code> <strong>weibull</strong><code>(real a, b)</code></p>
+<div class="paragraph">
+<p>Weibull distribution with shape parameter <code>a</code> and scale parameter <code>b</code>, with <code>a &gt; 0</code> and <code>b &gt; 0</code>.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/distribution_plots/weibull.svg" alt="weibull">
+</div>
+</div>
+<div class="hdlist">
+<table>
+<tr>
+<td class="hdlist1">
+Range
+</td>
+<td class="hdlist2">
+<p><code>[0, infinite)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Mean
+</td>
+<td class="hdlist2">
+<p><code>(b / a) * G(1 / a)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+Variance
+</td>
+<td class="hdlist2">
+<p><code>(b^2 / a) * (2 * G(2 / a) - (1 / a) * G(1 / a)^2)</code> with <code>G(x)</code> the Gamma function,
+<code>G(x)</code> <code>=</code> integral over <code>t</code> from <code>0</code> to <code>infinity</code>, for <code>t^(x - 1) * exp(-t)</code></p>
+</td>
+</tr>
+<tr>
+<td class="hdlist1">
+See also
+</td>
+<td class="hdlist2">
+<p>Weibull(a, b), <a href="#law-ref">[law-ref]</a>, page 284</p>
+</td>
+</tr>
+</table>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-references">References</h4>
+<div class="ulist bibliography">
+<ul class="bibliography">
+<li>
+<p><a id="banks-ref"></a>[banks-ref] Handbook of Simulation,
+Principles, Methodology, Advances, Applications, and Practice,
+editor Jerry Banks,
+publisher John Wiley &amp; Sons, inc, 1998</p>
+</li>
+<li>
+<p><a id="law-ref"></a>[law-ref] Simulation Modeling &amp; Analysis, fourth edition,
+by Averill M. Law,
+publisher McGraw-Hill, International Edition, 2007,
+ISBN 978-007-125519-6</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="ref-chapter-types">Types</h3>
+<div class="paragraph">
+<p>
+A type defines the set of possible values of an expression or a variable.
+Its syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/type.png" alt="type">
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The <code>ElementaryType</code> block contains types that do not build on other types.
+They are explained further in <a href="#ref-elementary-type">Elementary types</a>.</p>
+</li>
+<li>
+<p>The <code>ContainerType</code> block contains types that can store values of a single
+other type, the 'list', 'set', and 'dictionary' type. These types are further
+explained in <a href="#ref-container-type">Container types</a>.</p>
+</li>
+<li>
+<p>The <code>TupleType</code> block describes 'tuples', a type that can hold values of
+several other types.</p>
+</li>
+<li>
+<p>The <code>ChannelType</code> blocks describes communication channels that connect
+processes with each other, see <a href="#ref-channel-type">Channel type</a> for more explanation.</p>
+</li>
+<li>
+<p>The <code>DistributionType</code> block contains the stochastic distribution type,
+explained in <a href="#ref-distribution-type">Distribution type</a>.</p>
+</li>
+<li>
+<p>The <code>FunctionType</code> can hold a function definition. It allows you to pass
+a function to a process or another function. It is further explained in
+<a href="#ref-function-type">Function type</a>.</p>
+</li>
+<li>
+<p>The <code>ProcessType</code> can hold a process definition. It allows you to pass
+a process definition to a another process. It is further explained in
+<a href="#ref-process-type">Process type</a>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The <code>TypeName</code> is the name of a type defined with a <code>type</code> definition
+(explained in <a href="#ref-type-definitions">Type definitions</a>). For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">type lot = real;
+
+model M():
+    lot x;
+
+    ...
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>lot x</code> variable declaration (explained in <a href="#ref-variable-declarations">Local variables</a>)
+uses the type definition of <code>lot</code> at the first line to define the type of
+variable <code>x</code>.</p>
+</div>
+<div class="paragraph">
+<p>The <code>EnumTypeName</code> is similar, except it uses an enumeration definition (see
+<a href="#ref-enum-definitions">Enumeration definitions</a>) as type. For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">enum FlagColours = {red, white, blue};
+
+model M():
+    FlagColours x = white;
+
+    ...
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>FlagColours x</code> variable declaration defines that variable <code>x</code> has the
+type of the enumeration, and can hold its values.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect3">
+<h4 id="ref-elementary-type">Elementary types</h4>
+<div class="paragraph">
+<p>The elementary types do not depend on other types to define their set of
+allowed values. Their syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/elementary_type.png" alt="elementary type">
+</div>
+</div>
+<div class="paragraph">
+<p>As you can see, they are mostly just a single keyword. The
+<code>ConstantExpression</code> nodes in the <code>matrix</code> type line are integer
+expressions with a fixed (and known) value before execution of the program.
+More information about the elementary types is provided below.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="ref-boolean-type">Boolean type</h5>
+<div class="paragraph">
+<p>The <code>bool</code> keyword denotes the boolean data type. The allowed values are
+<code>false</code> and <code>true</code>. While it is allowed to store boolean values in other
+data types, their most frequent use is in expressions of statements that
+decide what to do, for example, the condition in the <code>while</code>, <code>if</code> or
+select statement (see <a href="#ref-while-loop-statement">While loop statement</a>,
+<a href="#ref-choice-statement">Choice statement</a> and <a href="#ref-select-statement">Select statement</a>).
+Expressions with booleans are explained in <a href="#ref-boolean-expression">Boolean expressions</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-integer-type">Integer type</h5>
+<div class="paragraph">
+<p>The <code>int</code> keyword denotes the integer data type, integer numbers from
+<code>2147483647</code> to <code>-2147483648</code> (a standard signed 32 bit number). Values outside
+that range give undefined behavior.
+Expressions with integers are explained in <a href="#ref-integer-expression">Integer expressions</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-real-type">Real type</h5>
+<div class="paragraph">
+<p>The <code>real</code> keyword denotes the real number data type, real numbers between
+<code>4.94065645841246544e-324</code> to <code>1.79769313486231570e+308</code> positive or negative (a
+standard 8 bytes IEEE 754 number). As normal with floating point numbers in
+computer systems, many  values are missing from the above range. Expect
+rounding errors with each calculation.
+Expressions with real numbers are explained in <a href="#ref-real-expression">Real number expressions</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-string-type">String type</h5>
+<div class="paragraph">
+<p>The <code>string</code> keyword denotes strings, sequences of characters. It contains
+all printable ASCII characters U+0020 to U+007E, and 'tab' (U+0009) and
+'new line' (U+000A).
+Expressions with strings are explained in <a href="#ref-string-expression">String expressions</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-file-type">File type</h5>
+<div class="paragraph">
+<p>The <code>file</code> keyword denotes a file at the file system of the computer. It
+allows reading and writing values of many data types (not all data types can
+be read or written). Expressions with files are explained in
+<a href="#ref-file-expression">File handle expressions</a>.
+How to work with files is explained in <a href="#tut-chapter-input-and-output">Input and output</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-inst-type">Instance type</h5>
+<div class="paragraph">
+<p>The <code>inst</code> keyword denotes an instance type, it can store a running
+process. Its use is to check whether the stored process has ended.
+The <a href="#ref-finish-statement">Finish statement</a> gives more details and provides an example.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-timer-type">Timer type</h5>
+<div class="paragraph">
+<p>The <code>timer</code> keyword denotes a count-down timer. Variables of this type
+measure time that has passed since their initialization. Expressions with
+timers are given in <a href="#ref-timer-expression">Timer expressions</a>, a tutorial about using
+timers can be found in <a href="#tut-using-timers">Timers</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-matrix-type">Matrix type</h5>
+<div class="paragraph">
+<p>The <code>matrix</code> type takes two constant expressions that define the number of
+rows and the number of columns of the matrix. The main purpose of the data
+type is to allow temporary storage of matrices so they can be passed on to
+other software. The Chi language also has expressions to write literal
+matrices, see <a href="#ref-matrix-expression">Matrix expression</a> for details.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-void-type">Void type</h5>
+<div class="paragraph">
+<p>The <code>void</code> type denotes that no data is involved. Values of type <code>void</code> do
+not exist. The type is allowed at two places in the Chi specification, namely</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>As data type of synchronization channels. Further explanation can be found
+at <a href="#ref-communication-statements">Communication statements</a> and <a href="#ref-channel-type">Channel type</a>.</p>
+</li>
+<li>
+<p>As exit type of <a href="#ref-model-definitions">Model definitions</a> and
+<a href="#ref-process-definitions">Process definitions</a>, to express that it may return an exit value
+from an <a href="#ref-exit-statement">Exit statement</a> without arguments.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-container-type">Container types</h4>
+<div class="paragraph">
+<p>The main function of container types is to organize and hold a collection of
+values of another type (the <em>element type</em>).
+The syntax diagram of the container types is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/container_type.png" alt="container type">
+</div>
+</div>
+<div class="paragraph">
+<p>The language has three container types, <em>lists</em> (explained in
+<a href="#ref-list-type">List type</a>), <em>sets</em> (explained in <a href="#ref-set-type">Set type</a>), and
+<em>dictionaries</em> (explained in <a href="#ref-dictionary-type">Dictionary type</a>).</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="ref-list-type">List type</h5>
+<div class="paragraph">
+<p>The list type has an ordered collection of values from its element type as its
+value. Duplicate element values are allowed.</p>
+</div>
+<div class="paragraph">
+<p>The syntax of a list type is given below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/list_type.png" alt="list type">
+</div>
+</div>
+<div class="paragraph">
+<p>It starts with the keyword <code>list</code>, optionally followed by a parenthesized
+(non-negative) integer expression denoting the initial number of element
+values in the collection, and finally the type of the element values.</p>
+</div>
+<div class="paragraph">
+<p>The default size of the collection is the value of the integer expression, or
+0 if there is no such expression. The value of the elements in the initial
+list value depends on the type of the elements.</p>
+</div>
+<div class="paragraph">
+<p>A few examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">list bool    # A list of boolean values, initial value is &lt;bool&gt;[]
+list (2) int # A list of integer values, initial value is [0, 0]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For a discussion of operations on values of this type,
+see <a href="#ref-list-expression">List expressions</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-set-type">Set type</h5>
+<div class="paragraph">
+<p>The set type has an unordered collection of values from its element type as
+its value. Duplicate element values are silently discarded.</p>
+</div>
+<div class="paragraph">
+<p>The syntax of the set type is given below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/set_type.png" alt="set type">
+</div>
+</div>
+<div class="paragraph">
+<p>The set type starts with a <code>set</code> keyword, followed by the type of its
+elements. Its initial value is the empty set.
+An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">set real  # A set of real numbers, initial value &lt;real&gt;{}.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For a discussion of operations on values of this type, see
+<a href="#ref-set-expression">Set expressions</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="ref-dictionary-type">Dictionary type</h5>
+<div class="paragraph">
+<p>The dictionary type has an unordered collection of values of its key type, so
+called keys. The keys are unique in the collection. In addition,
+the dictionary has a value of its value type associated with each key.</p>
+</div>
+<div class="paragraph">
+<p>The syntax of a dictionary type is given below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/dictionary_type.png" alt="dictionary type">
+</div>
+</div>
+<div class="paragraph">
+<p>The syntax starts with a <code>dict</code> keyword, and the key type and value type
+between parentheses, separated by a colon.
+The initial value of a dictionary type is the empty dictionary. An example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">dict (bool : int)  # A dictionary with boolean keys, and integer values.
+                   # Initial value &lt;bool:int&gt;{}.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For a discussion of operations on values of this type, see
+<a href="#ref-dictionary-expression">Dictionary expressions</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-tuple-type">Tuple type</h4>
+<div class="paragraph">
+<p>A tuple contains a fixed number of values of (possibly) different types. Its
+syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/tuple_type.png" alt="tuple type">
+</div>
+</div>
+<div class="paragraph">
+<p>A tuple type starts with the keyword <code>tuple</code>, followed by the list of its
+fields between parentheses. Each field has a name and a type. Sequences of
+fields with the same type can share their type description, which reduces the
+amount of text of the tuple type.
+Tuple types must have at least two fields.</p>
+</div>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-chi" data-lang="chi">tuple(int a, b)      # A tuple containing fields 'a' and 'b', both of type int
+tuple(int a; int b)  # A tuple containing fields 'a' and 'b', both of type int
+
+tuple(lot x; real start) # A tuple with a 'lot' and a 'real' type.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first two examples are equivalent, the first form is just a bit shorter in
+notation. The third example is more common fields of different types that are
+kept together in the modeled system.
+Expressions with tuples are discussed in <a href="#ref-tuple-expression">Tuple expression</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-channel-type">Channel type</h4>
+<div class="paragraph">
+<p>The channel type defines the direction and the type of values transported.
+The syntax of the channel type is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/channel_type.png" alt="channel type">
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>chan</code> keyword denotes a channel type is being created. It may be
+followed by allowed directions of transport, a <code>!</code> means that sending values
+is allowed but not for receiving, and a <code>?</code> means that receiving values is
+allowed and sending is not allowed. Finally <code>!?</code> means
+both sending and receiving is allowed. The latter is also selected when no
+direction is specified.
+The language silently discards allowed directions. A channel usable for both
+sending and receiving may be used as a channel for sending only (dropping
+the ability to receive at that point). It does not allow adding directions, a
+receive-only channel cannot be used for sending. It can also not be used as a
+channel for sending and receiving, even if then latter is only used for
+receiving values (that is, sending is never done).</p>
+</div>
+<div class="paragraph">
+<p>The type of data that is transported with a communication is given by the
+<code>Type</code> block. Signalling channels (that only synchronize without
+transporting data) are indicated by the <code>void</code> keyword.
+The only expressions available for channels are the equality tests, and a
+function to create new channels, see
+<a href="#ref-channel-expression">Channel expressions</a> for details.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-distribution-type">Distribution type</h4>
+<div class="paragraph">
+<p>The distribution type represents a stochastic distribution. The syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/distribution_type.png" alt="distribution type">
+</div>
+</div>
+<div class="paragraph">
+<p>A stochastic distribution allows modeling of random behavior, but with a known
+chance distribution. The <code>Type</code> block in the <code>DistributionType</code> diagram
+defines the type of values drawn. For a discussion of expressions for the
+distribution type, see <a href="#ref-distribution-expression">Distribution expressions</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-function-type">Function type</h4>
+<div class="paragraph">
+<p>The function type can hold a function. Its syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/function_type.png" alt="function type">
+</div>
+</div>
+<div class="paragraph">
+<p>A function type starts with the keyword <code>func</code> followed by the return type
+of the function and the type of the formal parameters.
+The purpose of the function type is to pass functions to processes or other
+functions, for example, the predicate function in <code>sort</code> and <code>insert</code>, see
+<a href="#ref-list-stdlib">List functions</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-process-type">Process type</h4>
+<div class="paragraph">
+<p>The process type is similar to the function type (discussed in
+<a href="#ref-function-type">Function type</a>), except this type can hold a process definition.
+The syntax is</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./reference-manual/rail_diagrams/process_type.png" alt="process type">
+</div>
+</div>
+<div class="paragraph">
+<p>The type starts with the keyword <code>proc</code> followed by the formal parameters of
+the process definition to store between parentheses.
+Expressions with process types are explained in <a href="#ref-process-expression">Process expressions</a>.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="ref-chapter-lexical-syntax">Lexical syntax</h3>
+<div class="paragraph">
+<p>At the lowest level, a Chi specification file consists of a sequence of
+characters. The characters are grouped together to form keywords, names,
+literal values such as numbers, and symbols such as expression operators
+like <code>+</code> and statement separator <code>;</code>. Also comments are recognized at this
+level.</p>
+</div>
+<div class="sect3">
+<h4 id="ref-whitespace">Whitespace</h4>
+<div class="paragraph">
+<p>The characters that delimit groups and lines from each other is known as
+<em>whitespace</em>. It contains the 'tab' character (U0009), the 'line feed'
+character (U000A), the 'carriage return' character (U000D), and the 'space'
+character (U0020).</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-comment">Comment</h4>
+<div class="paragraph">
+<p>A comment is a line of text intended for annotating the program text. It can
+also be used to (temporarily) add or remove statements.
+In the latter case, do note that the meaning of the program may change.</p>
+</div>
+<div class="paragraph">
+<p>A line of comment starts with a 'hash' character <code>#</code>, and continues
+until a 'line feed' character (or the end of the file). All characters in the
+comment are ignored by the simulator.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-lexical-names">Names</h4>
+<div class="paragraph">
+<p>A name is a word-like group of characters. It may start with a <code>$</code> prefix.
+After the prefix (if one is provided), first a letter (<code>A</code> to <code>Z</code> or <code>a</code>
+to <code>z</code>) or an 'underscore' character <code>_</code> should be used, optionally
+followed by more letters, 'underscore' characters, or digits <code>0</code> to <code>9</code>.</p>
+</div>
+<div class="paragraph">
+<p>Some names are special in the sense that the Chi language reserves them for
+its own use, for example the names <code>model</code> and <code>end</code>. Keywords are always
+written using lowercase letters. In the grammar diagrams, the keywords are
+shown in a rounded box. Names starting with a <code>$</code> prefix are never used as
+keyword.</p>
+</div>
+<div class="paragraph">
+<p>Names not used as keyword can be used to give entities in the Chi program a
+unique identification. In the grammar of this reference manual names are split
+according to the kind of entity that they refer to:</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1">ConstantName</dt>
+<dd>
+<p>Name that refers to a constant value, see <a href="#ref-constant-definitions">Constant definitions</a>
+for details.</p>
+</dd>
+<dt class="hdlist1">EnumtypeName</dt>
+<dd>
+<p>Name that refers to an enum type, see <a href="#ref-enum-definitions">Enumeration definitions</a> for
+details.</p>
+</dd>
+<dt class="hdlist1">EnumvalueName</dt>
+<dd>
+<p>Name that refers to a value within an enum type, see
+<a href="#ref-enum-value-expression">Enumeration value</a> for details.</p>
+</dd>
+<dt class="hdlist1">FieldName</dt>
+<dd>
+<p>Name that refers to a field in a tuple type, see <a href="#ref-tuple-type">Tuple type</a>
+for more details about tuples.</p>
+</dd>
+<dt class="hdlist1">FunctionName</dt>
+<dd>
+<p>Name that refers to a function definition, see
+<a href="#ref-function-definitions">Function definitions</a> for details.</p>
+</dd>
+<dt class="hdlist1">ModelName</dt>
+<dd>
+<p>Name that refers to a model definition, see <a href="#ref-model-definitions">Model definitions</a>
+for details.</p>
+</dd>
+<dt class="hdlist1">ProcessName</dt>
+<dd>
+<p>Name that refers to a process definition, see
+<a href="#ref-process-definitions">Process definitions</a> for details.</p>
+</dd>
+<dt class="hdlist1">TypeName</dt>
+<dd>
+<p>Name that refers to a type, see <a href="#ref-type-definitions">Type definitions</a> for details.</p>
+</dd>
+<dt class="hdlist1">VariableName</dt>
+<dd>
+<p>Name that refers to a variable (see <a href="#ref-variable-declarations">Local variables</a>) or
+formal parameter in a process or function (see <a href="#ref-formal-parameters">Formal parameters</a>).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>Names are also shown in a rounded box, but as shown above, start with an
+uppercase letter and end with <code>Name</code>.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="ref-chapter-migration">Model migration</h3>
+<div class="paragraph">
+<p>There are currently no migrations to upgrade from older versions of Chi.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="ref-chapter-svg-visualization">SVG visualization</h3>
+<div class="paragraph">
+<p>The Chi simulator has the possibility to display an SVG file during the
+simulation. The model can modify the displayed image depending on the state of
+the simulated system, thus visualizing the system.</p>
+</div>
+<div class="paragraph">
+<p>Such a visualization is useful for getting a quick global verification, as
+well as explaining the purpose of the model to people that do not know the
+detailed ins and outs of the problem being solved.</p>
+</div>
+<div class="paragraph">
+<p>Below are the technical details of the SVG visualization. The tutorial has a
+<a href="#tut-chapter-svg-visualization">more gentle introduction</a> into the subject.</p>
+</div>
+<div class="sect3">
+<h4 id="ref-svg-interface">SVG interface</h4>
+<div class="paragraph">
+<p>The SVG visualization itself is controlled by the simulator. Normally, it is
+updated just before a time step is performed. The simulation can however
+force an update with the <code>redraw</code> command (see below for details).</p>
+</div>
+<div class="paragraph">
+<p>The simulation accesses the SVG visualization by opening a file for writing
+with a name like <code>SVG:xyz.svg</code>. The <code>SVG:</code> prefix redirects the request to
+the SVG visualizer, the <code>xyz.svg</code> suffix is the name of the SVG file to
+display. The file should be available at the file system.</p>
+</div>
+<div class="paragraph">
+<p>Different Chi processes may open the same file at the same time. The SVG
+visualizer can only display one SVG file at a time, it is not allowed for
+processes to open different <code>.svg</code> files.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="ref-visualization-modification-commands">Visualization modification commands</h4>
+<div class="paragraph">
+<p>After opening the file, the content of the SVG file can be changed by
+modifying the nodes. This is done by writing lines with commands (one command
+at each line). Available commands are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><strong>Copy an element (recursively)</strong></p>
+<div class="paragraph">
+<p><code>copy [orig-id], [opt-prefix], [op-suffix]</code>, with <code>[orig-id]</code> the
+id-name of the element to copy, <code>[opt-prefix]</code> an optional prefix that is
+added to the <code>id</code> of all copied elements, and <code>[opt-suffix]</code> an optional
+suffix that is added to the <code>id</code> of all copied elements. Since the <code>id</code>
+of all elements must be unique, leaving both the prefix and the suffix empty
+gives an error about duplicate <code>id</code> labels.</p>
+</div>
+<div class="paragraph">
+<p>Note that the element (and its descendants) is only copied, but not moved.
+In other words, after copying it is fully obscured by the original element.
+The next step is normally an absolute move command or an attribute command
+to perform a relative translate transformation.</p>
+</div>
+</li>
+<li>
+<p><strong>Move an element to an absolute position</strong></p>
+<div class="paragraph">
+<p><code>absmove [id] ([xpos], [ypos])</code> with <code>[id]</code> the id-name of the
+element to move, <code>[xpos]</code> the horizontal position to move to, and
+<code>[ypos]</code> the vertical position to move to. This operation adds a
+translation to the <code>transform</code> attribute of the node such that the
+top-left corner of the bounding rectangle is moved to the provided position.
+It also takes the existing transformation into account, and in doing so,
+will fail if the transformation cannot be reversed.</p>
+</div>
+<div class="paragraph">
+<p>The origin of the coordinate system is at the top-left of the SVG
+visualization window, with positive X running to the right, and positive Y
+running down.</p>
+</div>
+<div class="paragraph">
+<p>Avoid using this operation repeatedly on the same element. Instead move it
+once to a base position, and perform relative translate transformations
+on a child element to move it to the desired position.</p>
+</div>
+</li>
+<li>
+<p><strong>Change an attribute of an element</strong></p>
+<div class="paragraph">
+<p><code>attr [id].[atrribute] = [value]</code> with <code>[id]</code> the id-name of the
+element, <code>[attribute]</code> the name of the attribute of the element to change,
+and <code>[value]</code> the new value of the attribute.</p>
+</div>
+<div class="paragraph">
+<p>A change overwrites any previous value of the attribute. Also, names of
+attributes and syntax of values are not checked.</p>
+</div>
+</li>
+<li>
+<p><strong>Change the text of an element</strong></p>
+<div class="paragraph">
+<p><code>text [id] = [value]</code> with <code>[id]</code> the id-name of the element, and
+<code>[value]</code> the new text.</p>
+</div>
+</li>
+<li>
+<p><strong>Force a redraw of the image</strong></p>
+<div class="paragraph">
+<p>Normally the program redraws the SVG image when it detects a change in time
+after making changes in the image by using one of the previous commands.
+With this command you can fake a change in time, thus allowing you to also
+display intermediate states.</p>
+</div>
+<div class="paragraph">
+<p>The command is mostly useful in experiments, where time never changes.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="tool-chapter-tool-manual">Chi Tool Manual</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This manual explains how to use the Chi simulation software. Before using
+the software however, you need to install it. The software is part of the
+Eclipse ESCET software.</p>
+</div>
+<div class="paragraph">
+<p>Once you&#8217;re finished installing, you can start to
+<a href="#tool-chapter-software-operation">simulate</a> Chi programs. The easiest way to
+start simulation is to press the <em>F9</em> key in a Chi text editor, or when a Chi
+(a file with a <code>.chi</code> extension) is selected in the
+<em>Project Explorer</em> or <em>Package Explorer</em> tab.</p>
+</div>
+<div class="paragraph">
+<p><em>Topics</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tool-chapter-software-operation">Available operations on a <code>chi</code> file</a></p>
+</li>
+<li>
+<p><a href="#tool-chapter-command-line">Command line options</a></p>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="tool-chapter-software-operation">Software operation</h3>
+<div class="paragraph">
+<p>The Chi simulator software performs two steps internally:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Type checking of the Chi source file, and building a simulator for it.</p>
+</li>
+<li>
+<p>Running the created simulator.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Starting with a <code>.chi</code> source file, both steps have to be performed for a
+simulation. As this is the common situation, the software normally combines
+both steps.
+If you run many experiments with the same file, it becomes useful to skip the
+first step. How to do this is explained in <a href="#tool-compile-or-simulate">Compile only</a>.
+In addition, the software can be run from the command line. In that case,
+command-line options as explained in <a href="#tool-chapter-command-line">Command line options</a> need to be
+specified.</p>
+</div>
+<div class="sect3">
+<h4 id="tool-compile-and-simulate">Compile and simulate</h4>
+<div class="paragraph">
+<p>Normally, you want to simulate a <code>.chi</code> source file. The Chi simulator
+software uses two steps internally (first checking the input and building the
+simulator, then running the just created simulator), but these steps are
+combined in the dialog.</p>
+</div>
+<div class="paragraph">
+<p>The process starts by selecting the source file you want to use (a file with
+a <code>.chi</code> extension) in the <em>Project Explorer</em> or <em>Package Explorer</em> tab, and opening the
+popup menu with the right mouse button from that selection.
+Alternatively, open the file in the editor, and use the right mouse button to
+get a similar popup menu.</p>
+</div>
+<div class="paragraph">
+<p>From the popup menu, select <em>Simulate Chi file</em> entry. The
+selection causes the <em>Console</em> view to be opened in Eclipse, and a
+dialog window pops up to set the simulator options like below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tool-manual/chi_simulator_dialog.png" alt="chi simulator dialog">
+</div>
+</div>
+<div class="paragraph">
+<p>The dialog shows the source file being used in the <em>Input file path</em> box.
+Below it, in the <em>Instance</em> box, you can enter how to run the
+model or the experiment of the source file. The syntax of the input is the same
+as you would
+write it in your Chi file. For example, with a model definition
+<code>model M(list real xs, int n): ... end</code>, you could write <code>M([1.5, 2.81], 15)</code> as
+model instantiation. If you leave the entry empty, the simulator tries to find
+an experiment without any parameters (for example <code>X()</code>). If that fails, it
+tries to find a model without any parameters (typically <code>M()</code>). If both
+attempts fail, or the simulator finds more than one such experiment or model,
+an error is reported.</p>
+</div>
+<div class="paragraph">
+<p>If you want to set an initial seed (see
+<a href="#tut-simulating-stochastic-behavior">Simulating stochastic behavior</a> for a discussion), you can use the
+<em>Initial seed value</em> box. Value <code>0</code> means 'create a new one'.</p>
+</div>
+<div class="paragraph">
+<p>This is all you have to do, select <em>OK</em> at the bottom. The software
+performs its two steps, and if no errors are found, it runs the model.</p>
+</div>
+<div class="sect4">
+<h5 id="tool-quick-simulate">Quick simulate</h5>
+<div class="paragraph">
+<p>For files that do not need any further configuration before
+they are run, there is a <em>Quick simulate Chi file</em>. This menu
+option assumes the default configuration (a parameter-less experiment or
+model needs to be run with a new seed), skips the dialog (saving you from
+having to press <em>OK</em>) and immediately proceeds with processing the Chi file.</p>
+</div>
+<div class="paragraph">
+<p>This functionality is also available from the Chi text editor, by pressing
+the <em>F9</em> key. Alternatively, you can select a Chi file in the
+<em>Project Explorer</em> or <em>Package Explorer</em>, and press the
+<em>F9</em> key.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tool-compile-or-simulate">Compile only</h4>
+<div class="paragraph">
+<p>The above is convenient for simple experiments, but checking the input and
+building a simulator each time is tedious if you want to do several
+experiments with the same source file.
+For this reason, each step can be done separately as well.</p>
+</div>
+<div class="paragraph">
+<p>Only building a simulator starts in the same way as above, select a <code>.chi</code>
+source file from the <em>Project Explorer</em>, the <em>Package Explorer</em>
+or an editor window, and right-click at it. Select the <em>Simulate Chi file</em>
+option from the popup menu. As the file only gets compiled, the
+simulator options are of no interest. Instead switch to the <em>Compiler</em>
+tab. It looks like this:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tool-manual/chi_compiler_dialog.png" alt="chi compiler dialog">
+</div>
+</div>
+<div class="paragraph">
+<p>Most settings are only useful for developers, but at the bottom, check the
+<em>Write the compiled Java code to a .cchi file</em> box, and click
+<em>OK</em> at the bottom. Setting this option causes the simulator
+software to check the input file, build a simulator, write the constructed
+simulator to a <code>.cchi</code> file (a compiled Chi file), and quit. No simulation
+of the Chi model is performed at this time.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tool-simulate-a-compiled-model">Simulate a compiled model</h4>
+<div class="paragraph">
+<p>You can simulate the Chi model from the <code>.cchi</code> file now, by selecting
+that file as source file by right-clicking on it. Select the
+<em>Simulate Chi file</em> or the <em>Quick simulate Chi file</em>
+option as before, and proceed with setting the
+simulator options and running the model as-if you selected a normal <code>.chi</code>
+file, as explained in <a href="#tool-compile-and-simulate">Compile and simulate</a> above.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tool-terminating-a-simulation">Terminating a simulation</h4>
+<div class="paragraph">
+<p>A simulation ends when:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The model goes into a deadlock state,</p>
+</li>
+<li>
+<p>An <code>exit</code> statement is performed (see <a href="#tut-exit">experiments</a>
+in the tutorial),</p>
+</li>
+<li>
+<p>The simulation is terminated by the user, via the console
+<em>Terminate</em> button (explained below), or</p>
+</li>
+<li>
+<p>A runtime error occurs.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The simulation can be stopped at any time by using the <em>Terminate</em> button
+(image::./tool-manual/terminate_button.png[]),
+located at the upper right corner of the console.
+Note however that if the console does not have the focus, this button may not
+be visible. If the button is not visible, click somewhere in the console to
+make the button appear. If even then the button is still not available, it may
+still appear if you <em>Maximize</em> the console. Also note that the
+button has no effect while the simulator interactively asks for input from the
+console. However, once the console input is provided, and <em>ENTER</em> is
+pressed, the termination request will be processed.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tool-chapter-command-line">Command line options</h3>
+<div class="paragraph">
+<p>When you run the Chi software from the command line, the interactive dialog
+as shown in <a href="#tool-chapter-software-operation">Software operation</a> is not shown (at least not by
+default), and everything has to be specified at the command line instead.</p>
+</div>
+<div class="paragraph">
+<p>The Chi simulator software takes one input file, which is a filename
+with <code>.chi</code> extension, or a filename with <code>.cchi</code> extension.</p>
+</div>
+<div class="paragraph">
+<p>Below is a list of the available options of such a command line. Most of them
+are for advanced uses only, and not of interest to most users.</p>
+</div>
+<div class="sect3">
+<h4 id="tool-simulator-options">Simulator options</h4>
+<div class="ulist">
+<ul>
+<li>
+<p><code>--instance=&lt;instance&gt;</code>, <code>-i &lt;instance&gt;</code></p>
+<div class="paragraph">
+<p>Instantiate the model of the file as given by instance.
+Default is instantiation of a model without parameters.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tool-general-application-options">General application options</h4>
+<div class="ulist">
+<ul>
+<li>
+<p><code>--help, -h</code></p>
+<div class="paragraph">
+<p>Prints the help text of the application to the console.</p>
+</div>
+</li>
+<li>
+<p><code>--option-dialog=&lt;bool&gt;</code></p>
+<div class="paragraph">
+<p>Whether to show the option dialog after the command line options have
+been processed. Default is <code>off</code>.</p>
+</div>
+</li>
+<li>
+<p><code>--output-mode=&lt;outmode&gt;</code>, <code>-m &lt;outmode&gt;</code></p>
+<div class="paragraph">
+<p>The output mode. Specify <code>error</code> for errors only; <code>warning</code> for errors
+and warnings only; <code>normal</code> (default) for errors, warnings, and normal
+output; or <code>debug</code> for errors, warnings, normal, and debug output.</p>
+</div>
+</li>
+<li>
+<p><code>--show-license</code></p>
+<div class="paragraph">
+<p>Prints the license text of the application to the console.</p>
+</div>
+</li>
+<li>
+<p><code>--devmode=&lt;bool&gt;</code></p>
+<div class="paragraph">
+<p>Whether exceptional situations return limited user friendly information
+(<code>--devmode=off</code>), or extended developer oriented information
+(<code>--devmode=on</code>).
+Default is user friendly information.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tool-compiler-options">Compiler options</h4>
+<div class="ulist">
+<ul>
+<li>
+<p><code>--emf=&lt;bool&gt;</code>, <code>-e &lt;bool&gt;</code></p>
+<div class="paragraph">
+<p>Whether or not to write the generated EMF model after type checking
+(default is <code>off</code>).</p>
+</div>
+</li>
+<li>
+<p><code>--directory=&lt;dir&gt;</code>, <code>-d &lt;dir&gt;</code></p>
+<div class="paragraph">
+<p>Output directory for generated Java files. Output is not written when the
+option is empty or not provided.</p>
+</div>
+</li>
+<li>
+<p><code>--java-compile=&lt;bool&gt;</code>, <code>-c &lt;bool&gt;</code></p>
+<div class="paragraph">
+<p>Whether or not to perform compilation of the generated Java code (default
+is <code>on</code>).</p>
+</div>
+</li>
+<li>
+<p><code>--jar=&lt;bool&gt;</code>, <code>-j &lt;bool&gt;</code></p>
+<div class="paragraph">
+<p>Whether or not to write the compiled Java simulator classes (default is
+<code>off</code>).</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="release-notes-chapter-index">Chi release notes</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The release notes for the releases of Chi and the associated tools, as
+part of the Eclipse ESCET project, are listed below in reverse chronological
+order.</p>
+</div>
+<div class="paragraph">
+<p>The release notes may refer to issues, the details for which can be found
+at the Eclipse ESCET
+<a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/issues">GitLab issues page</a>.</p>
+</div>
+<div class="paragraph">
+<p>See also the Eclipse ESCET
+<a href="https://www.eclipse.org/escet/escet/#release-notes-chapter-index">toolkit release notes</a>
+covering those aspects that are common to the various Eclipse ESCET tools.</p>
+</div>
+<div class="sect2">
+<h3 id="version-0-2">Version 0.2</h3>
+<div class="paragraph">
+<p>TBD</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="version-0-1">Version 0.1</h3>
+<div class="paragraph">
+<p>The first release of Chi as part of the Eclipse ESCET project.
+This release is based on the initial contribution by the Eindhoven University
+of Technology (TU/e).</p>
+</div>
+<div class="paragraph">
+<p>Most notable changes compared to the last TU/e release:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The Chi simulator no longer crashes on code generation.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="legal-chapter-index">Legal</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The material in this documentation is
+Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation.</p>
+</div>
+<div class="paragraph">
+<p>Eclipse ESCET and ESCET are trademarks of the Eclipse Foundation.
+Eclipse, and the Eclipse Logo are registered trademarks of the
+Eclipse Foundation. Other names may be trademarks of their
+respective owners.</p>
+</div>
+<div class="paragraph">
+<p><strong>License</strong></p>
+</div>
+<div class="paragraph">
+<p>The Eclipse Foundation makes available all content in this document
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the MIT License. A copy of the MIT License
+is available at <a href="https://opensource.org/licenses/MIT" class="bare">https://opensource.org/licenses/MIT</a>. For purposes of the
+MIT License, "Software" will mean the Content.</p>
+</div>
+<div class="paragraph">
+<p>If you did not receive this Content directly from the Eclipse Foundation,
+the Content is being redistributed by another party ("Redistributor") and
+different terms and conditions may apply to your use of any object code in
+the Content. Check the Redistributor&#8217;s license that was provided with the
+Content. If no such license exists, contact the Redistributor. Unless
+otherwise indicated below, the terms and conditions of the MIT License
+still apply to any source code in the Content and such source code may be
+obtained at <a href="http://www.eclipse.org" class="bare">http://www.eclipse.org</a>.</p>
+</div>
+</div>
+</div>
+</div>
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+  messageStyle: "none",
+  tex2jax: {
+    inlineMath: [["\\(", "\\)"]],
+    displayMath: [["\\[", "\\]"]],
+    ignoreClass: "nostem|nolatexmath"
+  },
+  asciimath2jax: {
+    delimiters: [["\\$", "\\$"]],
+    ignoreClass: "nostem|noasciimath"
+  },
+  TeX: { equationNumbers: { autoNumber: "none" } }
+})
+MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
+  MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) {
+    if ((node = data.script.parentNode) && (node = node.parentNode) && node.classList.contains("stemblock")) {
+      data.math.root.display = "block"
+    }
+    return data
+  })
+})
+</script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+
+<div id="footer">
+<div id="footer-text">
+<a href="https://www.eclipse.org">Eclipse Home</a>
+|
+<a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a>
+|
+<a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a>
+|
+<a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a>
+|
+<a href="https://www.eclipse.org/legal">Eclipse Legal</a>
+</div>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/Makefile b/v0.2-M1/chi/reference-manual/distribution_plots/Makefile
new file mode 100644
index 0000000..7d9adf7
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/Makefile
@@ -0,0 +1,66 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+#
+# Makefile for building density function plots.
+# The *.dat files have been generated by the
+# gen-chi-docu-distributions-plot-data.launch launch configuration.
+#
+SVG_FILES=gamma.svg beta.svg binomial.svg bernoulli.svg disc_uni.svg \
+	cont_uni.svg exponential.svg lognormal.svg normal.svg poisson.svg \
+	triangle.svg weibull.svg
+
+.phony: images clean
+
+images: $(SVG_FILES)
+
+bernoulli.svg: bernoulli.plt bernoulli.dat
+	gnuplot bernoulli.plt
+
+beta.svg: beta.plt beta_0.8_0.5.dat beta_1.5_3.0.dat beta_2.0_2.0.dat beta_5.0_1.5.dat
+	gnuplot beta.plt
+
+binomial.svg: binomial.plt binomial_20_0.5.dat binomial_20_0.7.dat binomial_40_0.5.dat
+	gnuplot binomial.plt
+
+cont_uni.svg: cont_uni.plt cont_uni1.dat cont_uni2.dat
+	gnuplot cont_uni.plt
+
+disc_uni.svg: disc_uni.plt disc_uni1.dat disc_uni2.dat
+	gnuplot disc_uni.plt
+
+exponential.svg: exponential.plt exponential_0.5.dat exponential_1.0.dat exponential_1.5.dat
+	gnuplot exponential.plt
+
+gamma.svg: gamma.plt gamma_1.0_2.0.dat gamma_3.0_2.0.dat gamma_6.0_0.5.dat gamma_6.0_2.0.dat
+	gnuplot gamma.plt
+
+lognormal.svg: lognormal.plt lognormal_0.0_0.25.dat lognormal_0.0_0.5.dat lognormal_0.0_1.0.dat
+	gnuplot lognormal.plt
+
+normal.svg: normal.plt normal_3_1.dat normal_5_2.dat
+	gnuplot normal.plt
+
+poisson.svg: poisson.plt poisson_10.0.dat poisson_4.0.dat
+	gnuplot poisson.plt
+
+triangle.svg: triangle.plt triangle_1_2_4.dat
+	gnuplot triangle.plt
+
+weibull.svg: weibull.plt weibull_0.5_1.0.dat weibull_1.0_1.0.dat weibull_1.5_1.0.dat weibull_5.0_1.0.dat
+	gnuplot weibull.plt
+
+clean:
+	for i in $(SVG_FILES) $(SVG_FILES:.svg=.pdf);\
+	do if test -f $$i;\
+	   then rm $$i;\
+	   fi;\
+	done
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/bernoulli.dat b/v0.2-M1/chi/reference-manual/distribution_plots/bernoulli.dat
new file mode 100644
index 0000000..412ce86
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/bernoulli.dat
@@ -0,0 +1,14 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0	0.31
+1	0.69
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/bernoulli.plt b/v0.2-M1/chi/reference-manual/distribution_plots/bernoulli.plt
new file mode 100644
index 0000000..cf3ffa2
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/bernoulli.plt
@@ -0,0 +1,27 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+set nokey
+set xrange [-0.2:1.2]
+set yrange [0:1]
+set xlabel "x"
+set ylabel "bernoulli(real p)"
+set label "bernoulli(0.69)" at 0.7, 0.5
+#set samples 2000
+set xtics ("false" 0, "true" 1)
+set output "bernoulli.svg"
+set style data impulses
+set pointsize 1
+plot "bernoulli.dat" using 1:2 with impulses linetype 1, \
+     "bernoulli.dat" using 1:2 with points linetype 1
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/bernoulli.svg b/v0.2-M1/chi/reference-manual/distribution_plots/bernoulli.svg
new file mode 100644
index 0000000..34feae3
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/bernoulli.svg
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L80.9,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(63.6,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M71.9,341.3 L80.9,341.3 M575.0,341.3 L566.0,341.3 '></path>
+	<g transform="translate(63.6,345.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.2</text>
+	</g>
+	<path  d='M71.9,260.1 L80.9,260.1 M575.0,260.1 L566.0,260.1 '></path>
+	<g transform="translate(63.6,264.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.4</text>
+	</g>
+	<path  d='M71.9,179.0 L80.9,179.0 M575.0,179.0 L566.0,179.0 '></path>
+	<g transform="translate(63.6,183.5)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.6</text>
+	</g>
+	<path  d='M71.9,97.8 L80.9,97.8 M575.0,97.8 L566.0,97.8 '></path>
+	<g transform="translate(63.6,102.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.8</text>
+	</g>
+	<path  d='M71.9,16.7 L80.9,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(63.6,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1</text>
+	</g>
+	<path  d='M143.8,422.4 L143.8,413.4 M143.8,16.7 L143.8,25.7 '></path>
+	<g transform="translate(143.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>false</text>
+	</g>
+	<path  d='M503.1,422.4 L503.1,413.4 M503.1,16.7 L503.1,25.7 '></path>
+	<g transform="translate(503.1,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>true</text>
+	</g>
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>bernoulli(real p)</text>
+	</g>
+	<g transform="translate(323.4,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(395.3,224.0)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>bernoulli(0.69)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M143.8,422.4 L143.8,296.6 M503.1,422.4 L503.1,142.5 '></path>
+</g>
+	</g>
+	<g id="Plot_2"><title>Plot_2</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<use xlink:href='#gpPt0' transform='translate(143.8,296.6) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(503.1,142.5) scale(4.50)'/>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/beta.plt b/v0.2-M1/chi/reference-manual/distribution_plots/beta.plt
new file mode 100644
index 0000000..8460f15
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/beta.plt
@@ -0,0 +1,31 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+#set xrange [0:20]
+#set yrange [0:0.5]
+set xlabel "x"
+set ylabel "beta(real p, q)"
+#set samples 2000
+set output "beta.svg"
+set nokey
+set label "beta(0.8, 0.5)" at 0.2, 0.8
+set label "beta(1.5, 3.0)" at 0.15, 2
+set label "beta(2.0, 2.0)" at 0.45, 1.6
+set label "beta(5.0, 1.5)" at 0.57, 2.5
+set style data lines
+plot "beta_0.8_0.5.dat" using 1:2 linetype 1, \
+     "beta_1.5_3.0.dat" using 1:2 linetype 2, \
+     "beta_2.0_2.0.dat" using 1:2 linetype 3, \
+     "beta_5.0_1.5.dat" using 1:2 linetype 4
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/beta.svg b/v0.2-M1/chi/reference-manual/distribution_plots/beta.svg
new file mode 100644
index 0000000..1226c99
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/beta.svg
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L80.9,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(63.6,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M71.9,364.4 L80.9,364.4 M575.0,364.4 L566.0,364.4 '></path>
+	<g transform="translate(63.6,368.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.5</text>
+	</g>
+	<path  d='M71.9,306.5 L80.9,306.5 M575.0,306.5 L566.0,306.5 '></path>
+	<g transform="translate(63.6,311.0)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1</text>
+	</g>
+	<path  d='M71.9,248.5 L80.9,248.5 M575.0,248.5 L566.0,248.5 '></path>
+	<g transform="translate(63.6,253.0)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1.5</text>
+	</g>
+	<path  d='M71.9,190.6 L80.9,190.6 M575.0,190.6 L566.0,190.6 '></path>
+	<g transform="translate(63.6,195.1)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 2</text>
+	</g>
+	<path  d='M71.9,132.6 L80.9,132.6 M575.0,132.6 L566.0,132.6 '></path>
+	<g transform="translate(63.6,137.1)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 2.5</text>
+	</g>
+	<path  d='M71.9,74.7 L80.9,74.7 M575.0,74.7 L566.0,74.7 '></path>
+	<g transform="translate(63.6,79.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 3</text>
+	</g>
+	<path  d='M71.9,16.7 L80.9,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(63.6,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 3.5</text>
+	</g>
+	<path  d='M71.9,422.4 L71.9,413.4 M71.9,16.7 L71.9,25.7 '></path>
+	<g transform="translate(71.9,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0</text>
+	</g>
+	<path  d='M122.2,422.4 L122.2,413.4 M122.2,16.7 L122.2,25.7 '></path>
+	<g transform="translate(122.2,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.1</text>
+	</g>
+	<path  d='M172.5,422.4 L172.5,413.4 M172.5,16.7 L172.5,25.7 '></path>
+	<g transform="translate(172.5,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.2</text>
+	</g>
+	<path  d='M222.8,422.4 L222.8,413.4 M222.8,16.7 L222.8,25.7 '></path>
+	<g transform="translate(222.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.3</text>
+	</g>
+	<path  d='M273.1,422.4 L273.1,413.4 M273.1,16.7 L273.1,25.7 '></path>
+	<g transform="translate(273.1,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.4</text>
+	</g>
+	<path  d='M323.5,422.4 L323.5,413.4 M323.5,16.7 L323.5,25.7 '></path>
+	<g transform="translate(323.5,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.5</text>
+	</g>
+	<path  d='M373.8,422.4 L373.8,413.4 M373.8,16.7 L373.8,25.7 '></path>
+	<g transform="translate(373.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.6</text>
+	</g>
+	<path  d='M424.1,422.4 L424.1,413.4 M424.1,16.7 L424.1,25.7 '></path>
+	<g transform="translate(424.1,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.7</text>
+	</g>
+	<path  d='M474.4,422.4 L474.4,413.4 M474.4,16.7 L474.4,25.7 '></path>
+	<g transform="translate(474.4,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.8</text>
+	</g>
+	<path  d='M524.7,422.4 L524.7,413.4 M524.7,16.7 L524.7,25.7 '></path>
+	<g transform="translate(524.7,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.9</text>
+	</g>
+	<path  d='M575.0,422.4 L575.0,413.4 M575.0,16.7 L575.0,25.7 '></path>
+	<g transform="translate(575.0,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 1</text>
+	</g>
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>beta(real p, q)</text>
+	</g>
+	<g transform="translate(323.4,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(172.5,334.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>beta(0.8, 0.5)</text>
+	</g>
+	<g transform="translate(147.4,195.1)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>beta(1.5, 3.0)</text>
+	</g>
+	<g transform="translate(298.3,241.4)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>beta(2.0, 2.0)</text>
+	</g>
+	<g transform="translate(358.7,137.1)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>beta(5.0, 1.5)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M76.9,295.1 L82.0,311.0 L87.0,319.2 L92.0,324.5 L97.1,328.2 L102.1,331.1 L107.1,333.4 L112.1,335.3 
+		L117.2,336.9 L122.2,338.2 L127.2,339.3 L132.3,340.3 L137.3,341.1 L142.3,341.8 L147.4,342.5 L152.4,343.0 
+		L157.4,343.5 L162.5,344.0 L167.5,344.3 L172.5,344.6 L177.6,344.9 L182.6,345.1 L187.6,345.3 L192.6,345.5 
+		L197.7,345.6 L202.7,345.7 L207.7,345.7 L212.8,345.8 L217.8,345.8 L222.8,345.7 L227.9,345.7 L232.9,345.6 
+		L237.9,345.5 L243.0,345.4 L248.0,345.3 L253.0,345.1 L258.0,344.9 L263.1,344.7 L268.1,344.5 L273.1,344.2 
+		L278.2,344.0 L283.2,343.7 L288.2,343.3 L293.3,343.0 L298.3,342.7 L303.3,342.3 L308.4,341.9 L313.4,341.4 
+		L318.4,341.0 L323.5,340.5 L328.5,340.0 L333.5,339.5 L338.5,338.9 L343.6,338.3 L348.6,337.7 L353.6,337.1 
+		L358.7,336.4 L363.7,335.7 L368.7,334.9 L373.8,334.1 L378.8,333.3 L383.8,332.4 L388.9,331.5 L393.9,330.5 
+		L398.9,329.5 L403.9,328.5 L409.0,327.3 L414.0,326.1 L419.0,324.9 L424.1,323.6 L429.1,322.1 L434.1,320.7 
+		L439.2,319.1 L444.2,317.4 L449.2,315.6 L454.3,313.7 L459.3,311.6 L464.3,309.4 L469.3,307.1 L474.4,304.5 
+		L479.4,301.8 L484.4,298.8 L489.5,295.5 L494.5,291.9 L499.5,287.9 L504.6,283.5 L509.6,278.6 L514.6,273.1 
+		L519.7,266.8 L524.7,259.6 L529.7,251.2 L534.8,241.2 L539.8,229.1 L544.8,214.0 L549.8,194.6 L554.9,168.3 
+		L559.9,129.6 L564.9,64.5 '></path>
+</g>
+	</g>
+	<g id="Plot_2"><title>Plot_2</title>
+<g style="fill:none; color:green; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L82.0,319.1 L92.0,282.2 L102.1,257.8 L112.1,240.3 L122.2,227.6 L132.3,218.3 L142.3,211.9 
+		L152.4,207.7 L162.5,205.4 L172.5,204.7 L182.6,205.3 L192.6,207.2 L202.7,210.0 L212.8,213.7 L222.8,218.2 
+		L232.9,223.4 L243.0,229.2 L253.0,235.5 L263.1,242.1 L273.1,249.2 L283.2,256.6 L293.3,264.2 L303.3,272.0 
+		L313.4,279.9 L323.5,287.9 L333.5,296.0 L343.6,304.1 L353.6,312.2 L363.7,320.2 L373.8,328.1 L383.8,335.9 
+		L393.9,343.5 L403.9,351.0 L414.0,358.2 L424.1,365.1 L434.1,371.8 L444.2,378.2 L454.3,384.2 L464.3,389.9 
+		L474.4,395.2 L484.4,400.1 L494.5,404.6 L504.6,408.6 L514.6,412.1 L524.7,415.2 L534.8,417.7 L544.8,419.7 
+		L554.9,421.2 L564.9,422.1 '></path>
+</g>
+	</g>
+	<g id="Plot_3"><title>Plot_3</title>
+<g style="fill:none; color:blue; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L82.0,408.8 L92.0,395.7 L102.1,383.2 L112.1,371.2 L122.2,359.8 L132.3,349.0 L142.3,338.7 
+		L152.4,328.9 L162.5,319.7 L172.5,311.1 L182.6,303.1 L192.6,295.5 L202.7,288.6 L212.8,282.2 L222.8,276.3 
+		L232.9,271.1 L243.0,266.3 L253.0,262.2 L263.1,258.5 L273.1,255.5 L283.2,253.0 L293.3,251.0 L303.3,249.6 
+		L313.4,248.8 L323.5,248.5 L333.5,248.8 L343.6,249.6 L353.6,251.0 L363.7,253.0 L373.8,255.5 L383.8,258.5 
+		L393.9,262.2 L403.9,266.3 L414.0,271.1 L424.1,276.3 L434.1,282.2 L444.2,288.6 L454.3,295.5 L464.3,303.1 
+		L474.4,311.1 L484.4,319.7 L494.5,328.9 L504.6,338.7 L514.6,349.0 L524.7,359.8 L534.8,371.2 L544.8,383.2 
+		L554.9,395.7 L564.9,408.8 '></path>
+</g>
+	</g>
+	<g id="Plot_4"><title>Plot_4</title>
+<g style="fill:none; color:cyan; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L82.0,422.4 L92.0,422.4 L102.1,422.4 L112.1,422.3 L122.2,422.3 L132.3,422.1 L142.3,421.8 
+		L152.4,421.5 L162.5,420.9 L172.5,420.2 L182.6,419.2 L192.6,417.9 L202.7,416.2 L212.8,414.2 L222.8,411.8 
+		L232.9,408.8 L243.0,405.4 L253.0,401.3 L263.1,396.6 L273.1,391.3 L283.2,385.2 L293.3,378.4 L303.3,370.8 
+		L313.4,362.3 L323.5,353.1 L333.5,342.9 L343.6,331.9 L353.6,320.1 L363.7,307.3 L373.8,293.8 L383.8,279.5 
+		L393.9,264.5 L403.9,248.8 L414.0,232.6 L424.1,216.1 L434.1,199.3 L444.2,182.5 L454.3,166.0 L464.3,150.0 
+		L474.4,135.0 L484.4,121.5 L494.5,110.0 L504.6,101.3 L514.6,96.5 L524.7,96.9 L534.8,104.5 L544.8,122.4 
+		L554.9,155.9 L564.9,217.7 '></path>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/beta_0.8_0.5.dat b/v0.2-M1/chi/reference-manual/distribution_plots/beta_0.8_0.5.dat
new file mode 100644
index 0000000..8c993e2
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/beta_0.8_0.5.dat
@@ -0,0 +1,110 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.010000	1.097966
+0.020000	0.960700
+0.030000	0.890423
+0.040000	0.845005
+0.050000	0.812364
+0.060000	0.787431
+0.070000	0.767619
+0.080000	0.751441
+0.090000	0.737968
+0.100000	0.726583
+0.110000	0.716858
+0.120000	0.708482
+0.130000	0.701227
+0.140000	0.694915
+0.150000	0.689412
+0.160000	0.684610
+0.170000	0.680421
+0.180000	0.676776
+0.190000	0.673618
+0.200000	0.670897
+0.210000	0.668574
+0.220000	0.666615
+0.230000	0.664991
+0.240000	0.663678
+0.250000	0.662656
+0.260000	0.661906
+0.270000	0.661413
+0.280000	0.661163
+0.290000	0.661147
+0.300000	0.661353
+0.310000	0.661774
+0.320000	0.662403
+0.330000	0.663234
+0.340000	0.664261
+0.350000	0.665482
+0.360000	0.666893
+0.370000	0.668492
+0.380000	0.670277
+0.390000	0.672247
+0.400000	0.674402
+0.410000	0.676743
+0.420000	0.679271
+0.430000	0.681986
+0.440000	0.684892
+0.450000	0.687991
+0.460000	0.691287
+0.470000	0.694783
+0.480000	0.698484
+0.490000	0.702397
+0.500000	0.706525
+0.510000	0.710877
+0.520000	0.715460
+0.530000	0.720282
+0.540000	0.725352
+0.550000	0.730681
+0.560000	0.736280
+0.570000	0.742160
+0.580000	0.748336
+0.590000	0.754822
+0.600000	0.761634
+0.610000	0.768791
+0.620000	0.776312
+0.630000	0.784220
+0.640000	0.792537
+0.650000	0.801290
+0.660000	0.810510
+0.670000	0.820228
+0.680000	0.830481
+0.690000	0.841310
+0.700000	0.852759
+0.710000	0.864880
+0.720000	0.877730
+0.730000	0.891375
+0.740000	0.905886
+0.750000	0.921350
+0.760000	0.937861
+0.770000	0.955531
+0.780000	0.974488
+0.790000	0.994882
+0.800000	1.016889
+0.810000	1.040717
+0.820000	1.066615
+0.830000	1.094880
+0.840000	1.125877
+0.850000	1.160051
+0.860000	1.197962
+0.870000	1.240313
+0.880000	1.288011
+0.890000	1.342247
+0.900000	1.404618
+0.910000	1.477329
+0.920000	1.563522
+0.930000	1.667866
+0.940000	1.797651
+0.950000	1.965065
+0.960000	2.192413
+0.970000	2.526339
+0.980000	3.087781
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/beta_1.5_3.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/beta_1.5_3.0.dat
new file mode 100644
index 0000000..a2e2f26
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/beta_1.5_3.0.dat
@@ -0,0 +1,62 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.020000	0.891326
+0.040000	1.209600
+0.060000	1.420367
+0.080000	1.571050
+0.100000	1.680948
+0.120000	1.760456
+0.140000	1.816060
+0.160000	1.852200
+0.180000	1.872118
+0.200000	1.878297
+0.220000	1.872707
+0.240000	1.856958
+0.260000	1.832396
+0.280000	1.800169
+0.300000	1.761270
+0.320000	1.716572
+0.340000	1.666850
+0.360000	1.612800
+0.380000	1.555050
+0.400000	1.494176
+0.420000	1.430705
+0.440000	1.365123
+0.460000	1.297884
+0.480000	1.229410
+0.500000	1.160097
+0.520000	1.090319
+0.540000	1.020427
+0.560000	0.950755
+0.580000	0.881621
+0.600000	0.813327
+0.620000	0.746161
+0.640000	0.680400
+0.660000	0.616310
+0.680000	0.554145
+0.700000	0.494152
+0.720000	0.436568
+0.740000	0.381621
+0.760000	0.329533
+0.780000	0.280519
+0.800000	0.234787
+0.820000	0.192540
+0.840000	0.153975
+0.860000	0.119282
+0.880000	0.088649
+0.900000	0.062257
+0.920000	0.040285
+0.940000	0.022905
+0.960000	0.010288
+0.980000	0.002599
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/beta_2.0_2.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/beta_2.0_2.0.dat
new file mode 100644
index 0000000..bcf4402
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/beta_2.0_2.0.dat
@@ -0,0 +1,62 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.020000	0.117600
+0.040000	0.230400
+0.060000	0.338400
+0.080000	0.441600
+0.100000	0.540000
+0.120000	0.633600
+0.140000	0.722400
+0.160000	0.806400
+0.180000	0.885600
+0.200000	0.960000
+0.220000	1.029600
+0.240000	1.094400
+0.260000	1.154400
+0.280000	1.209600
+0.300000	1.260000
+0.320000	1.305600
+0.340000	1.346400
+0.360000	1.382400
+0.380000	1.413600
+0.400000	1.440000
+0.420000	1.461600
+0.440000	1.478400
+0.460000	1.490400
+0.480000	1.497600
+0.500000	1.500000
+0.520000	1.497600
+0.540000	1.490400
+0.560000	1.478400
+0.580000	1.461600
+0.600000	1.440000
+0.620000	1.413600
+0.640000	1.382400
+0.660000	1.346400
+0.680000	1.305600
+0.700000	1.260000
+0.720000	1.209600
+0.740000	1.154400
+0.760000	1.094400
+0.780000	1.029600
+0.800000	0.960000
+0.820000	0.885600
+0.840000	0.806400
+0.860000	0.722400
+0.880000	0.633600
+0.900000	0.540000
+0.920000	0.441600
+0.940000	0.338400
+0.960000	0.230400
+0.980000	0.117600
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/beta_5.0_1.5.dat b/v0.2-M1/chi/reference-manual/distribution_plots/beta_5.0_1.5.dat
new file mode 100644
index 0000000..2a6dbf9
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/beta_5.0_1.5.dat
@@ -0,0 +1,62 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.020000	0.000002
+0.040000	0.000034
+0.060000	0.000170
+0.080000	0.000532
+0.100000	0.001284
+0.120000	0.002633
+0.140000	0.004822
+0.160000	0.008130
+0.180000	0.012866
+0.200000	0.019370
+0.220000	0.028003
+0.240000	0.039148
+0.260000	0.053207
+0.280000	0.070593
+0.300000	0.091727
+0.320000	0.117036
+0.340000	0.146944
+0.360000	0.181871
+0.380000	0.222225
+0.400000	0.268398
+0.420000	0.320756
+0.440000	0.379637
+0.460000	0.445340
+0.480000	0.518119
+0.500000	0.598175
+0.520000	0.685642
+0.540000	0.780580
+0.560000	0.882961
+0.580000	0.992659
+0.600000	1.109426
+0.620000	1.232883
+0.640000	1.362493
+0.660000	1.497540
+0.680000	1.637095
+0.700000	1.779984
+0.720000	1.924741
+0.740000	2.069554
+0.760000	2.212194
+0.780000	2.349920
+0.800000	2.479352
+0.820000	2.596300
+0.840000	2.695507
+0.860000	2.770264
+0.880000	2.811801
+0.900000	2.808234
+0.920000	2.742582
+0.940000	2.588513
+0.960000	2.299208
+0.980000	1.765560
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/binomial.plt b/v0.2-M1/chi/reference-manual/distribution_plots/binomial.plt
new file mode 100644
index 0000000..b3875d8
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/binomial.plt
@@ -0,0 +1,32 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+#set xrange [0:20]
+#set yrange [0:0.5]
+set xlabel "x"
+set ylabel "binomial(int n, real p)"
+#set samples 2000
+set output "binomial.svg"
+set nokey
+set label "binomial(20, 0.5)" at 2, 0.185
+set label "binomial(20, 0.7)" at 16, 0.17
+set label "binomial(40, 0.5)" at 24, 0.09
+set style data impulses
+set pointsize 1
+plot "binomial_20_0.5.dat" using 1:2 with impulses linetype 1, \
+     "binomial_20_0.5.dat" using 1:2 with points linetype 1, \
+     "binomial_20_0.7.dat" using 1:2 with impulses linetype 2, \
+     "binomial_20_0.7.dat" using 1:2 with points linetype 2, \
+     "binomial_40_0.5.dat" using 1:2 with impulses linetype 3, \
+     "binomial_40_0.5.dat" using 1:2 with points linetype 3
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/binomial.svg b/v0.2-M1/chi/reference-manual/distribution_plots/binomial.svg
new file mode 100644
index 0000000..b2115be
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/binomial.svg
@@ -0,0 +1,313 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M80.2,422.4 L89.2,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(71.9,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M80.2,381.8 L89.2,381.8 M575.0,381.8 L566.0,381.8 '></path>
+	<g transform="translate(71.9,386.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.02</text>
+	</g>
+	<path  d='M80.2,341.3 L89.2,341.3 M575.0,341.3 L566.0,341.3 '></path>
+	<g transform="translate(71.9,345.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.04</text>
+	</g>
+	<path  d='M80.2,300.7 L89.2,300.7 M575.0,300.7 L566.0,300.7 '></path>
+	<g transform="translate(71.9,305.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.06</text>
+	</g>
+	<path  d='M80.2,260.1 L89.2,260.1 M575.0,260.1 L566.0,260.1 '></path>
+	<g transform="translate(71.9,264.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.08</text>
+	</g>
+	<path  d='M80.2,219.5 L89.2,219.5 M575.0,219.5 L566.0,219.5 '></path>
+	<g transform="translate(71.9,224.0)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.1</text>
+	</g>
+	<path  d='M80.2,179.0 L89.2,179.0 M575.0,179.0 L566.0,179.0 '></path>
+	<g transform="translate(71.9,183.5)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.12</text>
+	</g>
+	<path  d='M80.2,138.4 L89.2,138.4 M575.0,138.4 L566.0,138.4 '></path>
+	<g transform="translate(71.9,142.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.14</text>
+	</g>
+	<path  d='M80.2,97.8 L89.2,97.8 M575.0,97.8 L566.0,97.8 '></path>
+	<g transform="translate(71.9,102.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.16</text>
+	</g>
+	<path  d='M80.2,57.3 L89.2,57.3 M575.0,57.3 L566.0,57.3 '></path>
+	<g transform="translate(71.9,61.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.18</text>
+	</g>
+	<path  d='M80.2,16.7 L89.2,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(71.9,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.2</text>
+	</g>
+	<path  d='M80.2,422.4 L80.2,413.4 M80.2,16.7 L80.2,25.7 '></path>
+	<g transform="translate(80.2,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0</text>
+	</g>
+	<path  d='M142.1,422.4 L142.1,413.4 M142.1,16.7 L142.1,25.7 '></path>
+	<g transform="translate(142.1,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 5</text>
+	</g>
+	<path  d='M203.9,422.4 L203.9,413.4 M203.9,16.7 L203.9,25.7 '></path>
+	<g transform="translate(203.9,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 10</text>
+	</g>
+	<path  d='M265.8,422.4 L265.8,413.4 M265.8,16.7 L265.8,25.7 '></path>
+	<g transform="translate(265.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 15</text>
+	</g>
+	<path  d='M327.6,422.4 L327.6,413.4 M327.6,16.7 L327.6,25.7 '></path>
+	<g transform="translate(327.6,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 20</text>
+	</g>
+	<path  d='M389.5,422.4 L389.5,413.4 M389.5,16.7 L389.5,25.7 '></path>
+	<g transform="translate(389.5,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 25</text>
+	</g>
+	<path  d='M451.3,422.4 L451.3,413.4 M451.3,16.7 L451.3,25.7 '></path>
+	<g transform="translate(451.3,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 30</text>
+	</g>
+	<path  d='M513.2,422.4 L513.2,413.4 M513.2,16.7 L513.2,25.7 '></path>
+	<g transform="translate(513.2,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 35</text>
+	</g>
+	<path  d='M575.0,422.4 L575.0,413.4 M575.0,16.7 L575.0,25.7 '></path>
+	<g transform="translate(575.0,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 40</text>
+	</g>
+	<path  d='M80.2,16.7 L80.2,422.4 L575.0,422.4 L575.0,16.7 L80.2,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>binomial(int n, real p)</text>
+	</g>
+	<g transform="translate(327.6,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(104.9,51.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>binomial(20, 0.5)</text>
+	</g>
+	<g transform="translate(278.1,82.1)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>binomial(20, 0.7)</text>
+	</g>
+	<g transform="translate(377.1,244.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>binomial(40, 0.5)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M80.2,422.4 M92.6,422.4 M104.9,422.4 L104.9,422.0 M117.3,422.4 L117.3,420.2 M129.7,422.4 L129.7,413.0 
+		M142.1,422.4 L142.1,392.4 M154.4,422.4 L154.4,347.4 M166.8,422.4 L166.8,272.4 M179.2,422.4 L179.2,178.7 
+		M191.5,422.4 L191.5,97.5 M203.9,422.4 L203.9,65.0 M216.3,422.4 L216.3,97.5 M228.6,422.4 L228.6,178.7 
+		M241.0,422.4 L241.0,272.4 M253.4,422.4 L253.4,347.4 M265.8,422.4 L265.8,392.4 M278.1,422.4 L278.1,413.0 
+		M290.5,422.4 L290.5,420.2 M302.9,422.4 L302.9,422.0 M315.2,422.4 M327.6,422.4 M340.0,422.4 M352.3,422.4 
+		M364.7,422.4 M377.1,422.4 M389.5,422.4 M401.8,422.4 M414.2,422.4 M426.6,422.4 M438.9,422.4 M451.3,422.4 
+		M463.7,422.4 M476.0,422.4 M488.4,422.4 M500.8,422.4 M513.2,422.4 M525.5,422.4 M537.9,422.4 M550.3,422.4 
+		M562.6,422.4 '></path>
+</g>
+	</g>
+	<g id="Plot_2"><title>Plot_2</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<use xlink:href='#gpPt0' transform='translate(80.2,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(92.6,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(104.9,422.0) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(117.3,420.2) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(129.7,413.0) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(142.1,392.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(154.4,347.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(166.8,272.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(179.2,178.7) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(191.5,97.5) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(203.9,65.0) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(216.3,97.5) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(228.6,178.7) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(241.0,272.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(253.4,347.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(265.8,392.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(278.1,413.0) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(290.5,420.2) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(302.9,422.0) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(315.2,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(327.6,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(340.0,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(352.3,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(364.7,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(377.1,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(389.5,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(401.8,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(414.2,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(426.6,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(438.9,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(451.3,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(463.7,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(476.0,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(488.4,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(500.8,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(513.2,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(525.5,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(537.9,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(550.3,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt0' transform='translate(562.6,422.4) scale(4.50)'/>
+</g>
+	</g>
+	<g id="Plot_3"><title>Plot_3</title>
+<g style="fill:none; color:green; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M80.2,422.4 M92.6,422.4 M104.9,422.4 M117.3,422.4 M129.7,422.4 M142.1,422.4 L142.1,422.3 M154.4,422.4 
+		L154.4,422.0 M166.8,422.4 L166.8,420.3 M179.2,422.4 L179.2,414.6 M191.5,422.4 L191.5,398.0 M203.9,422.4 
+		L203.9,359.9 M216.3,422.4 L216.3,289.8 M228.6,422.4 L228.6,190.3 M241.0,422.4 L241.0,89.2 M253.4,422.4 
+		L253.4,33.7 M265.8,422.4 L265.8,59.6 M278.1,422.4 L278.1,157.8 M290.5,422.4 L290.5,277.2 M302.9,422.4 
+		L302.9,365.9 M315.2,422.4 L315.2,408.5 M327.6,422.4 L327.6,420.8 M340.0,422.4 M352.3,422.4 M364.7,422.4 
+		M377.1,422.4 M389.5,422.4 M401.8,422.4 M414.2,422.4 M426.6,422.4 M438.9,422.4 M451.3,422.4 M463.7,422.4 
+		M476.0,422.4 M488.4,422.4 M500.8,422.4 M513.2,422.4 M525.5,422.4 M537.9,422.4 M550.3,422.4 M562.6,422.4 
+		'></path>
+</g>
+	</g>
+	<g id="Plot_4"><title>Plot_4</title>
+<g style="fill:none; color:green; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<use xlink:href='#gpPt1' transform='translate(80.2,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(92.6,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(104.9,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(117.3,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(129.7,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(142.1,422.3) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(154.4,422.0) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(166.8,420.3) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(179.2,414.6) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(191.5,398.0) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(203.9,359.9) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(216.3,289.8) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(228.6,190.3) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(241.0,89.2) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(253.4,33.7) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(265.8,59.6) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(278.1,157.8) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(290.5,277.2) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(302.9,365.9) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(315.2,408.5) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(327.6,420.8) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(340.0,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(352.3,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(364.7,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(377.1,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(389.5,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(401.8,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(414.2,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(426.6,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(438.9,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(451.3,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(463.7,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(476.0,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(488.4,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(500.8,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(513.2,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(525.5,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(537.9,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(550.3,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt1' transform='translate(562.6,422.4) scale(4.50)'/>
+</g>
+	</g>
+	<g id="Plot_5"><title>Plot_5</title>
+<g style="fill:none; color:blue; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M80.2,422.4 M92.6,422.4 M104.9,422.4 M117.3,422.4 M129.7,422.4 M142.1,422.4 M154.4,422.4 M166.8,422.4 
+		M179.2,422.4 L179.2,422.3 M191.5,422.4 L191.5,421.9 M203.9,422.4 L203.9,420.8 M216.3,422.4 L216.3,418.1 
+		M228.6,422.4 L228.6,412.1 M241.0,422.4 L241.0,400.2 M253.4,422.4 L253.4,379.6 M265.8,422.4 L265.8,348.2 
+		M278.1,422.4 L278.1,306.4 M290.5,422.4 L290.5,258.7 M302.9,422.4 L302.9,213.2 M315.2,422.4 L315.2,180.2 
+		M327.6,422.4 L327.6,168.1 M340.0,422.4 L340.0,180.2 M352.3,422.4 L352.3,213.2 M364.7,422.4 L364.7,258.7 
+		M377.1,422.4 L377.1,306.4 M389.5,422.4 L389.5,348.2 M401.8,422.4 L401.8,379.6 M414.2,422.4 L414.2,400.2 
+		M426.6,422.4 L426.6,412.1 M438.9,422.4 L438.9,418.1 M451.3,422.4 L451.3,420.8 M463.7,422.4 L463.7,421.9 
+		M476.0,422.4 L476.0,422.3 M488.4,422.4 M500.8,422.4 M513.2,422.4 M525.5,422.4 M537.9,422.4 M550.3,422.4 
+		M562.6,422.4 '></path>
+</g>
+	</g>
+	<g id="Plot_6"><title>Plot_6</title>
+<g style="fill:none; color:blue; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<use xlink:href='#gpPt2' transform='translate(80.2,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(92.6,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(104.9,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(117.3,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(129.7,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(142.1,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(154.4,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(166.8,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(179.2,422.3) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(191.5,421.9) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(203.9,420.8) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(216.3,418.1) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(228.6,412.1) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(241.0,400.2) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(253.4,379.6) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(265.8,348.2) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(278.1,306.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(290.5,258.7) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(302.9,213.2) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(315.2,180.2) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(327.6,168.1) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(340.0,180.2) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(352.3,213.2) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(364.7,258.7) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(377.1,306.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(389.5,348.2) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(401.8,379.6) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(414.2,400.2) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(426.6,412.1) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(438.9,418.1) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(451.3,420.8) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(463.7,421.9) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(476.0,422.3) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(488.4,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(500.8,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(513.2,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(525.5,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(537.9,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(550.3,422.4) scale(4.50)'/>
+	<use xlink:href='#gpPt2' transform='translate(562.6,422.4) scale(4.50)'/>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M80.2,16.7 L80.2,422.4 L575.0,422.4 L575.0,16.7 L80.2,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/binomial_20_0.5.dat b/v0.2-M1/chi/reference-manual/distribution_plots/binomial_20_0.5.dat
new file mode 100644
index 0000000..a690789
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/binomial_20_0.5.dat
@@ -0,0 +1,52 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0	0.000001
+1	0.000019
+2	0.000181
+3	0.001087
+4	0.004621
+5	0.014786
+6	0.036964
+7	0.073929
+8	0.120134
+9	0.160179
+10	0.176197
+11	0.160179
+12	0.120134
+13	0.073929
+14	0.036964
+15	0.014786
+16	0.004621
+17	0.001087
+18	0.000181
+19	0.000019
+20	0.000001
+21	0.000000
+22	0.000000
+23	0.000000
+24	0.000000
+25	0.000000
+26	0.000000
+27	0.000000
+28	0.000000
+29	0.000000
+30	0.000000
+31	0.000000
+32	0.000000
+33	0.000000
+34	0.000000
+35	0.000000
+36	0.000000
+37	0.000000
+38	0.000000
+39	0.000000
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/binomial_20_0.7.dat b/v0.2-M1/chi/reference-manual/distribution_plots/binomial_20_0.7.dat
new file mode 100644
index 0000000..c253e45
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/binomial_20_0.7.dat
@@ -0,0 +1,52 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0	0.000000
+1	0.000000
+2	0.000000
+3	0.000001
+4	0.000005
+5	0.000037
+6	0.000218
+7	0.001018
+8	0.003859
+9	0.012007
+10	0.030817
+11	0.065370
+12	0.114397
+13	0.164262
+14	0.191639
+15	0.178863
+16	0.130421
+17	0.071604
+18	0.027846
+19	0.006839
+20	0.000798
+21	0.000000
+22	0.000000
+23	0.000000
+24	0.000000
+25	0.000000
+26	0.000000
+27	0.000000
+28	0.000000
+29	0.000000
+30	0.000000
+31	0.000000
+32	0.000000
+33	0.000000
+34	0.000000
+35	0.000000
+36	0.000000
+37	0.000000
+38	0.000000
+39	0.000000
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/binomial_40_0.5.dat b/v0.2-M1/chi/reference-manual/distribution_plots/binomial_40_0.5.dat
new file mode 100644
index 0000000..49fae36
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/binomial_40_0.5.dat
@@ -0,0 +1,52 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0	0.000000
+1	0.000000
+2	0.000000
+3	0.000000
+4	0.000000
+5	0.000001
+6	0.000003
+7	0.000017
+8	0.000070
+9	0.000249
+10	0.000771
+11	0.002103
+12	0.005081
+13	0.010944
+14	0.021107
+15	0.036585
+16	0.057164
+17	0.080702
+18	0.103119
+19	0.119401
+20	0.125371
+21	0.119401
+22	0.103119
+23	0.080702
+24	0.057164
+25	0.036585
+26	0.021107
+27	0.010944
+28	0.005081
+29	0.002103
+30	0.000771
+31	0.000249
+32	0.000070
+33	0.000017
+34	0.000003
+35	0.000001
+36	0.000000
+37	0.000000
+38	0.000000
+39	0.000000
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni.plt b/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni.plt
new file mode 100644
index 0000000..fa20446
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni.plt
@@ -0,0 +1,25 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+set nokey
+set xrange [0.5:6.5]
+set yrange [0:0.25]
+set xlabel "x"
+set ylabel "uniform(real a, b)"
+set label "uniform(1.0, 6.0)" at 3.5, 0.18
+#set samples 2000
+set output "cont_uni.svg"
+set style data lines
+plot "cont_uni1.dat" using 1:2 linetype 1, \
+     "cont_uni2.dat" using 1:2 with points linetype 1 pt 6
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni.svg b/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni.svg
new file mode 100644
index 0000000..90dfa5a
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni.svg
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M80.2,422.4 L89.2,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(71.9,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M80.2,341.3 L89.2,341.3 M575.0,341.3 L566.0,341.3 '></path>
+	<g transform="translate(71.9,345.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.05</text>
+	</g>
+	<path  d='M80.2,260.1 L89.2,260.1 M575.0,260.1 L566.0,260.1 '></path>
+	<g transform="translate(71.9,264.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.1</text>
+	</g>
+	<path  d='M80.2,179.0 L89.2,179.0 M575.0,179.0 L566.0,179.0 '></path>
+	<g transform="translate(71.9,183.5)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.15</text>
+	</g>
+	<path  d='M80.2,97.8 L89.2,97.8 M575.0,97.8 L566.0,97.8 '></path>
+	<g transform="translate(71.9,102.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.2</text>
+	</g>
+	<path  d='M80.2,16.7 L89.2,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(71.9,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.25</text>
+	</g>
+	<path  d='M121.4,422.4 L121.4,413.4 M121.4,16.7 L121.4,25.7 '></path>
+	<g transform="translate(121.4,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 1</text>
+	</g>
+	<path  d='M203.9,422.4 L203.9,413.4 M203.9,16.7 L203.9,25.7 '></path>
+	<g transform="translate(203.9,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 2</text>
+	</g>
+	<path  d='M286.4,422.4 L286.4,413.4 M286.4,16.7 L286.4,25.7 '></path>
+	<g transform="translate(286.4,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 3</text>
+	</g>
+	<path  d='M368.8,422.4 L368.8,413.4 M368.8,16.7 L368.8,25.7 '></path>
+	<g transform="translate(368.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 4</text>
+	</g>
+	<path  d='M451.3,422.4 L451.3,413.4 M451.3,16.7 L451.3,25.7 '></path>
+	<g transform="translate(451.3,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 5</text>
+	</g>
+	<path  d='M533.8,422.4 L533.8,413.4 M533.8,16.7 L533.8,25.7 '></path>
+	<g transform="translate(533.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 6</text>
+	</g>
+	<path  d='M80.2,16.7 L80.2,422.4 L575.0,422.4 L575.0,16.7 L80.2,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>uniform(real a, b)</text>
+	</g>
+	<g transform="translate(327.6,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(327.6,134.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>uniform(1.0, 6.0)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M121.4,153.0 L129.7,153.0 L137.9,153.0 L146.2,153.0 L154.4,153.0 L162.7,153.0 L170.9,153.0 L179.2,153.0 
+		L187.4,153.0 L195.7,153.0 L203.9,153.0 L212.1,153.0 L220.4,153.0 L228.6,153.0 L236.9,153.0 L245.1,153.0 
+		L253.4,153.0 L261.6,153.0 L269.9,153.0 L278.1,153.0 L286.4,153.0 L294.6,153.0 L302.9,153.0 L311.1,153.0 
+		L319.4,153.0 L327.6,153.0 L335.8,153.0 L344.1,153.0 L352.3,153.0 L360.6,153.0 L368.8,153.0 L377.1,153.0 
+		L385.3,153.0 L393.6,153.0 L401.8,153.0 L410.1,153.0 L418.3,153.0 L426.6,153.0 L434.8,153.0 L443.1,153.0 
+		L451.3,153.0 L459.5,153.0 L467.8,153.0 L476.0,153.0 L484.3,153.0 L492.5,153.0 L500.8,153.0 L509.0,153.0 
+		L517.3,153.0 L525.5,153.0 L529.6,153.0 '></path>
+</g>
+	</g>
+	<g id="Plot_2"><title>Plot_2</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<use xlink:href='#gpPt5' transform='translate(533.8,153.0) scale(4.50)'/>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M80.2,16.7 L80.2,422.4 L575.0,422.4 L575.0,16.7 L80.2,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni1.dat b/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni1.dat
new file mode 100644
index 0000000..0d46570
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni1.dat
@@ -0,0 +1,63 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+1.0	0.166
+1.1	0.166
+1.2	0.166
+1.3	0.166
+1.4	0.166
+1.5	0.166
+1.6	0.166
+1.7	0.166
+1.8	0.166
+1.9	0.166
+2.0	0.166
+2.1	0.166
+2.2	0.166
+2.3	0.166
+2.4	0.166
+2.5	0.166
+2.6	0.166
+2.7	0.166
+2.8	0.166
+2.9	0.166
+3.0	0.166
+3.1	0.166
+3.2	0.166
+3.3	0.166
+3.4	0.166
+3.5	0.166
+3.6	0.166
+3.7	0.166
+3.8	0.166
+3.9	0.166
+4.0	0.166
+4.1	0.166
+4.2	0.166
+4.3	0.166
+4.4	0.166
+4.5	0.166
+4.6	0.166
+4.7	0.166
+4.8	0.166
+4.9	0.166
+5.0	0.166
+5.1	0.166
+5.2	0.166
+5.3	0.166
+5.4	0.166
+5.5	0.166
+5.6	0.166
+5.7	0.166
+5.8	0.166
+5.9	0.166
+5.95	0.166
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni2.dat b/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni2.dat
new file mode 100644
index 0000000..2f9aca7
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/cont_uni2.dat
@@ -0,0 +1,13 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+6.0	0.166
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni.plt b/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni.plt
new file mode 100644
index 0000000..c0f4ae1
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni.plt
@@ -0,0 +1,27 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+set nokey
+set xrange [0.5:6.5]
+set yrange [0:0.25]
+set xlabel "x"
+set ylabel "uniform(int a, b)"
+set label "uniform(1, 6)" at 3.5, 0.22
+#set samples 2000
+set output "disc_uni.svg"
+set style data impulses
+set pointsize 3
+plot "disc_uni1.dat" using 1:2 with impulses linetype 1, \
+     "disc_uni1.dat" using 1:2 with dots linetype 1, \
+     "disc_uni2.dat" using 1:2 with points linetype 1 pt 6 ps 1
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni.svg b/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni.svg
new file mode 100644
index 0000000..3f284af
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni.svg
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M80.2,422.4 L89.2,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(71.9,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M80.2,341.3 L89.2,341.3 M575.0,341.3 L566.0,341.3 '></path>
+	<g transform="translate(71.9,345.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.05</text>
+	</g>
+	<path  d='M80.2,260.1 L89.2,260.1 M575.0,260.1 L566.0,260.1 '></path>
+	<g transform="translate(71.9,264.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.1</text>
+	</g>
+	<path  d='M80.2,179.0 L89.2,179.0 M575.0,179.0 L566.0,179.0 '></path>
+	<g transform="translate(71.9,183.5)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.15</text>
+	</g>
+	<path  d='M80.2,97.8 L89.2,97.8 M575.0,97.8 L566.0,97.8 '></path>
+	<g transform="translate(71.9,102.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.2</text>
+	</g>
+	<path  d='M80.2,16.7 L89.2,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(71.9,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.25</text>
+	</g>
+	<path  d='M121.4,422.4 L121.4,413.4 M121.4,16.7 L121.4,25.7 '></path>
+	<g transform="translate(121.4,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 1</text>
+	</g>
+	<path  d='M203.9,422.4 L203.9,413.4 M203.9,16.7 L203.9,25.7 '></path>
+	<g transform="translate(203.9,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 2</text>
+	</g>
+	<path  d='M286.4,422.4 L286.4,413.4 M286.4,16.7 L286.4,25.7 '></path>
+	<g transform="translate(286.4,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 3</text>
+	</g>
+	<path  d='M368.8,422.4 L368.8,413.4 M368.8,16.7 L368.8,25.7 '></path>
+	<g transform="translate(368.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 4</text>
+	</g>
+	<path  d='M451.3,422.4 L451.3,413.4 M451.3,16.7 L451.3,25.7 '></path>
+	<g transform="translate(451.3,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 5</text>
+	</g>
+	<path  d='M533.8,422.4 L533.8,413.4 M533.8,16.7 L533.8,25.7 '></path>
+	<g transform="translate(533.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 6</text>
+	</g>
+	<path  d='M80.2,16.7 L80.2,422.4 L575.0,422.4 L575.0,16.7 L80.2,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>uniform(int a, b)</text>
+	</g>
+	<g transform="translate(327.6,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(327.6,69.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>uniform(1, 6)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M121.4,422.4 L121.4,97.8 M203.9,422.4 L203.9,97.8 M286.4,422.4 L286.4,97.8 M368.8,422.4 L368.8,97.8 
+		M451.3,422.4 L451.3,97.8 '></path>
+</g>
+	</g>
+	<g id="Plot_2"><title>Plot_2</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<use xlink:href='#gpDot' x='121.4' y='97.8'/>
+	<use xlink:href='#gpDot' x='203.9' y='97.8'/>
+	<use xlink:href='#gpDot' x='286.4' y='97.8'/>
+	<use xlink:href='#gpDot' x='368.8' y='97.8'/>
+	<use xlink:href='#gpDot' x='451.3' y='97.8'/>
+</g>
+	</g>
+	<g id="Plot_3"><title>Plot_3</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<use xlink:href='#gpPt5' transform='translate(533.8,97.8) scale(4.50)'/>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M80.2,16.7 L80.2,422.4 L575.0,422.4 L575.0,16.7 L80.2,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni1.dat b/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni1.dat
new file mode 100644
index 0000000..fc845f5
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni1.dat
@@ -0,0 +1,17 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+1	0.2
+2	0.2
+3	0.2
+4	0.2
+5	0.2
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni2.dat b/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni2.dat
new file mode 100644
index 0000000..0572a6a
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/disc_uni2.dat
@@ -0,0 +1,13 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+6	0.2
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/exponential.plt b/v0.2-M1/chi/reference-manual/distribution_plots/exponential.plt
new file mode 100644
index 0000000..02c68f1
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/exponential.plt
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+#set xrange [0:20]
+#set yrange [0:0.5]
+set xlabel "x"
+set ylabel "exponential(real m)"
+#set samples 2000
+set output "exponential.svg"
+set nokey
+set label "exponential(0.5)" at 0.2, 1.5
+set label "exponential(1.0)" at 0.9, 0.45
+set label "exponential(1.5)" at 2.5, 0.2
+set style data lines
+plot "exponential_0.5.dat" using 1:2 linetype 1, \
+     "exponential_1.0.dat" using 1:2 linetype 2, \
+     "exponential_1.5.dat" using 1:2 linetype 3
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/exponential.svg b/v0.2-M1/chi/reference-manual/distribution_plots/exponential.svg
new file mode 100644
index 0000000..d5b8da8
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/exponential.svg
@@ -0,0 +1,333 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L80.9,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(63.6,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M71.9,381.8 L80.9,381.8 M575.0,381.8 L566.0,381.8 '></path>
+	<g transform="translate(63.6,386.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.2</text>
+	</g>
+	<path  d='M71.9,341.3 L80.9,341.3 M575.0,341.3 L566.0,341.3 '></path>
+	<g transform="translate(63.6,345.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.4</text>
+	</g>
+	<path  d='M71.9,300.7 L80.9,300.7 M575.0,300.7 L566.0,300.7 '></path>
+	<g transform="translate(63.6,305.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.6</text>
+	</g>
+	<path  d='M71.9,260.1 L80.9,260.1 M575.0,260.1 L566.0,260.1 '></path>
+	<g transform="translate(63.6,264.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.8</text>
+	</g>
+	<path  d='M71.9,219.5 L80.9,219.5 M575.0,219.5 L566.0,219.5 '></path>
+	<g transform="translate(63.6,224.0)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1</text>
+	</g>
+	<path  d='M71.9,179.0 L80.9,179.0 M575.0,179.0 L566.0,179.0 '></path>
+	<g transform="translate(63.6,183.5)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1.2</text>
+	</g>
+	<path  d='M71.9,138.4 L80.9,138.4 M575.0,138.4 L566.0,138.4 '></path>
+	<g transform="translate(63.6,142.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1.4</text>
+	</g>
+	<path  d='M71.9,97.8 L80.9,97.8 M575.0,97.8 L566.0,97.8 '></path>
+	<g transform="translate(63.6,102.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1.6</text>
+	</g>
+	<path  d='M71.9,57.3 L80.9,57.3 M575.0,57.3 L566.0,57.3 '></path>
+	<g transform="translate(63.6,61.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1.8</text>
+	</g>
+	<path  d='M71.9,16.7 L80.9,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(63.6,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 2</text>
+	</g>
+	<path  d='M71.9,422.4 L71.9,413.4 M71.9,16.7 L71.9,25.7 '></path>
+	<g transform="translate(71.9,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0</text>
+	</g>
+	<path  d='M172.5,422.4 L172.5,413.4 M172.5,16.7 L172.5,25.7 '></path>
+	<g transform="translate(172.5,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 1</text>
+	</g>
+	<path  d='M273.1,422.4 L273.1,413.4 M273.1,16.7 L273.1,25.7 '></path>
+	<g transform="translate(273.1,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 2</text>
+	</g>
+	<path  d='M373.8,422.4 L373.8,413.4 M373.8,16.7 L373.8,25.7 '></path>
+	<g transform="translate(373.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 3</text>
+	</g>
+	<path  d='M474.4,422.4 L474.4,413.4 M474.4,16.7 L474.4,25.7 '></path>
+	<g transform="translate(474.4,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 4</text>
+	</g>
+	<path  d='M575.0,422.4 L575.0,413.4 M575.0,16.7 L575.0,25.7 '></path>
+	<g transform="translate(575.0,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 5</text>
+	</g>
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>exponential(real m)</text>
+	</g>
+	<g transform="translate(323.4,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(92.0,122.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>exponential(0.5)</text>
+	</g>
+	<g transform="translate(162.5,335.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>exponential(1.0)</text>
+	</g>
+	<g transform="translate(323.5,386.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>exponential(1.5)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,16.7 L72.9,24.7 L73.9,32.6 L74.9,40.3 L75.9,47.9 L76.9,55.3 L77.9,62.6 L78.9,69.7 
+		L79.9,76.7 L81.0,83.5 L82.0,90.2 L83.0,96.8 L84.0,103.3 L85.0,109.6 L86.0,115.8 L87.0,121.9 
+		L88.0,127.8 L89.0,133.6 L90.0,139.4 L91.0,145.0 L92.0,150.5 L93.0,155.8 L94.0,161.1 L95.0,166.3 
+		L96.0,171.4 L97.1,176.3 L98.1,181.2 L99.1,186.0 L100.1,190.7 L101.1,195.2 L102.1,199.7 L103.1,204.2 
+		L104.1,208.5 L105.1,212.7 L106.1,216.9 L107.1,220.9 L108.1,224.9 L109.1,228.8 L110.1,232.7 L111.1,236.4 
+		L112.1,240.1 L113.2,243.7 L114.2,247.3 L115.2,250.7 L116.2,254.1 L117.2,257.5 L118.2,260.7 L119.2,263.9 
+		L120.2,267.1 L121.2,270.1 L122.2,273.2 L123.2,276.1 L124.2,279.0 L125.2,281.8 L126.2,284.6 L127.2,287.4 
+		L128.2,290.0 L129.3,292.6 L130.3,295.2 L131.3,297.7 L132.3,300.2 L133.3,302.6 L134.3,305.0 L135.3,307.3 
+		L136.3,309.6 L137.3,311.8 L138.3,314.0 L139.3,316.2 L140.3,318.3 L141.3,320.3 L142.3,322.4 L143.3,324.3 
+		L144.3,326.3 L145.4,328.2 L146.4,330.0 L147.4,331.9 L148.4,333.7 L149.4,335.4 L150.4,337.1 L151.4,338.8 
+		L152.4,340.5 L153.4,342.1 L154.4,343.7 L155.4,345.3 L156.4,346.8 L157.4,348.3 L158.4,349.8 L159.4,351.2 
+		L160.4,352.6 L161.5,354.0 L162.5,355.3 L163.5,356.7 L164.5,358.0 L165.5,359.2 L166.5,360.5 L167.5,361.7 
+		L168.5,362.9 L169.5,364.1 L170.5,365.3 L171.5,366.4 L172.5,367.5 L173.5,368.6 L174.5,369.6 L175.5,370.7 
+		L176.5,371.7 L177.6,372.7 L178.6,373.7 L179.6,374.7 L180.6,375.6 L181.6,376.5 L182.6,377.4 L183.6,378.3 
+		L184.6,379.2 L185.6,380.1 L186.6,380.9 L187.6,381.7 L188.6,382.5 L189.6,383.3 L190.6,384.1 L191.6,384.9 
+		L192.6,385.6 L193.7,386.3 L194.7,387.0 L195.7,387.7 L196.7,388.4 L197.7,389.1 L198.7,389.8 L199.7,390.4 
+		L200.7,391.0 L201.7,391.7 L202.7,392.3 L203.7,392.9 L204.7,393.4 L205.7,394.0 L206.7,394.6 L207.7,395.1 
+		L208.7,395.7 L209.7,396.2 L210.8,396.7 L211.8,397.2 L212.8,397.7 L213.8,398.2 L214.8,398.7 L215.8,399.2 
+		L216.8,399.6 L217.8,400.1 L218.8,400.5 L219.8,401.0 L220.8,401.4 L221.8,401.8 L222.8,402.2 L223.8,402.6 
+		L224.8,403.0 L225.8,403.4 L226.9,403.8 L227.9,404.1 L228.9,404.5 L229.9,404.8 L230.9,405.2 L231.9,405.5 
+		L232.9,405.9 L233.9,406.2 L234.9,406.5 L235.9,406.8 L236.9,407.1 L237.9,407.4 L238.9,407.7 L239.9,408.0 
+		L240.9,408.3 L241.9,408.6 L243.0,408.9 L244.0,409.1 L245.0,409.4 L246.0,409.6 L247.0,409.9 L248.0,410.1 
+		L249.0,410.4 L250.0,410.6 L251.0,410.9 L252.0,411.1 L253.0,411.3 L254.0,411.5 L255.0,411.7 L256.0,412.0 
+		L257.0,412.2 L258.0,412.4 L259.1,412.6 L260.1,412.8 L261.1,413.0 L262.1,413.1 L263.1,413.3 L264.1,413.5 
+		L265.1,413.7 L266.1,413.9 L267.1,414.0 L268.1,414.2 L269.1,414.4 L270.1,414.5 L271.1,414.7 L272.1,414.8 
+		L273.1,415.0 L274.1,415.1 L275.2,415.3 L276.2,415.4 L277.2,415.5 L278.2,415.7 L279.2,415.8 L280.2,415.9 
+		L281.2,416.1 L282.2,416.2 L283.2,416.3 L284.2,416.4 L285.2,416.6 L286.2,416.7 L287.2,416.8 L288.2,416.9 
+		L289.2,417.0 L290.2,417.1 L291.3,417.2 L292.3,417.3 L293.3,417.4 L294.3,417.5 L295.3,417.6 L296.3,417.7 
+		L297.3,417.8 L298.3,417.9 L299.3,418.0 L300.3,418.1 L301.3,418.2 L302.3,418.2 L303.3,418.3 L304.3,418.4 
+		L305.3,418.5 L306.3,418.6 L307.4,418.6 L308.4,418.7 L309.4,418.8 L310.4,418.9 L311.4,418.9 L312.4,419.0 
+		L313.4,419.1 L314.4,419.1 L315.4,419.2 L316.4,419.3 L317.4,419.3 L318.4,419.4 L319.4,419.4 L320.4,419.5 
+		L321.4,419.6 L322.4,419.6 L323.5,419.7 L324.5,419.7 L325.5,419.8 L326.5,419.8 L327.5,419.9 L328.5,419.9 
+		L329.5,420.0 L330.5,420.0 L331.5,420.1 L332.5,420.1 L333.5,420.2 L334.5,420.2 L335.5,420.2 L336.5,420.3 
+		L337.5,420.3 L338.5,420.4 L339.5,420.4 L340.6,420.5 L341.6,420.5 L342.6,420.5 L343.6,420.6 L344.6,420.6 
+		L345.6,420.6 L346.6,420.7 L347.6,420.7 L348.6,420.7 L349.6,420.8 L350.6,420.8 L351.6,420.8 L352.6,420.9 
+		L353.6,420.9 L354.6,420.9 L355.6,421.0 L356.7,421.0 L357.7,421.0 L358.7,421.0 L359.7,421.1 L360.7,421.1 
+		L361.7,421.1 L362.7,421.1 L363.7,421.2 L364.7,421.2 L365.7,421.2 L366.7,421.2 L367.7,421.3 L368.7,421.3 
+		L369.7,421.3 L370.7,421.3 L371.7,421.4 L372.8,421.4 L373.8,421.4 L374.8,421.4 L375.8,421.4 L376.8,421.5 
+		L377.8,421.5 L378.8,421.5 L379.8,421.5 L380.8,421.5 L381.8,421.5 L382.8,421.6 L383.8,421.6 L384.8,421.6 
+		L385.8,421.6 L386.8,421.6 L387.8,421.6 L388.9,421.7 L389.9,421.7 L390.9,421.7 L391.9,421.7 L392.9,421.7 
+		L393.9,421.7 L394.9,421.7 L395.9,421.8 L396.9,421.8 L397.9,421.8 L398.9,421.8 L399.9,421.8 L400.9,421.8 
+		L401.9,421.8 L402.9,421.8 L403.9,421.8 L405.0,421.9 L406.0,421.9 L407.0,421.9 L408.0,421.9 L409.0,421.9 
+		L410.0,421.9 L411.0,421.9 L412.0,421.9 L413.0,421.9 L414.0,421.9 L415.0,422.0 L416.0,422.0 L417.0,422.0 
+		L418.0,422.0 L419.0,422.0 L420.0,422.0 L421.1,422.0 L422.1,422.0 L423.1,422.0 L424.1,422.0 L425.1,422.0 
+		L426.1,422.0 L427.1,422.1 L428.1,422.1 L429.1,422.1 L430.1,422.1 L431.1,422.1 L432.1,422.1 L433.1,422.1 
+		L434.1,422.1 L435.1,422.1 L436.1,422.1 L437.2,422.1 L438.2,422.1 L439.2,422.1 L440.2,422.1 L441.2,422.1 
+		L442.2,422.1 L443.2,422.1 L444.2,422.2 L445.2,422.2 L446.2,422.2 L447.2,422.2 L448.2,422.2 L449.2,422.2 
+		L450.2,422.2 L451.2,422.2 L452.2,422.2 L453.2,422.2 L454.3,422.2 L455.3,422.2 L456.3,422.2 L457.3,422.2 
+		L458.3,422.2 L459.3,422.2 L460.3,422.2 L461.3,422.2 L462.3,422.2 L463.3,422.2 L464.3,422.2 L465.3,422.2 
+		L466.3,422.2 L467.3,422.2 L468.3,422.2 L469.3,422.2 L470.4,422.3 L471.4,422.3 L472.4,422.3 L473.4,422.3 
+		L474.4,422.3 L475.4,422.3 L476.4,422.3 L477.4,422.3 L478.4,422.3 L479.4,422.3 L480.4,422.3 L481.4,422.3 
+		L482.4,422.3 L483.4,422.3 L484.4,422.3 L485.4,422.3 L486.5,422.3 L487.5,422.3 L488.5,422.3 L489.5,422.3 
+		L490.5,422.3 L491.5,422.3 L492.5,422.3 L493.5,422.3 L494.5,422.3 L495.5,422.3 L496.5,422.3 L497.5,422.3 
+		L498.5,422.3 L499.5,422.3 L500.5,422.3 L501.5,422.3 L502.6,422.3 L503.6,422.3 L504.6,422.3 L505.6,422.3 
+		L506.6,422.3 L507.6,422.3 L508.6,422.3 L509.6,422.3 L510.6,422.3 L511.6,422.3 L512.6,422.3 L513.6,422.3 
+		L514.6,422.3 L515.6,422.3 L516.6,422.3 L517.6,422.3 L518.7,422.3 L519.7,422.3 L520.7,422.3 L521.7,422.3 
+		L522.7,422.3 L523.7,422.3 L524.7,422.3 L525.7,422.4 L526.7,422.4 L527.7,422.4 L528.7,422.4 L529.7,422.4 
+		L530.7,422.4 L531.7,422.4 L532.7,422.4 L533.7,422.4 L534.8,422.4 L535.8,422.4 L536.8,422.4 L537.8,422.4 
+		L538.8,422.4 L539.8,422.4 L540.8,422.4 L541.8,422.4 L542.8,422.4 L543.8,422.4 L544.8,422.4 L545.8,422.4 
+		L546.8,422.4 L547.8,422.4 L548.8,422.4 L549.8,422.4 L550.9,422.4 L551.9,422.4 L552.9,422.4 L553.9,422.4 
+		L554.9,422.4 L555.9,422.4 L556.9,422.4 L557.9,422.4 L558.9,422.4 L559.9,422.4 L560.9,422.4 L561.9,422.4 
+		L562.9,422.4 L563.9,422.4 L564.9,422.4 L565.9,422.4 L567.0,422.4 L568.0,422.4 L569.0,422.4 L570.0,422.4 
+		L571.0,422.4 L572.0,422.4 L573.0,422.4 L574.0,422.4 L575.0,422.4 '></path>
+</g>
+	</g>
+	<g id="Plot_2"><title>Plot_2</title>
+<g style="fill:none; color:green; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,219.5 L72.9,221.6 L73.9,223.6 L74.9,225.5 L75.9,227.5 L76.9,229.4 L77.9,231.4 L78.9,233.3 
+		L79.9,235.1 L81.0,237.0 L82.0,238.9 L83.0,240.7 L84.0,242.5 L85.0,244.3 L86.0,246.1 L87.0,247.8 
+		L88.0,249.5 L89.0,251.3 L90.0,253.0 L91.0,254.7 L92.0,256.3 L93.0,258.0 L94.0,259.6 L95.0,261.2 
+		L96.0,262.8 L97.1,264.4 L98.1,266.0 L99.1,267.5 L100.1,269.1 L101.1,270.6 L102.1,272.1 L103.1,273.6 
+		L104.1,275.1 L105.1,276.6 L106.1,278.0 L107.1,279.5 L108.1,280.9 L109.1,282.3 L110.1,283.7 L111.1,285.1 
+		L112.1,286.4 L113.2,287.8 L114.2,289.1 L115.2,290.4 L116.2,291.8 L117.2,293.1 L118.2,294.3 L119.2,295.6 
+		L120.2,296.9 L121.2,298.1 L122.2,299.4 L123.2,300.6 L124.2,301.8 L125.2,303.0 L126.2,304.2 L127.2,305.4 
+		L128.2,306.5 L129.3,307.7 L130.3,308.8 L131.3,310.0 L132.3,311.1 L133.3,312.2 L134.3,313.3 L135.3,314.4 
+		L136.3,315.4 L137.3,316.5 L138.3,317.6 L139.3,318.6 L140.3,319.6 L141.3,320.7 L142.3,321.7 L143.3,322.7 
+		L144.3,323.7 L145.4,324.6 L146.4,325.6 L147.4,326.6 L148.4,327.5 L149.4,328.5 L150.4,329.4 L151.4,330.3 
+		L152.4,331.3 L153.4,332.2 L154.4,333.1 L155.4,333.9 L156.4,334.8 L157.4,335.7 L158.4,336.6 L159.4,337.4 
+		L160.4,338.3 L161.5,339.1 L162.5,339.9 L163.5,340.7 L164.5,341.6 L165.5,342.4 L166.5,343.2 L167.5,343.9 
+		L168.5,344.7 L169.5,345.5 L170.5,346.3 L171.5,347.0 L172.5,347.8 L173.5,348.5 L174.5,349.3 L175.5,350.0 
+		L176.5,350.7 L177.6,351.4 L178.6,352.1 L179.6,352.8 L180.6,353.5 L181.6,354.2 L182.6,354.9 L183.6,355.5 
+		L184.6,356.2 L185.6,356.9 L186.6,357.5 L187.6,358.2 L188.6,358.8 L189.6,359.4 L190.6,360.1 L191.6,360.7 
+		L192.6,361.3 L193.7,361.9 L194.7,362.5 L195.7,363.1 L196.7,363.7 L197.7,364.3 L198.7,364.9 L199.7,365.4 
+		L200.7,366.0 L201.7,366.6 L202.7,367.1 L203.7,367.7 L204.7,368.2 L205.7,368.8 L206.7,369.3 L207.7,369.8 
+		L208.7,370.3 L209.7,370.9 L210.8,371.4 L211.8,371.9 L212.8,372.4 L213.8,372.9 L214.8,373.4 L215.8,373.9 
+		L216.8,374.3 L217.8,374.8 L218.8,375.3 L219.8,375.8 L220.8,376.2 L221.8,376.7 L222.8,377.1 L223.8,377.6 
+		L224.8,378.0 L225.8,378.5 L226.9,378.9 L227.9,379.3 L228.9,379.8 L229.9,380.2 L230.9,380.6 L231.9,381.0 
+		L232.9,381.4 L233.9,381.9 L234.9,382.3 L235.9,382.7 L236.9,383.1 L237.9,383.4 L238.9,383.8 L239.9,384.2 
+		L240.9,384.6 L241.9,385.0 L243.0,385.3 L244.0,385.7 L245.0,386.1 L246.0,386.4 L247.0,386.8 L248.0,387.1 
+		L249.0,387.5 L250.0,387.8 L251.0,388.2 L252.0,388.5 L253.0,388.9 L254.0,389.2 L255.0,389.5 L256.0,389.9 
+		L257.0,390.2 L258.0,390.5 L259.1,390.8 L260.1,391.1 L261.1,391.4 L262.1,391.8 L263.1,392.1 L264.1,392.4 
+		L265.1,392.7 L266.1,393.0 L267.1,393.2 L268.1,393.5 L269.1,393.8 L270.1,394.1 L271.1,394.4 L272.1,394.7 
+		L273.1,394.9 L274.1,395.2 L275.2,395.5 L276.2,395.8 L277.2,396.0 L278.2,396.3 L279.2,396.5 L280.2,396.8 
+		L281.2,397.1 L282.2,397.3 L283.2,397.6 L284.2,397.8 L285.2,398.1 L286.2,398.3 L287.2,398.5 L288.2,398.8 
+		L289.2,399.0 L290.2,399.2 L291.3,399.5 L292.3,399.7 L293.3,399.9 L294.3,400.1 L295.3,400.4 L296.3,400.6 
+		L297.3,400.8 L298.3,401.0 L299.3,401.2 L300.3,401.4 L301.3,401.7 L302.3,401.9 L303.3,402.1 L304.3,402.3 
+		L305.3,402.5 L306.3,402.7 L307.4,402.9 L308.4,403.1 L309.4,403.2 L310.4,403.4 L311.4,403.6 L312.4,403.8 
+		L313.4,404.0 L314.4,404.2 L315.4,404.4 L316.4,404.5 L317.4,404.7 L318.4,404.9 L319.4,405.1 L320.4,405.2 
+		L321.4,405.4 L322.4,405.6 L323.5,405.7 L324.5,405.9 L325.5,406.1 L326.5,406.2 L327.5,406.4 L328.5,406.6 
+		L329.5,406.7 L330.5,406.9 L331.5,407.0 L332.5,407.2 L333.5,407.3 L334.5,407.5 L335.5,407.6 L336.5,407.8 
+		L337.5,407.9 L338.5,408.1 L339.5,408.2 L340.6,408.4 L341.6,408.5 L342.6,408.6 L343.6,408.8 L344.6,408.9 
+		L345.6,409.0 L346.6,409.2 L347.6,409.3 L348.6,409.4 L349.6,409.6 L350.6,409.7 L351.6,409.8 L352.6,409.9 
+		L353.6,410.1 L354.6,410.2 L355.6,410.3 L356.7,410.4 L357.7,410.5 L358.7,410.7 L359.7,410.8 L360.7,410.9 
+		L361.7,411.0 L362.7,411.1 L363.7,411.2 L364.7,411.3 L365.7,411.5 L366.7,411.6 L367.7,411.7 L368.7,411.8 
+		L369.7,411.9 L370.7,412.0 L371.7,412.1 L372.8,412.2 L373.8,412.3 L374.8,412.4 L375.8,412.5 L376.8,412.6 
+		L377.8,412.7 L378.8,412.8 L379.8,412.9 L380.8,413.0 L381.8,413.1 L382.8,413.2 L383.8,413.3 L384.8,413.4 
+		L385.8,413.4 L386.8,413.5 L387.8,413.6 L388.9,413.7 L389.9,413.8 L390.9,413.9 L391.9,414.0 L392.9,414.0 
+		L393.9,414.1 L394.9,414.2 L395.9,414.3 L396.9,414.4 L397.9,414.5 L398.9,414.5 L399.9,414.6 L400.9,414.7 
+		L401.9,414.8 L402.9,414.8 L403.9,414.9 L405.0,415.0 L406.0,415.1 L407.0,415.1 L408.0,415.2 L409.0,415.3 
+		L410.0,415.4 L411.0,415.4 L412.0,415.5 L413.0,415.6 L414.0,415.6 L415.0,415.7 L416.0,415.8 L417.0,415.8 
+		L418.0,415.9 L419.0,416.0 L420.0,416.0 L421.1,416.1 L422.1,416.2 L423.1,416.2 L424.1,416.3 L425.1,416.3 
+		L426.1,416.4 L427.1,416.5 L428.1,416.5 L429.1,416.6 L430.1,416.6 L431.1,416.7 L432.1,416.7 L433.1,416.8 
+		L434.1,416.9 L435.1,416.9 L436.1,417.0 L437.2,417.0 L438.2,417.1 L439.2,417.1 L440.2,417.2 L441.2,417.2 
+		L442.2,417.3 L443.2,417.3 L444.2,417.4 L445.2,417.4 L446.2,417.5 L447.2,417.5 L448.2,417.6 L449.2,417.6 
+		L450.2,417.7 L451.2,417.7 L452.2,417.8 L453.2,417.8 L454.3,417.9 L455.3,417.9 L456.3,418.0 L457.3,418.0 
+		L458.3,418.0 L459.3,418.1 L460.3,418.1 L461.3,418.2 L462.3,418.2 L463.3,418.3 L464.3,418.3 L465.3,418.3 
+		L466.3,418.4 L467.3,418.4 L468.3,418.5 L469.3,418.5 L470.4,418.5 L471.4,418.6 L472.4,418.6 L473.4,418.6 
+		L474.4,418.7 L475.4,418.7 L476.4,418.8 L477.4,418.8 L478.4,418.8 L479.4,418.9 L480.4,418.9 L481.4,418.9 
+		L482.4,419.0 L483.4,419.0 L484.4,419.0 L485.4,419.1 L486.5,419.1 L487.5,419.1 L488.5,419.2 L489.5,419.2 
+		L490.5,419.2 L491.5,419.3 L492.5,419.3 L493.5,419.3 L494.5,419.4 L495.5,419.4 L496.5,419.4 L497.5,419.4 
+		L498.5,419.5 L499.5,419.5 L500.5,419.5 L501.5,419.6 L502.6,419.6 L503.6,419.6 L504.6,419.6 L505.6,419.7 
+		L506.6,419.7 L507.6,419.7 L508.6,419.8 L509.6,419.8 L510.6,419.8 L511.6,419.8 L512.6,419.9 L513.6,419.9 
+		L514.6,419.9 L515.6,419.9 L516.6,420.0 L517.6,420.0 L518.7,420.0 L519.7,420.0 L520.7,420.1 L521.7,420.1 
+		L522.7,420.1 L523.7,420.1 L524.7,420.1 L525.7,420.2 L526.7,420.2 L527.7,420.2 L528.7,420.2 L529.7,420.3 
+		L530.7,420.3 L531.7,420.3 L532.7,420.3 L533.7,420.3 L534.8,420.4 L535.8,420.4 L536.8,420.4 L537.8,420.4 
+		L538.8,420.4 L539.8,420.5 L540.8,420.5 L541.8,420.5 L542.8,420.5 L543.8,420.5 L544.8,420.6 L545.8,420.6 
+		L546.8,420.6 L547.8,420.6 L548.8,420.6 L549.8,420.6 L550.9,420.7 L551.9,420.7 L552.9,420.7 L553.9,420.7 
+		L554.9,420.7 L555.9,420.7 L556.9,420.8 L557.9,420.8 L558.9,420.8 L559.9,420.8 L560.9,420.8 L561.9,420.8 
+		L562.9,420.9 L563.9,420.9 L564.9,420.9 L565.9,420.9 L567.0,420.9 L568.0,420.9 L569.0,420.9 L570.0,421.0 
+		L571.0,421.0 L572.0,421.0 L573.0,421.0 L574.0,421.0 L575.0,421.0 '></path>
+</g>
+	</g>
+	<g id="Plot_3"><title>Plot_3</title>
+<g style="fill:none; color:blue; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,287.2 L72.9,288.1 L73.9,289.0 L74.9,289.8 L75.9,290.7 L76.9,291.6 L77.9,292.5 L78.9,293.3 
+		L79.9,294.2 L81.0,295.0 L82.0,295.9 L83.0,296.7 L84.0,297.6 L85.0,298.4 L86.0,299.2 L87.0,300.0 
+		L88.0,300.8 L89.0,301.7 L90.0,302.5 L91.0,303.3 L92.0,304.0 L93.0,304.8 L94.0,305.6 L95.0,306.4 
+		L96.0,307.2 L97.1,307.9 L98.1,308.7 L99.1,309.4 L100.1,310.2 L101.1,310.9 L102.1,311.7 L103.1,312.4 
+		L104.1,313.1 L105.1,313.9 L106.1,314.6 L107.1,315.3 L108.1,316.0 L109.1,316.7 L110.1,317.4 L111.1,318.1 
+		L112.1,318.8 L113.2,319.5 L114.2,320.2 L115.2,320.9 L116.2,321.5 L117.2,322.2 L118.2,322.9 L119.2,323.5 
+		L120.2,324.2 L121.2,324.9 L122.2,325.5 L123.2,326.1 L124.2,326.8 L125.2,327.4 L126.2,328.1 L127.2,328.7 
+		L128.2,329.3 L129.3,329.9 L130.3,330.5 L131.3,331.1 L132.3,331.8 L133.3,332.4 L134.3,333.0 L135.3,333.5 
+		L136.3,334.1 L137.3,334.7 L138.3,335.3 L139.3,335.9 L140.3,336.5 L141.3,337.0 L142.3,337.6 L143.3,338.2 
+		L144.3,338.7 L145.4,339.3 L146.4,339.8 L147.4,340.4 L148.4,340.9 L149.4,341.5 L150.4,342.0 L151.4,342.5 
+		L152.4,343.1 L153.4,343.6 L154.4,344.1 L155.4,344.6 L156.4,345.2 L157.4,345.7 L158.4,346.2 L159.4,346.7 
+		L160.4,347.2 L161.5,347.7 L162.5,348.2 L163.5,348.7 L164.5,349.2 L165.5,349.7 L166.5,350.1 L167.5,350.6 
+		L168.5,351.1 L169.5,351.6 L170.5,352.0 L171.5,352.5 L172.5,353.0 L173.5,353.4 L174.5,353.9 L175.5,354.3 
+		L176.5,354.8 L177.6,355.2 L178.6,355.7 L179.6,356.1 L180.6,356.6 L181.6,357.0 L182.6,357.4 L183.6,357.9 
+		L184.6,358.3 L185.6,358.7 L186.6,359.2 L187.6,359.6 L188.6,360.0 L189.6,360.4 L190.6,360.8 L191.6,361.2 
+		L192.6,361.6 L193.7,362.0 L194.7,362.4 L195.7,362.8 L196.7,363.2 L197.7,363.6 L198.7,364.0 L199.7,364.4 
+		L200.7,364.8 L201.7,365.2 L202.7,365.6 L203.7,365.9 L204.7,366.3 L205.7,366.7 L206.7,367.1 L207.7,367.4 
+		L208.7,367.8 L209.7,368.1 L210.8,368.5 L211.8,368.9 L212.8,369.2 L213.8,369.6 L214.8,369.9 L215.8,370.3 
+		L216.8,370.6 L217.8,371.0 L218.8,371.3 L219.8,371.6 L220.8,372.0 L221.8,372.3 L222.8,372.7 L223.8,373.0 
+		L224.8,373.3 L225.8,373.6 L226.9,374.0 L227.9,374.3 L228.9,374.6 L229.9,374.9 L230.9,375.2 L231.9,375.5 
+		L232.9,375.9 L233.9,376.2 L234.9,376.5 L235.9,376.8 L236.9,377.1 L237.9,377.4 L238.9,377.7 L239.9,378.0 
+		L240.9,378.3 L241.9,378.6 L243.0,378.9 L244.0,379.1 L245.0,379.4 L246.0,379.7 L247.0,380.0 L248.0,380.3 
+		L249.0,380.6 L250.0,380.8 L251.0,381.1 L252.0,381.4 L253.0,381.7 L254.0,381.9 L255.0,382.2 L256.0,382.5 
+		L257.0,382.7 L258.0,383.0 L259.1,383.3 L260.1,383.5 L261.1,383.8 L262.1,384.0 L263.1,384.3 L264.1,384.5 
+		L265.1,384.8 L266.1,385.0 L267.1,385.3 L268.1,385.5 L269.1,385.8 L270.1,386.0 L271.1,386.3 L272.1,386.5 
+		L273.1,386.8 L274.1,387.0 L275.2,387.2 L276.2,387.5 L277.2,387.7 L278.2,387.9 L279.2,388.2 L280.2,388.4 
+		L281.2,388.6 L282.2,388.8 L283.2,389.1 L284.2,389.3 L285.2,389.5 L286.2,389.7 L287.2,389.9 L288.2,390.1 
+		L289.2,390.4 L290.2,390.6 L291.3,390.8 L292.3,391.0 L293.3,391.2 L294.3,391.4 L295.3,391.6 L296.3,391.8 
+		L297.3,392.0 L298.3,392.2 L299.3,392.4 L300.3,392.6 L301.3,392.8 L302.3,393.0 L303.3,393.2 L304.3,393.4 
+		L305.3,393.6 L306.3,393.8 L307.4,394.0 L308.4,394.2 L309.4,394.4 L310.4,394.5 L311.4,394.7 L312.4,394.9 
+		L313.4,395.1 L314.4,395.3 L315.4,395.5 L316.4,395.6 L317.4,395.8 L318.4,396.0 L319.4,396.2 L320.4,396.3 
+		L321.4,396.5 L322.4,396.7 L323.5,396.9 L324.5,397.0 L325.5,397.2 L326.5,397.4 L327.5,397.5 L328.5,397.7 
+		L329.5,397.9 L330.5,398.0 L331.5,398.2 L332.5,398.3 L333.5,398.5 L334.5,398.7 L335.5,398.8 L336.5,399.0 
+		L337.5,399.1 L338.5,399.3 L339.5,399.4 L340.6,399.6 L341.6,399.7 L342.6,399.9 L343.6,400.0 L344.6,400.2 
+		L345.6,400.3 L346.6,400.5 L347.6,400.6 L348.6,400.8 L349.6,400.9 L350.6,401.1 L351.6,401.2 L352.6,401.3 
+		L353.6,401.5 L354.6,401.6 L355.6,401.8 L356.7,401.9 L357.7,402.0 L358.7,402.2 L359.7,402.3 L360.7,402.4 
+		L361.7,402.6 L362.7,402.7 L363.7,402.8 L364.7,403.0 L365.7,403.1 L366.7,403.2 L367.7,403.4 L368.7,403.5 
+		L369.7,403.6 L370.7,403.7 L371.7,403.9 L372.8,404.0 L373.8,404.1 L374.8,404.2 L375.8,404.3 L376.8,404.5 
+		L377.8,404.6 L378.8,404.7 L379.8,404.8 L380.8,404.9 L381.8,405.0 L382.8,405.2 L383.8,405.3 L384.8,405.4 
+		L385.8,405.5 L386.8,405.6 L387.8,405.7 L388.9,405.8 L389.9,405.9 L390.9,406.1 L391.9,406.2 L392.9,406.3 
+		L393.9,406.4 L394.9,406.5 L395.9,406.6 L396.9,406.7 L397.9,406.8 L398.9,406.9 L399.9,407.0 L400.9,407.1 
+		L401.9,407.2 L402.9,407.3 L403.9,407.4 L405.0,407.5 L406.0,407.6 L407.0,407.7 L408.0,407.8 L409.0,407.9 
+		L410.0,408.0 L411.0,408.1 L412.0,408.2 L413.0,408.3 L414.0,408.4 L415.0,408.5 L416.0,408.6 L417.0,408.7 
+		L418.0,408.8 L419.0,408.8 L420.0,408.9 L421.1,409.0 L422.1,409.1 L423.1,409.2 L424.1,409.3 L425.1,409.4 
+		L426.1,409.5 L427.1,409.5 L428.1,409.6 L429.1,409.7 L430.1,409.8 L431.1,409.9 L432.1,410.0 L433.1,410.0 
+		L434.1,410.1 L435.1,410.2 L436.1,410.3 L437.2,410.4 L438.2,410.5 L439.2,410.5 L440.2,410.6 L441.2,410.7 
+		L442.2,410.8 L443.2,410.8 L444.2,410.9 L445.2,411.0 L446.2,411.1 L447.2,411.2 L448.2,411.2 L449.2,411.3 
+		L450.2,411.4 L451.2,411.4 L452.2,411.5 L453.2,411.6 L454.3,411.7 L455.3,411.7 L456.3,411.8 L457.3,411.9 
+		L458.3,411.9 L459.3,412.0 L460.3,412.1 L461.3,412.2 L462.3,412.2 L463.3,412.3 L464.3,412.4 L465.3,412.4 
+		L466.3,412.5 L467.3,412.6 L468.3,412.6 L469.3,412.7 L470.4,412.7 L471.4,412.8 L472.4,412.9 L473.4,412.9 
+		L474.4,413.0 L475.4,413.1 L476.4,413.1 L477.4,413.2 L478.4,413.3 L479.4,413.3 L480.4,413.4 L481.4,413.4 
+		L482.4,413.5 L483.4,413.6 L484.4,413.6 L485.4,413.7 L486.5,413.7 L487.5,413.8 L488.5,413.8 L489.5,413.9 
+		L490.5,414.0 L491.5,414.0 L492.5,414.1 L493.5,414.1 L494.5,414.2 L495.5,414.2 L496.5,414.3 L497.5,414.3 
+		L498.5,414.4 L499.5,414.4 L500.5,414.5 L501.5,414.6 L502.6,414.6 L503.6,414.7 L504.6,414.7 L505.6,414.8 
+		L506.6,414.8 L507.6,414.9 L508.6,414.9 L509.6,415.0 L510.6,415.0 L511.6,415.1 L512.6,415.1 L513.6,415.2 
+		L514.6,415.2 L515.6,415.3 L516.6,415.3 L517.6,415.3 L518.7,415.4 L519.7,415.4 L520.7,415.5 L521.7,415.5 
+		L522.7,415.6 L523.7,415.6 L524.7,415.7 L525.7,415.7 L526.7,415.8 L527.7,415.8 L528.7,415.8 L529.7,415.9 
+		L530.7,415.9 L531.7,416.0 L532.7,416.0 L533.7,416.1 L534.8,416.1 L535.8,416.1 L536.8,416.2 L537.8,416.2 
+		L538.8,416.3 L539.8,416.3 L540.8,416.3 L541.8,416.4 L542.8,416.4 L543.8,416.5 L544.8,416.5 L545.8,416.5 
+		L546.8,416.6 L547.8,416.6 L548.8,416.7 L549.8,416.7 L550.9,416.7 L551.9,416.8 L552.9,416.8 L553.9,416.9 
+		L554.9,416.9 L555.9,416.9 L556.9,417.0 L557.9,417.0 L558.9,417.0 L559.9,417.1 L560.9,417.1 L561.9,417.1 
+		L562.9,417.2 L563.9,417.2 L564.9,417.2 L565.9,417.3 L567.0,417.3 L568.0,417.3 L569.0,417.4 L570.0,417.4 
+		L571.0,417.4 L572.0,417.5 L573.0,417.5 L574.0,417.5 L575.0,417.6 '></path>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/exponential_0.5.dat b/v0.2-M1/chi/reference-manual/distribution_plots/exponential_0.5.dat
new file mode 100644
index 0000000..f1eb0ea
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/exponential_0.5.dat
@@ -0,0 +1,513 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	2.000000
+0.010000	1.960397
+0.020000	1.921579
+0.030000	1.883529
+0.040000	1.846233
+0.050000	1.809675
+0.060000	1.773841
+0.070000	1.738716
+0.080000	1.704288
+0.090000	1.670540
+0.100000	1.637462
+0.110000	1.605038
+0.120000	1.573256
+0.130000	1.542103
+0.140000	1.511567
+0.150000	1.481636
+0.160000	1.452298
+0.170000	1.423541
+0.180000	1.395353
+0.190000	1.367723
+0.200000	1.340640
+0.210000	1.314094
+0.220000	1.288073
+0.230000	1.262567
+0.240000	1.237567
+0.250000	1.213061
+0.260000	1.189041
+0.270000	1.165497
+0.280000	1.142418
+0.290000	1.119797
+0.300000	1.097623
+0.310000	1.075889
+0.320000	1.054585
+0.330000	1.033703
+0.340000	1.013234
+0.350000	0.993171
+0.360000	0.973505
+0.370000	0.954228
+0.380000	0.935333
+0.390000	0.916812
+0.400000	0.898658
+0.410000	0.880863
+0.420000	0.863421
+0.430000	0.846324
+0.440000	0.829566
+0.450000	0.813139
+0.460000	0.797038
+0.470000	0.781256
+0.480000	0.765786
+0.490000	0.750622
+0.500000	0.735759
+0.510000	0.721190
+0.520000	0.706909
+0.530000	0.692912
+0.540000	0.679191
+0.550000	0.665742
+0.560000	0.652560
+0.570000	0.639638
+0.580000	0.626972
+0.590000	0.614557
+0.600000	0.602388
+0.610000	0.590460
+0.620000	0.578768
+0.630000	0.567308
+0.640000	0.556075
+0.650000	0.545064
+0.660000	0.534271
+0.670000	0.523691
+0.680000	0.513322
+0.690000	0.503157
+0.700000	0.493194
+0.710000	0.483428
+0.720000	0.473856
+0.730000	0.464473
+0.740000	0.455275
+0.750000	0.446260
+0.760000	0.437424
+0.770000	0.428762
+0.780000	0.420272
+0.790000	0.411950
+0.800000	0.403793
+0.810000	0.395797
+0.820000	0.387960
+0.830000	0.380278
+0.840000	0.372748
+0.850000	0.365367
+0.860000	0.358132
+0.870000	0.351041
+0.880000	0.344090
+0.890000	0.337276
+0.900000	0.330598
+0.910000	0.324052
+0.920000	0.317635
+0.930000	0.311345
+0.940000	0.305180
+0.950000	0.299137
+0.960000	0.293214
+0.970000	0.287408
+0.980000	0.281717
+0.990000	0.276138
+1.000000	0.270671
+1.010000	0.265311
+1.020000	0.260057
+1.030000	0.254908
+1.040000	0.249860
+1.050000	0.244913
+1.060000	0.240063
+1.070000	0.235310
+1.080000	0.230650
+1.090000	0.226083
+1.100000	0.221606
+1.110000	0.217218
+1.120000	0.212917
+1.130000	0.208701
+1.140000	0.204568
+1.150000	0.200518
+1.160000	0.196547
+1.170000	0.192655
+1.180000	0.188840
+1.190000	0.185101
+1.200000	0.181436
+1.210000	0.177843
+1.220000	0.174322
+1.230000	0.170870
+1.240000	0.167486
+1.250000	0.164170
+1.260000	0.160919
+1.270000	0.157733
+1.280000	0.154609
+1.290000	0.151548
+1.300000	0.148547
+1.310000	0.145606
+1.320000	0.142723
+1.330000	0.139896
+1.340000	0.137126
+1.350000	0.134411
+1.360000	0.131750
+1.370000	0.129141
+1.380000	0.126584
+1.390000	0.124077
+1.400000	0.121620
+1.410000	0.119212
+1.420000	0.116851
+1.430000	0.114538
+1.440000	0.112270
+1.450000	0.110046
+1.460000	0.107867
+1.470000	0.105731
+1.480000	0.103638
+1.490000	0.101586
+1.500000	0.099574
+1.510000	0.097602
+1.520000	0.095670
+1.530000	0.093775
+1.540000	0.091919
+1.550000	0.090098
+1.560000	0.088314
+1.570000	0.086566
+1.580000	0.084851
+1.590000	0.083171
+1.600000	0.081524
+1.610000	0.079910
+1.620000	0.078328
+1.630000	0.076777
+1.640000	0.075257
+1.650000	0.073766
+1.660000	0.072306
+1.670000	0.070874
+1.680000	0.069471
+1.690000	0.068095
+1.700000	0.066747
+1.710000	0.065425
+1.720000	0.064129
+1.730000	0.062860
+1.740000	0.061615
+1.750000	0.060395
+1.760000	0.059199
+1.770000	0.058027
+1.780000	0.056878
+1.790000	0.055751
+1.800000	0.054647
+1.810000	0.053565
+1.820000	0.052505
+1.830000	0.051465
+1.840000	0.050446
+1.850000	0.049447
+1.860000	0.048468
+1.870000	0.047508
+1.880000	0.046567
+1.890000	0.045645
+1.900000	0.044742
+1.910000	0.043856
+1.920000	0.042987
+1.930000	0.042136
+1.940000	0.041302
+1.950000	0.040484
+1.960000	0.039682
+1.970000	0.038896
+1.980000	0.038126
+1.990000	0.037371
+2.000000	0.036631
+2.010000	0.035906
+2.020000	0.035195
+2.030000	0.034498
+2.040000	0.033815
+2.050000	0.033145
+2.060000	0.032489
+2.070000	0.031846
+2.080000	0.031215
+2.090000	0.030597
+2.100000	0.029991
+2.110000	0.029397
+2.120000	0.028815
+2.130000	0.028245
+2.140000	0.027685
+2.150000	0.027137
+2.160000	0.026600
+2.170000	0.026073
+2.180000	0.025557
+2.190000	0.025051
+2.200000	0.024555
+2.210000	0.024068
+2.220000	0.023592
+2.230000	0.023125
+2.240000	0.022667
+2.250000	0.022218
+2.260000	0.021778
+2.270000	0.021347
+2.280000	0.020924
+2.290000	0.020510
+2.300000	0.020104
+2.310000	0.019706
+2.320000	0.019315
+2.330000	0.018933
+2.340000	0.018558
+2.350000	0.018191
+2.360000	0.017830
+2.370000	0.017477
+2.380000	0.017131
+2.390000	0.016792
+2.400000	0.016459
+2.410000	0.016134
+2.420000	0.015814
+2.430000	0.015501
+2.440000	0.015194
+2.450000	0.014893
+2.460000	0.014598
+2.470000	0.014309
+2.480000	0.014026
+2.490000	0.013748
+2.500000	0.013476
+2.510000	0.013209
+2.520000	0.012947
+2.530000	0.012691
+2.540000	0.012440
+2.550000	0.012193
+2.560000	0.011952
+2.570000	0.011715
+2.580000	0.011483
+2.590000	0.011256
+2.600000	0.011033
+2.610000	0.010815
+2.620000	0.010601
+2.630000	0.010391
+2.640000	0.010185
+2.650000	0.009983
+2.660000	0.009786
+2.670000	0.009592
+2.680000	0.009402
+2.690000	0.009216
+2.700000	0.009033
+2.710000	0.008854
+2.720000	0.008679
+2.730000	0.008507
+2.740000	0.008339
+2.750000	0.008174
+2.760000	0.008012
+2.770000	0.007853
+2.780000	0.007698
+2.790000	0.007545
+2.800000	0.007396
+2.810000	0.007249
+2.820000	0.007106
+2.830000	0.006965
+2.840000	0.006827
+2.850000	0.006692
+2.860000	0.006559
+2.870000	0.006430
+2.880000	0.006302
+2.890000	0.006177
+2.900000	0.006055
+2.910000	0.005935
+2.920000	0.005818
+2.930000	0.005702
+2.940000	0.005590
+2.950000	0.005479
+2.960000	0.005370
+2.970000	0.005264
+2.980000	0.005160
+2.990000	0.005058
+3.000000	0.004958
+3.010000	0.004859
+3.020000	0.004763
+3.030000	0.004669
+3.040000	0.004576
+3.050000	0.004486
+3.060000	0.004397
+3.070000	0.004310
+3.080000	0.004225
+3.090000	0.004141
+3.100000	0.004059
+3.110000	0.003978
+3.120000	0.003900
+3.130000	0.003822
+3.140000	0.003747
+3.150000	0.003673
+3.160000	0.003600
+3.170000	0.003529
+3.180000	0.003459
+3.190000	0.003390
+3.200000	0.003323
+3.210000	0.003257
+3.220000	0.003193
+3.230000	0.003130
+3.240000	0.003068
+3.250000	0.003007
+3.260000	0.002947
+3.270000	0.002889
+3.280000	0.002832
+3.290000	0.002776
+3.300000	0.002721
+3.310000	0.002667
+3.320000	0.002614
+3.330000	0.002562
+3.340000	0.002512
+3.350000	0.002462
+3.360000	0.002413
+3.370000	0.002365
+3.380000	0.002318
+3.390000	0.002273
+3.400000	0.002228
+3.410000	0.002183
+3.420000	0.002140
+3.430000	0.002098
+3.440000	0.002056
+3.450000	0.002016
+3.460000	0.001976
+3.470000	0.001937
+3.480000	0.001898
+3.490000	0.001861
+3.500000	0.001824
+3.510000	0.001788
+3.520000	0.001752
+3.530000	0.001718
+3.540000	0.001684
+3.550000	0.001650
+3.560000	0.001618
+3.570000	0.001586
+3.580000	0.001554
+3.590000	0.001523
+3.600000	0.001493
+3.610000	0.001464
+3.620000	0.001435
+3.630000	0.001406
+3.640000	0.001378
+3.650000	0.001351
+3.660000	0.001324
+3.670000	0.001298
+3.680000	0.001272
+3.690000	0.001247
+3.700000	0.001223
+3.710000	0.001198
+3.720000	0.001175
+3.730000	0.001151
+3.740000	0.001129
+3.750000	0.001106
+3.760000	0.001084
+3.770000	0.001063
+3.780000	0.001042
+3.790000	0.001021
+3.800000	0.001001
+3.810000	0.000981
+3.820000	0.000962
+3.830000	0.000943
+3.840000	0.000924
+3.850000	0.000906
+3.860000	0.000888
+3.870000	0.000870
+3.880000	0.000853
+3.890000	0.000836
+3.900000	0.000819
+3.910000	0.000803
+3.920000	0.000787
+3.930000	0.000772
+3.940000	0.000756
+3.950000	0.000741
+3.960000	0.000727
+3.970000	0.000712
+3.980000	0.000698
+3.990000	0.000684
+4.000000	0.000671
+4.010000	0.000658
+4.020000	0.000645
+4.030000	0.000632
+4.040000	0.000619
+4.050000	0.000607
+4.060000	0.000595
+4.070000	0.000583
+4.080000	0.000572
+4.090000	0.000560
+4.100000	0.000549
+4.110000	0.000538
+4.120000	0.000528
+4.130000	0.000517
+4.140000	0.000507
+4.150000	0.000497
+4.160000	0.000487
+4.170000	0.000478
+4.180000	0.000468
+4.190000	0.000459
+4.200000	0.000450
+4.210000	0.000441
+4.220000	0.000432
+4.230000	0.000424
+4.240000	0.000415
+4.250000	0.000407
+4.260000	0.000399
+4.270000	0.000391
+4.280000	0.000383
+4.290000	0.000376
+4.300000	0.000368
+4.310000	0.000361
+4.320000	0.000354
+4.330000	0.000347
+4.340000	0.000340
+4.350000	0.000333
+4.360000	0.000327
+4.370000	0.000320
+4.380000	0.000314
+4.390000	0.000308
+4.400000	0.000301
+4.410000	0.000295
+4.420000	0.000290
+4.430000	0.000284
+4.440000	0.000278
+4.450000	0.000273
+4.460000	0.000267
+4.470000	0.000262
+4.480000	0.000257
+4.490000	0.000252
+4.500000	0.000247
+4.510000	0.000242
+4.520000	0.000237
+4.530000	0.000232
+4.540000	0.000228
+4.550000	0.000223
+4.560000	0.000219
+4.570000	0.000215
+4.580000	0.000210
+4.590000	0.000206
+4.600000	0.000202
+4.610000	0.000198
+4.620000	0.000194
+4.630000	0.000190
+4.640000	0.000187
+4.650000	0.000183
+4.660000	0.000179
+4.670000	0.000176
+4.680000	0.000172
+4.690000	0.000169
+4.700000	0.000165
+4.710000	0.000162
+4.720000	0.000159
+4.730000	0.000156
+4.740000	0.000153
+4.750000	0.000150
+4.760000	0.000147
+4.770000	0.000144
+4.780000	0.000141
+4.790000	0.000138
+4.800000	0.000135
+4.810000	0.000133
+4.820000	0.000130
+4.830000	0.000128
+4.840000	0.000125
+4.850000	0.000123
+4.860000	0.000120
+4.870000	0.000118
+4.880000	0.000115
+4.890000	0.000113
+4.900000	0.000111
+4.910000	0.000109
+4.920000	0.000107
+4.930000	0.000104
+4.940000	0.000102
+4.950000	0.000100
+4.960000	0.000098
+4.970000	0.000096
+4.980000	0.000095
+4.990000	0.000093
+5.000000	0.000091
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/exponential_1.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/exponential_1.0.dat
new file mode 100644
index 0000000..940a2d4
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/exponential_1.0.dat
@@ -0,0 +1,513 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	1.000000
+0.010000	0.990050
+0.020000	0.980199
+0.030000	0.970446
+0.040000	0.960789
+0.050000	0.951229
+0.060000	0.941765
+0.070000	0.932394
+0.080000	0.923116
+0.090000	0.913931
+0.100000	0.904837
+0.110000	0.895834
+0.120000	0.886920
+0.130000	0.878095
+0.140000	0.869358
+0.150000	0.860708
+0.160000	0.852144
+0.170000	0.843665
+0.180000	0.835270
+0.190000	0.826959
+0.200000	0.818731
+0.210000	0.810584
+0.220000	0.802519
+0.230000	0.794534
+0.240000	0.786628
+0.250000	0.778801
+0.260000	0.771052
+0.270000	0.763379
+0.280000	0.755784
+0.290000	0.748264
+0.300000	0.740818
+0.310000	0.733447
+0.320000	0.726149
+0.330000	0.718924
+0.340000	0.711770
+0.350000	0.704688
+0.360000	0.697676
+0.370000	0.690734
+0.380000	0.683861
+0.390000	0.677057
+0.400000	0.670320
+0.410000	0.663650
+0.420000	0.657047
+0.430000	0.650509
+0.440000	0.644036
+0.450000	0.637628
+0.460000	0.631284
+0.470000	0.625002
+0.480000	0.618783
+0.490000	0.612626
+0.500000	0.606531
+0.510000	0.600496
+0.520000	0.594521
+0.530000	0.588605
+0.540000	0.582748
+0.550000	0.576950
+0.560000	0.571209
+0.570000	0.565525
+0.580000	0.559898
+0.590000	0.554327
+0.600000	0.548812
+0.610000	0.543351
+0.620000	0.537944
+0.630000	0.532592
+0.640000	0.527292
+0.650000	0.522046
+0.660000	0.516851
+0.670000	0.511709
+0.680000	0.506617
+0.690000	0.501576
+0.700000	0.496585
+0.710000	0.491644
+0.720000	0.486752
+0.730000	0.481909
+0.740000	0.477114
+0.750000	0.472367
+0.760000	0.467666
+0.770000	0.463013
+0.780000	0.458406
+0.790000	0.453845
+0.800000	0.449329
+0.810000	0.444858
+0.820000	0.440432
+0.830000	0.436049
+0.840000	0.431711
+0.850000	0.427415
+0.860000	0.423162
+0.870000	0.418952
+0.880000	0.414783
+0.890000	0.410656
+0.900000	0.406570
+0.910000	0.402524
+0.920000	0.398519
+0.930000	0.394554
+0.940000	0.390628
+0.950000	0.386741
+0.960000	0.382893
+0.970000	0.379083
+0.980000	0.375311
+0.990000	0.371577
+1.000000	0.367879
+1.010000	0.364219
+1.020000	0.360595
+1.030000	0.357007
+1.040000	0.353455
+1.050000	0.349938
+1.060000	0.346456
+1.070000	0.343009
+1.080000	0.339596
+1.090000	0.336216
+1.100000	0.332871
+1.110000	0.329559
+1.120000	0.326280
+1.130000	0.323033
+1.140000	0.319819
+1.150000	0.316637
+1.160000	0.313486
+1.170000	0.310367
+1.180000	0.307279
+1.190000	0.304221
+1.200000	0.301194
+1.210000	0.298197
+1.220000	0.295230
+1.230000	0.292293
+1.240000	0.289384
+1.250000	0.286505
+1.260000	0.283654
+1.270000	0.280832
+1.280000	0.278037
+1.290000	0.275271
+1.300000	0.272532
+1.310000	0.269820
+1.320000	0.267135
+1.330000	0.264477
+1.340000	0.261846
+1.350000	0.259240
+1.360000	0.256661
+1.370000	0.254107
+1.380000	0.251579
+1.390000	0.249075
+1.400000	0.246597
+1.410000	0.244143
+1.420000	0.241714
+1.430000	0.239309
+1.440000	0.236928
+1.450000	0.234570
+1.460000	0.232236
+1.470000	0.229925
+1.480000	0.227638
+1.490000	0.225373
+1.500000	0.223130
+1.510000	0.220910
+1.520000	0.218712
+1.530000	0.216536
+1.540000	0.214381
+1.550000	0.212248
+1.560000	0.210136
+1.570000	0.208045
+1.580000	0.205975
+1.590000	0.203926
+1.600000	0.201897
+1.610000	0.199888
+1.620000	0.197899
+1.630000	0.195930
+1.640000	0.193980
+1.650000	0.192050
+1.660000	0.190139
+1.670000	0.188247
+1.680000	0.186374
+1.690000	0.184520
+1.700000	0.182684
+1.710000	0.180866
+1.720000	0.179066
+1.730000	0.177284
+1.740000	0.175520
+1.750000	0.173774
+1.760000	0.172045
+1.770000	0.170333
+1.780000	0.168638
+1.790000	0.166960
+1.800000	0.165299
+1.810000	0.163654
+1.820000	0.162026
+1.830000	0.160414
+1.840000	0.158817
+1.850000	0.157237
+1.860000	0.155673
+1.870000	0.154124
+1.880000	0.152590
+1.890000	0.151072
+1.900000	0.149569
+1.910000	0.148080
+1.920000	0.146607
+1.930000	0.145148
+1.940000	0.143704
+1.950000	0.142274
+1.960000	0.140858
+1.970000	0.139457
+1.980000	0.138069
+1.990000	0.136695
+2.000000	0.135335
+2.010000	0.133989
+2.020000	0.132655
+2.030000	0.131336
+2.040000	0.130029
+2.050000	0.128735
+2.060000	0.127454
+2.070000	0.126186
+2.080000	0.124930
+2.090000	0.123687
+2.100000	0.122456
+2.110000	0.121238
+2.120000	0.120032
+2.130000	0.118837
+2.140000	0.117655
+2.150000	0.116484
+2.160000	0.115325
+2.170000	0.114178
+2.180000	0.113042
+2.190000	0.111917
+2.200000	0.110803
+2.210000	0.109701
+2.220000	0.108609
+2.230000	0.107528
+2.240000	0.106459
+2.250000	0.105399
+2.260000	0.104350
+2.270000	0.103312
+2.280000	0.102284
+2.290000	0.101266
+2.300000	0.100259
+2.310000	0.099261
+2.320000	0.098274
+2.330000	0.097296
+2.340000	0.096328
+2.350000	0.095369
+2.360000	0.094420
+2.370000	0.093481
+2.380000	0.092551
+2.390000	0.091630
+2.400000	0.090718
+2.410000	0.089815
+2.420000	0.088922
+2.430000	0.088037
+2.440000	0.087161
+2.450000	0.086294
+2.460000	0.085435
+2.470000	0.084585
+2.480000	0.083743
+2.490000	0.082910
+2.500000	0.082085
+2.510000	0.081268
+2.520000	0.080460
+2.530000	0.079659
+2.540000	0.078866
+2.550000	0.078082
+2.560000	0.077305
+2.570000	0.076536
+2.580000	0.075774
+2.590000	0.075020
+2.600000	0.074274
+2.610000	0.073535
+2.620000	0.072803
+2.630000	0.072078
+2.640000	0.071361
+2.650000	0.070651
+2.660000	0.069948
+2.670000	0.069252
+2.680000	0.068563
+2.690000	0.067881
+2.700000	0.067206
+2.710000	0.066537
+2.720000	0.065875
+2.730000	0.065219
+2.740000	0.064570
+2.750000	0.063928
+2.760000	0.063292
+2.770000	0.062662
+2.780000	0.062039
+2.790000	0.061421
+2.800000	0.060810
+2.810000	0.060205
+2.820000	0.059606
+2.830000	0.059013
+2.840000	0.058426
+2.850000	0.057844
+2.860000	0.057269
+2.870000	0.056699
+2.880000	0.056135
+2.890000	0.055576
+2.900000	0.055023
+2.910000	0.054476
+2.920000	0.053934
+2.930000	0.053397
+2.940000	0.052866
+2.950000	0.052340
+2.960000	0.051819
+2.970000	0.051303
+2.980000	0.050793
+2.990000	0.050287
+3.000000	0.049787
+3.010000	0.049292
+3.020000	0.048801
+3.030000	0.048316
+3.040000	0.047835
+3.050000	0.047359
+3.060000	0.046888
+3.070000	0.046421
+3.080000	0.045959
+3.090000	0.045502
+3.100000	0.045049
+3.110000	0.044601
+3.120000	0.044157
+3.130000	0.043718
+3.140000	0.043283
+3.150000	0.042852
+3.160000	0.042426
+3.170000	0.042004
+3.180000	0.041586
+3.190000	0.041172
+3.200000	0.040762
+3.210000	0.040357
+3.220000	0.039955
+3.230000	0.039557
+3.240000	0.039164
+3.250000	0.038774
+3.260000	0.038388
+3.270000	0.038006
+3.280000	0.037628
+3.290000	0.037254
+3.300000	0.036883
+3.310000	0.036516
+3.320000	0.036153
+3.330000	0.035793
+3.340000	0.035437
+3.350000	0.035084
+3.360000	0.034735
+3.370000	0.034390
+3.380000	0.034047
+3.390000	0.033709
+3.400000	0.033373
+3.410000	0.033041
+3.420000	0.032712
+3.430000	0.032387
+3.440000	0.032065
+3.450000	0.031746
+3.460000	0.031430
+3.470000	0.031117
+3.480000	0.030807
+3.490000	0.030501
+3.500000	0.030197
+3.510000	0.029897
+3.520000	0.029599
+3.530000	0.029305
+3.540000	0.029013
+3.550000	0.028725
+3.560000	0.028439
+3.570000	0.028156
+3.580000	0.027876
+3.590000	0.027598
+3.600000	0.027324
+3.610000	0.027052
+3.620000	0.026783
+3.630000	0.026516
+3.640000	0.026252
+3.650000	0.025991
+3.660000	0.025733
+3.670000	0.025476
+3.680000	0.025223
+3.690000	0.024972
+3.700000	0.024724
+3.710000	0.024478
+3.720000	0.024234
+3.730000	0.023993
+3.740000	0.023754
+3.750000	0.023518
+3.760000	0.023284
+3.770000	0.023052
+3.780000	0.022823
+3.790000	0.022596
+3.800000	0.022371
+3.810000	0.022148
+3.820000	0.021928
+3.830000	0.021710
+3.840000	0.021494
+3.850000	0.021280
+3.860000	0.021068
+3.870000	0.020858
+3.880000	0.020651
+3.890000	0.020445
+3.900000	0.020242
+3.910000	0.020041
+3.920000	0.019841
+3.930000	0.019644
+3.940000	0.019448
+3.950000	0.019255
+3.960000	0.019063
+3.970000	0.018873
+3.980000	0.018686
+3.990000	0.018500
+4.000000	0.018316
+4.010000	0.018133
+4.020000	0.017953
+4.030000	0.017774
+4.040000	0.017597
+4.050000	0.017422
+4.060000	0.017249
+4.070000	0.017077
+4.080000	0.016907
+4.090000	0.016739
+4.100000	0.016573
+4.110000	0.016408
+4.120000	0.016245
+4.130000	0.016083
+4.140000	0.015923
+4.150000	0.015764
+4.160000	0.015608
+4.170000	0.015452
+4.180000	0.015299
+4.190000	0.015146
+4.200000	0.014996
+4.210000	0.014846
+4.220000	0.014699
+4.230000	0.014552
+4.240000	0.014408
+4.250000	0.014264
+4.260000	0.014122
+4.270000	0.013982
+4.280000	0.013843
+4.290000	0.013705
+4.300000	0.013569
+4.310000	0.013434
+4.320000	0.013300
+4.330000	0.013168
+4.340000	0.013037
+4.350000	0.012907
+4.360000	0.012778
+4.370000	0.012651
+4.380000	0.012525
+4.390000	0.012401
+4.400000	0.012277
+4.410000	0.012155
+4.420000	0.012034
+4.430000	0.011914
+4.440000	0.011796
+4.450000	0.011679
+4.460000	0.011562
+4.470000	0.011447
+4.480000	0.011333
+4.490000	0.011221
+4.500000	0.011109
+4.510000	0.010998
+4.520000	0.010889
+4.530000	0.010781
+4.540000	0.010673
+4.550000	0.010567
+4.560000	0.010462
+4.570000	0.010358
+4.580000	0.010255
+4.590000	0.010153
+4.600000	0.010052
+4.610000	0.009952
+4.620000	0.009853
+4.630000	0.009755
+4.640000	0.009658
+4.650000	0.009562
+4.660000	0.009466
+4.670000	0.009372
+4.680000	0.009279
+4.690000	0.009187
+4.700000	0.009095
+4.710000	0.009005
+4.720000	0.008915
+4.730000	0.008826
+4.740000	0.008739
+4.750000	0.008652
+4.760000	0.008566
+4.770000	0.008480
+4.780000	0.008396
+4.790000	0.008312
+4.800000	0.008230
+4.810000	0.008148
+4.820000	0.008067
+4.830000	0.007987
+4.840000	0.007907
+4.850000	0.007828
+4.860000	0.007750
+4.870000	0.007673
+4.880000	0.007597
+4.890000	0.007521
+4.900000	0.007447
+4.910000	0.007372
+4.920000	0.007299
+4.930000	0.007227
+4.940000	0.007155
+4.950000	0.007083
+4.960000	0.007013
+4.970000	0.006943
+4.980000	0.006874
+4.990000	0.006806
+5.000000	0.006738
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/exponential_1.5.dat b/v0.2-M1/chi/reference-manual/distribution_plots/exponential_1.5.dat
new file mode 100644
index 0000000..00634fd
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/exponential_1.5.dat
@@ -0,0 +1,513 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.666667
+0.010000	0.662237
+0.020000	0.657837
+0.030000	0.653466
+0.040000	0.649124
+0.050000	0.644811
+0.060000	0.640526
+0.070000	0.636270
+0.080000	0.632043
+0.090000	0.627843
+0.100000	0.623671
+0.110000	0.619527
+0.120000	0.615411
+0.130000	0.611322
+0.140000	0.607260
+0.150000	0.603225
+0.160000	0.599217
+0.170000	0.595235
+0.180000	0.591280
+0.190000	0.587352
+0.200000	0.583449
+0.210000	0.579572
+0.220000	0.575721
+0.230000	0.571896
+0.240000	0.568096
+0.250000	0.564321
+0.260000	0.560572
+0.270000	0.556847
+0.280000	0.553147
+0.290000	0.549471
+0.300000	0.545821
+0.310000	0.542194
+0.320000	0.538591
+0.330000	0.535013
+0.340000	0.531458
+0.350000	0.527926
+0.360000	0.524419
+0.370000	0.520934
+0.380000	0.517473
+0.390000	0.514034
+0.400000	0.510619
+0.410000	0.507226
+0.420000	0.503856
+0.430000	0.500508
+0.440000	0.497182
+0.450000	0.493879
+0.460000	0.490597
+0.470000	0.487337
+0.480000	0.484099
+0.490000	0.480883
+0.500000	0.477688
+0.510000	0.474514
+0.520000	0.471361
+0.530000	0.468229
+0.540000	0.465118
+0.550000	0.462027
+0.560000	0.458957
+0.570000	0.455908
+0.580000	0.452878
+0.590000	0.449869
+0.600000	0.446880
+0.610000	0.443911
+0.620000	0.440961
+0.630000	0.438031
+0.640000	0.435121
+0.650000	0.432230
+0.660000	0.429358
+0.670000	0.426505
+0.680000	0.423671
+0.690000	0.420856
+0.700000	0.418059
+0.710000	0.415282
+0.720000	0.412522
+0.730000	0.409781
+0.740000	0.407058
+0.750000	0.404354
+0.760000	0.401667
+0.770000	0.398998
+0.780000	0.396347
+0.790000	0.393714
+0.800000	0.391097
+0.810000	0.388499
+0.820000	0.385917
+0.830000	0.383353
+0.840000	0.380806
+0.850000	0.378276
+0.860000	0.375762
+0.870000	0.373266
+0.880000	0.370785
+0.890000	0.368322
+0.900000	0.365874
+0.910000	0.363443
+0.920000	0.361028
+0.930000	0.358630
+0.940000	0.356247
+0.950000	0.353880
+0.960000	0.351528
+0.970000	0.349193
+0.980000	0.346872
+0.990000	0.344568
+1.000000	0.342278
+1.010000	0.340004
+1.020000	0.337745
+1.030000	0.335501
+1.040000	0.333271
+1.050000	0.331057
+1.060000	0.328857
+1.070000	0.326672
+1.080000	0.324502
+1.090000	0.322345
+1.100000	0.320204
+1.110000	0.318076
+1.120000	0.315962
+1.130000	0.313863
+1.140000	0.311778
+1.150000	0.309706
+1.160000	0.307648
+1.170000	0.305604
+1.180000	0.303573
+1.190000	0.301556
+1.200000	0.299553
+1.210000	0.297562
+1.220000	0.295585
+1.230000	0.293621
+1.240000	0.291670
+1.250000	0.289732
+1.260000	0.287807
+1.270000	0.285895
+1.280000	0.283995
+1.290000	0.282108
+1.300000	0.280234
+1.310000	0.278372
+1.320000	0.276522
+1.330000	0.274685
+1.340000	0.272859
+1.350000	0.271046
+1.360000	0.269245
+1.370000	0.267456
+1.380000	0.265679
+1.390000	0.263914
+1.400000	0.262160
+1.410000	0.260419
+1.420000	0.258688
+1.430000	0.256969
+1.440000	0.255262
+1.450000	0.253566
+1.460000	0.251881
+1.470000	0.250207
+1.480000	0.248545
+1.490000	0.246893
+1.500000	0.245253
+1.510000	0.243623
+1.520000	0.242005
+1.530000	0.240397
+1.540000	0.238799
+1.550000	0.237213
+1.560000	0.235636
+1.570000	0.234071
+1.580000	0.232515
+1.590000	0.230971
+1.600000	0.229436
+1.610000	0.227911
+1.620000	0.226397
+1.630000	0.224893
+1.640000	0.223398
+1.650000	0.221914
+1.660000	0.220440
+1.670000	0.218975
+1.680000	0.217520
+1.690000	0.216075
+1.700000	0.214639
+1.710000	0.213213
+1.720000	0.211796
+1.730000	0.210389
+1.740000	0.208991
+1.750000	0.207602
+1.760000	0.206223
+1.770000	0.204852
+1.780000	0.203491
+1.790000	0.202139
+1.800000	0.200796
+1.810000	0.199462
+1.820000	0.198137
+1.830000	0.196820
+1.840000	0.195512
+1.850000	0.194213
+1.860000	0.192923
+1.870000	0.191641
+1.880000	0.190368
+1.890000	0.189103
+1.900000	0.187846
+1.910000	0.186598
+1.920000	0.185358
+1.930000	0.184127
+1.940000	0.182903
+1.950000	0.181688
+1.960000	0.180481
+1.970000	0.179281
+1.980000	0.178090
+1.990000	0.176907
+2.000000	0.175731
+2.010000	0.174564
+2.020000	0.173404
+2.030000	0.172252
+2.040000	0.171107
+2.050000	0.169970
+2.060000	0.168841
+2.070000	0.167719
+2.080000	0.166605
+2.090000	0.165498
+2.100000	0.164398
+2.110000	0.163306
+2.120000	0.162221
+2.130000	0.161143
+2.140000	0.160072
+2.150000	0.159008
+2.160000	0.157952
+2.170000	0.156902
+2.180000	0.155860
+2.190000	0.154824
+2.200000	0.153795
+2.210000	0.152774
+2.220000	0.151758
+2.230000	0.150750
+2.240000	0.149748
+2.250000	0.148753
+2.260000	0.147765
+2.270000	0.146783
+2.280000	0.145808
+2.290000	0.144839
+2.300000	0.143877
+2.310000	0.142921
+2.320000	0.141971
+2.330000	0.141028
+2.340000	0.140091
+2.350000	0.139160
+2.360000	0.138235
+2.370000	0.137317
+2.380000	0.136404
+2.390000	0.135498
+2.400000	0.134598
+2.410000	0.133703
+2.420000	0.132815
+2.430000	0.131932
+2.440000	0.131056
+2.450000	0.130185
+2.460000	0.129320
+2.470000	0.128461
+2.480000	0.127607
+2.490000	0.126759
+2.500000	0.125917
+2.510000	0.125080
+2.520000	0.124249
+2.530000	0.123424
+2.540000	0.122604
+2.550000	0.121789
+2.560000	0.120980
+2.570000	0.120176
+2.580000	0.119377
+2.590000	0.118584
+2.600000	0.117796
+2.610000	0.117014
+2.620000	0.116236
+2.630000	0.115464
+2.640000	0.114697
+2.650000	0.113934
+2.660000	0.113177
+2.670000	0.112425
+2.680000	0.111678
+2.690000	0.110936
+2.700000	0.110199
+2.710000	0.109467
+2.720000	0.108740
+2.730000	0.108017
+2.740000	0.107299
+2.750000	0.106586
+2.760000	0.105878
+2.770000	0.105175
+2.780000	0.104476
+2.790000	0.103782
+2.800000	0.103092
+2.810000	0.102407
+2.820000	0.101727
+2.830000	0.101051
+2.840000	0.100379
+2.850000	0.099712
+2.860000	0.099050
+2.870000	0.098392
+2.880000	0.097738
+2.890000	0.097089
+2.900000	0.096443
+2.910000	0.095803
+2.920000	0.095166
+2.930000	0.094534
+2.940000	0.093906
+2.950000	0.093282
+2.960000	0.092662
+2.970000	0.092046
+2.980000	0.091435
+2.990000	0.090827
+3.000000	0.090224
+3.010000	0.089624
+3.020000	0.089029
+3.030000	0.088437
+3.040000	0.087849
+3.050000	0.087266
+3.060000	0.086686
+3.070000	0.086110
+3.080000	0.085538
+3.090000	0.084969
+3.100000	0.084405
+3.110000	0.083844
+3.120000	0.083287
+3.130000	0.082733
+3.140000	0.082184
+3.150000	0.081638
+3.160000	0.081095
+3.170000	0.080556
+3.180000	0.080021
+3.190000	0.079489
+3.200000	0.078961
+3.210000	0.078437
+3.220000	0.077915
+3.230000	0.077398
+3.240000	0.076883
+3.250000	0.076373
+3.260000	0.075865
+3.270000	0.075361
+3.280000	0.074860
+3.290000	0.074363
+3.300000	0.073869
+3.310000	0.073378
+3.320000	0.072890
+3.330000	0.072406
+3.340000	0.071925
+3.350000	0.071447
+3.360000	0.070972
+3.370000	0.070501
+3.380000	0.070032
+3.390000	0.069567
+3.400000	0.069105
+3.410000	0.068646
+3.420000	0.068189
+3.430000	0.067736
+3.440000	0.067286
+3.450000	0.066839
+3.460000	0.066395
+3.470000	0.065954
+3.480000	0.065516
+3.490000	0.065080
+3.500000	0.064648
+3.510000	0.064218
+3.520000	0.063792
+3.530000	0.063368
+3.540000	0.062947
+3.550000	0.062529
+3.560000	0.062113
+3.570000	0.061700
+3.580000	0.061290
+3.590000	0.060883
+3.600000	0.060479
+3.610000	0.060077
+3.620000	0.059678
+3.630000	0.059281
+3.640000	0.058887
+3.650000	0.058496
+3.660000	0.058107
+3.670000	0.057721
+3.680000	0.057338
+3.690000	0.056957
+3.700000	0.056578
+3.710000	0.056202
+3.720000	0.055829
+3.730000	0.055458
+3.740000	0.055089
+3.750000	0.054723
+3.760000	0.054360
+3.770000	0.053999
+3.780000	0.053640
+3.790000	0.053283
+3.800000	0.052929
+3.810000	0.052578
+3.820000	0.052228
+3.830000	0.051881
+3.840000	0.051536
+3.850000	0.051194
+3.860000	0.050854
+3.870000	0.050516
+3.880000	0.050180
+3.890000	0.049847
+3.900000	0.049516
+3.910000	0.049187
+3.920000	0.048860
+3.930000	0.048535
+3.940000	0.048213
+3.950000	0.047892
+3.960000	0.047574
+3.970000	0.047258
+3.980000	0.046944
+3.990000	0.046632
+4.000000	0.046322
+4.010000	0.046015
+4.020000	0.045709
+4.030000	0.045405
+4.040000	0.045103
+4.050000	0.044804
+4.060000	0.044506
+4.070000	0.044210
+4.080000	0.043917
+4.090000	0.043625
+4.100000	0.043335
+4.110000	0.043047
+4.120000	0.042761
+4.130000	0.042477
+4.140000	0.042195
+4.150000	0.041914
+4.160000	0.041636
+4.170000	0.041359
+4.180000	0.041084
+4.190000	0.040811
+4.200000	0.040540
+4.210000	0.040271
+4.220000	0.040003
+4.230000	0.039737
+4.240000	0.039473
+4.250000	0.039211
+4.260000	0.038950
+4.270000	0.038692
+4.280000	0.038435
+4.290000	0.038179
+4.300000	0.037925
+4.310000	0.037673
+4.320000	0.037423
+4.330000	0.037175
+4.340000	0.036928
+4.350000	0.036682
+4.360000	0.036438
+4.370000	0.036196
+4.380000	0.035956
+4.390000	0.035717
+4.400000	0.035480
+4.410000	0.035244
+4.420000	0.035010
+4.430000	0.034777
+4.440000	0.034546
+4.450000	0.034316
+4.460000	0.034088
+4.470000	0.033862
+4.480000	0.033637
+4.490000	0.033413
+4.500000	0.033191
+4.510000	0.032971
+4.520000	0.032752
+4.530000	0.032534
+4.540000	0.032318
+4.550000	0.032103
+4.560000	0.031890
+4.570000	0.031678
+4.580000	0.031468
+4.590000	0.031258
+4.600000	0.031051
+4.610000	0.030844
+4.620000	0.030640
+4.630000	0.030436
+4.640000	0.030234
+4.650000	0.030033
+4.660000	0.029833
+4.670000	0.029635
+4.680000	0.029438
+4.690000	0.029243
+4.700000	0.029048
+4.710000	0.028855
+4.720000	0.028663
+4.730000	0.028473
+4.740000	0.028284
+4.750000	0.028096
+4.760000	0.027909
+4.770000	0.027724
+4.780000	0.027540
+4.790000	0.027357
+4.800000	0.027175
+4.810000	0.026994
+4.820000	0.026815
+4.830000	0.026637
+4.840000	0.026460
+4.850000	0.026284
+4.860000	0.026109
+4.870000	0.025936
+4.880000	0.025763
+4.890000	0.025592
+4.900000	0.025422
+4.910000	0.025253
+4.920000	0.025086
+4.930000	0.024919
+4.940000	0.024753
+4.950000	0.024589
+4.960000	0.024425
+4.970000	0.024263
+4.980000	0.024102
+4.990000	0.023942
+5.000000	0.023783
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/gamma.plt b/v0.2-M1/chi/reference-manual/distribution_plots/gamma.plt
new file mode 100644
index 0000000..f91c8da
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/gamma.plt
@@ -0,0 +1,30 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+set nokey
+#set grid back
+#set xrange [0:20]
+#set yrange [0:0.5]
+set xlabel "x"
+set ylabel "gamma(real a, b)"
+#set samples 2000
+set output "gamma.svg"
+set label "gamma(1.0, 2.0)" at 0.8, 0.42
+set label "gamma(3.0, 2.0)" at 6, 0.13
+set label "gamma(6.0, 2.0)" at 13.0, 0.09
+set label "gamma(6.0, 0.5)" at 3.8, 0.27
+set style data lines
+plot "gamma_1.0_2.0.dat" using 1:2 linetype 1, \
+     "gamma_3.0_2.0.dat" using 1:2 linetype 2, \
+     "gamma_6.0_2.0.dat" using 1:2 linetype 3, \
+     "gamma_6.0_0.5.dat" using 1:2 linetype 4
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/gamma.svg b/v0.2-M1/chi/reference-manual/distribution_plots/gamma.svg
new file mode 100644
index 0000000..47513a5
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/gamma.svg
@@ -0,0 +1,1155 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L80.9,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(63.6,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M71.9,341.3 L80.9,341.3 M575.0,341.3 L566.0,341.3 '></path>
+	<g transform="translate(63.6,345.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.1</text>
+	</g>
+	<path  d='M71.9,260.1 L80.9,260.1 M575.0,260.1 L566.0,260.1 '></path>
+	<g transform="translate(63.6,264.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.2</text>
+	</g>
+	<path  d='M71.9,179.0 L80.9,179.0 M575.0,179.0 L566.0,179.0 '></path>
+	<g transform="translate(63.6,183.5)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.3</text>
+	</g>
+	<path  d='M71.9,97.8 L80.9,97.8 M575.0,97.8 L566.0,97.8 '></path>
+	<g transform="translate(63.6,102.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.4</text>
+	</g>
+	<path  d='M71.9,16.7 L80.9,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(63.6,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.5</text>
+	</g>
+	<path  d='M71.9,422.4 L71.9,413.4 M71.9,16.7 L71.9,25.7 '></path>
+	<g transform="translate(71.9,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0</text>
+	</g>
+	<path  d='M122.2,422.4 L122.2,413.4 M122.2,16.7 L122.2,25.7 '></path>
+	<g transform="translate(122.2,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 2</text>
+	</g>
+	<path  d='M172.5,422.4 L172.5,413.4 M172.5,16.7 L172.5,25.7 '></path>
+	<g transform="translate(172.5,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 4</text>
+	</g>
+	<path  d='M222.8,422.4 L222.8,413.4 M222.8,16.7 L222.8,25.7 '></path>
+	<g transform="translate(222.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 6</text>
+	</g>
+	<path  d='M273.1,422.4 L273.1,413.4 M273.1,16.7 L273.1,25.7 '></path>
+	<g transform="translate(273.1,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 8</text>
+	</g>
+	<path  d='M323.5,422.4 L323.5,413.4 M323.5,16.7 L323.5,25.7 '></path>
+	<g transform="translate(323.5,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 10</text>
+	</g>
+	<path  d='M373.8,422.4 L373.8,413.4 M373.8,16.7 L373.8,25.7 '></path>
+	<g transform="translate(373.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 12</text>
+	</g>
+	<path  d='M424.1,422.4 L424.1,413.4 M424.1,16.7 L424.1,25.7 '></path>
+	<g transform="translate(424.1,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 14</text>
+	</g>
+	<path  d='M474.4,422.4 L474.4,413.4 M474.4,16.7 L474.4,25.7 '></path>
+	<g transform="translate(474.4,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 16</text>
+	</g>
+	<path  d='M524.7,422.4 L524.7,413.4 M524.7,16.7 L524.7,25.7 '></path>
+	<g transform="translate(524.7,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 18</text>
+	</g>
+	<path  d='M575.0,422.4 L575.0,413.4 M575.0,16.7 L575.0,25.7 '></path>
+	<g transform="translate(575.0,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 20</text>
+	</g>
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>gamma(real a, b)</text>
+	</g>
+	<g transform="translate(323.4,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(92.0,86.1)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>gamma(1.0, 2.0)</text>
+	</g>
+	<g transform="translate(222.8,321.4)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>gamma(3.0, 2.0)</text>
+	</g>
+	<g transform="translate(398.9,353.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>gamma(6.0, 2.0)</text>
+	</g>
+	<g transform="translate(167.5,207.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>gamma(6.0, 0.5)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,16.7 L72.2,18.7 L72.4,20.7 L72.7,22.7 L72.9,24.7 L73.2,26.7 L73.4,28.7 L73.7,30.7 
+		L73.9,32.6 L74.2,34.6 L74.4,36.5 L74.7,38.4 L74.9,40.3 L75.2,42.2 L75.4,44.1 L75.7,46.0 
+		L75.9,47.9 L76.2,49.8 L76.4,51.6 L76.7,53.5 L76.9,55.3 L77.2,57.1 L77.4,59.0 L77.7,60.8 
+		L77.9,62.6 L78.2,64.4 L78.4,66.2 L78.7,67.9 L78.9,69.7 L79.2,71.5 L79.4,73.2 L79.7,75.0 
+		L79.9,76.7 L80.2,78.4 L80.5,80.1 L80.7,81.8 L81.0,83.5 L81.2,85.2 L81.5,86.9 L81.7,88.6 
+		L82.0,90.2 L82.2,91.9 L82.5,93.5 L82.7,95.2 L83.0,96.8 L83.2,98.4 L83.5,100.1 L83.7,101.7 
+		L84.0,103.3 L84.2,104.9 L84.5,106.4 L84.7,108.0 L85.0,109.6 L85.2,111.1 L85.5,112.7 L85.7,114.2 
+		L86.0,115.8 L86.2,117.3 L86.5,118.8 L86.7,120.3 L87.0,121.9 L87.2,123.3 L87.5,124.8 L87.7,126.3 
+		L88.0,127.8 L88.3,129.3 L88.5,130.7 L88.8,132.2 L89.0,133.6 L89.3,135.1 L89.5,136.5 L89.8,137.9 
+		L90.0,139.4 L90.3,140.8 L90.5,142.2 L90.8,143.6 L91.0,145.0 L91.3,146.3 L91.5,147.7 L91.8,149.1 
+		L92.0,150.5 L92.3,151.8 L92.5,153.2 L92.8,154.5 L93.0,155.8 L93.3,157.2 L93.5,158.5 L93.8,159.8 
+		L94.0,161.1 L94.3,162.4 L94.5,163.7 L94.8,165.0 L95.0,166.3 L95.3,167.6 L95.5,168.8 L95.8,170.1 
+		L96.0,171.4 L96.3,172.6 L96.6,173.9 L96.8,175.1 L97.1,176.3 L97.3,177.6 L97.6,178.8 L97.8,180.0 
+		L98.1,181.2 L98.3,182.4 L98.6,183.6 L98.8,184.8 L99.1,186.0 L99.3,187.2 L99.6,188.3 L99.8,189.5 
+		L100.1,190.7 L100.3,191.8 L100.6,193.0 L100.8,194.1 L101.1,195.2 L101.3,196.4 L101.6,197.5 L101.8,198.6 
+		L102.1,199.7 L102.3,200.9 L102.6,202.0 L102.8,203.1 L103.1,204.2 L103.3,205.2 L103.6,206.3 L103.8,207.4 
+		L104.1,208.5 L104.3,209.5 L104.6,210.6 L104.9,211.7 L105.1,212.7 L105.4,213.8 L105.6,214.8 L105.9,215.8 
+		L106.1,216.9 L106.4,217.9 L106.6,218.9 L106.9,219.9 L107.1,220.9 L107.4,221.9 L107.6,222.9 L107.9,223.9 
+		L108.1,224.9 L108.4,225.9 L108.6,226.9 L108.9,227.9 L109.1,228.8 L109.4,229.8 L109.6,230.8 L109.9,231.7 
+		L110.1,232.7 L110.4,233.6 L110.6,234.6 L110.9,235.5 L111.1,236.4 L111.4,237.4 L111.6,238.3 L111.9,239.2 
+		L112.1,240.1 L112.4,241.0 L112.7,241.9 L112.9,242.8 L113.2,243.7 L113.4,244.6 L113.7,245.5 L113.9,246.4 
+		L114.2,247.3 L114.4,248.1 L114.7,249.0 L114.9,249.9 L115.2,250.7 L115.4,251.6 L115.7,252.4 L115.9,253.3 
+		L116.2,254.1 L116.4,255.0 L116.7,255.8 L116.9,256.6 L117.2,257.5 L117.4,258.3 L117.7,259.1 L117.9,259.9 
+		L118.2,260.7 L118.4,261.5 L118.7,262.3 L118.9,263.1 L119.2,263.9 L119.4,264.7 L119.7,265.5 L119.9,266.3 
+		L120.2,267.1 L120.4,267.8 L120.7,268.6 L121.0,269.4 L121.2,270.1 L121.5,270.9 L121.7,271.7 L122.0,272.4 
+		L122.2,273.2 L122.5,273.9 L122.7,274.6 L123.0,275.4 L123.2,276.1 L123.5,276.8 L123.7,277.6 L124.0,278.3 
+		L124.2,279.0 L124.5,279.7 L124.7,280.4 L125.0,281.1 L125.2,281.8 L125.5,282.5 L125.7,283.2 L126.0,283.9 
+		L126.2,284.6 L126.5,285.3 L126.7,286.0 L127.0,286.7 L127.2,287.4 L127.5,288.0 L127.7,288.7 L128.0,289.4 
+		L128.2,290.0 L128.5,290.7 L128.8,291.3 L129.0,292.0 L129.3,292.6 L129.5,293.3 L129.8,293.9 L130.0,294.6 
+		L130.3,295.2 L130.5,295.9 L130.8,296.5 L131.0,297.1 L131.3,297.7 L131.5,298.4 L131.8,299.0 L132.0,299.6 
+		L132.3,300.2 L132.5,300.8 L132.8,301.4 L133.0,302.0 L133.3,302.6 L133.5,303.2 L133.8,303.8 L134.0,304.4 
+		L134.3,305.0 L134.5,305.6 L134.8,306.2 L135.0,306.7 L135.3,307.3 L135.5,307.9 L135.8,308.5 L136.0,309.0 
+		L136.3,309.6 L136.5,310.2 L136.8,310.7 L137.1,311.3 L137.3,311.8 L137.6,312.4 L137.8,312.9 L138.1,313.5 
+		L138.3,314.0 L138.6,314.6 L138.8,315.1 L139.1,315.6 L139.3,316.2 L139.6,316.7 L139.8,317.2 L140.1,317.8 
+		L140.3,318.3 L140.6,318.8 L140.8,319.3 L141.1,319.8 L141.3,320.3 L141.6,320.8 L141.8,321.3 L142.1,321.9 
+		L142.3,322.4 L142.6,322.9 L142.8,323.4 L143.1,323.8 L143.3,324.3 L143.6,324.8 L143.8,325.3 L144.1,325.8 
+		L144.3,326.3 L144.6,326.8 L144.8,327.2 L145.1,327.7 L145.4,328.2 L145.6,328.7 L145.9,329.1 L146.1,329.6 
+		L146.4,330.0 L146.6,330.5 L146.9,331.0 L147.1,331.4 L147.4,331.9 L147.6,332.3 L147.9,332.8 L148.1,333.2 
+		L148.4,333.7 L148.6,334.1 L148.9,334.6 L149.1,335.0 L149.4,335.4 L149.6,335.9 L149.9,336.3 L150.1,336.7 
+		L150.4,337.1 L150.6,337.6 L150.9,338.0 L151.1,338.4 L151.4,338.8 L151.6,339.3 L151.9,339.7 L152.1,340.1 
+		L152.4,340.5 L152.6,340.9 L152.9,341.3 L153.2,341.7 L153.4,342.1 L153.7,342.5 L153.9,342.9 L154.2,343.3 
+		L154.4,343.7 L154.7,344.1 L154.9,344.5 L155.2,344.9 L155.4,345.3 L155.7,345.6 L155.9,346.0 L156.2,346.4 
+		L156.4,346.8 L156.7,347.2 L156.9,347.5 L157.2,347.9 L157.4,348.3 L157.7,348.7 L157.9,349.0 L158.2,349.4 
+		L158.4,349.8 L158.7,350.1 L158.9,350.5 L159.2,350.8 L159.4,351.2 L159.7,351.5 L159.9,351.9 L160.2,352.3 
+		L160.4,352.6 L160.7,352.9 L160.9,353.3 L161.2,353.6 L161.5,354.0 L161.7,354.3 L162.0,354.7 L162.2,355.0 
+		L162.5,355.3 L162.7,355.7 L163.0,356.0 L163.2,356.3 L163.5,356.7 L163.7,357.0 L164.0,357.3 L164.2,357.6 
+		L164.5,358.0 L164.7,358.3 L165.0,358.6 L165.2,358.9 L165.5,359.2 L165.7,359.6 L166.0,359.9 L166.2,360.2 
+		L166.5,360.5 L166.7,360.8 L167.0,361.1 L167.2,361.4 L167.5,361.7 L167.7,362.0 L168.0,362.3 L168.2,362.6 
+		L168.5,362.9 L168.7,363.2 L169.0,363.5 L169.2,363.8 L169.5,364.1 L169.8,364.4 L170.0,364.7 L170.3,365.0 
+		L170.5,365.3 L170.8,365.5 L171.0,365.8 L171.3,366.1 L171.5,366.4 L171.8,366.7 L172.0,366.9 L172.3,367.2 
+		L172.5,367.5 L172.8,367.8 L173.0,368.0 L173.3,368.3 L173.5,368.6 L173.8,368.9 L174.0,369.1 L174.3,369.4 
+		L174.5,369.6 L174.8,369.9 L175.0,370.2 L175.3,370.4 L175.5,370.7 L175.8,370.9 L176.0,371.2 L176.3,371.5 
+		L176.5,371.7 L176.8,372.0 L177.0,372.2 L177.3,372.5 L177.6,372.7 L177.8,373.0 L178.1,373.2 L178.3,373.5 
+		L178.6,373.7 L178.8,373.9 L179.1,374.2 L179.3,374.4 L179.6,374.7 L179.8,374.9 L180.1,375.1 L180.3,375.4 
+		L180.6,375.6 L180.8,375.8 L181.1,376.1 L181.3,376.3 L181.6,376.5 L181.8,376.8 L182.1,377.0 L182.3,377.2 
+		L182.6,377.4 L182.8,377.7 L183.1,377.9 L183.3,378.1 L183.6,378.3 L183.8,378.6 L184.1,378.8 L184.3,379.0 
+		L184.6,379.2 L184.8,379.4 L185.1,379.6 L185.3,379.9 L185.6,380.1 L185.9,380.3 L186.1,380.5 L186.4,380.7 
+		L186.6,380.9 L186.9,381.1 L187.1,381.3 L187.4,381.5 L187.6,381.7 L187.9,381.9 L188.1,382.1 L188.4,382.3 
+		L188.6,382.5 L188.9,382.7 L189.1,382.9 L189.4,383.1 L189.6,383.3 L189.9,383.5 L190.1,383.7 L190.4,383.9 
+		L190.6,384.1 L190.9,384.3 L191.1,384.5 L191.4,384.7 L191.6,384.9 L191.9,385.0 L192.1,385.2 L192.4,385.4 
+		L192.6,385.6 L192.9,385.8 L193.1,386.0 L193.4,386.1 L193.7,386.3 L193.9,386.5 L194.2,386.7 L194.4,386.9 
+		L194.7,387.0 L194.9,387.2 L195.2,387.4 L195.4,387.6 L195.7,387.7 L195.9,387.9 L196.2,388.1 L196.4,388.3 
+		L196.7,388.4 L196.9,388.6 L197.2,388.8 L197.4,388.9 L197.7,389.1 L197.9,389.3 L198.2,389.4 L198.4,389.6 
+		L198.7,389.8 L198.9,389.9 L199.2,390.1 L199.4,390.2 L199.7,390.4 L199.9,390.6 L200.2,390.7 L200.4,390.9 
+		L200.7,391.0 L200.9,391.2 L201.2,391.3 L201.4,391.5 L201.7,391.7 L202.0,391.8 L202.2,392.0 L202.5,392.1 
+		L202.7,392.3 L203.0,392.4 L203.2,392.6 L203.5,392.7 L203.7,392.9 L204.0,393.0 L204.2,393.2 L204.5,393.3 
+		L204.7,393.4 L205.0,393.6 L205.2,393.7 L205.5,393.9 L205.7,394.0 L206.0,394.2 L206.2,394.3 L206.5,394.4 
+		L206.7,394.6 L207.0,394.7 L207.2,394.9 L207.5,395.0 L207.7,395.1 L208.0,395.3 L208.2,395.4 L208.5,395.5 
+		L208.7,395.7 L209.0,395.8 L209.2,395.9 L209.5,396.1 L209.7,396.2 L210.0,396.3 L210.3,396.5 L210.5,396.6 
+		L210.8,396.7 L211.0,396.9 L211.3,397.0 L211.5,397.1 L211.8,397.2 L212.0,397.4 L212.3,397.5 L212.5,397.6 
+		L212.8,397.7 L213.0,397.9 L213.3,398.0 L213.5,398.1 L213.8,398.2 L214.0,398.3 L214.3,398.5 L214.5,398.6 
+		L214.8,398.7 L215.0,398.8 L215.3,398.9 L215.5,399.0 L215.8,399.2 L216.0,399.3 L216.3,399.4 L216.5,399.5 
+		L216.8,399.6 L217.0,399.7 L217.3,399.9 L217.5,400.0 L217.8,400.1 L218.1,400.2 L218.3,400.3 L218.6,400.4 
+		L218.8,400.5 L219.1,400.6 L219.3,400.7 L219.6,400.8 L219.8,401.0 L220.1,401.1 L220.3,401.2 L220.6,401.3 
+		L220.8,401.4 L221.1,401.5 L221.3,401.6 L221.6,401.7 L221.8,401.8 L222.1,401.9 L222.3,402.0 L222.6,402.1 
+		L222.8,402.2 L223.1,402.3 L223.3,402.4 L223.6,402.5 L223.8,402.6 L224.1,402.7 L224.3,402.8 L224.6,402.9 
+		L224.8,403.0 L225.1,403.1 L225.3,403.2 L225.6,403.3 L225.8,403.4 L226.1,403.5 L226.4,403.6 L226.6,403.7 
+		L226.9,403.8 L227.1,403.8 L227.4,403.9 L227.6,404.0 L227.9,404.1 L228.1,404.2 L228.4,404.3 L228.6,404.4 
+		L228.9,404.5 L229.1,404.6 L229.4,404.7 L229.6,404.8 L229.9,404.8 L230.1,404.9 L230.4,405.0 L230.6,405.1 
+		L230.9,405.2 L231.1,405.3 L231.4,405.4 L231.6,405.4 L231.9,405.5 L232.1,405.6 L232.4,405.7 L232.6,405.8 
+		L232.9,405.9 L233.1,405.9 L233.4,406.0 L233.6,406.1 L233.9,406.2 L234.1,406.3 L234.4,406.4 L234.7,406.4 
+		L234.9,406.5 L235.2,406.6 L235.4,406.7 L235.7,406.7 L235.9,406.8 L236.2,406.9 L236.4,407.0 L236.7,407.1 
+		L236.9,407.1 L237.2,407.2 L237.4,407.3 L237.7,407.4 L237.9,407.4 L238.2,407.5 L238.4,407.6 L238.7,407.7 
+		L238.9,407.7 L239.2,407.8 L239.4,407.9 L239.7,408.0 L239.9,408.0 L240.2,408.1 L240.4,408.2 L240.7,408.2 
+		L240.9,408.3 L241.2,408.4 L241.4,408.4 L241.7,408.5 L241.9,408.6 L242.2,408.7 L242.5,408.7 L242.7,408.8 
+		L243.0,408.9 L243.2,408.9 L243.5,409.0 L243.7,409.1 L244.0,409.1 L244.2,409.2 L244.5,409.3 L244.7,409.3 
+		L245.0,409.4 L245.2,409.5 L245.5,409.5 L245.7,409.6 L246.0,409.6 L246.2,409.7 L246.5,409.8 L246.7,409.8 
+		L247.0,409.9 L247.2,410.0 L247.5,410.0 L247.7,410.1 L248.0,410.1 L248.2,410.2 L248.5,410.3 L248.7,410.3 
+		L249.0,410.4 L249.2,410.5 L249.5,410.5 L249.7,410.6 L250.0,410.6 L250.2,410.7 L250.5,410.7 L250.8,410.8 
+		L251.0,410.9 L251.3,410.9 L251.5,411.0 L251.8,411.0 L252.0,411.1 L252.3,411.1 L252.5,411.2 L252.8,411.3 
+		L253.0,411.3 L253.3,411.4 L253.5,411.4 L253.8,411.5 L254.0,411.5 L254.3,411.6 L254.5,411.6 L254.8,411.7 
+		L255.0,411.7 L255.3,411.8 L255.5,411.9 L255.8,411.9 L256.0,412.0 L256.3,412.0 L256.5,412.1 L256.8,412.1 
+		L257.0,412.2 L257.3,412.2 L257.5,412.3 L257.8,412.3 L258.0,412.4 L258.3,412.4 L258.6,412.5 L258.8,412.5 
+		L259.1,412.6 L259.3,412.6 L259.6,412.7 L259.8,412.7 L260.1,412.8 L260.3,412.8 L260.6,412.9 L260.8,412.9 
+		L261.1,413.0 L261.3,413.0 L261.6,413.0 L261.8,413.1 L262.1,413.1 L262.3,413.2 L262.6,413.2 L262.8,413.3 
+		L263.1,413.3 L263.3,413.4 L263.6,413.4 L263.8,413.5 L264.1,413.5 L264.3,413.5 L264.6,413.6 L264.8,413.6 
+		L265.1,413.7 L265.3,413.7 L265.6,413.8 L265.8,413.8 L266.1,413.9 L266.3,413.9 L266.6,413.9 L266.9,414.0 
+		L267.1,414.0 L267.4,414.1 L267.6,414.1 L267.9,414.1 L268.1,414.2 L268.4,414.2 L268.6,414.3 L268.9,414.3 
+		L269.1,414.4 L269.4,414.4 L269.6,414.4 L269.9,414.5 L270.1,414.5 L270.4,414.5 L270.6,414.6 L270.9,414.6 
+		L271.1,414.7 L271.4,414.7 L271.6,414.7 L271.9,414.8 L272.1,414.8 L272.4,414.9 L272.6,414.9 L272.9,414.9 
+		L273.1,415.0 L273.4,415.0 L273.6,415.0 L273.9,415.1 L274.1,415.1 L274.4,415.2 L274.6,415.2 L274.9,415.2 
+		L275.2,415.3 L275.4,415.3 L275.7,415.3 L275.9,415.4 L276.2,415.4 L276.4,415.4 L276.7,415.5 L276.9,415.5 
+		L277.2,415.5 L277.4,415.6 L277.7,415.6 L277.9,415.6 L278.2,415.7 L278.4,415.7 L278.7,415.7 L278.9,415.8 
+		L279.2,415.8 L279.4,415.8 L279.7,415.9 L279.9,415.9 L280.2,415.9 L280.4,416.0 L280.7,416.0 L280.9,416.0 
+		L281.2,416.1 L281.4,416.1 L281.7,416.1 L281.9,416.2 L282.2,416.2 L282.4,416.2 L282.7,416.3 L283.0,416.3 
+		L283.2,416.3 L283.5,416.3 L283.7,416.4 L284.0,416.4 L284.2,416.4 L284.5,416.5 L284.7,416.5 L285.0,416.5 
+		L285.2,416.6 L285.5,416.6 L285.7,416.6 L286.0,416.6 L286.2,416.7 L286.5,416.7 L286.7,416.7 L287.0,416.8 
+		L287.2,416.8 L287.5,416.8 L287.7,416.8 L288.0,416.9 L288.2,416.9 L288.5,416.9 L288.7,416.9 L289.0,417.0 
+		L289.2,417.0 L289.5,417.0 L289.7,417.1 L290.0,417.1 L290.2,417.1 L290.5,417.1 L290.7,417.2 L291.0,417.2 
+		L291.3,417.2 L291.5,417.2 L291.8,417.3 L292.0,417.3 L292.3,417.3 L292.5,417.3 L292.8,417.4 L293.0,417.4 
+		L293.3,417.4 L293.5,417.4 L293.8,417.5 L294.0,417.5 L294.3,417.5 L294.5,417.5 L294.8,417.6 L295.0,417.6 
+		L295.3,417.6 L295.5,417.6 L295.8,417.7 L296.0,417.7 L296.3,417.7 L296.5,417.7 L296.8,417.8 L297.0,417.8 
+		L297.3,417.8 L297.5,417.8 L297.8,417.8 L298.0,417.9 L298.3,417.9 L298.5,417.9 L298.8,417.9 L299.0,418.0 
+		L299.3,418.0 L299.6,418.0 L299.8,418.0 L300.1,418.0 L300.3,418.1 L300.6,418.1 L300.8,418.1 L301.1,418.1 
+		L301.3,418.2 L301.6,418.2 L301.8,418.2 L302.1,418.2 L302.3,418.2 L302.6,418.3 L302.8,418.3 L303.1,418.3 
+		L303.3,418.3 L303.6,418.3 L303.8,418.4 L304.1,418.4 L304.3,418.4 L304.6,418.4 L304.8,418.4 L305.1,418.5 
+		L305.3,418.5 L305.6,418.5 L305.8,418.5 L306.1,418.5 L306.3,418.6 L306.6,418.6 L306.8,418.6 L307.1,418.6 
+		L307.4,418.6 L307.6,418.7 L307.9,418.7 L308.1,418.7 L308.4,418.7 L308.6,418.7 L308.9,418.7 L309.1,418.8 
+		L309.4,418.8 L309.6,418.8 L309.9,418.8 L310.1,418.8 L310.4,418.9 L310.6,418.9 L310.9,418.9 L311.1,418.9 
+		L311.4,418.9 L311.6,418.9 L311.9,419.0 L312.1,419.0 L312.4,419.0 L312.6,419.0 L312.9,419.0 L313.1,419.0 
+		L313.4,419.1 L313.6,419.1 L313.9,419.1 L314.1,419.1 L314.4,419.1 L314.6,419.1 L314.9,419.2 L315.1,419.2 
+		L315.4,419.2 L315.7,419.2 L315.9,419.2 L316.2,419.2 L316.4,419.3 L316.7,419.3 L316.9,419.3 L317.2,419.3 
+		L317.4,419.3 L317.7,419.3 L317.9,419.3 L318.2,419.4 L318.4,419.4 L318.7,419.4 L318.9,419.4 L319.2,419.4 
+		L319.4,419.4 L319.7,419.5 L319.9,419.5 L320.2,419.5 L320.4,419.5 L320.7,419.5 L320.9,419.5 L321.2,419.5 
+		L321.4,419.6 L321.7,419.6 L321.9,419.6 L322.2,419.6 L322.4,419.6 L322.7,419.6 L322.9,419.6 L323.2,419.7 
+		L323.5,419.7 L323.7,419.7 L324.0,419.7 L324.2,419.7 L324.5,419.7 L324.7,419.7 L325.0,419.7 L325.2,419.8 
+		L325.5,419.8 L325.7,419.8 L326.0,419.8 L326.2,419.8 L326.5,419.8 L326.7,419.8 L327.0,419.9 L327.2,419.9 
+		L327.5,419.9 L327.7,419.9 L328.0,419.9 L328.2,419.9 L328.5,419.9 L328.7,419.9 L329.0,420.0 L329.2,420.0 
+		L329.5,420.0 L329.7,420.0 L330.0,420.0 L330.2,420.0 L330.5,420.0 L330.7,420.0 L331.0,420.0 L331.2,420.1 
+		L331.5,420.1 L331.8,420.1 L332.0,420.1 L332.3,420.1 L332.5,420.1 L332.8,420.1 L333.0,420.1 L333.3,420.2 
+		L333.5,420.2 L333.8,420.2 L334.0,420.2 L334.3,420.2 L334.5,420.2 L334.8,420.2 L335.0,420.2 L335.3,420.2 
+		L335.5,420.2 L335.8,420.3 L336.0,420.3 L336.3,420.3 L336.5,420.3 L336.8,420.3 L337.0,420.3 L337.3,420.3 
+		L337.5,420.3 L337.8,420.3 L338.0,420.4 L338.3,420.4 L338.5,420.4 L338.8,420.4 L339.0,420.4 L339.3,420.4 
+		L339.5,420.4 L339.8,420.4 L340.1,420.4 L340.3,420.4 L340.6,420.5 L340.8,420.5 L341.1,420.5 L341.3,420.5 
+		L341.6,420.5 L341.8,420.5 L342.1,420.5 L342.3,420.5 L342.6,420.5 L342.8,420.5 L343.1,420.5 L343.3,420.6 
+		L343.6,420.6 L343.8,420.6 L344.1,420.6 L344.3,420.6 L344.6,420.6 L344.8,420.6 L345.1,420.6 L345.3,420.6 
+		L345.6,420.6 L345.8,420.6 L346.1,420.7 L346.3,420.7 L346.6,420.7 L346.8,420.7 L347.1,420.7 L347.3,420.7 
+		L347.6,420.7 L347.9,420.7 L348.1,420.7 L348.4,420.7 L348.6,420.7 L348.9,420.8 L349.1,420.8 L349.4,420.8 
+		L349.6,420.8 L349.9,420.8 L350.1,420.8 L350.4,420.8 L350.6,420.8 L350.9,420.8 L351.1,420.8 L351.4,420.8 
+		L351.6,420.8 L351.9,420.8 L352.1,420.9 L352.4,420.9 L352.6,420.9 L352.9,420.9 L353.1,420.9 L353.4,420.9 
+		L353.6,420.9 L353.9,420.9 L354.1,420.9 L354.4,420.9 L354.6,420.9 L354.9,420.9 L355.1,420.9 L355.4,421.0 
+		L355.6,421.0 L355.9,421.0 L356.2,421.0 L356.4,421.0 L356.7,421.0 L356.9,421.0 L357.2,421.0 L357.4,421.0 
+		L357.7,421.0 L357.9,421.0 L358.2,421.0 L358.4,421.0 L358.7,421.0 L358.9,421.0 L359.2,421.1 L359.4,421.1 
+		L359.7,421.1 L359.9,421.1 L360.2,421.1 L360.4,421.1 L360.7,421.1 L360.9,421.1 L361.2,421.1 L361.4,421.1 
+		L361.7,421.1 L361.9,421.1 L362.2,421.1 L362.4,421.1 L362.7,421.1 L362.9,421.2 L363.2,421.2 L363.4,421.2 
+		L363.7,421.2 L363.9,421.2 L364.2,421.2 L364.5,421.2 L364.7,421.2 L365.0,421.2 L365.2,421.2 L365.5,421.2 
+		L365.7,421.2 L366.0,421.2 L366.2,421.2 L366.5,421.2 L366.7,421.2 L367.0,421.2 L367.2,421.3 L367.5,421.3 
+		L367.7,421.3 L368.0,421.3 L368.2,421.3 L368.5,421.3 L368.7,421.3 L369.0,421.3 L369.2,421.3 L369.5,421.3 
+		L369.7,421.3 L370.0,421.3 L370.2,421.3 L370.5,421.3 L370.7,421.3 L371.0,421.3 L371.2,421.3 L371.5,421.3 
+		L371.7,421.4 L372.0,421.4 L372.3,421.4 L372.5,421.4 L372.8,421.4 L373.0,421.4 L373.3,421.4 L373.5,421.4 
+		L373.8,421.4 L374.0,421.4 L374.3,421.4 L374.5,421.4 L374.8,421.4 L375.0,421.4 L375.3,421.4 L375.5,421.4 
+		L375.8,421.4 L376.0,421.4 L376.3,421.4 L376.5,421.4 L376.8,421.5 L377.0,421.5 L377.3,421.5 L377.5,421.5 
+		L377.8,421.5 L378.0,421.5 L378.3,421.5 L378.5,421.5 L378.8,421.5 L379.0,421.5 L379.3,421.5 L379.5,421.5 
+		L379.8,421.5 L380.0,421.5 L380.3,421.5 L380.6,421.5 L380.8,421.5 L381.1,421.5 L381.3,421.5 L381.6,421.5 
+		L381.8,421.5 L382.1,421.5 L382.3,421.6 L382.6,421.6 L382.8,421.6 L383.1,421.6 L383.3,421.6 L383.6,421.6 
+		L383.8,421.6 L384.1,421.6 L384.3,421.6 L384.6,421.6 L384.8,421.6 L385.1,421.6 L385.3,421.6 L385.6,421.6 
+		L385.8,421.6 L386.1,421.6 L386.3,421.6 L386.6,421.6 L386.8,421.6 L387.1,421.6 L387.3,421.6 L387.6,421.6 
+		L387.8,421.6 L388.1,421.6 L388.3,421.6 L388.6,421.7 L388.9,421.7 L389.1,421.7 L389.4,421.7 L389.6,421.7 
+		L389.9,421.7 L390.1,421.7 L390.4,421.7 L390.6,421.7 L390.9,421.7 L391.1,421.7 L391.4,421.7 L391.6,421.7 
+		L391.9,421.7 L392.1,421.7 L392.4,421.7 L392.6,421.7 L392.9,421.7 L393.1,421.7 L393.4,421.7 L393.6,421.7 
+		L393.9,421.7 L394.1,421.7 L394.4,421.7 L394.6,421.7 L394.9,421.7 L395.1,421.7 L395.4,421.7 L395.6,421.7 
+		L395.9,421.8 L396.1,421.8 L396.4,421.8 L396.7,421.8 L396.9,421.8 L397.2,421.8 L397.4,421.8 L397.7,421.8 
+		L397.9,421.8 L398.2,421.8 L398.4,421.8 L398.7,421.8 L398.9,421.8 L399.2,421.8 L399.4,421.8 L399.7,421.8 
+		L399.9,421.8 L400.2,421.8 L400.4,421.8 L400.7,421.8 L400.9,421.8 L401.2,421.8 L401.4,421.8 L401.7,421.8 
+		L401.9,421.8 L402.2,421.8 L402.4,421.8 L402.7,421.8 L402.9,421.8 L403.2,421.8 L403.4,421.8 L403.7,421.8 
+		L403.9,421.8 L404.2,421.9 L404.4,421.9 L404.7,421.9 L405.0,421.9 L405.2,421.9 L405.5,421.9 L405.7,421.9 
+		L406.0,421.9 L406.2,421.9 L406.5,421.9 L406.7,421.9 L407.0,421.9 L407.2,421.9 L407.5,421.9 L407.7,421.9 
+		L408.0,421.9 L408.2,421.9 L408.5,421.9 L408.7,421.9 L409.0,421.9 L409.2,421.9 L409.5,421.9 L409.7,421.9 
+		L410.0,421.9 L410.2,421.9 L410.5,421.9 L410.7,421.9 L411.0,421.9 L411.2,421.9 L411.5,421.9 L411.7,421.9 
+		L412.0,421.9 L412.2,421.9 L412.5,421.9 L412.8,421.9 L413.0,421.9 L413.3,421.9 L413.5,421.9 L413.8,421.9 
+		L414.0,421.9 L414.3,422.0 L414.5,422.0 L414.8,422.0 L415.0,422.0 L415.3,422.0 L415.5,422.0 L415.8,422.0 
+		L416.0,422.0 L416.3,422.0 L416.5,422.0 L416.8,422.0 L417.0,422.0 L417.3,422.0 L417.5,422.0 L417.8,422.0 
+		L418.0,422.0 L418.3,422.0 L418.5,422.0 L418.8,422.0 L419.0,422.0 L419.3,422.0 L419.5,422.0 L419.8,422.0 
+		L420.0,422.0 L420.3,422.0 L420.5,422.0 L420.8,422.0 L421.1,422.0 L421.3,422.0 L421.6,422.0 L421.8,422.0 
+		L422.1,422.0 L422.3,422.0 L422.6,422.0 L422.8,422.0 L423.1,422.0 L423.3,422.0 L423.6,422.0 L423.8,422.0 
+		L424.1,422.0 L424.3,422.0 L424.6,422.0 L424.8,422.0 L425.1,422.0 L425.3,422.0 L425.6,422.0 L425.8,422.0 
+		L426.1,422.0 L426.3,422.0 L426.6,422.0 L426.8,422.0 L427.1,422.1 L427.3,422.1 L427.6,422.1 L427.8,422.1 
+		L428.1,422.1 L428.3,422.1 L428.6,422.1 L428.8,422.1 L429.1,422.1 L429.4,422.1 L429.6,422.1 L429.9,422.1 
+		L430.1,422.1 L430.4,422.1 L430.6,422.1 L430.9,422.1 L431.1,422.1 L431.4,422.1 L431.6,422.1 L431.9,422.1 
+		L432.1,422.1 L432.4,422.1 L432.6,422.1 L432.9,422.1 L433.1,422.1 L433.4,422.1 L433.6,422.1 L433.9,422.1 
+		L434.1,422.1 L434.4,422.1 L434.6,422.1 L434.9,422.1 L435.1,422.1 L435.4,422.1 L435.6,422.1 L435.9,422.1 
+		L436.1,422.1 L436.4,422.1 L436.6,422.1 L436.9,422.1 L437.2,422.1 L437.4,422.1 L437.7,422.1 L437.9,422.1 
+		L438.2,422.1 L438.4,422.1 L438.7,422.1 L438.9,422.1 L439.2,422.1 L439.4,422.1 L439.7,422.1 L439.9,422.1 
+		L440.2,422.1 L440.4,422.1 L440.7,422.1 L440.9,422.1 L441.2,422.1 L441.4,422.1 L441.7,422.1 L441.9,422.1 
+		L442.2,422.1 L442.4,422.1 L442.7,422.1 L442.9,422.1 L443.2,422.1 L443.4,422.1 L443.7,422.1 L443.9,422.2 
+		L444.2,422.2 L444.4,422.2 L444.7,422.2 L444.9,422.2 L445.2,422.2 L445.5,422.2 L445.7,422.2 L446.0,422.2 
+		L446.2,422.2 L446.5,422.2 L446.7,422.2 L447.0,422.2 L447.2,422.2 L447.5,422.2 L447.7,422.2 L448.0,422.2 
+		L448.2,422.2 L448.5,422.2 L448.7,422.2 L449.0,422.2 L449.2,422.2 L449.5,422.2 L449.7,422.2 L450.0,422.2 
+		L450.2,422.2 L450.5,422.2 L450.7,422.2 L451.0,422.2 L451.2,422.2 L451.5,422.2 L451.7,422.2 L452.0,422.2 
+		L452.2,422.2 L452.5,422.2 L452.7,422.2 L453.0,422.2 L453.2,422.2 L453.5,422.2 L453.8,422.2 L454.0,422.2 
+		L454.3,422.2 L454.5,422.2 L454.8,422.2 L455.0,422.2 L455.3,422.2 L455.5,422.2 L455.8,422.2 L456.0,422.2 
+		L456.3,422.2 L456.5,422.2 L456.8,422.2 L457.0,422.2 L457.3,422.2 L457.5,422.2 L457.8,422.2 L458.0,422.2 
+		L458.3,422.2 L458.5,422.2 L458.8,422.2 L459.0,422.2 L459.3,422.2 L459.5,422.2 L459.8,422.2 L460.0,422.2 
+		L460.3,422.2 L460.5,422.2 L460.8,422.2 L461.0,422.2 L461.3,422.2 L461.6,422.2 L461.8,422.2 L462.1,422.2 
+		L462.3,422.2 L462.6,422.2 L462.8,422.2 L463.1,422.2 L463.3,422.2 L463.6,422.2 L463.8,422.2 L464.1,422.2 
+		L464.3,422.2 L464.6,422.2 L464.8,422.2 L465.1,422.2 L465.3,422.2 L465.6,422.2 L465.8,422.2 L466.1,422.2 
+		L466.3,422.2 L466.6,422.2 L466.8,422.2 L467.1,422.2 L467.3,422.2 L467.6,422.2 L467.8,422.2 L468.1,422.2 
+		L468.3,422.2 L468.6,422.2 L468.8,422.2 L469.1,422.2 L469.3,422.2 L469.6,422.3 L469.9,422.3 L470.1,422.3 
+		L470.4,422.3 L470.6,422.3 L470.9,422.3 L471.1,422.3 L471.4,422.3 L471.6,422.3 L471.9,422.3 L472.1,422.3 
+		L472.4,422.3 L472.6,422.3 L472.9,422.3 L473.1,422.3 L473.4,422.3 L473.6,422.3 L473.9,422.3 L474.1,422.3 
+		L474.4,422.3 L474.6,422.3 L474.9,422.3 L475.1,422.3 L475.4,422.3 L475.6,422.3 L475.9,422.3 L476.1,422.3 
+		L476.4,422.3 L476.6,422.3 L476.9,422.3 L477.1,422.3 L477.4,422.3 L477.7,422.3 L477.9,422.3 L478.2,422.3 
+		L478.4,422.3 L478.7,422.3 L478.9,422.3 L479.2,422.3 L479.4,422.3 L479.7,422.3 L479.9,422.3 L480.2,422.3 
+		L480.4,422.3 L480.7,422.3 L480.9,422.3 L481.2,422.3 L481.4,422.3 L481.7,422.3 L481.9,422.3 L482.2,422.3 
+		L482.4,422.3 L482.7,422.3 L482.9,422.3 L483.2,422.3 L483.4,422.3 L483.7,422.3 L483.9,422.3 L484.2,422.3 
+		L484.4,422.3 L484.7,422.3 L484.9,422.3 L485.2,422.3 L485.4,422.3 L485.7,422.3 L486.0,422.3 L486.2,422.3 
+		L486.5,422.3 L486.7,422.3 L487.0,422.3 L487.2,422.3 L487.5,422.3 L487.7,422.3 L488.0,422.3 L488.2,422.3 
+		L488.5,422.3 L488.7,422.3 L489.0,422.3 L489.2,422.3 L489.5,422.3 L489.7,422.3 L490.0,422.3 L490.2,422.3 
+		L490.5,422.3 L490.7,422.3 L491.0,422.3 L491.2,422.3 L491.5,422.3 L491.7,422.3 L492.0,422.3 L492.2,422.3 
+		L492.5,422.3 L492.7,422.3 L493.0,422.3 L493.2,422.3 L493.5,422.3 L493.7,422.3 L494.0,422.3 L494.3,422.3 
+		L494.5,422.3 L494.8,422.3 L495.0,422.3 L495.3,422.3 L495.5,422.3 L495.8,422.3 L496.0,422.3 L496.3,422.3 
+		L496.5,422.3 L496.8,422.3 L497.0,422.3 L497.3,422.3 L497.5,422.3 L497.8,422.3 L498.0,422.3 L498.3,422.3 
+		L498.5,422.3 L498.8,422.3 L499.0,422.3 L499.3,422.3 L499.5,422.3 L499.8,422.3 L500.0,422.3 L500.3,422.3 
+		L500.5,422.3 L500.8,422.3 L501.0,422.3 L501.3,422.3 L501.5,422.3 L501.8,422.3 L502.1,422.3 L502.3,422.3 
+		L502.6,422.3 L502.8,422.3 L503.1,422.3 L503.3,422.3 L503.6,422.3 L503.8,422.3 L504.1,422.3 L504.3,422.3 
+		L504.6,422.3 L504.8,422.3 L505.1,422.3 L505.3,422.3 L505.6,422.3 L505.8,422.3 L506.1,422.3 L506.3,422.3 
+		L506.6,422.3 L506.8,422.3 L507.1,422.3 L507.3,422.3 L507.6,422.3 L507.8,422.3 L508.1,422.3 L508.3,422.3 
+		L508.6,422.3 L508.8,422.3 L509.1,422.3 L509.3,422.3 L509.6,422.3 L509.8,422.3 L510.1,422.3 L510.4,422.3 
+		L510.6,422.3 L510.9,422.3 L511.1,422.3 L511.4,422.3 L511.6,422.3 L511.9,422.3 L512.1,422.3 L512.4,422.3 
+		L512.6,422.3 L512.9,422.3 L513.1,422.3 L513.4,422.3 L513.6,422.3 L513.9,422.3 L514.1,422.3 L514.4,422.3 
+		L514.6,422.3 L514.9,422.3 L515.1,422.3 L515.4,422.3 L515.6,422.3 L515.9,422.3 L516.1,422.3 L516.4,422.3 
+		L516.6,422.3 L516.9,422.3 L517.1,422.3 L517.4,422.3 L517.6,422.3 L517.9,422.3 L518.1,422.3 L518.4,422.3 
+		L518.7,422.3 L518.9,422.3 L519.2,422.3 L519.4,422.3 L519.7,422.3 L519.9,422.3 L520.2,422.3 L520.4,422.3 
+		L520.7,422.3 L520.9,422.3 L521.2,422.3 L521.4,422.3 L521.7,422.3 L521.9,422.3 L522.2,422.3 L522.4,422.3 
+		L522.7,422.3 L522.9,422.3 L523.2,422.3 L523.4,422.3 L523.7,422.3 L523.9,422.3 L524.2,422.3 L524.4,422.3 
+		L524.7,422.3 L524.9,422.4 L525.2,422.4 L525.4,422.4 L525.7,422.4 L525.9,422.4 L526.2,422.4 L526.5,422.4 
+		L526.7,422.4 L527.0,422.4 L527.2,422.4 L527.5,422.4 L527.7,422.4 L528.0,422.4 L528.2,422.4 L528.5,422.4 
+		L528.7,422.4 L529.0,422.4 L529.2,422.4 L529.5,422.4 L529.7,422.4 L530.0,422.4 L530.2,422.4 L530.5,422.4 
+		L530.7,422.4 L531.0,422.4 L531.2,422.4 L531.5,422.4 L531.7,422.4 L532.0,422.4 L532.2,422.4 L532.5,422.4 
+		L532.7,422.4 L533.0,422.4 L533.2,422.4 L533.5,422.4 L533.7,422.4 L534.0,422.4 L534.2,422.4 L534.5,422.4 
+		L534.8,422.4 L535.0,422.4 L535.3,422.4 L535.5,422.4 L535.8,422.4 L536.0,422.4 L536.3,422.4 L536.5,422.4 
+		L536.8,422.4 L537.0,422.4 L537.3,422.4 L537.5,422.4 L537.8,422.4 L538.0,422.4 L538.3,422.4 L538.5,422.4 
+		L538.8,422.4 L539.0,422.4 L539.3,422.4 L539.5,422.4 L539.8,422.4 L540.0,422.4 L540.3,422.4 L540.5,422.4 
+		L540.8,422.4 L541.0,422.4 L541.3,422.4 L541.5,422.4 L541.8,422.4 L542.0,422.4 L542.3,422.4 L542.6,422.4 
+		L542.8,422.4 L543.1,422.4 L543.3,422.4 L543.6,422.4 L543.8,422.4 L544.1,422.4 L544.3,422.4 L544.6,422.4 
+		L544.8,422.4 L545.1,422.4 L545.3,422.4 L545.6,422.4 L545.8,422.4 L546.1,422.4 L546.3,422.4 L546.6,422.4 
+		L546.8,422.4 L547.1,422.4 L547.3,422.4 L547.6,422.4 L547.8,422.4 L548.1,422.4 L548.3,422.4 L548.6,422.4 
+		L548.8,422.4 L549.1,422.4 L549.3,422.4 L549.6,422.4 L549.8,422.4 L550.1,422.4 L550.3,422.4 L550.6,422.4 
+		L550.9,422.4 L551.1,422.4 L551.4,422.4 L551.6,422.4 L551.9,422.4 L552.1,422.4 L552.4,422.4 L552.6,422.4 
+		L552.9,422.4 L553.1,422.4 L553.4,422.4 L553.6,422.4 L553.9,422.4 L554.1,422.4 L554.4,422.4 L554.6,422.4 
+		L554.9,422.4 L555.1,422.4 L555.4,422.4 L555.6,422.4 L555.9,422.4 L556.1,422.4 L556.4,422.4 L556.6,422.4 
+		L556.9,422.4 L557.1,422.4 L557.4,422.4 L557.6,422.4 L557.9,422.4 L558.1,422.4 L558.4,422.4 L558.6,422.4 
+		L558.9,422.4 L559.2,422.4 L559.4,422.4 L559.7,422.4 L559.9,422.4 L560.2,422.4 L560.4,422.4 L560.7,422.4 
+		L560.9,422.4 L561.2,422.4 L561.4,422.4 L561.7,422.4 L561.9,422.4 L562.2,422.4 L562.4,422.4 L562.7,422.4 
+		L562.9,422.4 L563.2,422.4 L563.4,422.4 L563.7,422.4 L563.9,422.4 L564.2,422.4 L564.4,422.4 L564.7,422.4 
+		L564.9,422.4 L565.2,422.4 L565.4,422.4 L565.7,422.4 L565.9,422.4 L566.2,422.4 L566.4,422.4 L566.7,422.4 
+		L567.0,422.4 L567.2,422.4 L567.5,422.4 L567.7,422.4 L568.0,422.4 L568.2,422.4 L568.5,422.4 L568.7,422.4 
+		L569.0,422.4 L569.2,422.4 L569.5,422.4 L569.7,422.4 L570.0,422.4 L570.2,422.4 L570.5,422.4 L570.7,422.4 
+		L571.0,422.4 L571.2,422.4 L571.5,422.4 L571.7,422.4 L572.0,422.4 L572.2,422.4 L572.5,422.4 L572.7,422.4 
+		L573.0,422.4 L573.2,422.4 L573.5,422.4 L573.7,422.4 L574.0,422.4 L574.2,422.4 L574.5,422.4 L574.7,422.4 
+		'></path>
+</g>
+	</g>
+	<g id="Plot_2"><title>Plot_2</title>
+<g style="fill:none; color:green; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L72.2,422.4 L72.4,422.4 L72.7,422.4 L72.9,422.3 L73.2,422.3 L73.4,422.2 L73.7,422.2 
+		L73.9,422.1 L74.2,422.0 L74.4,421.9 L74.7,421.8 L74.9,421.7 L75.2,421.6 L75.4,421.5 L75.7,421.3 
+		L75.9,421.2 L76.2,421.1 L76.4,420.9 L76.7,420.7 L76.9,420.6 L77.2,420.4 L77.4,420.2 L77.7,420.0 
+		L77.9,419.8 L78.2,419.6 L78.4,419.4 L78.7,419.2 L78.9,418.9 L79.2,418.7 L79.4,418.5 L79.7,418.2 
+		L79.9,418.0 L80.2,417.7 L80.5,417.5 L80.7,417.2 L81.0,416.9 L81.2,416.6 L81.5,416.3 L81.7,416.1 
+		L82.0,415.8 L82.2,415.5 L82.5,415.1 L82.7,414.8 L83.0,414.5 L83.2,414.2 L83.5,413.9 L83.7,413.5 
+		L84.0,413.2 L84.2,412.9 L84.5,412.5 L84.7,412.2 L85.0,411.8 L85.2,411.5 L85.5,411.1 L85.7,410.7 
+		L86.0,410.4 L86.2,410.0 L86.5,409.6 L86.7,409.3 L87.0,408.9 L87.2,408.5 L87.5,408.1 L87.7,407.7 
+		L88.0,407.3 L88.3,406.9 L88.5,406.5 L88.8,406.1 L89.0,405.7 L89.3,405.3 L89.5,404.9 L89.8,404.5 
+		L90.0,404.1 L90.3,403.6 L90.5,403.2 L90.8,402.8 L91.0,402.4 L91.3,401.9 L91.5,401.5 L91.8,401.1 
+		L92.0,400.6 L92.3,400.2 L92.5,399.8 L92.8,399.3 L93.0,398.9 L93.3,398.4 L93.5,398.0 L93.8,397.6 
+		L94.0,397.1 L94.3,396.7 L94.5,396.2 L94.8,395.8 L95.0,395.3 L95.3,394.8 L95.5,394.4 L95.8,393.9 
+		L96.0,393.5 L96.3,393.0 L96.6,392.6 L96.8,392.1 L97.1,391.6 L97.3,391.2 L97.6,390.7 L97.8,390.3 
+		L98.1,389.8 L98.3,389.3 L98.6,388.9 L98.8,388.4 L99.1,387.9 L99.3,387.5 L99.6,387.0 L99.8,386.5 
+		L100.1,386.1 L100.3,385.6 L100.6,385.1 L100.8,384.7 L101.1,384.2 L101.3,383.7 L101.6,383.3 L101.8,382.8 
+		L102.1,382.3 L102.3,381.9 L102.6,381.4 L102.8,380.9 L103.1,380.5 L103.3,380.0 L103.6,379.5 L103.8,379.1 
+		L104.1,378.6 L104.3,378.1 L104.6,377.7 L104.9,377.2 L105.1,376.7 L105.4,376.3 L105.6,375.8 L105.9,375.3 
+		L106.1,374.9 L106.4,374.4 L106.6,374.0 L106.9,373.5 L107.1,373.0 L107.4,372.6 L107.6,372.1 L107.9,371.7 
+		L108.1,371.2 L108.4,370.8 L108.6,370.3 L108.9,369.9 L109.1,369.4 L109.4,369.0 L109.6,368.5 L109.9,368.1 
+		L110.1,367.6 L110.4,367.2 L110.6,366.7 L110.9,366.3 L111.1,365.8 L111.4,365.4 L111.6,364.9 L111.9,364.5 
+		L112.1,364.1 L112.4,363.6 L112.7,363.2 L112.9,362.8 L113.2,362.3 L113.4,361.9 L113.7,361.5 L113.9,361.0 
+		L114.2,360.6 L114.4,360.2 L114.7,359.8 L114.9,359.3 L115.2,358.9 L115.4,358.5 L115.7,358.1 L115.9,357.7 
+		L116.2,357.2 L116.4,356.8 L116.7,356.4 L116.9,356.0 L117.2,355.6 L117.4,355.2 L117.7,354.8 L117.9,354.4 
+		L118.2,354.0 L118.4,353.6 L118.7,353.2 L118.9,352.8 L119.2,352.4 L119.4,352.0 L119.7,351.6 L119.9,351.2 
+		L120.2,350.8 L120.4,350.4 L120.7,350.0 L121.0,349.7 L121.2,349.3 L121.5,348.9 L121.7,348.5 L122.0,348.1 
+		L122.2,347.8 L122.5,347.4 L122.7,347.0 L123.0,346.7 L123.2,346.3 L123.5,345.9 L123.7,345.6 L124.0,345.2 
+		L124.2,344.9 L124.5,344.5 L124.7,344.1 L125.0,343.8 L125.2,343.4 L125.5,343.1 L125.7,342.7 L126.0,342.4 
+		L126.2,342.1 L126.5,341.7 L126.7,341.4 L127.0,341.0 L127.2,340.7 L127.5,340.4 L127.7,340.0 L128.0,339.7 
+		L128.2,339.4 L128.5,339.1 L128.8,338.7 L129.0,338.4 L129.3,338.1 L129.5,337.8 L129.8,337.5 L130.0,337.1 
+		L130.3,336.8 L130.5,336.5 L130.8,336.2 L131.0,335.9 L131.3,335.6 L131.5,335.3 L131.8,335.0 L132.0,334.7 
+		L132.3,334.4 L132.5,334.1 L132.8,333.8 L133.0,333.5 L133.3,333.3 L133.5,333.0 L133.8,332.7 L134.0,332.4 
+		L134.3,332.1 L134.5,331.9 L134.8,331.6 L135.0,331.3 L135.3,331.1 L135.5,330.8 L135.8,330.5 L136.0,330.3 
+		L136.3,330.0 L136.5,329.7 L136.8,329.5 L137.1,329.2 L137.3,329.0 L137.6,328.7 L137.8,328.5 L138.1,328.2 
+		L138.3,328.0 L138.6,327.7 L138.8,327.5 L139.1,327.3 L139.3,327.0 L139.6,326.8 L139.8,326.6 L140.1,326.3 
+		L140.3,326.1 L140.6,325.9 L140.8,325.7 L141.1,325.4 L141.3,325.2 L141.6,325.0 L141.8,324.8 L142.1,324.6 
+		L142.3,324.4 L142.6,324.1 L142.8,323.9 L143.1,323.7 L143.3,323.5 L143.6,323.3 L143.8,323.1 L144.1,322.9 
+		L144.3,322.7 L144.6,322.5 L144.8,322.4 L145.1,322.2 L145.4,322.0 L145.6,321.8 L145.9,321.6 L146.1,321.4 
+		L146.4,321.3 L146.6,321.1 L146.9,320.9 L147.1,320.7 L147.4,320.6 L147.6,320.4 L147.9,320.2 L148.1,320.1 
+		L148.4,319.9 L148.6,319.7 L148.9,319.6 L149.1,319.4 L149.4,319.3 L149.6,319.1 L149.9,319.0 L150.1,318.8 
+		L150.4,318.7 L150.6,318.5 L150.9,318.4 L151.1,318.2 L151.4,318.1 L151.6,318.0 L151.9,317.8 L152.1,317.7 
+		L152.4,317.6 L152.6,317.4 L152.9,317.3 L153.2,317.2 L153.4,317.0 L153.7,316.9 L153.9,316.8 L154.2,316.7 
+		L154.4,316.6 L154.7,316.5 L154.9,316.3 L155.2,316.2 L155.4,316.1 L155.7,316.0 L155.9,315.9 L156.2,315.8 
+		L156.4,315.7 L156.7,315.6 L156.9,315.5 L157.2,315.4 L157.4,315.3 L157.7,315.2 L157.9,315.1 L158.2,315.0 
+		L158.4,314.9 L158.7,314.9 L158.9,314.8 L159.2,314.7 L159.4,314.6 L159.7,314.5 L159.9,314.4 L160.2,314.4 
+		L160.4,314.3 L160.7,314.2 L160.9,314.2 L161.2,314.1 L161.5,314.0 L161.7,313.9 L162.0,313.9 L162.2,313.8 
+		L162.5,313.8 L162.7,313.7 L163.0,313.6 L163.2,313.6 L163.5,313.5 L163.7,313.5 L164.0,313.4 L164.2,313.4 
+		L164.5,313.3 L164.7,313.3 L165.0,313.2 L165.2,313.2 L165.5,313.2 L165.7,313.1 L166.0,313.1 L166.2,313.0 
+		L166.5,313.0 L166.7,313.0 L167.0,312.9 L167.2,312.9 L167.5,312.9 L167.7,312.8 L168.0,312.8 L168.2,312.8 
+		L168.5,312.8 L168.7,312.7 L169.0,312.7 L169.2,312.7 L169.5,312.7 L169.8,312.7 L170.0,312.7 L170.3,312.6 
+		L170.5,312.6 L170.8,312.6 L171.0,312.6 L171.3,312.6 L171.5,312.6 L171.8,312.6 L172.0,312.6 L172.3,312.6 
+		L172.5,312.6 L172.8,312.6 L173.0,312.6 L173.3,312.6 L173.5,312.6 L173.8,312.6 L174.0,312.6 L174.3,312.6 
+		L174.5,312.6 L174.8,312.6 L175.0,312.7 L175.3,312.7 L175.5,312.7 L175.8,312.7 L176.0,312.7 L176.3,312.7 
+		L176.5,312.8 L176.8,312.8 L177.0,312.8 L177.3,312.8 L177.6,312.9 L177.8,312.9 L178.1,312.9 L178.3,312.9 
+		L178.6,313.0 L178.8,313.0 L179.1,313.0 L179.3,313.1 L179.6,313.1 L179.8,313.1 L180.1,313.2 L180.3,313.2 
+		L180.6,313.3 L180.8,313.3 L181.1,313.3 L181.3,313.4 L181.6,313.4 L181.8,313.5 L182.1,313.5 L182.3,313.6 
+		L182.6,313.6 L182.8,313.7 L183.1,313.7 L183.3,313.8 L183.6,313.8 L183.8,313.9 L184.1,313.9 L184.3,314.0 
+		L184.6,314.0 L184.8,314.1 L185.1,314.2 L185.3,314.2 L185.6,314.3 L185.9,314.3 L186.1,314.4 L186.4,314.5 
+		L186.6,314.5 L186.9,314.6 L187.1,314.7 L187.4,314.7 L187.6,314.8 L187.9,314.9 L188.1,315.0 L188.4,315.0 
+		L188.6,315.1 L188.9,315.2 L189.1,315.3 L189.4,315.3 L189.6,315.4 L189.9,315.5 L190.1,315.6 L190.4,315.6 
+		L190.6,315.7 L190.9,315.8 L191.1,315.9 L191.4,316.0 L191.6,316.1 L191.9,316.1 L192.1,316.2 L192.4,316.3 
+		L192.6,316.4 L192.9,316.5 L193.1,316.6 L193.4,316.7 L193.7,316.8 L193.9,316.9 L194.2,316.9 L194.4,317.0 
+		L194.7,317.1 L194.9,317.2 L195.2,317.3 L195.4,317.4 L195.7,317.5 L195.9,317.6 L196.2,317.7 L196.4,317.8 
+		L196.7,317.9 L196.9,318.0 L197.2,318.1 L197.4,318.2 L197.7,318.3 L197.9,318.4 L198.2,318.5 L198.4,318.6 
+		L198.7,318.8 L198.9,318.9 L199.2,319.0 L199.4,319.1 L199.7,319.2 L199.9,319.3 L200.2,319.4 L200.4,319.5 
+		L200.7,319.6 L200.9,319.7 L201.2,319.9 L201.4,320.0 L201.7,320.1 L202.0,320.2 L202.2,320.3 L202.5,320.4 
+		L202.7,320.6 L203.0,320.7 L203.2,320.8 L203.5,320.9 L203.7,321.0 L204.0,321.1 L204.2,321.3 L204.5,321.4 
+		L204.7,321.5 L205.0,321.6 L205.2,321.8 L205.5,321.9 L205.7,322.0 L206.0,322.1 L206.2,322.3 L206.5,322.4 
+		L206.7,322.5 L207.0,322.6 L207.2,322.8 L207.5,322.9 L207.7,323.0 L208.0,323.1 L208.2,323.3 L208.5,323.4 
+		L208.7,323.5 L209.0,323.7 L209.2,323.8 L209.5,323.9 L209.7,324.1 L210.0,324.2 L210.3,324.3 L210.5,324.5 
+		L210.8,324.6 L211.0,324.7 L211.3,324.9 L211.5,325.0 L211.8,325.1 L212.0,325.3 L212.3,325.4 L212.5,325.6 
+		L212.8,325.7 L213.0,325.8 L213.3,326.0 L213.5,326.1 L213.8,326.2 L214.0,326.4 L214.3,326.5 L214.5,326.7 
+		L214.8,326.8 L215.0,327.0 L215.3,327.1 L215.5,327.2 L215.8,327.4 L216.0,327.5 L216.3,327.7 L216.5,327.8 
+		L216.8,328.0 L217.0,328.1 L217.3,328.2 L217.5,328.4 L217.8,328.5 L218.1,328.7 L218.3,328.8 L218.6,329.0 
+		L218.8,329.1 L219.1,329.3 L219.3,329.4 L219.6,329.6 L219.8,329.7 L220.1,329.9 L220.3,330.0 L220.6,330.2 
+		L220.8,330.3 L221.1,330.5 L221.3,330.6 L221.6,330.8 L221.8,330.9 L222.1,331.1 L222.3,331.2 L222.6,331.4 
+		L222.8,331.5 L223.1,331.7 L223.3,331.8 L223.6,332.0 L223.8,332.1 L224.1,332.3 L224.3,332.4 L224.6,332.6 
+		L224.8,332.7 L225.1,332.9 L225.3,333.0 L225.6,333.2 L225.8,333.3 L226.1,333.5 L226.4,333.6 L226.6,333.8 
+		L226.9,334.0 L227.1,334.1 L227.4,334.3 L227.6,334.4 L227.9,334.6 L228.1,334.7 L228.4,334.9 L228.6,335.0 
+		L228.9,335.2 L229.1,335.4 L229.4,335.5 L229.6,335.7 L229.9,335.8 L230.1,336.0 L230.4,336.1 L230.6,336.3 
+		L230.9,336.5 L231.1,336.6 L231.4,336.8 L231.6,336.9 L231.9,337.1 L232.1,337.3 L232.4,337.4 L232.6,337.6 
+		L232.9,337.7 L233.1,337.9 L233.4,338.0 L233.6,338.2 L233.9,338.4 L234.1,338.5 L234.4,338.7 L234.7,338.8 
+		L234.9,339.0 L235.2,339.2 L235.4,339.3 L235.7,339.5 L235.9,339.6 L236.2,339.8 L236.4,340.0 L236.7,340.1 
+		L236.9,340.3 L237.2,340.4 L237.4,340.6 L237.7,340.8 L237.9,340.9 L238.2,341.1 L238.4,341.2 L238.7,341.4 
+		L238.9,341.6 L239.2,341.7 L239.4,341.9 L239.7,342.0 L239.9,342.2 L240.2,342.4 L240.4,342.5 L240.7,342.7 
+		L240.9,342.9 L241.2,343.0 L241.4,343.2 L241.7,343.3 L241.9,343.5 L242.2,343.7 L242.5,343.8 L242.7,344.0 
+		L243.0,344.1 L243.2,344.3 L243.5,344.5 L243.7,344.6 L244.0,344.8 L244.2,344.9 L244.5,345.1 L244.7,345.3 
+		L245.0,345.4 L245.2,345.6 L245.5,345.8 L245.7,345.9 L246.0,346.1 L246.2,346.2 L246.5,346.4 L246.7,346.6 
+		L247.0,346.7 L247.2,346.9 L247.5,347.0 L247.7,347.2 L248.0,347.4 L248.2,347.5 L248.5,347.7 L248.7,347.8 
+		L249.0,348.0 L249.2,348.2 L249.5,348.3 L249.7,348.5 L250.0,348.6 L250.2,348.8 L250.5,349.0 L250.8,349.1 
+		L251.0,349.3 L251.3,349.4 L251.5,349.6 L251.8,349.8 L252.0,349.9 L252.3,350.1 L252.5,350.2 L252.8,350.4 
+		L253.0,350.6 L253.3,350.7 L253.5,350.9 L253.8,351.0 L254.0,351.2 L254.3,351.4 L254.5,351.5 L254.8,351.7 
+		L255.0,351.8 L255.3,352.0 L255.5,352.2 L255.8,352.3 L256.0,352.5 L256.3,352.6 L256.5,352.8 L256.8,353.0 
+		L257.0,353.1 L257.3,353.3 L257.5,353.4 L257.8,353.6 L258.0,353.7 L258.3,353.9 L258.6,354.1 L258.8,354.2 
+		L259.1,354.4 L259.3,354.5 L259.6,354.7 L259.8,354.8 L260.1,355.0 L260.3,355.2 L260.6,355.3 L260.8,355.5 
+		L261.1,355.6 L261.3,355.8 L261.6,355.9 L261.8,356.1 L262.1,356.3 L262.3,356.4 L262.6,356.6 L262.8,356.7 
+		L263.1,356.9 L263.3,357.0 L263.6,357.2 L263.8,357.3 L264.1,357.5 L264.3,357.6 L264.6,357.8 L264.8,358.0 
+		L265.1,358.1 L265.3,358.3 L265.6,358.4 L265.8,358.6 L266.1,358.7 L266.3,358.9 L266.6,359.0 L266.9,359.2 
+		L267.1,359.3 L267.4,359.5 L267.6,359.6 L267.9,359.8 L268.1,359.9 L268.4,360.1 L268.6,360.3 L268.9,360.4 
+		L269.1,360.6 L269.4,360.7 L269.6,360.9 L269.9,361.0 L270.1,361.2 L270.4,361.3 L270.6,361.5 L270.9,361.6 
+		L271.1,361.8 L271.4,361.9 L271.6,362.1 L271.9,362.2 L272.1,362.4 L272.4,362.5 L272.6,362.7 L272.9,362.8 
+		L273.1,363.0 L273.4,363.1 L273.6,363.3 L273.9,363.4 L274.1,363.5 L274.4,363.7 L274.6,363.8 L274.9,364.0 
+		L275.2,364.1 L275.4,364.3 L275.7,364.4 L275.9,364.6 L276.2,364.7 L276.4,364.9 L276.7,365.0 L276.9,365.2 
+		L277.2,365.3 L277.4,365.5 L277.7,365.6 L277.9,365.7 L278.2,365.9 L278.4,366.0 L278.7,366.2 L278.9,366.3 
+		L279.2,366.5 L279.4,366.6 L279.7,366.8 L279.9,366.9 L280.2,367.0 L280.4,367.2 L280.7,367.3 L280.9,367.5 
+		L281.2,367.6 L281.4,367.8 L281.7,367.9 L281.9,368.0 L282.2,368.2 L282.4,368.3 L282.7,368.5 L283.0,368.6 
+		L283.2,368.7 L283.5,368.9 L283.7,369.0 L284.0,369.2 L284.2,369.3 L284.5,369.4 L284.7,369.6 L285.0,369.7 
+		L285.2,369.9 L285.5,370.0 L285.7,370.1 L286.0,370.3 L286.2,370.4 L286.5,370.5 L286.7,370.7 L287.0,370.8 
+		L287.2,371.0 L287.5,371.1 L287.7,371.2 L288.0,371.4 L288.2,371.5 L288.5,371.6 L288.7,371.8 L289.0,371.9 
+		L289.2,372.1 L289.5,372.2 L289.7,372.3 L290.0,372.5 L290.2,372.6 L290.5,372.7 L290.7,372.9 L291.0,373.0 
+		L291.3,373.1 L291.5,373.3 L291.8,373.4 L292.0,373.5 L292.3,373.7 L292.5,373.8 L292.8,373.9 L293.0,374.1 
+		L293.3,374.2 L293.5,374.3 L293.8,374.4 L294.0,374.6 L294.3,374.7 L294.5,374.8 L294.8,375.0 L295.0,375.1 
+		L295.3,375.2 L295.5,375.4 L295.8,375.5 L296.0,375.6 L296.3,375.7 L296.5,375.9 L296.8,376.0 L297.0,376.1 
+		L297.3,376.3 L297.5,376.4 L297.8,376.5 L298.0,376.6 L298.3,376.8 L298.5,376.9 L298.8,377.0 L299.0,377.1 
+		L299.3,377.3 L299.6,377.4 L299.8,377.5 L300.1,377.6 L300.3,377.8 L300.6,377.9 L300.8,378.0 L301.1,378.1 
+		L301.3,378.3 L301.6,378.4 L301.8,378.5 L302.1,378.6 L302.3,378.8 L302.6,378.9 L302.8,379.0 L303.1,379.1 
+		L303.3,379.3 L303.6,379.4 L303.8,379.5 L304.1,379.6 L304.3,379.7 L304.6,379.9 L304.8,380.0 L305.1,380.1 
+		L305.3,380.2 L305.6,380.3 L305.8,380.5 L306.1,380.6 L306.3,380.7 L306.6,380.8 L306.8,380.9 L307.1,381.1 
+		L307.4,381.2 L307.6,381.3 L307.9,381.4 L308.1,381.5 L308.4,381.6 L308.6,381.8 L308.9,381.9 L309.1,382.0 
+		L309.4,382.1 L309.6,382.2 L309.9,382.3 L310.1,382.5 L310.4,382.6 L310.6,382.7 L310.9,382.8 L311.1,382.9 
+		L311.4,383.0 L311.6,383.1 L311.9,383.3 L312.1,383.4 L312.4,383.5 L312.6,383.6 L312.9,383.7 L313.1,383.8 
+		L313.4,383.9 L313.6,384.0 L313.9,384.2 L314.1,384.3 L314.4,384.4 L314.6,384.5 L314.9,384.6 L315.1,384.7 
+		L315.4,384.8 L315.7,384.9 L315.9,385.0 L316.2,385.2 L316.4,385.3 L316.7,385.4 L316.9,385.5 L317.2,385.6 
+		L317.4,385.7 L317.7,385.8 L317.9,385.9 L318.2,386.0 L318.4,386.1 L318.7,386.2 L318.9,386.3 L319.2,386.5 
+		L319.4,386.6 L319.7,386.7 L319.9,386.8 L320.2,386.9 L320.4,387.0 L320.7,387.1 L320.9,387.2 L321.2,387.3 
+		L321.4,387.4 L321.7,387.5 L321.9,387.6 L322.2,387.7 L322.4,387.8 L322.7,387.9 L322.9,388.0 L323.2,388.1 
+		L323.5,388.2 L323.7,388.3 L324.0,388.4 L324.2,388.5 L324.5,388.6 L324.7,388.7 L325.0,388.8 L325.2,388.9 
+		L325.5,389.0 L325.7,389.1 L326.0,389.2 L326.2,389.3 L326.5,389.4 L326.7,389.5 L327.0,389.6 L327.2,389.7 
+		L327.5,389.8 L327.7,389.9 L328.0,390.0 L328.2,390.1 L328.5,390.2 L328.7,390.3 L329.0,390.4 L329.2,390.5 
+		L329.5,390.6 L329.7,390.7 L330.0,390.8 L330.2,390.9 L330.5,391.0 L330.7,391.1 L331.0,391.2 L331.2,391.3 
+		L331.5,391.4 L331.8,391.5 L332.0,391.6 L332.3,391.7 L332.5,391.8 L332.8,391.9 L333.0,392.0 L333.3,392.0 
+		L333.5,392.1 L333.8,392.2 L334.0,392.3 L334.3,392.4 L334.5,392.5 L334.8,392.6 L335.0,392.7 L335.3,392.8 
+		L335.5,392.9 L335.8,393.0 L336.0,393.1 L336.3,393.2 L336.5,393.2 L336.8,393.3 L337.0,393.4 L337.3,393.5 
+		L337.5,393.6 L337.8,393.7 L338.0,393.8 L338.3,393.9 L338.5,394.0 L338.8,394.0 L339.0,394.1 L339.3,394.2 
+		L339.5,394.3 L339.8,394.4 L340.1,394.5 L340.3,394.6 L340.6,394.7 L340.8,394.7 L341.1,394.8 L341.3,394.9 
+		L341.6,395.0 L341.8,395.1 L342.1,395.2 L342.3,395.3 L342.6,395.3 L342.8,395.4 L343.1,395.5 L343.3,395.6 
+		L343.6,395.7 L343.8,395.8 L344.1,395.9 L344.3,395.9 L344.6,396.0 L344.8,396.1 L345.1,396.2 L345.3,396.3 
+		L345.6,396.4 L345.8,396.4 L346.1,396.5 L346.3,396.6 L346.6,396.7 L346.8,396.8 L347.1,396.8 L347.3,396.9 
+		L347.6,397.0 L347.9,397.1 L348.1,397.2 L348.4,397.2 L348.6,397.3 L348.9,397.4 L349.1,397.5 L349.4,397.6 
+		L349.6,397.6 L349.9,397.7 L350.1,397.8 L350.4,397.9 L350.6,398.0 L350.9,398.0 L351.1,398.1 L351.4,398.2 
+		L351.6,398.3 L351.9,398.3 L352.1,398.4 L352.4,398.5 L352.6,398.6 L352.9,398.6 L353.1,398.7 L353.4,398.8 
+		L353.6,398.9 L353.9,399.0 L354.1,399.0 L354.4,399.1 L354.6,399.2 L354.9,399.3 L355.1,399.3 L355.4,399.4 
+		L355.6,399.5 L355.9,399.5 L356.2,399.6 L356.4,399.7 L356.7,399.8 L356.9,399.8 L357.2,399.9 L357.4,400.0 
+		L357.7,400.1 L357.9,400.1 L358.2,400.2 L358.4,400.3 L358.7,400.3 L358.9,400.4 L359.2,400.5 L359.4,400.6 
+		L359.7,400.6 L359.9,400.7 L360.2,400.8 L360.4,400.8 L360.7,400.9 L360.9,401.0 L361.2,401.1 L361.4,401.1 
+		L361.7,401.2 L361.9,401.3 L362.2,401.3 L362.4,401.4 L362.7,401.5 L362.9,401.5 L363.2,401.6 L363.4,401.7 
+		L363.7,401.7 L363.9,401.8 L364.2,401.9 L364.5,401.9 L364.7,402.0 L365.0,402.1 L365.2,402.1 L365.5,402.2 
+		L365.7,402.3 L366.0,402.3 L366.2,402.4 L366.5,402.5 L366.7,402.5 L367.0,402.6 L367.2,402.7 L367.5,402.7 
+		L367.7,402.8 L368.0,402.9 L368.2,402.9 L368.5,403.0 L368.7,403.1 L369.0,403.1 L369.2,403.2 L369.5,403.2 
+		L369.7,403.3 L370.0,403.4 L370.2,403.4 L370.5,403.5 L370.7,403.6 L371.0,403.6 L371.2,403.7 L371.5,403.7 
+		L371.7,403.8 L372.0,403.9 L372.3,403.9 L372.5,404.0 L372.8,404.1 L373.0,404.1 L373.3,404.2 L373.5,404.2 
+		L373.8,404.3 L374.0,404.4 L374.3,404.4 L374.5,404.5 L374.8,404.5 L375.0,404.6 L375.3,404.7 L375.5,404.7 
+		L375.8,404.8 L376.0,404.8 L376.3,404.9 L376.5,405.0 L376.8,405.0 L377.0,405.1 L377.3,405.1 L377.5,405.2 
+		L377.8,405.2 L378.0,405.3 L378.3,405.4 L378.5,405.4 L378.8,405.5 L379.0,405.5 L379.3,405.6 L379.5,405.6 
+		L379.8,405.7 L380.0,405.8 L380.3,405.8 L380.6,405.9 L380.8,405.9 L381.1,406.0 L381.3,406.0 L381.6,406.1 
+		L381.8,406.1 L382.1,406.2 L382.3,406.3 L382.6,406.3 L382.8,406.4 L383.1,406.4 L383.3,406.5 L383.6,406.5 
+		L383.8,406.6 L384.1,406.6 L384.3,406.7 L384.6,406.7 L384.8,406.8 L385.1,406.8 L385.3,406.9 L385.6,406.9 
+		L385.8,407.0 L386.1,407.1 L386.3,407.1 L386.6,407.2 L386.8,407.2 L387.1,407.3 L387.3,407.3 L387.6,407.4 
+		L387.8,407.4 L388.1,407.5 L388.3,407.5 L388.6,407.6 L388.9,407.6 L389.1,407.7 L389.4,407.7 L389.6,407.8 
+		L389.9,407.8 L390.1,407.9 L390.4,407.9 L390.6,408.0 L390.9,408.0 L391.1,408.1 L391.4,408.1 L391.6,408.2 
+		L391.9,408.2 L392.1,408.3 L392.4,408.3 L392.6,408.4 L392.9,408.4 L393.1,408.5 L393.4,408.5 L393.6,408.5 
+		L393.9,408.6 L394.1,408.6 L394.4,408.7 L394.6,408.7 L394.9,408.8 L395.1,408.8 L395.4,408.9 L395.6,408.9 
+		L395.9,409.0 L396.1,409.0 L396.4,409.1 L396.7,409.1 L396.9,409.2 L397.2,409.2 L397.4,409.2 L397.7,409.3 
+		L397.9,409.3 L398.2,409.4 L398.4,409.4 L398.7,409.5 L398.9,409.5 L399.2,409.6 L399.4,409.6 L399.7,409.6 
+		L399.9,409.7 L400.2,409.7 L400.4,409.8 L400.7,409.8 L400.9,409.9 L401.2,409.9 L401.4,410.0 L401.7,410.0 
+		L401.9,410.0 L402.2,410.1 L402.4,410.1 L402.7,410.2 L402.9,410.2 L403.2,410.3 L403.4,410.3 L403.7,410.3 
+		L403.9,410.4 L404.2,410.4 L404.4,410.5 L404.7,410.5 L405.0,410.5 L405.2,410.6 L405.5,410.6 L405.7,410.7 
+		L406.0,410.7 L406.2,410.8 L406.5,410.8 L406.7,410.8 L407.0,410.9 L407.2,410.9 L407.5,411.0 L407.7,411.0 
+		L408.0,411.0 L408.2,411.1 L408.5,411.1 L408.7,411.2 L409.0,411.2 L409.2,411.2 L409.5,411.3 L409.7,411.3 
+		L410.0,411.3 L410.2,411.4 L410.5,411.4 L410.7,411.5 L411.0,411.5 L411.2,411.5 L411.5,411.6 L411.7,411.6 
+		L412.0,411.7 L412.2,411.7 L412.5,411.7 L412.8,411.8 L413.0,411.8 L413.3,411.8 L413.5,411.9 L413.8,411.9 
+		L414.0,412.0 L414.3,412.0 L414.5,412.0 L414.8,412.1 L415.0,412.1 L415.3,412.1 L415.5,412.2 L415.8,412.2 
+		L416.0,412.2 L416.3,412.3 L416.5,412.3 L416.8,412.4 L417.0,412.4 L417.3,412.4 L417.5,412.5 L417.8,412.5 
+		L418.0,412.5 L418.3,412.6 L418.5,412.6 L418.8,412.6 L419.0,412.7 L419.3,412.7 L419.5,412.7 L419.8,412.8 
+		L420.0,412.8 L420.3,412.8 L420.5,412.9 L420.8,412.9 L421.1,412.9 L421.3,413.0 L421.6,413.0 L421.8,413.0 
+		L422.1,413.1 L422.3,413.1 L422.6,413.1 L422.8,413.2 L423.1,413.2 L423.3,413.2 L423.6,413.3 L423.8,413.3 
+		L424.1,413.3 L424.3,413.4 L424.6,413.4 L424.8,413.4 L425.1,413.5 L425.3,413.5 L425.6,413.5 L425.8,413.6 
+		L426.1,413.6 L426.3,413.6 L426.6,413.7 L426.8,413.7 L427.1,413.7 L427.3,413.7 L427.6,413.8 L427.8,413.8 
+		L428.1,413.8 L428.3,413.9 L428.6,413.9 L428.8,413.9 L429.1,414.0 L429.4,414.0 L429.6,414.0 L429.9,414.1 
+		L430.1,414.1 L430.4,414.1 L430.6,414.1 L430.9,414.2 L431.1,414.2 L431.4,414.2 L431.6,414.3 L431.9,414.3 
+		L432.1,414.3 L432.4,414.3 L432.6,414.4 L432.9,414.4 L433.1,414.4 L433.4,414.5 L433.6,414.5 L433.9,414.5 
+		L434.1,414.5 L434.4,414.6 L434.6,414.6 L434.9,414.6 L435.1,414.7 L435.4,414.7 L435.6,414.7 L435.9,414.7 
+		L436.1,414.8 L436.4,414.8 L436.6,414.8 L436.9,414.9 L437.2,414.9 L437.4,414.9 L437.7,414.9 L437.9,415.0 
+		L438.2,415.0 L438.4,415.0 L438.7,415.0 L438.9,415.1 L439.2,415.1 L439.4,415.1 L439.7,415.2 L439.9,415.2 
+		L440.2,415.2 L440.4,415.2 L440.7,415.3 L440.9,415.3 L441.2,415.3 L441.4,415.3 L441.7,415.4 L441.9,415.4 
+		L442.2,415.4 L442.4,415.4 L442.7,415.5 L442.9,415.5 L443.2,415.5 L443.4,415.5 L443.7,415.6 L443.9,415.6 
+		L444.2,415.6 L444.4,415.6 L444.7,415.7 L444.9,415.7 L445.2,415.7 L445.5,415.7 L445.7,415.8 L446.0,415.8 
+		L446.2,415.8 L446.5,415.8 L446.7,415.9 L447.0,415.9 L447.2,415.9 L447.5,415.9 L447.7,415.9 L448.0,416.0 
+		L448.2,416.0 L448.5,416.0 L448.7,416.0 L449.0,416.1 L449.2,416.1 L449.5,416.1 L449.7,416.1 L450.0,416.2 
+		L450.2,416.2 L450.5,416.2 L450.7,416.2 L451.0,416.2 L451.2,416.3 L451.5,416.3 L451.7,416.3 L452.0,416.3 
+		L452.2,416.4 L452.5,416.4 L452.7,416.4 L453.0,416.4 L453.2,416.4 L453.5,416.5 L453.8,416.5 L454.0,416.5 
+		L454.3,416.5 L454.5,416.6 L454.8,416.6 L455.0,416.6 L455.3,416.6 L455.5,416.6 L455.8,416.7 L456.0,416.7 
+		L456.3,416.7 L456.5,416.7 L456.8,416.7 L457.0,416.8 L457.3,416.8 L457.5,416.8 L457.8,416.8 L458.0,416.9 
+		L458.3,416.9 L458.5,416.9 L458.8,416.9 L459.0,416.9 L459.3,417.0 L459.5,417.0 L459.8,417.0 L460.0,417.0 
+		L460.3,417.0 L460.5,417.1 L460.8,417.1 L461.0,417.1 L461.3,417.1 L461.6,417.1 L461.8,417.2 L462.1,417.2 
+		L462.3,417.2 L462.6,417.2 L462.8,417.2 L463.1,417.2 L463.3,417.3 L463.6,417.3 L463.8,417.3 L464.1,417.3 
+		L464.3,417.3 L464.6,417.4 L464.8,417.4 L465.1,417.4 L465.3,417.4 L465.6,417.4 L465.8,417.5 L466.1,417.5 
+		L466.3,417.5 L466.6,417.5 L466.8,417.5 L467.1,417.5 L467.3,417.6 L467.6,417.6 L467.8,417.6 L468.1,417.6 
+		L468.3,417.6 L468.6,417.7 L468.8,417.7 L469.1,417.7 L469.3,417.7 L469.6,417.7 L469.9,417.7 L470.1,417.8 
+		L470.4,417.8 L470.6,417.8 L470.9,417.8 L471.1,417.8 L471.4,417.8 L471.6,417.9 L471.9,417.9 L472.1,417.9 
+		L472.4,417.9 L472.6,417.9 L472.9,417.9 L473.1,418.0 L473.4,418.0 L473.6,418.0 L473.9,418.0 L474.1,418.0 
+		L474.4,418.0 L474.6,418.1 L474.9,418.1 L475.1,418.1 L475.4,418.1 L475.6,418.1 L475.9,418.1 L476.1,418.2 
+		L476.4,418.2 L476.6,418.2 L476.9,418.2 L477.1,418.2 L477.4,418.2 L477.7,418.3 L477.9,418.3 L478.2,418.3 
+		L478.4,418.3 L478.7,418.3 L478.9,418.3 L479.2,418.3 L479.4,418.4 L479.7,418.4 L479.9,418.4 L480.2,418.4 
+		L480.4,418.4 L480.7,418.4 L480.9,418.5 L481.2,418.5 L481.4,418.5 L481.7,418.5 L481.9,418.5 L482.2,418.5 
+		L482.4,418.5 L482.7,418.6 L482.9,418.6 L483.2,418.6 L483.4,418.6 L483.7,418.6 L483.9,418.6 L484.2,418.6 
+		L484.4,418.7 L484.7,418.7 L484.9,418.7 L485.2,418.7 L485.4,418.7 L485.7,418.7 L486.0,418.7 L486.2,418.8 
+		L486.5,418.8 L486.7,418.8 L487.0,418.8 L487.2,418.8 L487.5,418.8 L487.7,418.8 L488.0,418.8 L488.2,418.9 
+		L488.5,418.9 L488.7,418.9 L489.0,418.9 L489.2,418.9 L489.5,418.9 L489.7,418.9 L490.0,419.0 L490.2,419.0 
+		L490.5,419.0 L490.7,419.0 L491.0,419.0 L491.2,419.0 L491.5,419.0 L491.7,419.0 L492.0,419.1 L492.2,419.1 
+		L492.5,419.1 L492.7,419.1 L493.0,419.1 L493.2,419.1 L493.5,419.1 L493.7,419.1 L494.0,419.2 L494.3,419.2 
+		L494.5,419.2 L494.8,419.2 L495.0,419.2 L495.3,419.2 L495.5,419.2 L495.8,419.2 L496.0,419.3 L496.3,419.3 
+		L496.5,419.3 L496.8,419.3 L497.0,419.3 L497.3,419.3 L497.5,419.3 L497.8,419.3 L498.0,419.3 L498.3,419.4 
+		L498.5,419.4 L498.8,419.4 L499.0,419.4 L499.3,419.4 L499.5,419.4 L499.8,419.4 L500.0,419.4 L500.3,419.5 
+		L500.5,419.5 L500.8,419.5 L501.0,419.5 L501.3,419.5 L501.5,419.5 L501.8,419.5 L502.1,419.5 L502.3,419.5 
+		L502.6,419.6 L502.8,419.6 L503.1,419.6 L503.3,419.6 L503.6,419.6 L503.8,419.6 L504.1,419.6 L504.3,419.6 
+		L504.6,419.6 L504.8,419.6 L505.1,419.7 L505.3,419.7 L505.6,419.7 L505.8,419.7 L506.1,419.7 L506.3,419.7 
+		L506.6,419.7 L506.8,419.7 L507.1,419.7 L507.3,419.8 L507.6,419.8 L507.8,419.8 L508.1,419.8 L508.3,419.8 
+		L508.6,419.8 L508.8,419.8 L509.1,419.8 L509.3,419.8 L509.6,419.8 L509.8,419.9 L510.1,419.9 L510.4,419.9 
+		L510.6,419.9 L510.9,419.9 L511.1,419.9 L511.4,419.9 L511.6,419.9 L511.9,419.9 L512.1,419.9 L512.4,419.9 
+		L512.6,420.0 L512.9,420.0 L513.1,420.0 L513.4,420.0 L513.6,420.0 L513.9,420.0 L514.1,420.0 L514.4,420.0 
+		L514.6,420.0 L514.9,420.0 L515.1,420.1 L515.4,420.1 L515.6,420.1 L515.9,420.1 L516.1,420.1 L516.4,420.1 
+		L516.6,420.1 L516.9,420.1 L517.1,420.1 L517.4,420.1 L517.6,420.1 L517.9,420.1 L518.1,420.2 L518.4,420.2 
+		L518.7,420.2 L518.9,420.2 L519.2,420.2 L519.4,420.2 L519.7,420.2 L519.9,420.2 L520.2,420.2 L520.4,420.2 
+		L520.7,420.2 L520.9,420.3 L521.2,420.3 L521.4,420.3 L521.7,420.3 L521.9,420.3 L522.2,420.3 L522.4,420.3 
+		L522.7,420.3 L522.9,420.3 L523.2,420.3 L523.4,420.3 L523.7,420.3 L523.9,420.3 L524.2,420.4 L524.4,420.4 
+		L524.7,420.4 L524.9,420.4 L525.2,420.4 L525.4,420.4 L525.7,420.4 L525.9,420.4 L526.2,420.4 L526.5,420.4 
+		L526.7,420.4 L527.0,420.4 L527.2,420.4 L527.5,420.5 L527.7,420.5 L528.0,420.5 L528.2,420.5 L528.5,420.5 
+		L528.7,420.5 L529.0,420.5 L529.2,420.5 L529.5,420.5 L529.7,420.5 L530.0,420.5 L530.2,420.5 L530.5,420.5 
+		L530.7,420.6 L531.0,420.6 L531.2,420.6 L531.5,420.6 L531.7,420.6 L532.0,420.6 L532.2,420.6 L532.5,420.6 
+		L532.7,420.6 L533.0,420.6 L533.2,420.6 L533.5,420.6 L533.7,420.6 L534.0,420.6 L534.2,420.7 L534.5,420.7 
+		L534.8,420.7 L535.0,420.7 L535.3,420.7 L535.5,420.7 L535.8,420.7 L536.0,420.7 L536.3,420.7 L536.5,420.7 
+		L536.8,420.7 L537.0,420.7 L537.3,420.7 L537.5,420.7 L537.8,420.7 L538.0,420.8 L538.3,420.8 L538.5,420.8 
+		L538.8,420.8 L539.0,420.8 L539.3,420.8 L539.5,420.8 L539.8,420.8 L540.0,420.8 L540.3,420.8 L540.5,420.8 
+		L540.8,420.8 L541.0,420.8 L541.3,420.8 L541.5,420.8 L541.8,420.8 L542.0,420.9 L542.3,420.9 L542.6,420.9 
+		L542.8,420.9 L543.1,420.9 L543.3,420.9 L543.6,420.9 L543.8,420.9 L544.1,420.9 L544.3,420.9 L544.6,420.9 
+		L544.8,420.9 L545.1,420.9 L545.3,420.9 L545.6,420.9 L545.8,420.9 L546.1,420.9 L546.3,421.0 L546.6,421.0 
+		L546.8,421.0 L547.1,421.0 L547.3,421.0 L547.6,421.0 L547.8,421.0 L548.1,421.0 L548.3,421.0 L548.6,421.0 
+		L548.8,421.0 L549.1,421.0 L549.3,421.0 L549.6,421.0 L549.8,421.0 L550.1,421.0 L550.3,421.0 L550.6,421.0 
+		L550.9,421.1 L551.1,421.1 L551.4,421.1 L551.6,421.1 L551.9,421.1 L552.1,421.1 L552.4,421.1 L552.6,421.1 
+		L552.9,421.1 L553.1,421.1 L553.4,421.1 L553.6,421.1 L553.9,421.1 L554.1,421.1 L554.4,421.1 L554.6,421.1 
+		L554.9,421.1 L555.1,421.1 L555.4,421.1 L555.6,421.1 L555.9,421.2 L556.1,421.2 L556.4,421.2 L556.6,421.2 
+		L556.9,421.2 L557.1,421.2 L557.4,421.2 L557.6,421.2 L557.9,421.2 L558.1,421.2 L558.4,421.2 L558.6,421.2 
+		L558.9,421.2 L559.2,421.2 L559.4,421.2 L559.7,421.2 L559.9,421.2 L560.2,421.2 L560.4,421.2 L560.7,421.2 
+		L560.9,421.2 L561.2,421.3 L561.4,421.3 L561.7,421.3 L561.9,421.3 L562.2,421.3 L562.4,421.3 L562.7,421.3 
+		L562.9,421.3 L563.2,421.3 L563.4,421.3 L563.7,421.3 L563.9,421.3 L564.2,421.3 L564.4,421.3 L564.7,421.3 
+		L564.9,421.3 L565.2,421.3 L565.4,421.3 L565.7,421.3 L565.9,421.3 L566.2,421.3 L566.4,421.3 L566.7,421.3 
+		L567.0,421.4 L567.2,421.4 L567.5,421.4 L567.7,421.4 L568.0,421.4 L568.2,421.4 L568.5,421.4 L568.7,421.4 
+		L569.0,421.4 L569.2,421.4 L569.5,421.4 L569.7,421.4 L570.0,421.4 L570.2,421.4 L570.5,421.4 L570.7,421.4 
+		L571.0,421.4 L571.2,421.4 L571.5,421.4 L571.7,421.4 L572.0,421.4 L572.2,421.4 L572.5,421.4 L572.7,421.4 
+		L573.0,421.4 L573.2,421.5 L573.5,421.5 L573.7,421.5 L574.0,421.5 L574.2,421.5 L574.5,421.5 L574.7,421.5 
+		'></path>
+</g>
+	</g>
+	<g id="Plot_3"><title>Plot_3</title>
+<g style="fill:none; color:blue; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L72.2,422.4 L72.4,422.4 L72.7,422.4 L72.9,422.4 L73.2,422.4 L73.4,422.4 L73.7,422.4 
+		L73.9,422.4 L74.2,422.4 L74.4,422.4 L74.7,422.4 L74.9,422.4 L75.2,422.4 L75.4,422.4 L75.7,422.4 
+		L75.9,422.4 L76.2,422.4 L76.4,422.4 L76.7,422.4 L76.9,422.4 L77.2,422.4 L77.4,422.4 L77.7,422.4 
+		L77.9,422.4 L78.2,422.4 L78.4,422.4 L78.7,422.4 L78.9,422.4 L79.2,422.4 L79.4,422.4 L79.7,422.4 
+		L79.9,422.4 L80.2,422.4 L80.5,422.4 L80.7,422.4 L81.0,422.4 L81.2,422.4 L81.5,422.4 L81.7,422.4 
+		L82.0,422.4 L82.2,422.4 L82.5,422.4 L82.7,422.4 L83.0,422.4 L83.2,422.4 L83.5,422.4 L83.7,422.4 
+		L84.0,422.4 L84.2,422.4 L84.5,422.4 L84.7,422.4 L85.0,422.4 L85.2,422.4 L85.5,422.4 L85.7,422.4 
+		L86.0,422.4 L86.2,422.4 L86.5,422.4 L86.7,422.4 L87.0,422.4 L87.2,422.4 L87.5,422.4 L87.7,422.4 
+		L88.0,422.4 L88.3,422.4 L88.5,422.4 L88.8,422.4 L89.0,422.4 L89.3,422.4 L89.5,422.4 L89.8,422.4 
+		L90.0,422.4 L90.3,422.4 L90.5,422.4 L90.8,422.4 L91.0,422.4 L91.3,422.4 L91.5,422.4 L91.8,422.4 
+		L92.0,422.4 L92.3,422.4 L92.5,422.4 L92.8,422.4 L93.0,422.4 L93.3,422.4 L93.5,422.4 L93.8,422.4 
+		L94.0,422.4 L94.3,422.4 L94.5,422.4 L94.8,422.4 L95.0,422.4 L95.3,422.4 L95.5,422.4 L95.8,422.3 
+		L96.0,422.3 L96.3,422.3 L96.6,422.3 L96.8,422.3 L97.1,422.3 L97.3,422.3 L97.6,422.3 L97.8,422.3 
+		L98.1,422.3 L98.3,422.3 L98.6,422.3 L98.8,422.3 L99.1,422.3 L99.3,422.3 L99.6,422.3 L99.8,422.3 
+		L100.1,422.3 L100.3,422.3 L100.6,422.3 L100.8,422.3 L101.1,422.3 L101.3,422.3 L101.6,422.3 L101.8,422.3 
+		L102.1,422.3 L102.3,422.3 L102.6,422.2 L102.8,422.2 L103.1,422.2 L103.3,422.2 L103.6,422.2 L103.8,422.2 
+		L104.1,422.2 L104.3,422.2 L104.6,422.2 L104.9,422.2 L105.1,422.2 L105.4,422.2 L105.6,422.2 L105.9,422.2 
+		L106.1,422.2 L106.4,422.1 L106.6,422.1 L106.9,422.1 L107.1,422.1 L107.4,422.1 L107.6,422.1 L107.9,422.1 
+		L108.1,422.1 L108.4,422.1 L108.6,422.1 L108.9,422.1 L109.1,422.0 L109.4,422.0 L109.6,422.0 L109.9,422.0 
+		L110.1,422.0 L110.4,422.0 L110.6,422.0 L110.9,422.0 L111.1,422.0 L111.4,421.9 L111.6,421.9 L111.9,421.9 
+		L112.1,421.9 L112.4,421.9 L112.7,421.9 L112.9,421.9 L113.2,421.8 L113.4,421.8 L113.7,421.8 L113.9,421.8 
+		L114.2,421.8 L114.4,421.8 L114.7,421.8 L114.9,421.7 L115.2,421.7 L115.4,421.7 L115.7,421.7 L115.9,421.7 
+		L116.2,421.7 L116.4,421.6 L116.7,421.6 L116.9,421.6 L117.2,421.6 L117.4,421.6 L117.7,421.6 L117.9,421.5 
+		L118.2,421.5 L118.4,421.5 L118.7,421.5 L118.9,421.5 L119.2,421.4 L119.4,421.4 L119.7,421.4 L119.9,421.4 
+		L120.2,421.3 L120.4,421.3 L120.7,421.3 L121.0,421.3 L121.2,421.3 L121.5,421.2 L121.7,421.2 L122.0,421.2 
+		L122.2,421.2 L122.5,421.1 L122.7,421.1 L123.0,421.1 L123.2,421.1 L123.5,421.0 L123.7,421.0 L124.0,421.0 
+		L124.2,420.9 L124.5,420.9 L124.7,420.9 L125.0,420.9 L125.2,420.8 L125.5,420.8 L125.7,420.8 L126.0,420.7 
+		L126.2,420.7 L126.5,420.7 L126.7,420.7 L127.0,420.6 L127.2,420.6 L127.5,420.6 L127.7,420.5 L128.0,420.5 
+		L128.2,420.5 L128.5,420.4 L128.8,420.4 L129.0,420.4 L129.3,420.3 L129.5,420.3 L129.8,420.2 L130.0,420.2 
+		L130.3,420.2 L130.5,420.1 L130.8,420.1 L131.0,420.1 L131.3,420.0 L131.5,420.0 L131.8,419.9 L132.0,419.9 
+		L132.3,419.9 L132.5,419.8 L132.8,419.8 L133.0,419.7 L133.3,419.7 L133.5,419.7 L133.8,419.6 L134.0,419.6 
+		L134.3,419.5 L134.5,419.5 L134.8,419.4 L135.0,419.4 L135.3,419.4 L135.5,419.3 L135.8,419.3 L136.0,419.2 
+		L136.3,419.2 L136.5,419.1 L136.8,419.1 L137.1,419.0 L137.3,419.0 L137.6,418.9 L137.8,418.9 L138.1,418.8 
+		L138.3,418.8 L138.6,418.7 L138.8,418.7 L139.1,418.6 L139.3,418.6 L139.6,418.5 L139.8,418.5 L140.1,418.4 
+		L140.3,418.4 L140.6,418.3 L140.8,418.3 L141.1,418.2 L141.3,418.1 L141.6,418.1 L141.8,418.0 L142.1,418.0 
+		L142.3,417.9 L142.6,417.9 L142.8,417.8 L143.1,417.7 L143.3,417.7 L143.6,417.6 L143.8,417.6 L144.1,417.5 
+		L144.3,417.4 L144.6,417.4 L144.8,417.3 L145.1,417.3 L145.4,417.2 L145.6,417.1 L145.9,417.1 L146.1,417.0 
+		L146.4,416.9 L146.6,416.9 L146.9,416.8 L147.1,416.7 L147.4,416.7 L147.6,416.6 L147.9,416.5 L148.1,416.5 
+		L148.4,416.4 L148.6,416.3 L148.9,416.3 L149.1,416.2 L149.4,416.1 L149.6,416.1 L149.9,416.0 L150.1,415.9 
+		L150.4,415.8 L150.6,415.8 L150.9,415.7 L151.1,415.6 L151.4,415.5 L151.6,415.5 L151.9,415.4 L152.1,415.3 
+		L152.4,415.2 L152.6,415.2 L152.9,415.1 L153.2,415.0 L153.4,414.9 L153.7,414.9 L153.9,414.8 L154.2,414.7 
+		L154.4,414.6 L154.7,414.5 L154.9,414.5 L155.2,414.4 L155.4,414.3 L155.7,414.2 L155.9,414.1 L156.2,414.1 
+		L156.4,414.0 L156.7,413.9 L156.9,413.8 L157.2,413.7 L157.4,413.6 L157.7,413.5 L157.9,413.5 L158.2,413.4 
+		L158.4,413.3 L158.7,413.2 L158.9,413.1 L159.2,413.0 L159.4,412.9 L159.7,412.8 L159.9,412.8 L160.2,412.7 
+		L160.4,412.6 L160.7,412.5 L160.9,412.4 L161.2,412.3 L161.5,412.2 L161.7,412.1 L162.0,412.0 L162.2,411.9 
+		L162.5,411.8 L162.7,411.7 L163.0,411.7 L163.2,411.6 L163.5,411.5 L163.7,411.4 L164.0,411.3 L164.2,411.2 
+		L164.5,411.1 L164.7,411.0 L165.0,410.9 L165.2,410.8 L165.5,410.7 L165.7,410.6 L166.0,410.5 L166.2,410.4 
+		L166.5,410.3 L166.7,410.2 L167.0,410.1 L167.2,410.0 L167.5,409.9 L167.7,409.8 L168.0,409.7 L168.2,409.6 
+		L168.5,409.5 L168.7,409.4 L169.0,409.3 L169.2,409.2 L169.5,409.0 L169.8,408.9 L170.0,408.8 L170.3,408.7 
+		L170.5,408.6 L170.8,408.5 L171.0,408.4 L171.3,408.3 L171.5,408.2 L171.8,408.1 L172.0,408.0 L172.3,407.9 
+		L172.5,407.8 L172.8,407.6 L173.0,407.5 L173.3,407.4 L173.5,407.3 L173.8,407.2 L174.0,407.1 L174.3,407.0 
+		L174.5,406.9 L174.8,406.8 L175.0,406.6 L175.3,406.5 L175.5,406.4 L175.8,406.3 L176.0,406.2 L176.3,406.1 
+		L176.5,406.0 L176.8,405.8 L177.0,405.7 L177.3,405.6 L177.6,405.5 L177.8,405.4 L178.1,405.3 L178.3,405.1 
+		L178.6,405.0 L178.8,404.9 L179.1,404.8 L179.3,404.7 L179.6,404.5 L179.8,404.4 L180.1,404.3 L180.3,404.2 
+		L180.6,404.1 L180.8,403.9 L181.1,403.8 L181.3,403.7 L181.6,403.6 L181.8,403.5 L182.1,403.3 L182.3,403.2 
+		L182.6,403.1 L182.8,403.0 L183.1,402.8 L183.3,402.7 L183.6,402.6 L183.8,402.5 L184.1,402.4 L184.3,402.2 
+		L184.6,402.1 L184.8,402.0 L185.1,401.9 L185.3,401.7 L185.6,401.6 L185.9,401.5 L186.1,401.3 L186.4,401.2 
+		L186.6,401.1 L186.9,401.0 L187.1,400.8 L187.4,400.7 L187.6,400.6 L187.9,400.5 L188.1,400.3 L188.4,400.2 
+		L188.6,400.1 L188.9,399.9 L189.1,399.8 L189.4,399.7 L189.6,399.6 L189.9,399.4 L190.1,399.3 L190.4,399.2 
+		L190.6,399.0 L190.9,398.9 L191.1,398.8 L191.4,398.6 L191.6,398.5 L191.9,398.4 L192.1,398.2 L192.4,398.1 
+		L192.6,398.0 L192.9,397.8 L193.1,397.7 L193.4,397.6 L193.7,397.4 L193.9,397.3 L194.2,397.2 L194.4,397.0 
+		L194.7,396.9 L194.9,396.8 L195.2,396.6 L195.4,396.5 L195.7,396.4 L195.9,396.2 L196.2,396.1 L196.4,396.0 
+		L196.7,395.8 L196.9,395.7 L197.2,395.6 L197.4,395.4 L197.7,395.3 L197.9,395.2 L198.2,395.0 L198.4,394.9 
+		L198.7,394.8 L198.9,394.6 L199.2,394.5 L199.4,394.3 L199.7,394.2 L199.9,394.1 L200.2,393.9 L200.4,393.8 
+		L200.7,393.7 L200.9,393.5 L201.2,393.4 L201.4,393.3 L201.7,393.1 L202.0,393.0 L202.2,392.8 L202.5,392.7 
+		L202.7,392.6 L203.0,392.4 L203.2,392.3 L203.5,392.2 L203.7,392.0 L204.0,391.9 L204.2,391.7 L204.5,391.6 
+		L204.7,391.5 L205.0,391.3 L205.2,391.2 L205.5,391.0 L205.7,390.9 L206.0,390.8 L206.2,390.6 L206.5,390.5 
+		L206.7,390.4 L207.0,390.2 L207.2,390.1 L207.5,389.9 L207.7,389.8 L208.0,389.7 L208.2,389.5 L208.5,389.4 
+		L208.7,389.2 L209.0,389.1 L209.2,389.0 L209.5,388.8 L209.7,388.7 L210.0,388.5 L210.3,388.4 L210.5,388.3 
+		L210.8,388.1 L211.0,388.0 L211.3,387.9 L211.5,387.7 L211.8,387.6 L212.0,387.4 L212.3,387.3 L212.5,387.2 
+		L212.8,387.0 L213.0,386.9 L213.3,386.7 L213.5,386.6 L213.8,386.5 L214.0,386.3 L214.3,386.2 L214.5,386.0 
+		L214.8,385.9 L215.0,385.8 L215.3,385.6 L215.5,385.5 L215.8,385.4 L216.0,385.2 L216.3,385.1 L216.5,384.9 
+		L216.8,384.8 L217.0,384.7 L217.3,384.5 L217.5,384.4 L217.8,384.2 L218.1,384.1 L218.3,384.0 L218.6,383.8 
+		L218.8,383.7 L219.1,383.6 L219.3,383.4 L219.6,383.3 L219.8,383.1 L220.1,383.0 L220.3,382.9 L220.6,382.7 
+		L220.8,382.6 L221.1,382.5 L221.3,382.3 L221.6,382.2 L221.8,382.0 L222.1,381.9 L222.3,381.8 L222.6,381.6 
+		L222.8,381.5 L223.1,381.4 L223.3,381.2 L223.6,381.1 L223.8,381.0 L224.1,380.8 L224.3,380.7 L224.6,380.5 
+		L224.8,380.4 L225.1,380.3 L225.3,380.1 L225.6,380.0 L225.8,379.9 L226.1,379.7 L226.4,379.6 L226.6,379.5 
+		L226.9,379.3 L227.1,379.2 L227.4,379.1 L227.6,378.9 L227.9,378.8 L228.1,378.7 L228.4,378.5 L228.6,378.4 
+		L228.9,378.3 L229.1,378.1 L229.4,378.0 L229.6,377.9 L229.9,377.7 L230.1,377.6 L230.4,377.5 L230.6,377.3 
+		L230.9,377.2 L231.1,377.1 L231.4,376.9 L231.6,376.8 L231.9,376.7 L232.1,376.5 L232.4,376.4 L232.6,376.3 
+		L232.9,376.2 L233.1,376.0 L233.4,375.9 L233.6,375.8 L233.9,375.6 L234.1,375.5 L234.4,375.4 L234.7,375.3 
+		L234.9,375.1 L235.2,375.0 L235.4,374.9 L235.7,374.7 L235.9,374.6 L236.2,374.5 L236.4,374.4 L236.7,374.2 
+		L236.9,374.1 L237.2,374.0 L237.4,373.9 L237.7,373.7 L237.9,373.6 L238.2,373.5 L238.4,373.3 L238.7,373.2 
+		L238.9,373.1 L239.2,373.0 L239.4,372.9 L239.7,372.7 L239.9,372.6 L240.2,372.5 L240.4,372.4 L240.7,372.2 
+		L240.9,372.1 L241.2,372.0 L241.4,371.9 L241.7,371.7 L241.9,371.6 L242.2,371.5 L242.5,371.4 L242.7,371.3 
+		L243.0,371.1 L243.2,371.0 L243.5,370.9 L243.7,370.8 L244.0,370.7 L244.2,370.5 L244.5,370.4 L244.7,370.3 
+		L245.0,370.2 L245.2,370.1 L245.5,369.9 L245.7,369.8 L246.0,369.7 L246.2,369.6 L246.5,369.5 L246.7,369.4 
+		L247.0,369.2 L247.2,369.1 L247.5,369.0 L247.7,368.9 L248.0,368.8 L248.2,368.7 L248.5,368.5 L248.7,368.4 
+		L249.0,368.3 L249.2,368.2 L249.5,368.1 L249.7,368.0 L250.0,367.9 L250.2,367.8 L250.5,367.6 L250.8,367.5 
+		L251.0,367.4 L251.3,367.3 L251.5,367.2 L251.8,367.1 L252.0,367.0 L252.3,366.9 L252.5,366.8 L252.8,366.7 
+		L253.0,366.5 L253.3,366.4 L253.5,366.3 L253.8,366.2 L254.0,366.1 L254.3,366.0 L254.5,365.9 L254.8,365.8 
+		L255.0,365.7 L255.3,365.6 L255.5,365.5 L255.8,365.4 L256.0,365.3 L256.3,365.2 L256.5,365.1 L256.8,365.0 
+		L257.0,364.8 L257.3,364.7 L257.5,364.6 L257.8,364.5 L258.0,364.4 L258.3,364.3 L258.6,364.2 L258.8,364.1 
+		L259.1,364.0 L259.3,363.9 L259.6,363.8 L259.8,363.7 L260.1,363.6 L260.3,363.5 L260.6,363.4 L260.8,363.3 
+		L261.1,363.2 L261.3,363.1 L261.6,363.0 L261.8,363.0 L262.1,362.9 L262.3,362.8 L262.6,362.7 L262.8,362.6 
+		L263.1,362.5 L263.3,362.4 L263.6,362.3 L263.8,362.2 L264.1,362.1 L264.3,362.0 L264.6,361.9 L264.8,361.8 
+		L265.1,361.7 L265.3,361.6 L265.6,361.5 L265.8,361.5 L266.1,361.4 L266.3,361.3 L266.6,361.2 L266.9,361.1 
+		L267.1,361.0 L267.4,360.9 L267.6,360.8 L267.9,360.7 L268.1,360.7 L268.4,360.6 L268.6,360.5 L268.9,360.4 
+		L269.1,360.3 L269.4,360.2 L269.6,360.1 L269.9,360.1 L270.1,360.0 L270.4,359.9 L270.6,359.8 L270.9,359.7 
+		L271.1,359.6 L271.4,359.6 L271.6,359.5 L271.9,359.4 L272.1,359.3 L272.4,359.2 L272.6,359.2 L272.9,359.1 
+		L273.1,359.0 L273.4,358.9 L273.6,358.8 L273.9,358.8 L274.1,358.7 L274.4,358.6 L274.6,358.5 L274.9,358.4 
+		L275.2,358.4 L275.4,358.3 L275.7,358.2 L275.9,358.1 L276.2,358.1 L276.4,358.0 L276.7,357.9 L276.9,357.8 
+		L277.2,357.8 L277.4,357.7 L277.7,357.6 L277.9,357.6 L278.2,357.5 L278.4,357.4 L278.7,357.3 L278.9,357.3 
+		L279.2,357.2 L279.4,357.1 L279.7,357.1 L279.9,357.0 L280.2,356.9 L280.4,356.9 L280.7,356.8 L280.9,356.7 
+		L281.2,356.7 L281.4,356.6 L281.7,356.5 L281.9,356.5 L282.2,356.4 L282.4,356.3 L282.7,356.3 L283.0,356.2 
+		L283.2,356.1 L283.5,356.1 L283.7,356.0 L284.0,356.0 L284.2,355.9 L284.5,355.8 L284.7,355.8 L285.0,355.7 
+		L285.2,355.7 L285.5,355.6 L285.7,355.5 L286.0,355.5 L286.2,355.4 L286.5,355.4 L286.7,355.3 L287.0,355.2 
+		L287.2,355.2 L287.5,355.1 L287.7,355.1 L288.0,355.0 L288.2,355.0 L288.5,354.9 L288.7,354.9 L289.0,354.8 
+		L289.2,354.7 L289.5,354.7 L289.7,354.6 L290.0,354.6 L290.2,354.5 L290.5,354.5 L290.7,354.4 L291.0,354.4 
+		L291.3,354.3 L291.5,354.3 L291.8,354.2 L292.0,354.2 L292.3,354.1 L292.5,354.1 L292.8,354.0 L293.0,354.0 
+		L293.3,353.9 L293.5,353.9 L293.8,353.9 L294.0,353.8 L294.3,353.8 L294.5,353.7 L294.8,353.7 L295.0,353.6 
+		L295.3,353.6 L295.5,353.5 L295.8,353.5 L296.0,353.5 L296.3,353.4 L296.5,353.4 L296.8,353.3 L297.0,353.3 
+		L297.3,353.3 L297.5,353.2 L297.8,353.2 L298.0,353.1 L298.3,353.1 L298.5,353.1 L298.8,353.0 L299.0,353.0 
+		L299.3,352.9 L299.6,352.9 L299.8,352.9 L300.1,352.8 L300.3,352.8 L300.6,352.8 L300.8,352.7 L301.1,352.7 
+		L301.3,352.7 L301.6,352.6 L301.8,352.6 L302.1,352.6 L302.3,352.5 L302.6,352.5 L302.8,352.5 L303.1,352.4 
+		L303.3,352.4 L303.6,352.4 L303.8,352.3 L304.1,352.3 L304.3,352.3 L304.6,352.3 L304.8,352.2 L305.1,352.2 
+		L305.3,352.2 L305.6,352.1 L305.8,352.1 L306.1,352.1 L306.3,352.1 L306.6,352.0 L306.8,352.0 L307.1,352.0 
+		L307.4,352.0 L307.6,351.9 L307.9,351.9 L308.1,351.9 L308.4,351.9 L308.6,351.9 L308.9,351.8 L309.1,351.8 
+		L309.4,351.8 L309.6,351.8 L309.9,351.7 L310.1,351.7 L310.4,351.7 L310.6,351.7 L310.9,351.7 L311.1,351.7 
+		L311.4,351.6 L311.6,351.6 L311.9,351.6 L312.1,351.6 L312.4,351.6 L312.6,351.6 L312.9,351.5 L313.1,351.5 
+		L313.4,351.5 L313.6,351.5 L313.9,351.5 L314.1,351.5 L314.4,351.4 L314.6,351.4 L314.9,351.4 L315.1,351.4 
+		L315.4,351.4 L315.7,351.4 L315.9,351.4 L316.2,351.4 L316.4,351.4 L316.7,351.3 L316.9,351.3 L317.2,351.3 
+		L317.4,351.3 L317.7,351.3 L317.9,351.3 L318.2,351.3 L318.4,351.3 L318.7,351.3 L318.9,351.3 L319.2,351.3 
+		L319.4,351.3 L319.7,351.3 L319.9,351.2 L320.2,351.2 L320.4,351.2 L320.7,351.2 L320.9,351.2 L321.2,351.2 
+		L321.4,351.2 L321.7,351.2 L321.9,351.2 L322.2,351.2 L322.4,351.2 L322.7,351.2 L322.9,351.2 L323.2,351.2 
+		L323.5,351.2 L323.7,351.2 L324.0,351.2 L324.2,351.2 L324.5,351.2 L324.7,351.2 L325.0,351.2 L325.2,351.2 
+		L325.5,351.2 L325.7,351.2 L326.0,351.2 L326.2,351.2 L326.5,351.2 L326.7,351.2 L327.0,351.2 L327.2,351.3 
+		L327.5,351.3 L327.7,351.3 L328.0,351.3 L328.2,351.3 L328.5,351.3 L328.7,351.3 L329.0,351.3 L329.2,351.3 
+		L329.5,351.3 L329.7,351.3 L330.0,351.3 L330.2,351.3 L330.5,351.3 L330.7,351.4 L331.0,351.4 L331.2,351.4 
+		L331.5,351.4 L331.8,351.4 L332.0,351.4 L332.3,351.4 L332.5,351.4 L332.8,351.5 L333.0,351.5 L333.3,351.5 
+		L333.5,351.5 L333.8,351.5 L334.0,351.5 L334.3,351.5 L334.5,351.5 L334.8,351.6 L335.0,351.6 L335.3,351.6 
+		L335.5,351.6 L335.8,351.6 L336.0,351.6 L336.3,351.7 L336.5,351.7 L336.8,351.7 L337.0,351.7 L337.3,351.7 
+		L337.5,351.7 L337.8,351.8 L338.0,351.8 L338.3,351.8 L338.5,351.8 L338.8,351.8 L339.0,351.9 L339.3,351.9 
+		L339.5,351.9 L339.8,351.9 L340.1,352.0 L340.3,352.0 L340.6,352.0 L340.8,352.0 L341.1,352.0 L341.3,352.1 
+		L341.6,352.1 L341.8,352.1 L342.1,352.1 L342.3,352.2 L342.6,352.2 L342.8,352.2 L343.1,352.2 L343.3,352.3 
+		L343.6,352.3 L343.8,352.3 L344.1,352.3 L344.3,352.4 L344.6,352.4 L344.8,352.4 L345.1,352.4 L345.3,352.5 
+		L345.6,352.5 L345.8,352.5 L346.1,352.6 L346.3,352.6 L346.6,352.6 L346.8,352.6 L347.1,352.7 L347.3,352.7 
+		L347.6,352.7 L347.9,352.8 L348.1,352.8 L348.4,352.8 L348.6,352.9 L348.9,352.9 L349.1,352.9 L349.4,353.0 
+		L349.6,353.0 L349.9,353.0 L350.1,353.1 L350.4,353.1 L350.6,353.1 L350.9,353.2 L351.1,353.2 L351.4,353.2 
+		L351.6,353.3 L351.9,353.3 L352.1,353.3 L352.4,353.4 L352.6,353.4 L352.9,353.4 L353.1,353.5 L353.4,353.5 
+		L353.6,353.5 L353.9,353.6 L354.1,353.6 L354.4,353.7 L354.6,353.7 L354.9,353.7 L355.1,353.8 L355.4,353.8 
+		L355.6,353.9 L355.9,353.9 L356.2,353.9 L356.4,354.0 L356.7,354.0 L356.9,354.0 L357.2,354.1 L357.4,354.1 
+		L357.7,354.2 L357.9,354.2 L358.2,354.3 L358.4,354.3 L358.7,354.3 L358.9,354.4 L359.2,354.4 L359.4,354.5 
+		L359.7,354.5 L359.9,354.5 L360.2,354.6 L360.4,354.6 L360.7,354.7 L360.9,354.7 L361.2,354.8 L361.4,354.8 
+		L361.7,354.9 L361.9,354.9 L362.2,354.9 L362.4,355.0 L362.7,355.0 L362.9,355.1 L363.2,355.1 L363.4,355.2 
+		L363.7,355.2 L363.9,355.3 L364.2,355.3 L364.5,355.4 L364.7,355.4 L365.0,355.5 L365.2,355.5 L365.5,355.5 
+		L365.7,355.6 L366.0,355.6 L366.2,355.7 L366.5,355.7 L366.7,355.8 L367.0,355.8 L367.2,355.9 L367.5,355.9 
+		L367.7,356.0 L368.0,356.0 L368.2,356.1 L368.5,356.1 L368.7,356.2 L369.0,356.2 L369.2,356.3 L369.5,356.3 
+		L369.7,356.4 L370.0,356.4 L370.2,356.5 L370.5,356.5 L370.7,356.6 L371.0,356.6 L371.2,356.7 L371.5,356.8 
+		L371.7,356.8 L372.0,356.9 L372.3,356.9 L372.5,357.0 L372.8,357.0 L373.0,357.1 L373.3,357.1 L373.5,357.2 
+		L373.8,357.2 L374.0,357.3 L374.3,357.3 L374.5,357.4 L374.8,357.5 L375.0,357.5 L375.3,357.6 L375.5,357.6 
+		L375.8,357.7 L376.0,357.7 L376.3,357.8 L376.5,357.8 L376.8,357.9 L377.0,358.0 L377.3,358.0 L377.5,358.1 
+		L377.8,358.1 L378.0,358.2 L378.3,358.2 L378.5,358.3 L378.8,358.4 L379.0,358.4 L379.3,358.5 L379.5,358.5 
+		L379.8,358.6 L380.0,358.6 L380.3,358.7 L380.6,358.8 L380.8,358.8 L381.1,358.9 L381.3,358.9 L381.6,359.0 
+		L381.8,359.1 L382.1,359.1 L382.3,359.2 L382.6,359.2 L382.8,359.3 L383.1,359.4 L383.3,359.4 L383.6,359.5 
+		L383.8,359.5 L384.1,359.6 L384.3,359.7 L384.6,359.7 L384.8,359.8 L385.1,359.8 L385.3,359.9 L385.6,360.0 
+		L385.8,360.0 L386.1,360.1 L386.3,360.2 L386.6,360.2 L386.8,360.3 L387.1,360.3 L387.3,360.4 L387.6,360.5 
+		L387.8,360.5 L388.1,360.6 L388.3,360.7 L388.6,360.7 L388.9,360.8 L389.1,360.9 L389.4,360.9 L389.6,361.0 
+		L389.9,361.0 L390.1,361.1 L390.4,361.2 L390.6,361.2 L390.9,361.3 L391.1,361.4 L391.4,361.4 L391.6,361.5 
+		L391.9,361.6 L392.1,361.6 L392.4,361.7 L392.6,361.8 L392.9,361.8 L393.1,361.9 L393.4,362.0 L393.6,362.0 
+		L393.9,362.1 L394.1,362.1 L394.4,362.2 L394.6,362.3 L394.9,362.3 L395.1,362.4 L395.4,362.5 L395.6,362.5 
+		L395.9,362.6 L396.1,362.7 L396.4,362.7 L396.7,362.8 L396.9,362.9 L397.2,362.9 L397.4,363.0 L397.7,363.1 
+		L397.9,363.2 L398.2,363.2 L398.4,363.3 L398.7,363.4 L398.9,363.4 L399.2,363.5 L399.4,363.6 L399.7,363.6 
+		L399.9,363.7 L400.2,363.8 L400.4,363.8 L400.7,363.9 L400.9,364.0 L401.2,364.0 L401.4,364.1 L401.7,364.2 
+		L401.9,364.2 L402.2,364.3 L402.4,364.4 L402.7,364.5 L402.9,364.5 L403.2,364.6 L403.4,364.7 L403.7,364.7 
+		L403.9,364.8 L404.2,364.9 L404.4,364.9 L404.7,365.0 L405.0,365.1 L405.2,365.2 L405.5,365.2 L405.7,365.3 
+		L406.0,365.4 L406.2,365.4 L406.5,365.5 L406.7,365.6 L407.0,365.6 L407.2,365.7 L407.5,365.8 L407.7,365.9 
+		L408.0,365.9 L408.2,366.0 L408.5,366.1 L408.7,366.1 L409.0,366.2 L409.2,366.3 L409.5,366.4 L409.7,366.4 
+		L410.0,366.5 L410.2,366.6 L410.5,366.6 L410.7,366.7 L411.0,366.8 L411.2,366.9 L411.5,366.9 L411.7,367.0 
+		L412.0,367.1 L412.2,367.1 L412.5,367.2 L412.8,367.3 L413.0,367.4 L413.3,367.4 L413.5,367.5 L413.8,367.6 
+		L414.0,367.7 L414.3,367.7 L414.5,367.8 L414.8,367.9 L415.0,367.9 L415.3,368.0 L415.5,368.1 L415.8,368.2 
+		L416.0,368.2 L416.3,368.3 L416.5,368.4 L416.8,368.5 L417.0,368.5 L417.3,368.6 L417.5,368.7 L417.8,368.7 
+		L418.0,368.8 L418.3,368.9 L418.5,369.0 L418.8,369.0 L419.0,369.1 L419.3,369.2 L419.5,369.3 L419.8,369.3 
+		L420.0,369.4 L420.3,369.5 L420.5,369.6 L420.8,369.6 L421.1,369.7 L421.3,369.8 L421.6,369.8 L421.8,369.9 
+		L422.1,370.0 L422.3,370.1 L422.6,370.1 L422.8,370.2 L423.1,370.3 L423.3,370.4 L423.6,370.4 L423.8,370.5 
+		L424.1,370.6 L424.3,370.7 L424.6,370.7 L424.8,370.8 L425.1,370.9 L425.3,371.0 L425.6,371.0 L425.8,371.1 
+		L426.1,371.2 L426.3,371.3 L426.6,371.3 L426.8,371.4 L427.1,371.5 L427.3,371.5 L427.6,371.6 L427.8,371.7 
+		L428.1,371.8 L428.3,371.8 L428.6,371.9 L428.8,372.0 L429.1,372.1 L429.4,372.1 L429.6,372.2 L429.9,372.3 
+		L430.1,372.4 L430.4,372.4 L430.6,372.5 L430.9,372.6 L431.1,372.7 L431.4,372.7 L431.6,372.8 L431.9,372.9 
+		L432.1,373.0 L432.4,373.0 L432.6,373.1 L432.9,373.2 L433.1,373.3 L433.4,373.3 L433.6,373.4 L433.9,373.5 
+		L434.1,373.6 L434.4,373.6 L434.6,373.7 L434.9,373.8 L435.1,373.9 L435.4,373.9 L435.6,374.0 L435.9,374.1 
+		L436.1,374.2 L436.4,374.2 L436.6,374.3 L436.9,374.4 L437.2,374.5 L437.4,374.5 L437.7,374.6 L437.9,374.7 
+		L438.2,374.8 L438.4,374.8 L438.7,374.9 L438.9,375.0 L439.2,375.1 L439.4,375.1 L439.7,375.2 L439.9,375.3 
+		L440.2,375.4 L440.4,375.4 L440.7,375.5 L440.9,375.6 L441.2,375.6 L441.4,375.7 L441.7,375.8 L441.9,375.9 
+		L442.2,375.9 L442.4,376.0 L442.7,376.1 L442.9,376.2 L443.2,376.2 L443.4,376.3 L443.7,376.4 L443.9,376.5 
+		L444.2,376.5 L444.4,376.6 L444.7,376.7 L444.9,376.8 L445.2,376.8 L445.5,376.9 L445.7,377.0 L446.0,377.1 
+		L446.2,377.1 L446.5,377.2 L446.7,377.3 L447.0,377.4 L447.2,377.4 L447.5,377.5 L447.7,377.6 L448.0,377.7 
+		L448.2,377.7 L448.5,377.8 L448.7,377.9 L449.0,378.0 L449.2,378.0 L449.5,378.1 L449.7,378.2 L450.0,378.2 
+		L450.2,378.3 L450.5,378.4 L450.7,378.5 L451.0,378.5 L451.2,378.6 L451.5,378.7 L451.7,378.8 L452.0,378.8 
+		L452.2,378.9 L452.5,379.0 L452.7,379.1 L453.0,379.1 L453.2,379.2 L453.5,379.3 L453.8,379.4 L454.0,379.4 
+		L454.3,379.5 L454.5,379.6 L454.8,379.6 L455.0,379.7 L455.3,379.8 L455.5,379.9 L455.8,379.9 L456.0,380.0 
+		L456.3,380.1 L456.5,380.2 L456.8,380.2 L457.0,380.3 L457.3,380.4 L457.5,380.5 L457.8,380.5 L458.0,380.6 
+		L458.3,380.7 L458.5,380.7 L458.8,380.8 L459.0,380.9 L459.3,381.0 L459.5,381.0 L459.8,381.1 L460.0,381.2 
+		L460.3,381.3 L460.5,381.3 L460.8,381.4 L461.0,381.5 L461.3,381.5 L461.6,381.6 L461.8,381.7 L462.1,381.8 
+		L462.3,381.8 L462.6,381.9 L462.8,382.0 L463.1,382.0 L463.3,382.1 L463.6,382.2 L463.8,382.3 L464.1,382.3 
+		L464.3,382.4 L464.6,382.5 L464.8,382.5 L465.1,382.6 L465.3,382.7 L465.6,382.8 L465.8,382.8 L466.1,382.9 
+		L466.3,383.0 L466.6,383.0 L466.8,383.1 L467.1,383.2 L467.3,383.3 L467.6,383.3 L467.8,383.4 L468.1,383.5 
+		L468.3,383.5 L468.6,383.6 L468.8,383.7 L469.1,383.8 L469.3,383.8 L469.6,383.9 L469.9,384.0 L470.1,384.0 
+		L470.4,384.1 L470.6,384.2 L470.9,384.3 L471.1,384.3 L471.4,384.4 L471.6,384.5 L471.9,384.5 L472.1,384.6 
+		L472.4,384.7 L472.6,384.7 L472.9,384.8 L473.1,384.9 L473.4,385.0 L473.6,385.0 L473.9,385.1 L474.1,385.2 
+		L474.4,385.2 L474.6,385.3 L474.9,385.4 L475.1,385.4 L475.4,385.5 L475.6,385.6 L475.9,385.7 L476.1,385.7 
+		L476.4,385.8 L476.6,385.9 L476.9,385.9 L477.1,386.0 L477.4,386.1 L477.7,386.1 L477.9,386.2 L478.2,386.3 
+		L478.4,386.3 L478.7,386.4 L478.9,386.5 L479.2,386.5 L479.4,386.6 L479.7,386.7 L479.9,386.8 L480.2,386.8 
+		L480.4,386.9 L480.7,387.0 L480.9,387.0 L481.2,387.1 L481.4,387.2 L481.7,387.2 L481.9,387.3 L482.2,387.4 
+		L482.4,387.4 L482.7,387.5 L482.9,387.6 L483.2,387.6 L483.4,387.7 L483.7,387.8 L483.9,387.8 L484.2,387.9 
+		L484.4,388.0 L484.7,388.0 L484.9,388.1 L485.2,388.2 L485.4,388.2 L485.7,388.3 L486.0,388.4 L486.2,388.4 
+		L486.5,388.5 L486.7,388.6 L487.0,388.6 L487.2,388.7 L487.5,388.8 L487.7,388.8 L488.0,388.9 L488.2,389.0 
+		L488.5,389.0 L488.7,389.1 L489.0,389.2 L489.2,389.2 L489.5,389.3 L489.7,389.4 L490.0,389.4 L490.2,389.5 
+		L490.5,389.6 L490.7,389.6 L491.0,389.7 L491.2,389.8 L491.5,389.8 L491.7,389.9 L492.0,390.0 L492.2,390.0 
+		L492.5,390.1 L492.7,390.2 L493.0,390.2 L493.2,390.3 L493.5,390.3 L493.7,390.4 L494.0,390.5 L494.3,390.5 
+		L494.5,390.6 L494.8,390.7 L495.0,390.7 L495.3,390.8 L495.5,390.9 L495.8,390.9 L496.0,391.0 L496.3,391.1 
+		L496.5,391.1 L496.8,391.2 L497.0,391.2 L497.3,391.3 L497.5,391.4 L497.8,391.4 L498.0,391.5 L498.3,391.6 
+		L498.5,391.6 L498.8,391.7 L499.0,391.8 L499.3,391.8 L499.5,391.9 L499.8,391.9 L500.0,392.0 L500.3,392.1 
+		L500.5,392.1 L500.8,392.2 L501.0,392.3 L501.3,392.3 L501.5,392.4 L501.8,392.4 L502.1,392.5 L502.3,392.6 
+		L502.6,392.6 L502.8,392.7 L503.1,392.7 L503.3,392.8 L503.6,392.9 L503.8,392.9 L504.1,393.0 L504.3,393.1 
+		L504.6,393.1 L504.8,393.2 L505.1,393.2 L505.3,393.3 L505.6,393.4 L505.8,393.4 L506.1,393.5 L506.3,393.5 
+		L506.6,393.6 L506.8,393.7 L507.1,393.7 L507.3,393.8 L507.6,393.8 L507.8,393.9 L508.1,394.0 L508.3,394.0 
+		L508.6,394.1 L508.8,394.1 L509.1,394.2 L509.3,394.3 L509.6,394.3 L509.8,394.4 L510.1,394.4 L510.4,394.5 
+		L510.6,394.6 L510.9,394.6 L511.1,394.7 L511.4,394.7 L511.6,394.8 L511.9,394.9 L512.1,394.9 L512.4,395.0 
+		L512.6,395.0 L512.9,395.1 L513.1,395.2 L513.4,395.2 L513.6,395.3 L513.9,395.3 L514.1,395.4 L514.4,395.4 
+		L514.6,395.5 L514.9,395.6 L515.1,395.6 L515.4,395.7 L515.6,395.7 L515.9,395.8 L516.1,395.9 L516.4,395.9 
+		L516.6,396.0 L516.9,396.0 L517.1,396.1 L517.4,396.1 L517.6,396.2 L517.9,396.3 L518.1,396.3 L518.4,396.4 
+		L518.7,396.4 L518.9,396.5 L519.2,396.5 L519.4,396.6 L519.7,396.7 L519.9,396.7 L520.2,396.8 L520.4,396.8 
+		L520.7,396.9 L520.9,396.9 L521.2,397.0 L521.4,397.0 L521.7,397.1 L521.9,397.2 L522.2,397.2 L522.4,397.3 
+		L522.7,397.3 L522.9,397.4 L523.2,397.4 L523.4,397.5 L523.7,397.5 L523.9,397.6 L524.2,397.7 L524.4,397.7 
+		L524.7,397.8 L524.9,397.8 L525.2,397.9 L525.4,397.9 L525.7,398.0 L525.9,398.0 L526.2,398.1 L526.5,398.1 
+		L526.7,398.2 L527.0,398.3 L527.2,398.3 L527.5,398.4 L527.7,398.4 L528.0,398.5 L528.2,398.5 L528.5,398.6 
+		L528.7,398.6 L529.0,398.7 L529.2,398.7 L529.5,398.8 L529.7,398.8 L530.0,398.9 L530.2,398.9 L530.5,399.0 
+		L530.7,399.1 L531.0,399.1 L531.2,399.2 L531.5,399.2 L531.7,399.3 L532.0,399.3 L532.2,399.4 L532.5,399.4 
+		L532.7,399.5 L533.0,399.5 L533.2,399.6 L533.5,399.6 L533.7,399.7 L534.0,399.7 L534.2,399.8 L534.5,399.8 
+		L534.8,399.9 L535.0,399.9 L535.3,400.0 L535.5,400.0 L535.8,400.1 L536.0,400.1 L536.3,400.2 L536.5,400.2 
+		L536.8,400.3 L537.0,400.3 L537.3,400.4 L537.5,400.4 L537.8,400.5 L538.0,400.5 L538.3,400.6 L538.5,400.6 
+		L538.8,400.7 L539.0,400.7 L539.3,400.8 L539.5,400.8 L539.8,400.9 L540.0,400.9 L540.3,401.0 L540.5,401.0 
+		L540.8,401.1 L541.0,401.1 L541.3,401.2 L541.5,401.2 L541.8,401.3 L542.0,401.3 L542.3,401.4 L542.6,401.4 
+		L542.8,401.5 L543.1,401.5 L543.3,401.6 L543.6,401.6 L543.8,401.7 L544.1,401.7 L544.3,401.8 L544.6,401.8 
+		L544.8,401.9 L545.1,401.9 L545.3,402.0 L545.6,402.0 L545.8,402.1 L546.1,402.1 L546.3,402.2 L546.6,402.2 
+		L546.8,402.3 L547.1,402.3 L547.3,402.4 L547.6,402.4 L547.8,402.4 L548.1,402.5 L548.3,402.5 L548.6,402.6 
+		L548.8,402.6 L549.1,402.7 L549.3,402.7 L549.6,402.8 L549.8,402.8 L550.1,402.9 L550.3,402.9 L550.6,403.0 
+		L550.9,403.0 L551.1,403.0 L551.4,403.1 L551.6,403.1 L551.9,403.2 L552.1,403.2 L552.4,403.3 L552.6,403.3 
+		L552.9,403.4 L553.1,403.4 L553.4,403.5 L553.6,403.5 L553.9,403.6 L554.1,403.6 L554.4,403.6 L554.6,403.7 
+		L554.9,403.7 L555.1,403.8 L555.4,403.8 L555.6,403.9 L555.9,403.9 L556.1,404.0 L556.4,404.0 L556.6,404.0 
+		L556.9,404.1 L557.1,404.1 L557.4,404.2 L557.6,404.2 L557.9,404.3 L558.1,404.3 L558.4,404.3 L558.6,404.4 
+		L558.9,404.4 L559.2,404.5 L559.4,404.5 L559.7,404.6 L559.9,404.6 L560.2,404.7 L560.4,404.7 L560.7,404.7 
+		L560.9,404.8 L561.2,404.8 L561.4,404.9 L561.7,404.9 L561.9,405.0 L562.2,405.0 L562.4,405.0 L562.7,405.1 
+		L562.9,405.1 L563.2,405.2 L563.4,405.2 L563.7,405.2 L563.9,405.3 L564.2,405.3 L564.4,405.4 L564.7,405.4 
+		L564.9,405.5 L565.2,405.5 L565.4,405.5 L565.7,405.6 L565.9,405.6 L566.2,405.7 L566.4,405.7 L566.7,405.7 
+		L567.0,405.8 L567.2,405.8 L567.5,405.9 L567.7,405.9 L568.0,405.9 L568.2,406.0 L568.5,406.0 L568.7,406.1 
+		L569.0,406.1 L569.2,406.1 L569.5,406.2 L569.7,406.2 L570.0,406.3 L570.2,406.3 L570.5,406.3 L570.7,406.4 
+		L571.0,406.4 L571.2,406.5 L571.5,406.5 L571.7,406.5 L572.0,406.6 L572.2,406.6 L572.5,406.7 L572.7,406.7 
+		L573.0,406.7 L573.2,406.8 L573.5,406.8 L573.7,406.9 L574.0,406.9 L574.2,406.9 L574.5,407.0 L574.7,407.0 
+		'></path>
+</g>
+	</g>
+	<g id="Plot_4"><title>Plot_4</title>
+<g style="fill:none; color:cyan; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L72.2,422.4 L72.4,422.4 L72.7,422.4 L72.9,422.4 L73.2,422.4 L73.4,422.4 L73.7,422.4 
+		L73.9,422.4 L74.2,422.4 L74.4,422.4 L74.7,422.4 L74.9,422.4 L75.2,422.4 L75.4,422.4 L75.7,422.4 
+		L75.9,422.4 L76.2,422.4 L76.4,422.3 L76.7,422.3 L76.9,422.3 L77.2,422.3 L77.4,422.3 L77.7,422.2 
+		L77.9,422.2 L78.2,422.1 L78.4,422.1 L78.7,422.0 L78.9,422.0 L79.2,421.9 L79.4,421.8 L79.7,421.7 
+		L79.9,421.6 L80.2,421.5 L80.5,421.4 L80.7,421.3 L81.0,421.1 L81.2,421.0 L81.5,420.8 L81.7,420.6 
+		L82.0,420.4 L82.2,420.2 L82.5,420.0 L82.7,419.7 L83.0,419.4 L83.2,419.2 L83.5,418.8 L83.7,418.5 
+		L84.0,418.2 L84.2,417.8 L84.5,417.4 L84.7,417.0 L85.0,416.6 L85.2,416.1 L85.5,415.7 L85.7,415.2 
+		L86.0,414.6 L86.2,414.1 L86.5,413.5 L86.7,412.9 L87.0,412.3 L87.2,411.6 L87.5,410.9 L87.7,410.2 
+		L88.0,409.5 L88.3,408.7 L88.5,407.9 L88.8,407.1 L89.0,406.3 L89.3,405.4 L89.5,404.5 L89.8,403.5 
+		L90.0,402.6 L90.3,401.6 L90.5,400.5 L90.8,399.5 L91.0,398.4 L91.3,397.3 L91.5,396.1 L91.8,395.0 
+		L92.0,393.8 L92.3,392.5 L92.5,391.3 L92.8,390.0 L93.0,388.7 L93.3,387.3 L93.5,385.9 L93.8,384.5 
+		L94.0,383.1 L94.3,381.6 L94.5,380.2 L94.8,378.6 L95.0,377.1 L95.3,375.5 L95.5,373.9 L95.8,372.3 
+		L96.0,370.7 L96.3,369.0 L96.6,367.3 L96.8,365.6 L97.1,363.8 L97.3,362.1 L97.6,360.3 L97.8,358.5 
+		L98.1,356.6 L98.3,354.8 L98.6,352.9 L98.8,351.0 L99.1,349.1 L99.3,347.1 L99.6,345.2 L99.8,343.2 
+		L100.1,341.2 L100.3,339.2 L100.6,337.2 L100.8,335.1 L101.1,333.1 L101.3,331.0 L101.6,328.9 L101.8,326.8 
+		L102.1,324.7 L102.3,322.6 L102.6,320.5 L102.8,318.3 L103.1,316.2 L103.3,314.0 L103.6,311.8 L103.8,309.6 
+		L104.1,307.5 L104.3,305.3 L104.6,303.1 L104.9,300.9 L105.1,298.6 L105.4,296.4 L105.6,294.2 L105.9,292.0 
+		L106.1,289.8 L106.4,287.5 L106.6,285.3 L106.9,283.1 L107.1,280.9 L107.4,278.6 L107.6,276.4 L107.9,274.2 
+		L108.1,272.0 L108.4,269.8 L108.6,267.6 L108.9,265.4 L109.1,263.2 L109.4,261.0 L109.6,258.8 L109.9,256.6 
+		L110.1,254.4 L110.4,252.3 L110.6,250.1 L110.9,248.0 L111.1,245.9 L111.4,243.7 L111.6,241.6 L111.9,239.5 
+		L112.1,237.4 L112.4,235.4 L112.7,233.3 L112.9,231.3 L113.2,229.2 L113.4,227.2 L113.7,225.2 L113.9,223.2 
+		L114.2,221.2 L114.4,219.3 L114.7,217.3 L114.9,215.4 L115.2,213.5 L115.4,211.6 L115.7,209.8 L115.9,207.9 
+		L116.2,206.1 L116.4,204.3 L116.7,202.5 L116.9,200.7 L117.2,199.0 L117.4,197.2 L117.7,195.5 L117.9,193.9 
+		L118.2,192.2 L118.4,190.6 L118.7,188.9 L118.9,187.3 L119.2,185.8 L119.4,184.2 L119.7,182.7 L119.9,181.2 
+		L120.2,179.7 L120.4,178.3 L120.7,176.8 L121.0,175.4 L121.2,174.0 L121.5,172.7 L121.7,171.4 L122.0,170.0 
+		L122.2,168.8 L122.5,167.5 L122.7,166.3 L123.0,165.1 L123.2,163.9 L123.5,162.7 L123.7,161.6 L124.0,160.5 
+		L124.2,159.4 L124.5,158.4 L124.7,157.4 L125.0,156.4 L125.2,155.4 L125.5,154.5 L125.7,153.5 L126.0,152.7 
+		L126.2,151.8 L126.5,150.9 L126.7,150.1 L127.0,149.3 L127.2,148.6 L127.5,147.9 L127.7,147.1 L128.0,146.5 
+		L128.2,145.8 L128.5,145.2 L128.8,144.6 L129.0,144.0 L129.3,143.5 L129.5,142.9 L129.8,142.4 L130.0,142.0 
+		L130.3,141.5 L130.5,141.1 L130.8,140.7 L131.0,140.3 L131.3,140.0 L131.5,139.6 L131.8,139.3 L132.0,139.1 
+		L132.3,138.8 L132.5,138.6 L132.8,138.4 L133.0,138.2 L133.3,138.1 L133.5,137.9 L133.8,137.8 L134.0,137.8 
+		L134.3,137.7 L134.5,137.7 L134.8,137.7 L135.0,137.7 L135.3,137.7 L135.5,137.8 L135.8,137.8 L136.0,137.9 
+		L136.3,138.1 L136.5,138.2 L136.8,138.4 L137.1,138.6 L137.3,138.8 L137.6,139.0 L137.8,139.2 L138.1,139.5 
+		L138.3,139.8 L138.6,140.1 L138.8,140.4 L139.1,140.8 L139.3,141.2 L139.6,141.5 L139.8,141.9 L140.1,142.4 
+		L140.3,142.8 L140.6,143.3 L140.8,143.8 L141.1,144.3 L141.3,144.8 L141.6,145.3 L141.8,145.8 L142.1,146.4 
+		L142.3,147.0 L142.6,147.6 L142.8,148.2 L143.1,148.8 L143.3,149.5 L143.6,150.1 L143.8,150.8 L144.1,151.5 
+		L144.3,152.2 L144.6,152.9 L144.8,153.7 L145.1,154.4 L145.4,155.2 L145.6,156.0 L145.9,156.7 L146.1,157.5 
+		L146.4,158.4 L146.6,159.2 L146.9,160.0 L147.1,160.9 L147.4,161.7 L147.6,162.6 L147.9,163.5 L148.1,164.4 
+		L148.4,165.3 L148.6,166.2 L148.9,167.2 L149.1,168.1 L149.4,169.0 L149.6,170.0 L149.9,171.0 L150.1,171.9 
+		L150.4,172.9 L150.6,173.9 L150.9,174.9 L151.1,175.9 L151.4,177.0 L151.6,178.0 L151.9,179.0 L152.1,180.1 
+		L152.4,181.1 L152.6,182.2 L152.9,183.3 L153.2,184.3 L153.4,185.4 L153.7,186.5 L153.9,187.6 L154.2,188.7 
+		L154.4,189.8 L154.7,190.9 L154.9,192.0 L155.2,193.1 L155.4,194.3 L155.7,195.4 L155.9,196.5 L156.2,197.7 
+		L156.4,198.8 L156.7,199.9 L156.9,201.1 L157.2,202.3 L157.4,203.4 L157.7,204.6 L157.9,205.7 L158.2,206.9 
+		L158.4,208.1 L158.7,209.2 L158.9,210.4 L159.2,211.6 L159.4,212.8 L159.7,214.0 L159.9,215.1 L160.2,216.3 
+		L160.4,217.5 L160.7,218.7 L160.9,219.9 L161.2,221.1 L161.5,222.3 L161.7,223.5 L162.0,224.7 L162.2,225.9 
+		L162.5,227.0 L162.7,228.2 L163.0,229.4 L163.2,230.6 L163.5,231.8 L163.7,233.0 L164.0,234.2 L164.2,235.4 
+		L164.5,236.6 L164.7,237.8 L165.0,239.0 L165.2,240.2 L165.5,241.4 L165.7,242.5 L166.0,243.7 L166.2,244.9 
+		L166.5,246.1 L166.7,247.3 L167.0,248.4 L167.2,249.6 L167.5,250.8 L167.7,252.0 L168.0,253.1 L168.2,254.3 
+		L168.5,255.5 L168.7,256.6 L169.0,257.8 L169.2,259.0 L169.5,260.1 L169.8,261.3 L170.0,262.4 L170.3,263.6 
+		L170.5,264.7 L170.8,265.9 L171.0,267.0 L171.3,268.1 L171.5,269.3 L171.8,270.4 L172.0,271.5 L172.3,272.6 
+		L172.5,273.7 L172.8,274.9 L173.0,276.0 L173.3,277.1 L173.5,278.2 L173.8,279.3 L174.0,280.4 L174.3,281.5 
+		L174.5,282.5 L174.8,283.6 L175.0,284.7 L175.3,285.8 L175.5,286.8 L175.8,287.9 L176.0,289.0 L176.3,290.0 
+		L176.5,291.1 L176.8,292.1 L177.0,293.2 L177.3,294.2 L177.6,295.2 L177.8,296.3 L178.1,297.3 L178.3,298.3 
+		L178.6,299.3 L178.8,300.3 L179.1,301.3 L179.3,302.3 L179.6,303.3 L179.8,304.3 L180.1,305.3 L180.3,306.3 
+		L180.6,307.2 L180.8,308.2 L181.1,309.2 L181.3,310.1 L181.6,311.1 L181.8,312.0 L182.1,313.0 L182.3,313.9 
+		L182.6,314.8 L182.8,315.8 L183.1,316.7 L183.3,317.6 L183.6,318.5 L183.8,319.4 L184.1,320.3 L184.3,321.2 
+		L184.6,322.1 L184.8,323.0 L185.1,323.9 L185.3,324.7 L185.6,325.6 L185.9,326.5 L186.1,327.3 L186.4,328.2 
+		L186.6,329.0 L186.9,329.9 L187.1,330.7 L187.4,331.5 L187.6,332.3 L187.9,333.2 L188.1,334.0 L188.4,334.8 
+		L188.6,335.6 L188.9,336.4 L189.1,337.2 L189.4,338.0 L189.6,338.7 L189.9,339.5 L190.1,340.3 L190.4,341.1 
+		L190.6,341.8 L190.9,342.6 L191.1,343.3 L191.4,344.1 L191.6,344.8 L191.9,345.5 L192.1,346.3 L192.4,347.0 
+		L192.6,347.7 L192.9,348.4 L193.1,349.1 L193.4,349.8 L193.7,350.5 L193.9,351.2 L194.2,351.9 L194.4,352.6 
+		L194.7,353.3 L194.9,353.9 L195.2,354.6 L195.4,355.3 L195.7,355.9 L195.9,356.6 L196.2,357.2 L196.4,357.9 
+		L196.7,358.5 L196.9,359.1 L197.2,359.8 L197.4,360.4 L197.7,361.0 L197.9,361.6 L198.2,362.2 L198.4,362.8 
+		L198.7,363.4 L198.9,364.0 L199.2,364.6 L199.4,365.2 L199.7,365.8 L199.9,366.3 L200.2,366.9 L200.4,367.5 
+		L200.7,368.0 L200.9,368.6 L201.2,369.1 L201.4,369.7 L201.7,370.2 L202.0,370.7 L202.2,371.3 L202.5,371.8 
+		L202.7,372.3 L203.0,372.8 L203.2,373.4 L203.5,373.9 L203.7,374.4 L204.0,374.9 L204.2,375.4 L204.5,375.9 
+		L204.7,376.3 L205.0,376.8 L205.2,377.3 L205.5,377.8 L205.7,378.3 L206.0,378.7 L206.2,379.2 L206.5,379.6 
+		L206.7,380.1 L207.0,380.5 L207.2,381.0 L207.5,381.4 L207.7,381.9 L208.0,382.3 L208.2,382.7 L208.5,383.2 
+		L208.7,383.6 L209.0,384.0 L209.2,384.4 L209.5,384.8 L209.7,385.2 L210.0,385.6 L210.3,386.0 L210.5,386.4 
+		L210.8,386.8 L211.0,387.2 L211.3,387.6 L211.5,388.0 L211.8,388.3 L212.0,388.7 L212.3,389.1 L212.5,389.4 
+		L212.8,389.8 L213.0,390.2 L213.3,390.5 L213.5,390.9 L213.8,391.2 L214.0,391.6 L214.3,391.9 L214.5,392.3 
+		L214.8,392.6 L215.0,392.9 L215.3,393.2 L215.5,393.6 L215.8,393.9 L216.0,394.2 L216.3,394.5 L216.5,394.8 
+		L216.8,395.2 L217.0,395.5 L217.3,395.8 L217.5,396.1 L217.8,396.4 L218.1,396.7 L218.3,397.0 L218.6,397.2 
+		L218.8,397.5 L219.1,397.8 L219.3,398.1 L219.6,398.4 L219.8,398.6 L220.1,398.9 L220.3,399.2 L220.6,399.4 
+		L220.8,399.7 L221.1,400.0 L221.3,400.2 L221.6,400.5 L221.8,400.7 L222.1,401.0 L222.3,401.2 L222.6,401.5 
+		L222.8,401.7 L223.1,402.0 L223.3,402.2 L223.6,402.4 L223.8,402.7 L224.1,402.9 L224.3,403.1 L224.6,403.4 
+		L224.8,403.6 L225.1,403.8 L225.3,404.0 L225.6,404.2 L225.8,404.4 L226.1,404.7 L226.4,404.9 L226.6,405.1 
+		L226.9,405.3 L227.1,405.5 L227.4,405.7 L227.6,405.9 L227.9,406.1 L228.1,406.3 L228.4,406.5 L228.6,406.6 
+		L228.9,406.8 L229.1,407.0 L229.4,407.2 L229.6,407.4 L229.9,407.6 L230.1,407.7 L230.4,407.9 L230.6,408.1 
+		L230.9,408.3 L231.1,408.4 L231.4,408.6 L231.6,408.8 L231.9,408.9 L232.1,409.1 L232.4,409.3 L232.6,409.4 
+		L232.9,409.6 L233.1,409.7 L233.4,409.9 L233.6,410.0 L233.9,410.2 L234.1,410.3 L234.4,410.5 L234.7,410.6 
+		L234.9,410.8 L235.2,410.9 L235.4,411.1 L235.7,411.2 L235.9,411.3 L236.2,411.5 L236.4,411.6 L236.7,411.7 
+		L236.9,411.9 L237.2,412.0 L237.4,412.1 L237.7,412.2 L237.9,412.4 L238.2,412.5 L238.4,412.6 L238.7,412.7 
+		L238.9,412.9 L239.2,413.0 L239.4,413.1 L239.7,413.2 L239.9,413.3 L240.2,413.4 L240.4,413.5 L240.7,413.7 
+		L240.9,413.8 L241.2,413.9 L241.4,414.0 L241.7,414.1 L241.9,414.2 L242.2,414.3 L242.5,414.4 L242.7,414.5 
+		L243.0,414.6 L243.2,414.7 L243.5,414.8 L243.7,414.9 L244.0,415.0 L244.2,415.1 L244.5,415.2 L244.7,415.3 
+		L245.0,415.3 L245.2,415.4 L245.5,415.5 L245.7,415.6 L246.0,415.7 L246.2,415.8 L246.5,415.9 L246.7,416.0 
+		L247.0,416.0 L247.2,416.1 L247.5,416.2 L247.7,416.3 L248.0,416.4 L248.2,416.4 L248.5,416.5 L248.7,416.6 
+		L249.0,416.7 L249.2,416.7 L249.5,416.8 L249.7,416.9 L250.0,416.9 L250.2,417.0 L250.5,417.1 L250.8,417.2 
+		L251.0,417.2 L251.3,417.3 L251.5,417.4 L251.8,417.4 L252.0,417.5 L252.3,417.5 L252.5,417.6 L252.8,417.7 
+		L253.0,417.7 L253.3,417.8 L253.5,417.9 L253.8,417.9 L254.0,418.0 L254.3,418.0 L254.5,418.1 L254.8,418.1 
+		L255.0,418.2 L255.3,418.3 L255.5,418.3 L255.8,418.4 L256.0,418.4 L256.3,418.5 L256.5,418.5 L256.8,418.6 
+		L257.0,418.6 L257.3,418.7 L257.5,418.7 L257.8,418.8 L258.0,418.8 L258.3,418.9 L258.6,418.9 L258.8,419.0 
+		L259.1,419.0 L259.3,419.0 L259.6,419.1 L259.8,419.1 L260.1,419.2 L260.3,419.2 L260.6,419.3 L260.8,419.3 
+		L261.1,419.3 L261.3,419.4 L261.6,419.4 L261.8,419.5 L262.1,419.5 L262.3,419.5 L262.6,419.6 L262.8,419.6 
+		L263.1,419.7 L263.3,419.7 L263.6,419.7 L263.8,419.8 L264.1,419.8 L264.3,419.8 L264.6,419.9 L264.8,419.9 
+		L265.1,419.9 L265.3,420.0 L265.6,420.0 L265.8,420.0 L266.1,420.1 L266.3,420.1 L266.6,420.1 L266.9,420.2 
+		L267.1,420.2 L267.4,420.2 L267.6,420.2 L267.9,420.3 L268.1,420.3 L268.4,420.3 L268.6,420.4 L268.9,420.4 
+		L269.1,420.4 L269.4,420.4 L269.6,420.5 L269.9,420.5 L270.1,420.5 L270.4,420.5 L270.6,420.6 L270.9,420.6 
+		L271.1,420.6 L271.4,420.6 L271.6,420.7 L271.9,420.7 L272.1,420.7 L272.4,420.7 L272.6,420.8 L272.9,420.8 
+		L273.1,420.8 L273.4,420.8 L273.6,420.8 L273.9,420.9 L274.1,420.9 L274.4,420.9 L274.6,420.9 L274.9,421.0 
+		L275.2,421.0 L275.4,421.0 L275.7,421.0 L275.9,421.0 L276.2,421.0 L276.4,421.1 L276.7,421.1 L276.9,421.1 
+		L277.2,421.1 L277.4,421.1 L277.7,421.2 L277.9,421.2 L278.2,421.2 L278.4,421.2 L278.7,421.2 L278.9,421.2 
+		L279.2,421.3 L279.4,421.3 L279.7,421.3 L279.9,421.3 L280.2,421.3 L280.4,421.3 L280.7,421.3 L280.9,421.4 
+		L281.2,421.4 L281.4,421.4 L281.7,421.4 L281.9,421.4 L282.2,421.4 L282.4,421.4 L282.7,421.5 L283.0,421.5 
+		L283.2,421.5 L283.5,421.5 L283.7,421.5 L284.0,421.5 L284.2,421.5 L284.5,421.5 L284.7,421.6 L285.0,421.6 
+		L285.2,421.6 L285.5,421.6 L285.7,421.6 L286.0,421.6 L286.2,421.6 L286.5,421.6 L286.7,421.6 L287.0,421.7 
+		L287.2,421.7 L287.5,421.7 L287.7,421.7 L288.0,421.7 L288.2,421.7 L288.5,421.7 L288.7,421.7 L289.0,421.7 
+		L289.2,421.7 L289.5,421.8 L289.7,421.8 L290.0,421.8 L290.2,421.8 L290.5,421.8 L290.7,421.8 L291.0,421.8 
+		L291.3,421.8 L291.5,421.8 L291.8,421.8 L292.0,421.8 L292.3,421.9 L292.5,421.9 L292.8,421.9 L293.0,421.9 
+		L293.3,421.9 L293.5,421.9 L293.8,421.9 L294.0,421.9 L294.3,421.9 L294.5,421.9 L294.8,421.9 L295.0,421.9 
+		L295.3,421.9 L295.5,421.9 L295.8,422.0 L296.0,422.0 L296.3,422.0 L296.5,422.0 L296.8,422.0 L297.0,422.0 
+		L297.3,422.0 L297.5,422.0 L297.8,422.0 L298.0,422.0 L298.3,422.0 L298.5,422.0 L298.8,422.0 L299.0,422.0 
+		L299.3,422.0 L299.6,422.0 L299.8,422.0 L300.1,422.0 L300.3,422.1 L300.6,422.1 L300.8,422.1 L301.1,422.1 
+		L301.3,422.1 L301.6,422.1 L301.8,422.1 L302.1,422.1 L302.3,422.1 L302.6,422.1 L302.8,422.1 L303.1,422.1 
+		L303.3,422.1 L303.6,422.1 L303.8,422.1 L304.1,422.1 L304.3,422.1 L304.6,422.1 L304.8,422.1 L305.1,422.1 
+		L305.3,422.1 L305.6,422.1 L305.8,422.1 L306.1,422.2 L306.3,422.2 L306.6,422.2 L306.8,422.2 L307.1,422.2 
+		L307.4,422.2 L307.6,422.2 L307.9,422.2 L308.1,422.2 L308.4,422.2 L308.6,422.2 L308.9,422.2 L309.1,422.2 
+		L309.4,422.2 L309.6,422.2 L309.9,422.2 L310.1,422.2 L310.4,422.2 L310.6,422.2 L310.9,422.2 L311.1,422.2 
+		L311.4,422.2 L311.6,422.2 L311.9,422.2 L312.1,422.2 L312.4,422.2 L312.6,422.2 L312.9,422.2 L313.1,422.2 
+		L313.4,422.2 L313.6,422.2 L313.9,422.2 L314.1,422.2 L314.4,422.2 L314.6,422.2 L314.9,422.3 L315.1,422.3 
+		L315.4,422.3 L315.7,422.3 L315.9,422.3 L316.2,422.3 L316.4,422.3 L316.7,422.3 L316.9,422.3 L317.2,422.3 
+		L317.4,422.3 L317.7,422.3 L317.9,422.3 L318.2,422.3 L318.4,422.3 L318.7,422.3 L318.9,422.3 L319.2,422.3 
+		L319.4,422.3 L319.7,422.3 L319.9,422.3 L320.2,422.3 L320.4,422.3 L320.7,422.3 L320.9,422.3 L321.2,422.3 
+		L321.4,422.3 L321.7,422.3 L321.9,422.3 L322.2,422.3 L322.4,422.3 L322.7,422.3 L322.9,422.3 L323.2,422.3 
+		L323.5,422.3 L323.7,422.3 L324.0,422.3 L324.2,422.3 L324.5,422.3 L324.7,422.3 L325.0,422.3 L325.2,422.3 
+		L325.5,422.3 L325.7,422.3 L326.0,422.3 L326.2,422.3 L326.5,422.3 L326.7,422.3 L327.0,422.3 L327.2,422.3 
+		L327.5,422.3 L327.7,422.3 L328.0,422.3 L328.2,422.3 L328.5,422.3 L328.7,422.3 L329.0,422.3 L329.2,422.3 
+		L329.5,422.3 L329.7,422.3 L330.0,422.3 L330.2,422.3 L330.5,422.3 L330.7,422.3 L331.0,422.3 L331.2,422.3 
+		L331.5,422.3 L331.8,422.3 L332.0,422.3 L332.3,422.3 L332.5,422.3 L332.8,422.3 L333.0,422.3 L333.3,422.4 
+		L333.5,422.4 L333.8,422.4 L334.0,422.4 L334.3,422.4 L334.5,422.4 L334.8,422.4 L335.0,422.4 L335.3,422.4 
+		L335.5,422.4 L335.8,422.4 L336.0,422.4 L336.3,422.4 L336.5,422.4 L336.8,422.4 L337.0,422.4 L337.3,422.4 
+		L337.5,422.4 L337.8,422.4 L338.0,422.4 L338.3,422.4 L338.5,422.4 L338.8,422.4 L339.0,422.4 L339.3,422.4 
+		L339.5,422.4 L339.8,422.4 L340.1,422.4 L340.3,422.4 L340.6,422.4 L340.8,422.4 L341.1,422.4 L341.3,422.4 
+		L341.6,422.4 L341.8,422.4 L342.1,422.4 L342.3,422.4 L342.6,422.4 L342.8,422.4 L343.1,422.4 L343.3,422.4 
+		L343.6,422.4 L343.8,422.4 L344.1,422.4 L344.3,422.4 L344.6,422.4 L344.8,422.4 L345.1,422.4 L345.3,422.4 
+		L345.6,422.4 L345.8,422.4 L346.1,422.4 L346.3,422.4 L346.6,422.4 L346.8,422.4 L347.1,422.4 L347.3,422.4 
+		L347.6,422.4 L347.9,422.4 L348.1,422.4 L348.4,422.4 L348.6,422.4 L348.9,422.4 L349.1,422.4 L349.4,422.4 
+		L349.6,422.4 L349.9,422.4 L350.1,422.4 L350.4,422.4 L350.6,422.4 L350.9,422.4 L351.1,422.4 L351.4,422.4 
+		L351.6,422.4 L351.9,422.4 L352.1,422.4 L352.4,422.4 L352.6,422.4 L352.9,422.4 L353.1,422.4 L353.4,422.4 
+		L353.6,422.4 L353.9,422.4 L354.1,422.4 L354.4,422.4 L354.6,422.4 L354.9,422.4 L355.1,422.4 L355.4,422.4 
+		L355.6,422.4 L355.9,422.4 L356.2,422.4 L356.4,422.4 L356.7,422.4 L356.9,422.4 L357.2,422.4 L357.4,422.4 
+		L357.7,422.4 L357.9,422.4 L358.2,422.4 L358.4,422.4 L358.7,422.4 L358.9,422.4 L359.2,422.4 L359.4,422.4 
+		L359.7,422.4 L359.9,422.4 L360.2,422.4 L360.4,422.4 L360.7,422.4 L360.9,422.4 L361.2,422.4 L361.4,422.4 
+		L361.7,422.4 L361.9,422.4 L362.2,422.4 L362.4,422.4 L362.7,422.4 L362.9,422.4 L363.2,422.4 L363.4,422.4 
+		L363.7,422.4 L363.9,422.4 L364.2,422.4 L364.5,422.4 L364.7,422.4 L365.0,422.4 L365.2,422.4 L365.5,422.4 
+		L365.7,422.4 L366.0,422.4 L366.2,422.4 L366.5,422.4 L366.7,422.4 L367.0,422.4 L367.2,422.4 L367.5,422.4 
+		L367.7,422.4 L368.0,422.4 L368.2,422.4 L368.5,422.4 L368.7,422.4 L369.0,422.4 L369.2,422.4 L369.5,422.4 
+		L369.7,422.4 L370.0,422.4 L370.2,422.4 L370.5,422.4 L370.7,422.4 L371.0,422.4 L371.2,422.4 L371.5,422.4 
+		L371.7,422.4 L372.0,422.4 L372.3,422.4 L372.5,422.4 L372.8,422.4 L373.0,422.4 L373.3,422.4 L373.5,422.4 
+		L373.8,422.4 L374.0,422.4 L374.3,422.4 L374.5,422.4 L374.8,422.4 L375.0,422.4 L375.3,422.4 L375.5,422.4 
+		L375.8,422.4 L376.0,422.4 L376.3,422.4 L376.5,422.4 L376.8,422.4 L377.0,422.4 L377.3,422.4 L377.5,422.4 
+		L377.8,422.4 L378.0,422.4 L378.3,422.4 L378.5,422.4 L378.8,422.4 L379.0,422.4 L379.3,422.4 L379.5,422.4 
+		L379.8,422.4 L380.0,422.4 L380.3,422.4 L380.6,422.4 L380.8,422.4 L381.1,422.4 L381.3,422.4 L381.6,422.4 
+		L381.8,422.4 L382.1,422.4 L382.3,422.4 L382.6,422.4 L382.8,422.4 L383.1,422.4 L383.3,422.4 L383.6,422.4 
+		L383.8,422.4 L384.1,422.4 L384.3,422.4 L384.6,422.4 L384.8,422.4 L385.1,422.4 L385.3,422.4 L385.6,422.4 
+		L385.8,422.4 L386.1,422.4 L386.3,422.4 L386.6,422.4 L386.8,422.4 L387.1,422.4 L387.3,422.4 L387.6,422.4 
+		L387.8,422.4 L388.1,422.4 L388.3,422.4 L388.6,422.4 L388.9,422.4 L389.1,422.4 L389.4,422.4 L389.6,422.4 
+		L389.9,422.4 L390.1,422.4 L390.4,422.4 L390.6,422.4 L390.9,422.4 L391.1,422.4 L391.4,422.4 L391.6,422.4 
+		L391.9,422.4 L392.1,422.4 L392.4,422.4 L392.6,422.4 L392.9,422.4 L393.1,422.4 L393.4,422.4 L393.6,422.4 
+		L393.9,422.4 L394.1,422.4 L394.4,422.4 L394.6,422.4 L394.9,422.4 L395.1,422.4 L395.4,422.4 L395.6,422.4 
+		L395.9,422.4 L396.1,422.4 L396.4,422.4 L396.7,422.4 L396.9,422.4 L397.2,422.4 L397.4,422.4 L397.7,422.4 
+		L397.9,422.4 L398.2,422.4 L398.4,422.4 L398.7,422.4 L398.9,422.4 L399.2,422.4 L399.4,422.4 L399.7,422.4 
+		L399.9,422.4 L400.2,422.4 L400.4,422.4 L400.7,422.4 L400.9,422.4 L401.2,422.4 L401.4,422.4 L401.7,422.4 
+		L401.9,422.4 L402.2,422.4 L402.4,422.4 L402.7,422.4 L402.9,422.4 L403.2,422.4 L403.4,422.4 L403.7,422.4 
+		L403.9,422.4 L404.2,422.4 L404.4,422.4 L404.7,422.4 L405.0,422.4 L405.2,422.4 L405.5,422.4 L405.7,422.4 
+		L406.0,422.4 L406.2,422.4 L406.5,422.4 L406.7,422.4 L407.0,422.4 L407.2,422.4 L407.5,422.4 L407.7,422.4 
+		L408.0,422.4 L408.2,422.4 L408.5,422.4 L408.7,422.4 L409.0,422.4 L409.2,422.4 L409.5,422.4 L409.7,422.4 
+		L410.0,422.4 L410.2,422.4 L410.5,422.4 L410.7,422.4 L411.0,422.4 L411.2,422.4 L411.5,422.4 L411.7,422.4 
+		L412.0,422.4 L412.2,422.4 L412.5,422.4 L412.8,422.4 L413.0,422.4 L413.3,422.4 L413.5,422.4 L413.8,422.4 
+		L414.0,422.4 L414.3,422.4 L414.5,422.4 L414.8,422.4 L415.0,422.4 L415.3,422.4 L415.5,422.4 L415.8,422.4 
+		L416.0,422.4 L416.3,422.4 L416.5,422.4 L416.8,422.4 L417.0,422.4 L417.3,422.4 L417.5,422.4 L417.8,422.4 
+		L418.0,422.4 L418.3,422.4 L418.5,422.4 L418.8,422.4 L419.0,422.4 L419.3,422.4 L419.5,422.4 L419.8,422.4 
+		L420.0,422.4 L420.3,422.4 L420.5,422.4 L420.8,422.4 L421.1,422.4 L421.3,422.4 L421.6,422.4 L421.8,422.4 
+		L422.1,422.4 L422.3,422.4 L422.6,422.4 L422.8,422.4 L423.1,422.4 L423.3,422.4 L423.6,422.4 L423.8,422.4 
+		L424.1,422.4 L424.3,422.4 L424.6,422.4 L424.8,422.4 L425.1,422.4 L425.3,422.4 L425.6,422.4 L425.8,422.4 
+		L426.1,422.4 L426.3,422.4 L426.6,422.4 L426.8,422.4 L427.1,422.4 L427.3,422.4 L427.6,422.4 L427.8,422.4 
+		L428.1,422.4 L428.3,422.4 L428.6,422.4 L428.8,422.4 L429.1,422.4 L429.4,422.4 L429.6,422.4 L429.9,422.4 
+		L430.1,422.4 L430.4,422.4 L430.6,422.4 L430.9,422.4 L431.1,422.4 L431.4,422.4 L431.6,422.4 L431.9,422.4 
+		L432.1,422.4 L432.4,422.4 L432.6,422.4 L432.9,422.4 L433.1,422.4 L433.4,422.4 L433.6,422.4 L433.9,422.4 
+		L434.1,422.4 L434.4,422.4 L434.6,422.4 L434.9,422.4 L435.1,422.4 L435.4,422.4 L435.6,422.4 L435.9,422.4 
+		L436.1,422.4 L436.4,422.4 L436.6,422.4 L436.9,422.4 L437.2,422.4 L437.4,422.4 L437.7,422.4 L437.9,422.4 
+		L438.2,422.4 L438.4,422.4 L438.7,422.4 L438.9,422.4 L439.2,422.4 L439.4,422.4 L439.7,422.4 L439.9,422.4 
+		L440.2,422.4 L440.4,422.4 L440.7,422.4 L440.9,422.4 L441.2,422.4 L441.4,422.4 L441.7,422.4 L441.9,422.4 
+		L442.2,422.4 L442.4,422.4 L442.7,422.4 L442.9,422.4 L443.2,422.4 L443.4,422.4 L443.7,422.4 L443.9,422.4 
+		L444.2,422.4 L444.4,422.4 L444.7,422.4 L444.9,422.4 L445.2,422.4 L445.5,422.4 L445.7,422.4 L446.0,422.4 
+		L446.2,422.4 L446.5,422.4 L446.7,422.4 L447.0,422.4 L447.2,422.4 L447.5,422.4 L447.7,422.4 L448.0,422.4 
+		L448.2,422.4 L448.5,422.4 L448.7,422.4 L449.0,422.4 L449.2,422.4 L449.5,422.4 L449.7,422.4 L450.0,422.4 
+		L450.2,422.4 L450.5,422.4 L450.7,422.4 L451.0,422.4 L451.2,422.4 L451.5,422.4 L451.7,422.4 L452.0,422.4 
+		L452.2,422.4 L452.5,422.4 L452.7,422.4 L453.0,422.4 L453.2,422.4 L453.5,422.4 L453.8,422.4 L454.0,422.4 
+		L454.3,422.4 L454.5,422.4 L454.8,422.4 L455.0,422.4 L455.3,422.4 L455.5,422.4 L455.8,422.4 L456.0,422.4 
+		L456.3,422.4 L456.5,422.4 L456.8,422.4 L457.0,422.4 L457.3,422.4 L457.5,422.4 L457.8,422.4 L458.0,422.4 
+		L458.3,422.4 L458.5,422.4 L458.8,422.4 L459.0,422.4 L459.3,422.4 L459.5,422.4 L459.8,422.4 L460.0,422.4 
+		L460.3,422.4 L460.5,422.4 L460.8,422.4 L461.0,422.4 L461.3,422.4 L461.6,422.4 L461.8,422.4 L462.1,422.4 
+		L462.3,422.4 L462.6,422.4 L462.8,422.4 L463.1,422.4 L463.3,422.4 L463.6,422.4 L463.8,422.4 L464.1,422.4 
+		L464.3,422.4 L464.6,422.4 L464.8,422.4 L465.1,422.4 L465.3,422.4 L465.6,422.4 L465.8,422.4 L466.1,422.4 
+		L466.3,422.4 L466.6,422.4 L466.8,422.4 L467.1,422.4 L467.3,422.4 L467.6,422.4 L467.8,422.4 L468.1,422.4 
+		L468.3,422.4 L468.6,422.4 L468.8,422.4 L469.1,422.4 L469.3,422.4 L469.6,422.4 L469.9,422.4 L470.1,422.4 
+		L470.4,422.4 L470.6,422.4 L470.9,422.4 L471.1,422.4 L471.4,422.4 L471.6,422.4 L471.9,422.4 L472.1,422.4 
+		L472.4,422.4 L472.6,422.4 L472.9,422.4 L473.1,422.4 L473.4,422.4 L473.6,422.4 L473.9,422.4 L474.1,422.4 
+		L474.4,422.4 L474.6,422.4 L474.9,422.4 L475.1,422.4 L475.4,422.4 L475.6,422.4 L475.9,422.4 L476.1,422.4 
+		L476.4,422.4 L476.6,422.4 L476.9,422.4 L477.1,422.4 L477.4,422.4 L477.7,422.4 L477.9,422.4 L478.2,422.4 
+		L478.4,422.4 L478.7,422.4 L478.9,422.4 L479.2,422.4 L479.4,422.4 L479.7,422.4 L479.9,422.4 L480.2,422.4 
+		L480.4,422.4 L480.7,422.4 L480.9,422.4 L481.2,422.4 L481.4,422.4 L481.7,422.4 L481.9,422.4 L482.2,422.4 
+		L482.4,422.4 L482.7,422.4 L482.9,422.4 L483.2,422.4 L483.4,422.4 L483.7,422.4 L483.9,422.4 L484.2,422.4 
+		L484.4,422.4 L484.7,422.4 L484.9,422.4 L485.2,422.4 L485.4,422.4 L485.7,422.4 L486.0,422.4 L486.2,422.4 
+		L486.5,422.4 L486.7,422.4 L487.0,422.4 L487.2,422.4 L487.5,422.4 L487.7,422.4 L488.0,422.4 L488.2,422.4 
+		L488.5,422.4 L488.7,422.4 L489.0,422.4 L489.2,422.4 L489.5,422.4 L489.7,422.4 L490.0,422.4 L490.2,422.4 
+		L490.5,422.4 L490.7,422.4 L491.0,422.4 L491.2,422.4 L491.5,422.4 L491.7,422.4 L492.0,422.4 L492.2,422.4 
+		L492.5,422.4 L492.7,422.4 L493.0,422.4 L493.2,422.4 L493.5,422.4 L493.7,422.4 L494.0,422.4 L494.3,422.4 
+		L494.5,422.4 L494.8,422.4 L495.0,422.4 L495.3,422.4 L495.5,422.4 L495.8,422.4 L496.0,422.4 L496.3,422.4 
+		L496.5,422.4 L496.8,422.4 L497.0,422.4 L497.3,422.4 L497.5,422.4 L497.8,422.4 L498.0,422.4 L498.3,422.4 
+		L498.5,422.4 L498.8,422.4 L499.0,422.4 L499.3,422.4 L499.5,422.4 L499.8,422.4 L500.0,422.4 L500.3,422.4 
+		L500.5,422.4 L500.8,422.4 L501.0,422.4 L501.3,422.4 L501.5,422.4 L501.8,422.4 L502.1,422.4 L502.3,422.4 
+		L502.6,422.4 L502.8,422.4 L503.1,422.4 L503.3,422.4 L503.6,422.4 L503.8,422.4 L504.1,422.4 L504.3,422.4 
+		L504.6,422.4 L504.8,422.4 L505.1,422.4 L505.3,422.4 L505.6,422.4 L505.8,422.4 L506.1,422.4 L506.3,422.4 
+		L506.6,422.4 L506.8,422.4 L507.1,422.4 L507.3,422.4 L507.6,422.4 L507.8,422.4 L508.1,422.4 L508.3,422.4 
+		L508.6,422.4 L508.8,422.4 L509.1,422.4 L509.3,422.4 L509.6,422.4 L509.8,422.4 L510.1,422.4 L510.4,422.4 
+		L510.6,422.4 L510.9,422.4 L511.1,422.4 L511.4,422.4 L511.6,422.4 L511.9,422.4 L512.1,422.4 L512.4,422.4 
+		L512.6,422.4 L512.9,422.4 L513.1,422.4 L513.4,422.4 L513.6,422.4 L513.9,422.4 L514.1,422.4 L514.4,422.4 
+		L514.6,422.4 L514.9,422.4 L515.1,422.4 L515.4,422.4 L515.6,422.4 L515.9,422.4 L516.1,422.4 L516.4,422.4 
+		L516.6,422.4 L516.9,422.4 L517.1,422.4 L517.4,422.4 L517.6,422.4 L517.9,422.4 L518.1,422.4 L518.4,422.4 
+		L518.7,422.4 L518.9,422.4 L519.2,422.4 L519.4,422.4 L519.7,422.4 L519.9,422.4 L520.2,422.4 L520.4,422.4 
+		L520.7,422.4 L520.9,422.4 L521.2,422.4 L521.4,422.4 L521.7,422.4 L521.9,422.4 L522.2,422.4 L522.4,422.4 
+		L522.7,422.4 L522.9,422.4 L523.2,422.4 L523.4,422.4 L523.7,422.4 L523.9,422.4 L524.2,422.4 L524.4,422.4 
+		L524.7,422.4 L524.9,422.4 L525.2,422.4 L525.4,422.4 L525.7,422.4 L525.9,422.4 L526.2,422.4 L526.5,422.4 
+		L526.7,422.4 L527.0,422.4 L527.2,422.4 L527.5,422.4 L527.7,422.4 L528.0,422.4 L528.2,422.4 L528.5,422.4 
+		L528.7,422.4 L529.0,422.4 L529.2,422.4 L529.5,422.4 L529.7,422.4 L530.0,422.4 L530.2,422.4 L530.5,422.4 
+		L530.7,422.4 L531.0,422.4 L531.2,422.4 L531.5,422.4 L531.7,422.4 L532.0,422.4 L532.2,422.4 L532.5,422.4 
+		L532.7,422.4 L533.0,422.4 L533.2,422.4 L533.5,422.4 L533.7,422.4 L534.0,422.4 L534.2,422.4 L534.5,422.4 
+		L534.8,422.4 L535.0,422.4 L535.3,422.4 L535.5,422.4 L535.8,422.4 L536.0,422.4 L536.3,422.4 L536.5,422.4 
+		L536.8,422.4 L537.0,422.4 L537.3,422.4 L537.5,422.4 L537.8,422.4 L538.0,422.4 L538.3,422.4 L538.5,422.4 
+		L538.8,422.4 L539.0,422.4 L539.3,422.4 L539.5,422.4 L539.8,422.4 L540.0,422.4 L540.3,422.4 L540.5,422.4 
+		L540.8,422.4 L541.0,422.4 L541.3,422.4 L541.5,422.4 L541.8,422.4 L542.0,422.4 L542.3,422.4 L542.6,422.4 
+		L542.8,422.4 L543.1,422.4 L543.3,422.4 L543.6,422.4 L543.8,422.4 L544.1,422.4 L544.3,422.4 L544.6,422.4 
+		L544.8,422.4 L545.1,422.4 L545.3,422.4 L545.6,422.4 L545.8,422.4 L546.1,422.4 L546.3,422.4 L546.6,422.4 
+		L546.8,422.4 L547.1,422.4 L547.3,422.4 L547.6,422.4 L547.8,422.4 L548.1,422.4 L548.3,422.4 L548.6,422.4 
+		L548.8,422.4 L549.1,422.4 L549.3,422.4 L549.6,422.4 L549.8,422.4 L550.1,422.4 L550.3,422.4 L550.6,422.4 
+		L550.9,422.4 L551.1,422.4 L551.4,422.4 L551.6,422.4 L551.9,422.4 L552.1,422.4 L552.4,422.4 L552.6,422.4 
+		L552.9,422.4 L553.1,422.4 L553.4,422.4 L553.6,422.4 L553.9,422.4 L554.1,422.4 L554.4,422.4 L554.6,422.4 
+		L554.9,422.4 L555.1,422.4 L555.4,422.4 L555.6,422.4 L555.9,422.4 L556.1,422.4 L556.4,422.4 L556.6,422.4 
+		L556.9,422.4 L557.1,422.4 L557.4,422.4 L557.6,422.4 L557.9,422.4 L558.1,422.4 L558.4,422.4 L558.6,422.4 
+		L558.9,422.4 L559.2,422.4 L559.4,422.4 L559.7,422.4 L559.9,422.4 L560.2,422.4 L560.4,422.4 L560.7,422.4 
+		L560.9,422.4 L561.2,422.4 L561.4,422.4 L561.7,422.4 L561.9,422.4 L562.2,422.4 L562.4,422.4 L562.7,422.4 
+		L562.9,422.4 L563.2,422.4 L563.4,422.4 L563.7,422.4 L563.9,422.4 L564.2,422.4 L564.4,422.4 L564.7,422.4 
+		L564.9,422.4 L565.2,422.4 L565.4,422.4 L565.7,422.4 L565.9,422.4 L566.2,422.4 L566.4,422.4 L566.7,422.4 
+		L567.0,422.4 L567.2,422.4 L567.5,422.4 L567.7,422.4 L568.0,422.4 L568.2,422.4 L568.5,422.4 L568.7,422.4 
+		L569.0,422.4 L569.2,422.4 L569.5,422.4 L569.7,422.4 L570.0,422.4 L570.2,422.4 L570.5,422.4 L570.7,422.4 
+		L571.0,422.4 L571.2,422.4 L571.5,422.4 L571.7,422.4 L572.0,422.4 L572.2,422.4 L572.5,422.4 L572.7,422.4 
+		L573.0,422.4 L573.2,422.4 L573.5,422.4 L573.7,422.4 L574.0,422.4 L574.2,422.4 L574.5,422.4 L574.7,422.4 
+		'></path>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/gamma_1.0_2.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/gamma_1.0_2.0.dat
new file mode 100644
index 0000000..bd11a13
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/gamma_1.0_2.0.dat
@@ -0,0 +1,2012 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.500000
+0.010000	0.497506
+0.020000	0.495025
+0.030000	0.492556
+0.040000	0.490099
+0.050000	0.487655
+0.060000	0.485223
+0.070000	0.482803
+0.080000	0.480395
+0.090000	0.477999
+0.100000	0.475615
+0.110000	0.473243
+0.120000	0.470882
+0.130000	0.468534
+0.140000	0.466197
+0.150000	0.463872
+0.160000	0.461558
+0.170000	0.459256
+0.180000	0.456966
+0.190000	0.454686
+0.200000	0.452419
+0.210000	0.450162
+0.220000	0.447917
+0.230000	0.445683
+0.240000	0.443460
+0.250000	0.441248
+0.260000	0.439048
+0.270000	0.436858
+0.280000	0.434679
+0.290000	0.432511
+0.300000	0.430354
+0.310000	0.428208
+0.320000	0.426072
+0.330000	0.423947
+0.340000	0.421832
+0.350000	0.419729
+0.360000	0.417635
+0.370000	0.415552
+0.380000	0.413480
+0.390000	0.411417
+0.400000	0.409365
+0.410000	0.407324
+0.420000	0.405292
+0.430000	0.403271
+0.440000	0.401259
+0.450000	0.399258
+0.460000	0.397267
+0.470000	0.395285
+0.480000	0.393314
+0.490000	0.391352
+0.500000	0.389400
+0.510000	0.387458
+0.520000	0.385526
+0.530000	0.383603
+0.540000	0.381690
+0.550000	0.379786
+0.560000	0.377892
+0.570000	0.376007
+0.580000	0.374132
+0.590000	0.372266
+0.600000	0.370409
+0.610000	0.368562
+0.620000	0.366723
+0.630000	0.364894
+0.640000	0.363075
+0.650000	0.361264
+0.660000	0.359462
+0.670000	0.357669
+0.680000	0.355885
+0.690000	0.354110
+0.700000	0.352344
+0.710000	0.350587
+0.720000	0.348838
+0.730000	0.347098
+0.740000	0.345367
+0.750000	0.343645
+0.760000	0.341931
+0.770000	0.340225
+0.780000	0.338528
+0.790000	0.336840
+0.800000	0.335160
+0.810000	0.333488
+0.820000	0.331825
+0.830000	0.330170
+0.840000	0.328523
+0.850000	0.326885
+0.860000	0.325255
+0.870000	0.323632
+0.880000	0.322018
+0.890000	0.320412
+0.900000	0.318814
+0.910000	0.317224
+0.920000	0.315642
+0.930000	0.314068
+0.940000	0.312501
+0.950000	0.310943
+0.960000	0.309392
+0.970000	0.307849
+0.980000	0.306313
+0.990000	0.304785
+1.000000	0.303265
+1.010000	0.301753
+1.020000	0.300248
+1.030000	0.298750
+1.040000	0.297260
+1.050000	0.295778
+1.060000	0.294302
+1.070000	0.292835
+1.080000	0.291374
+1.090000	0.289921
+1.100000	0.288475
+1.110000	0.287036
+1.120000	0.285605
+1.130000	0.284180
+1.140000	0.282763
+1.150000	0.281352
+1.160000	0.279949
+1.170000	0.278553
+1.180000	0.277164
+1.190000	0.275781
+1.200000	0.274406
+1.210000	0.273037
+1.220000	0.271675
+1.230000	0.270320
+1.240000	0.268972
+1.250000	0.267631
+1.260000	0.266296
+1.270000	0.264968
+1.280000	0.263646
+1.290000	0.262331
+1.300000	0.261023
+1.310000	0.259721
+1.320000	0.258426
+1.330000	0.257137
+1.340000	0.255854
+1.350000	0.254578
+1.360000	0.253308
+1.370000	0.252045
+1.380000	0.250788
+1.390000	0.249537
+1.400000	0.248293
+1.410000	0.247054
+1.420000	0.245822
+1.430000	0.244596
+1.440000	0.243376
+1.450000	0.242162
+1.460000	0.240954
+1.470000	0.239753
+1.480000	0.238557
+1.490000	0.237367
+1.500000	0.236183
+1.510000	0.235005
+1.520000	0.233833
+1.530000	0.232667
+1.540000	0.231507
+1.550000	0.230352
+1.560000	0.229203
+1.570000	0.228060
+1.580000	0.226922
+1.590000	0.225791
+1.600000	0.224664
+1.610000	0.223544
+1.620000	0.222429
+1.630000	0.221320
+1.640000	0.220216
+1.650000	0.219117
+1.660000	0.218025
+1.670000	0.216937
+1.680000	0.215855
+1.690000	0.214779
+1.700000	0.213707
+1.710000	0.212642
+1.720000	0.211581
+1.730000	0.210526
+1.740000	0.209476
+1.750000	0.208431
+1.760000	0.207391
+1.770000	0.206357
+1.780000	0.205328
+1.790000	0.204304
+1.800000	0.203285
+1.810000	0.202271
+1.820000	0.201262
+1.830000	0.200258
+1.840000	0.199260
+1.850000	0.198266
+1.860000	0.197277
+1.870000	0.196293
+1.880000	0.195314
+1.890000	0.194340
+1.900000	0.193371
+1.910000	0.192406
+1.920000	0.191446
+1.930000	0.190492
+1.940000	0.189542
+1.950000	0.188596
+1.960000	0.187656
+1.970000	0.186720
+1.980000	0.185788
+1.990000	0.184862
+2.000000	0.183940
+2.010000	0.183022
+2.020000	0.182109
+2.030000	0.181201
+2.040000	0.180297
+2.050000	0.179398
+2.060000	0.178503
+2.070000	0.177613
+2.080000	0.176727
+2.090000	0.175846
+2.100000	0.174969
+2.110000	0.174096
+2.120000	0.173228
+2.130000	0.172364
+2.140000	0.171504
+2.150000	0.170649
+2.160000	0.169798
+2.170000	0.168951
+2.180000	0.168108
+2.190000	0.167270
+2.200000	0.166436
+2.210000	0.165605
+2.220000	0.164779
+2.230000	0.163958
+2.240000	0.163140
+2.250000	0.162326
+2.260000	0.161517
+2.270000	0.160711
+2.280000	0.159910
+2.290000	0.159112
+2.300000	0.158318
+2.310000	0.157529
+2.320000	0.156743
+2.330000	0.155961
+2.340000	0.155183
+2.350000	0.154409
+2.360000	0.153639
+2.370000	0.152873
+2.380000	0.152111
+2.390000	0.151352
+2.400000	0.150597
+2.410000	0.149846
+2.420000	0.149099
+2.430000	0.148355
+2.440000	0.147615
+2.450000	0.146879
+2.460000	0.146146
+2.470000	0.145417
+2.480000	0.144692
+2.490000	0.143970
+2.500000	0.143252
+2.510000	0.142538
+2.520000	0.141827
+2.530000	0.141120
+2.540000	0.140416
+2.550000	0.139715
+2.560000	0.139019
+2.570000	0.138325
+2.580000	0.137635
+2.590000	0.136949
+2.600000	0.136266
+2.610000	0.135586
+2.620000	0.134910
+2.630000	0.134237
+2.640000	0.133568
+2.650000	0.132901
+2.660000	0.132239
+2.670000	0.131579
+2.680000	0.130923
+2.690000	0.130270
+2.700000	0.129620
+2.710000	0.128974
+2.720000	0.128330
+2.730000	0.127690
+2.740000	0.127053
+2.750000	0.126420
+2.760000	0.125789
+2.770000	0.125162
+2.780000	0.124538
+2.790000	0.123917
+2.800000	0.123298
+2.810000	0.122684
+2.820000	0.122072
+2.830000	0.121463
+2.840000	0.120857
+2.850000	0.120254
+2.860000	0.119654
+2.870000	0.119058
+2.880000	0.118464
+2.890000	0.117873
+2.900000	0.117285
+2.910000	0.116700
+2.920000	0.116118
+2.930000	0.115539
+2.940000	0.114963
+2.950000	0.114389
+2.960000	0.113819
+2.970000	0.113251
+2.980000	0.112686
+2.990000	0.112124
+3.000000	0.111565
+3.010000	0.111009
+3.020000	0.110455
+3.030000	0.109904
+3.040000	0.109356
+3.050000	0.108811
+3.060000	0.108268
+3.070000	0.107728
+3.080000	0.107191
+3.090000	0.106656
+3.100000	0.106124
+3.110000	0.105595
+3.120000	0.105068
+3.130000	0.104544
+3.140000	0.104023
+3.150000	0.103504
+3.160000	0.102988
+3.170000	0.102474
+3.180000	0.101963
+3.190000	0.101454
+3.200000	0.100948
+3.210000	0.100445
+3.220000	0.099944
+3.230000	0.099445
+3.240000	0.098949
+3.250000	0.098456
+3.260000	0.097965
+3.270000	0.097476
+3.280000	0.096990
+3.290000	0.096506
+3.300000	0.096025
+3.310000	0.095546
+3.320000	0.095069
+3.330000	0.094595
+3.340000	0.094124
+3.350000	0.093654
+3.360000	0.093187
+3.370000	0.092722
+3.380000	0.092260
+3.390000	0.091800
+3.400000	0.091342
+3.410000	0.090886
+3.420000	0.090433
+3.430000	0.089982
+3.440000	0.089533
+3.450000	0.089087
+3.460000	0.088642
+3.470000	0.088200
+3.480000	0.087760
+3.490000	0.087322
+3.500000	0.086887
+3.510000	0.086454
+3.520000	0.086022
+3.530000	0.085593
+3.540000	0.085166
+3.550000	0.084742
+3.560000	0.084319
+3.570000	0.083899
+3.580000	0.083480
+3.590000	0.083064
+3.600000	0.082649
+3.610000	0.082237
+3.620000	0.081827
+3.630000	0.081419
+3.640000	0.081013
+3.650000	0.080609
+3.660000	0.080207
+3.670000	0.079807
+3.680000	0.079409
+3.690000	0.079013
+3.700000	0.078619
+3.710000	0.078226
+3.720000	0.077836
+3.730000	0.077448
+3.740000	0.077062
+3.750000	0.076677
+3.760000	0.076295
+3.770000	0.075915
+3.780000	0.075536
+3.790000	0.075159
+3.800000	0.074784
+3.810000	0.074411
+3.820000	0.074040
+3.830000	0.073671
+3.840000	0.073303
+3.850000	0.072938
+3.860000	0.072574
+3.870000	0.072212
+3.880000	0.071852
+3.890000	0.071494
+3.900000	0.071137
+3.910000	0.070782
+3.920000	0.070429
+3.930000	0.070078
+3.940000	0.069728
+3.950000	0.069381
+3.960000	0.069035
+3.970000	0.068690
+3.980000	0.068348
+3.990000	0.068007
+4.000000	0.067668
+4.010000	0.067330
+4.020000	0.066994
+4.030000	0.066660
+4.040000	0.066328
+4.050000	0.065997
+4.060000	0.065668
+4.070000	0.065340
+4.080000	0.065014
+4.090000	0.064690
+4.100000	0.064367
+4.110000	0.064046
+4.120000	0.063727
+4.130000	0.063409
+4.140000	0.063093
+4.150000	0.062778
+4.160000	0.062465
+4.170000	0.062154
+4.180000	0.061844
+4.190000	0.061535
+4.200000	0.061228
+4.210000	0.060923
+4.220000	0.060619
+4.230000	0.060317
+4.240000	0.060016
+4.250000	0.059716
+4.260000	0.059419
+4.270000	0.059122
+4.280000	0.058827
+4.290000	0.058534
+4.300000	0.058242
+4.310000	0.057952
+4.320000	0.057663
+4.330000	0.057375
+4.340000	0.057089
+4.350000	0.056804
+4.360000	0.056521
+4.370000	0.056239
+4.380000	0.055958
+4.390000	0.055679
+4.400000	0.055402
+4.410000	0.055125
+4.420000	0.054850
+4.430000	0.054577
+4.440000	0.054305
+4.450000	0.054034
+4.460000	0.053764
+4.470000	0.053496
+4.480000	0.053229
+4.490000	0.052964
+4.500000	0.052700
+4.510000	0.052437
+4.520000	0.052175
+4.530000	0.051915
+4.540000	0.051656
+4.550000	0.051398
+4.560000	0.051142
+4.570000	0.050887
+4.580000	0.050633
+4.590000	0.050381
+4.600000	0.050129
+4.610000	0.049879
+4.620000	0.049631
+4.630000	0.049383
+4.640000	0.049137
+4.650000	0.048892
+4.660000	0.048648
+4.670000	0.048405
+4.680000	0.048164
+4.690000	0.047924
+4.700000	0.047685
+4.710000	0.047447
+4.720000	0.047210
+4.730000	0.046975
+4.740000	0.046740
+4.750000	0.046507
+4.760000	0.046275
+4.770000	0.046044
+4.780000	0.045815
+4.790000	0.045586
+4.800000	0.045359
+4.810000	0.045133
+4.820000	0.044908
+4.830000	0.044684
+4.840000	0.044461
+4.850000	0.044239
+4.860000	0.044018
+4.870000	0.043799
+4.880000	0.043580
+4.890000	0.043363
+4.900000	0.043147
+4.910000	0.042932
+4.920000	0.042717
+4.930000	0.042504
+4.940000	0.042292
+4.950000	0.042081
+4.960000	0.041872
+4.970000	0.041663
+4.980000	0.041455
+4.990000	0.041248
+5.000000	0.041042
+5.010000	0.040838
+5.020000	0.040634
+5.030000	0.040431
+5.040000	0.040230
+5.050000	0.040029
+5.060000	0.039830
+5.070000	0.039631
+5.080000	0.039433
+5.090000	0.039237
+5.100000	0.039041
+5.110000	0.038846
+5.120000	0.038652
+5.130000	0.038460
+5.140000	0.038268
+5.150000	0.038077
+5.160000	0.037887
+5.170000	0.037698
+5.180000	0.037510
+5.190000	0.037323
+5.200000	0.037137
+5.210000	0.036952
+5.220000	0.036767
+5.230000	0.036584
+5.240000	0.036401
+5.250000	0.036220
+5.260000	0.036039
+5.270000	0.035859
+5.280000	0.035681
+5.290000	0.035503
+5.300000	0.035326
+5.310000	0.035149
+5.320000	0.034974
+5.330000	0.034800
+5.340000	0.034626
+5.350000	0.034453
+5.360000	0.034282
+5.370000	0.034111
+5.380000	0.033940
+5.390000	0.033771
+5.400000	0.033603
+5.410000	0.033435
+5.420000	0.033268
+5.430000	0.033102
+5.440000	0.032937
+5.450000	0.032773
+5.460000	0.032610
+5.470000	0.032447
+5.480000	0.032285
+5.490000	0.032124
+5.500000	0.031964
+5.510000	0.031805
+5.520000	0.031646
+5.530000	0.031488
+5.540000	0.031331
+5.550000	0.031175
+5.560000	0.031019
+5.570000	0.030865
+5.580000	0.030711
+5.590000	0.030557
+5.600000	0.030405
+5.610000	0.030253
+5.620000	0.030102
+5.630000	0.029952
+5.640000	0.029803
+5.650000	0.029654
+5.660000	0.029506
+5.670000	0.029359
+5.680000	0.029213
+5.690000	0.029067
+5.700000	0.028922
+5.710000	0.028778
+5.720000	0.028634
+5.730000	0.028492
+5.740000	0.028349
+5.750000	0.028208
+5.760000	0.028067
+5.770000	0.027927
+5.780000	0.027788
+5.790000	0.027650
+5.800000	0.027512
+5.810000	0.027374
+5.820000	0.027238
+5.830000	0.027102
+5.840000	0.026967
+5.850000	0.026832
+5.860000	0.026699
+5.870000	0.026565
+5.880000	0.026433
+5.890000	0.026301
+5.900000	0.026170
+5.910000	0.026039
+5.920000	0.025909
+5.930000	0.025780
+5.940000	0.025652
+5.950000	0.025524
+5.960000	0.025396
+5.970000	0.025270
+5.980000	0.025144
+5.990000	0.025018
+6.000000	0.024894
+6.010000	0.024769
+6.020000	0.024646
+6.030000	0.024523
+6.040000	0.024401
+6.050000	0.024279
+6.060000	0.024158
+6.070000	0.024037
+6.080000	0.023917
+6.090000	0.023798
+6.100000	0.023679
+6.110000	0.023561
+6.120000	0.023444
+6.130000	0.023327
+6.140000	0.023211
+6.150000	0.023095
+6.160000	0.022980
+6.170000	0.022865
+6.180000	0.022751
+6.190000	0.022638
+6.200000	0.022525
+6.210000	0.022412
+6.220000	0.022300
+6.230000	0.022189
+6.240000	0.022079
+6.250000	0.021968
+6.260000	0.021859
+6.270000	0.021750
+6.280000	0.021641
+6.290000	0.021533
+6.300000	0.021426
+6.310000	0.021319
+6.320000	0.021213
+6.330000	0.021107
+6.340000	0.021002
+6.350000	0.020897
+6.360000	0.020793
+6.370000	0.020689
+6.380000	0.020586
+6.390000	0.020483
+6.400000	0.020381
+6.410000	0.020279
+6.420000	0.020178
+6.430000	0.020078
+6.440000	0.019978
+6.450000	0.019878
+6.460000	0.019779
+6.470000	0.019680
+6.480000	0.019582
+6.490000	0.019484
+6.500000	0.019387
+6.510000	0.019290
+6.520000	0.019194
+6.530000	0.019098
+6.540000	0.019003
+6.550000	0.018908
+6.560000	0.018814
+6.570000	0.018720
+6.580000	0.018627
+6.590000	0.018534
+6.600000	0.018442
+6.610000	0.018350
+6.620000	0.018258
+6.630000	0.018167
+6.640000	0.018076
+6.650000	0.017986
+6.660000	0.017897
+6.670000	0.017807
+6.680000	0.017718
+6.690000	0.017630
+6.700000	0.017542
+6.710000	0.017455
+6.720000	0.017368
+6.730000	0.017281
+6.740000	0.017195
+6.750000	0.017109
+6.760000	0.017024
+6.770000	0.016939
+6.780000	0.016854
+6.790000	0.016770
+6.800000	0.016687
+6.810000	0.016603
+6.820000	0.016521
+6.830000	0.016438
+6.840000	0.016356
+6.850000	0.016275
+6.860000	0.016193
+6.870000	0.016113
+6.880000	0.016032
+6.890000	0.015952
+6.900000	0.015873
+6.910000	0.015794
+6.920000	0.015715
+6.930000	0.015637
+6.940000	0.015559
+6.950000	0.015481
+6.960000	0.015404
+6.970000	0.015327
+6.980000	0.015250
+6.990000	0.015174
+7.000000	0.015099
+7.010000	0.015023
+7.020000	0.014948
+7.030000	0.014874
+7.040000	0.014800
+7.050000	0.014726
+7.060000	0.014652
+7.070000	0.014579
+7.080000	0.014507
+7.090000	0.014434
+7.100000	0.014362
+7.110000	0.014291
+7.120000	0.014219
+7.130000	0.014148
+7.140000	0.014078
+7.150000	0.014008
+7.160000	0.013938
+7.170000	0.013868
+7.180000	0.013799
+7.190000	0.013730
+7.200000	0.013662
+7.210000	0.013594
+7.220000	0.013526
+7.230000	0.013458
+7.240000	0.013391
+7.250000	0.013325
+7.260000	0.013258
+7.270000	0.013192
+7.280000	0.013126
+7.290000	0.013061
+7.300000	0.012996
+7.310000	0.012931
+7.320000	0.012866
+7.330000	0.012802
+7.340000	0.012738
+7.350000	0.012675
+7.360000	0.012611
+7.370000	0.012549
+7.380000	0.012486
+7.390000	0.012424
+7.400000	0.012362
+7.410000	0.012300
+7.420000	0.012239
+7.430000	0.012178
+7.440000	0.012117
+7.450000	0.012057
+7.460000	0.011996
+7.470000	0.011937
+7.480000	0.011877
+7.490000	0.011818
+7.500000	0.011759
+7.510000	0.011700
+7.520000	0.011642
+7.530000	0.011584
+7.540000	0.011526
+7.550000	0.011469
+7.560000	0.011411
+7.570000	0.011354
+7.580000	0.011298
+7.590000	0.011241
+7.600000	0.011185
+7.610000	0.011130
+7.620000	0.011074
+7.630000	0.011019
+7.640000	0.010964
+7.650000	0.010909
+7.660000	0.010855
+7.670000	0.010801
+7.680000	0.010747
+7.690000	0.010693
+7.700000	0.010640
+7.710000	0.010587
+7.720000	0.010534
+7.730000	0.010481
+7.740000	0.010429
+7.750000	0.010377
+7.760000	0.010325
+7.770000	0.010274
+7.780000	0.010223
+7.790000	0.010172
+7.800000	0.010121
+7.810000	0.010070
+7.820000	0.010020
+7.830000	0.009970
+7.840000	0.009921
+7.850000	0.009871
+7.860000	0.009822
+7.870000	0.009773
+7.880000	0.009724
+7.890000	0.009676
+7.900000	0.009627
+7.910000	0.009579
+7.920000	0.009532
+7.930000	0.009484
+7.940000	0.009437
+7.950000	0.009390
+7.960000	0.009343
+7.970000	0.009296
+7.980000	0.009250
+7.990000	0.009204
+8.000000	0.009158
+8.010000	0.009112
+8.020000	0.009067
+8.030000	0.009021
+8.040000	0.008976
+8.050000	0.008932
+8.060000	0.008887
+8.070000	0.008843
+8.080000	0.008799
+8.090000	0.008755
+8.100000	0.008711
+8.110000	0.008668
+8.120000	0.008625
+8.130000	0.008581
+8.140000	0.008539
+8.150000	0.008496
+8.160000	0.008454
+8.170000	0.008412
+8.180000	0.008370
+8.190000	0.008328
+8.200000	0.008286
+8.210000	0.008245
+8.220000	0.008204
+8.230000	0.008163
+8.240000	0.008122
+8.250000	0.008082
+8.260000	0.008041
+8.270000	0.008001
+8.280000	0.007961
+8.290000	0.007922
+8.300000	0.007882
+8.310000	0.007843
+8.320000	0.007804
+8.330000	0.007765
+8.340000	0.007726
+8.350000	0.007688
+8.360000	0.007649
+8.370000	0.007611
+8.380000	0.007573
+8.390000	0.007535
+8.400000	0.007498
+8.410000	0.007460
+8.420000	0.007423
+8.430000	0.007386
+8.440000	0.007349
+8.450000	0.007313
+8.460000	0.007276
+8.470000	0.007240
+8.480000	0.007204
+8.490000	0.007168
+8.500000	0.007132
+8.510000	0.007097
+8.520000	0.007061
+8.530000	0.007026
+8.540000	0.006991
+8.550000	0.006956
+8.560000	0.006921
+8.570000	0.006887
+8.580000	0.006852
+8.590000	0.006818
+8.600000	0.006784
+8.610000	0.006750
+8.620000	0.006717
+8.630000	0.006683
+8.640000	0.006650
+8.650000	0.006617
+8.660000	0.006584
+8.670000	0.006551
+8.680000	0.006518
+8.690000	0.006486
+8.700000	0.006453
+8.710000	0.006421
+8.720000	0.006389
+8.730000	0.006357
+8.740000	0.006326
+8.750000	0.006294
+8.760000	0.006263
+8.770000	0.006231
+8.780000	0.006200
+8.790000	0.006169
+8.800000	0.006139
+8.810000	0.006108
+8.820000	0.006078
+8.830000	0.006047
+8.840000	0.006017
+8.850000	0.005987
+8.860000	0.005957
+8.870000	0.005928
+8.880000	0.005898
+8.890000	0.005869
+8.900000	0.005839
+8.910000	0.005810
+8.920000	0.005781
+8.930000	0.005752
+8.940000	0.005724
+8.950000	0.005695
+8.960000	0.005667
+8.970000	0.005638
+8.980000	0.005610
+8.990000	0.005582
+9.000000	0.005554
+9.010000	0.005527
+9.020000	0.005499
+9.030000	0.005472
+9.040000	0.005445
+9.050000	0.005417
+9.060000	0.005390
+9.070000	0.005363
+9.080000	0.005337
+9.090000	0.005310
+9.100000	0.005284
+9.110000	0.005257
+9.120000	0.005231
+9.130000	0.005205
+9.140000	0.005179
+9.150000	0.005153
+9.160000	0.005127
+9.170000	0.005102
+9.180000	0.005076
+9.190000	0.005051
+9.200000	0.005026
+9.210000	0.005001
+9.220000	0.004976
+9.230000	0.004951
+9.240000	0.004926
+9.250000	0.004902
+9.260000	0.004877
+9.270000	0.004853
+9.280000	0.004829
+9.290000	0.004805
+9.300000	0.004781
+9.310000	0.004757
+9.320000	0.004733
+9.330000	0.004710
+9.340000	0.004686
+9.350000	0.004663
+9.360000	0.004640
+9.370000	0.004616
+9.380000	0.004593
+9.390000	0.004570
+9.400000	0.004548
+9.410000	0.004525
+9.420000	0.004502
+9.430000	0.004480
+9.440000	0.004458
+9.450000	0.004435
+9.460000	0.004413
+9.470000	0.004391
+9.480000	0.004369
+9.490000	0.004348
+9.500000	0.004326
+9.510000	0.004304
+9.520000	0.004283
+9.530000	0.004261
+9.540000	0.004240
+9.550000	0.004219
+9.560000	0.004198
+9.570000	0.004177
+9.580000	0.004156
+9.590000	0.004135
+9.600000	0.004115
+9.610000	0.004094
+9.620000	0.004074
+9.630000	0.004054
+9.640000	0.004033
+9.650000	0.004013
+9.660000	0.003993
+9.670000	0.003973
+9.680000	0.003954
+9.690000	0.003934
+9.700000	0.003914
+9.710000	0.003895
+9.720000	0.003875
+9.730000	0.003856
+9.740000	0.003837
+9.750000	0.003818
+9.760000	0.003799
+9.770000	0.003780
+9.780000	0.003761
+9.790000	0.003742
+9.800000	0.003723
+9.810000	0.003705
+9.820000	0.003686
+9.830000	0.003668
+9.840000	0.003650
+9.850000	0.003631
+9.860000	0.003613
+9.870000	0.003595
+9.880000	0.003577
+9.890000	0.003559
+9.900000	0.003542
+9.910000	0.003524
+9.920000	0.003506
+9.930000	0.003489
+9.940000	0.003472
+9.950000	0.003454
+9.960000	0.003437
+9.970000	0.003420
+9.980000	0.003403
+9.990000	0.003386
+10.000000	0.003369
+10.010000	0.003352
+10.020000	0.003335
+10.030000	0.003319
+10.040000	0.003302
+10.050000	0.003286
+10.060000	0.003269
+10.070000	0.003253
+10.080000	0.003237
+10.090000	0.003221
+10.100000	0.003205
+10.110000	0.003189
+10.120000	0.003173
+10.130000	0.003157
+10.140000	0.003141
+10.150000	0.003126
+10.160000	0.003110
+10.170000	0.003094
+10.180000	0.003079
+10.190000	0.003064
+10.200000	0.003048
+10.210000	0.003033
+10.220000	0.003018
+10.230000	0.003003
+10.240000	0.002988
+10.250000	0.002973
+10.260000	0.002958
+10.270000	0.002944
+10.280000	0.002929
+10.290000	0.002914
+10.300000	0.002900
+10.310000	0.002885
+10.320000	0.002871
+10.330000	0.002857
+10.340000	0.002842
+10.350000	0.002828
+10.360000	0.002814
+10.370000	0.002800
+10.380000	0.002786
+10.390000	0.002772
+10.400000	0.002758
+10.410000	0.002745
+10.420000	0.002731
+10.430000	0.002717
+10.440000	0.002704
+10.450000	0.002690
+10.460000	0.002677
+10.470000	0.002663
+10.480000	0.002650
+10.490000	0.002637
+10.500000	0.002624
+10.510000	0.002611
+10.520000	0.002598
+10.530000	0.002585
+10.540000	0.002572
+10.550000	0.002559
+10.560000	0.002546
+10.570000	0.002534
+10.580000	0.002521
+10.590000	0.002508
+10.600000	0.002496
+10.610000	0.002483
+10.620000	0.002471
+10.630000	0.002459
+10.640000	0.002446
+10.650000	0.002434
+10.660000	0.002422
+10.670000	0.002410
+10.680000	0.002398
+10.690000	0.002386
+10.700000	0.002374
+10.710000	0.002362
+10.720000	0.002350
+10.730000	0.002339
+10.740000	0.002327
+10.750000	0.002315
+10.760000	0.002304
+10.770000	0.002292
+10.780000	0.002281
+10.790000	0.002270
+10.800000	0.002258
+10.810000	0.002247
+10.820000	0.002236
+10.830000	0.002225
+10.840000	0.002214
+10.850000	0.002203
+10.860000	0.002192
+10.870000	0.002181
+10.880000	0.002170
+10.890000	0.002159
+10.900000	0.002148
+10.910000	0.002137
+10.920000	0.002127
+10.930000	0.002116
+10.940000	0.002106
+10.950000	0.002095
+10.960000	0.002085
+10.970000	0.002074
+10.980000	0.002064
+10.990000	0.002054
+11.000000	0.002043
+11.010000	0.002033
+11.020000	0.002023
+11.030000	0.002013
+11.040000	0.002003
+11.050000	0.001993
+11.060000	0.001983
+11.070000	0.001973
+11.080000	0.001963
+11.090000	0.001953
+11.100000	0.001944
+11.110000	0.001934
+11.120000	0.001924
+11.130000	0.001915
+11.140000	0.001905
+11.150000	0.001896
+11.160000	0.001886
+11.170000	0.001877
+11.180000	0.001868
+11.190000	0.001858
+11.200000	0.001849
+11.210000	0.001840
+11.220000	0.001831
+11.230000	0.001821
+11.240000	0.001812
+11.250000	0.001803
+11.260000	0.001794
+11.270000	0.001785
+11.280000	0.001776
+11.290000	0.001768
+11.300000	0.001759
+11.310000	0.001750
+11.320000	0.001741
+11.330000	0.001733
+11.340000	0.001724
+11.350000	0.001715
+11.360000	0.001707
+11.370000	0.001698
+11.380000	0.001690
+11.390000	0.001681
+11.400000	0.001673
+11.410000	0.001665
+11.420000	0.001656
+11.430000	0.001648
+11.440000	0.001640
+11.450000	0.001632
+11.460000	0.001624
+11.470000	0.001615
+11.480000	0.001607
+11.490000	0.001599
+11.500000	0.001591
+11.510000	0.001583
+11.520000	0.001576
+11.530000	0.001568
+11.540000	0.001560
+11.550000	0.001552
+11.560000	0.001544
+11.570000	0.001537
+11.580000	0.001529
+11.590000	0.001521
+11.600000	0.001514
+11.610000	0.001506
+11.620000	0.001499
+11.630000	0.001491
+11.640000	0.001484
+11.650000	0.001476
+11.660000	0.001469
+11.670000	0.001462
+11.680000	0.001454
+11.690000	0.001447
+11.700000	0.001440
+11.710000	0.001433
+11.720000	0.001426
+11.730000	0.001419
+11.740000	0.001411
+11.750000	0.001404
+11.760000	0.001397
+11.770000	0.001390
+11.780000	0.001383
+11.790000	0.001377
+11.800000	0.001370
+11.810000	0.001363
+11.820000	0.001356
+11.830000	0.001349
+11.840000	0.001343
+11.850000	0.001336
+11.860000	0.001329
+11.870000	0.001323
+11.880000	0.001316
+11.890000	0.001309
+11.900000	0.001303
+11.910000	0.001296
+11.920000	0.001290
+11.930000	0.001284
+11.940000	0.001277
+11.950000	0.001271
+11.960000	0.001264
+11.970000	0.001258
+11.980000	0.001252
+11.990000	0.001246
+12.000000	0.001239
+12.010000	0.001233
+12.020000	0.001227
+12.030000	0.001221
+12.040000	0.001215
+12.050000	0.001209
+12.060000	0.001203
+12.070000	0.001197
+12.080000	0.001191
+12.090000	0.001185
+12.100000	0.001179
+12.110000	0.001173
+12.120000	0.001167
+12.130000	0.001161
+12.140000	0.001156
+12.150000	0.001150
+12.160000	0.001144
+12.170000	0.001138
+12.180000	0.001133
+12.190000	0.001127
+12.200000	0.001121
+12.210000	0.001116
+12.220000	0.001110
+12.230000	0.001105
+12.240000	0.001099
+12.250000	0.001094
+12.260000	0.001088
+12.270000	0.001083
+12.280000	0.001077
+12.290000	0.001072
+12.300000	0.001067
+12.310000	0.001061
+12.320000	0.001056
+12.330000	0.001051
+12.340000	0.001046
+12.350000	0.001040
+12.360000	0.001035
+12.370000	0.001030
+12.380000	0.001025
+12.390000	0.001020
+12.400000	0.001015
+12.410000	0.001010
+12.420000	0.001005
+12.430000	0.001000
+12.440000	0.000995
+12.450000	0.000990
+12.460000	0.000985
+12.470000	0.000980
+12.480000	0.000975
+12.490000	0.000970
+12.500000	0.000965
+12.510000	0.000960
+12.520000	0.000956
+12.530000	0.000951
+12.540000	0.000946
+12.550000	0.000941
+12.560000	0.000937
+12.570000	0.000932
+12.580000	0.000927
+12.590000	0.000923
+12.600000	0.000918
+12.610000	0.000914
+12.620000	0.000909
+12.630000	0.000904
+12.640000	0.000900
+12.650000	0.000895
+12.660000	0.000891
+12.670000	0.000887
+12.680000	0.000882
+12.690000	0.000878
+12.700000	0.000873
+12.710000	0.000869
+12.720000	0.000865
+12.730000	0.000860
+12.740000	0.000856
+12.750000	0.000852
+12.760000	0.000848
+12.770000	0.000843
+12.780000	0.000839
+12.790000	0.000835
+12.800000	0.000831
+12.810000	0.000827
+12.820000	0.000823
+12.830000	0.000818
+12.840000	0.000814
+12.850000	0.000810
+12.860000	0.000806
+12.870000	0.000802
+12.880000	0.000798
+12.890000	0.000794
+12.900000	0.000790
+12.910000	0.000786
+12.920000	0.000782
+12.930000	0.000778
+12.940000	0.000775
+12.950000	0.000771
+12.960000	0.000767
+12.970000	0.000763
+12.980000	0.000759
+12.990000	0.000755
+13.000000	0.000752
+13.010000	0.000748
+13.020000	0.000744
+13.030000	0.000741
+13.040000	0.000737
+13.050000	0.000733
+13.060000	0.000730
+13.070000	0.000726
+13.080000	0.000722
+13.090000	0.000719
+13.100000	0.000715
+13.110000	0.000711
+13.120000	0.000708
+13.130000	0.000704
+13.140000	0.000701
+13.150000	0.000697
+13.160000	0.000694
+13.170000	0.000690
+13.180000	0.000687
+13.190000	0.000684
+13.200000	0.000680
+13.210000	0.000677
+13.220000	0.000673
+13.230000	0.000670
+13.240000	0.000667
+13.250000	0.000663
+13.260000	0.000660
+13.270000	0.000657
+13.280000	0.000654
+13.290000	0.000650
+13.300000	0.000647
+13.310000	0.000644
+13.320000	0.000641
+13.330000	0.000637
+13.340000	0.000634
+13.350000	0.000631
+13.360000	0.000628
+13.370000	0.000625
+13.380000	0.000622
+13.390000	0.000619
+13.400000	0.000615
+13.410000	0.000612
+13.420000	0.000609
+13.430000	0.000606
+13.440000	0.000603
+13.450000	0.000600
+13.460000	0.000597
+13.470000	0.000594
+13.480000	0.000591
+13.490000	0.000588
+13.500000	0.000585
+13.510000	0.000583
+13.520000	0.000580
+13.530000	0.000577
+13.540000	0.000574
+13.550000	0.000571
+13.560000	0.000568
+13.570000	0.000565
+13.580000	0.000562
+13.590000	0.000560
+13.600000	0.000557
+13.610000	0.000554
+13.620000	0.000551
+13.630000	0.000549
+13.640000	0.000546
+13.650000	0.000543
+13.660000	0.000540
+13.670000	0.000538
+13.680000	0.000535
+13.690000	0.000532
+13.700000	0.000530
+13.710000	0.000527
+13.720000	0.000524
+13.730000	0.000522
+13.740000	0.000519
+13.750000	0.000517
+13.760000	0.000514
+13.770000	0.000512
+13.780000	0.000509
+13.790000	0.000506
+13.800000	0.000504
+13.810000	0.000501
+13.820000	0.000499
+13.830000	0.000496
+13.840000	0.000494
+13.850000	0.000491
+13.860000	0.000489
+13.870000	0.000487
+13.880000	0.000484
+13.890000	0.000482
+13.900000	0.000479
+13.910000	0.000477
+13.920000	0.000475
+13.930000	0.000472
+13.940000	0.000470
+13.950000	0.000467
+13.960000	0.000465
+13.970000	0.000463
+13.980000	0.000461
+13.990000	0.000458
+14.000000	0.000456
+14.010000	0.000454
+14.020000	0.000451
+14.030000	0.000449
+14.040000	0.000447
+14.050000	0.000445
+14.060000	0.000442
+14.070000	0.000440
+14.080000	0.000438
+14.090000	0.000436
+14.100000	0.000434
+14.110000	0.000432
+14.120000	0.000429
+14.130000	0.000427
+14.140000	0.000425
+14.150000	0.000423
+14.160000	0.000421
+14.170000	0.000419
+14.180000	0.000417
+14.190000	0.000415
+14.200000	0.000413
+14.210000	0.000410
+14.220000	0.000408
+14.230000	0.000406
+14.240000	0.000404
+14.250000	0.000402
+14.260000	0.000400
+14.270000	0.000398
+14.280000	0.000396
+14.290000	0.000394
+14.300000	0.000392
+14.310000	0.000390
+14.320000	0.000389
+14.330000	0.000387
+14.340000	0.000385
+14.350000	0.000383
+14.360000	0.000381
+14.370000	0.000379
+14.380000	0.000377
+14.390000	0.000375
+14.400000	0.000373
+14.410000	0.000371
+14.420000	0.000370
+14.430000	0.000368
+14.440000	0.000366
+14.450000	0.000364
+14.460000	0.000362
+14.470000	0.000360
+14.480000	0.000359
+14.490000	0.000357
+14.500000	0.000355
+14.510000	0.000353
+14.520000	0.000352
+14.530000	0.000350
+14.540000	0.000348
+14.550000	0.000346
+14.560000	0.000345
+14.570000	0.000343
+14.580000	0.000341
+14.590000	0.000339
+14.600000	0.000338
+14.610000	0.000336
+14.620000	0.000334
+14.630000	0.000333
+14.640000	0.000331
+14.650000	0.000329
+14.660000	0.000328
+14.670000	0.000326
+14.680000	0.000325
+14.690000	0.000323
+14.700000	0.000321
+14.710000	0.000320
+14.720000	0.000318
+14.730000	0.000317
+14.740000	0.000315
+14.750000	0.000313
+14.760000	0.000312
+14.770000	0.000310
+14.780000	0.000309
+14.790000	0.000307
+14.800000	0.000306
+14.810000	0.000304
+14.820000	0.000303
+14.830000	0.000301
+14.840000	0.000300
+14.850000	0.000298
+14.860000	0.000297
+14.870000	0.000295
+14.880000	0.000294
+14.890000	0.000292
+14.900000	0.000291
+14.910000	0.000289
+14.920000	0.000288
+14.930000	0.000286
+14.940000	0.000285
+14.950000	0.000284
+14.960000	0.000282
+14.970000	0.000281
+14.980000	0.000279
+14.990000	0.000278
+15.000000	0.000277
+15.010000	0.000275
+15.020000	0.000274
+15.030000	0.000272
+15.040000	0.000271
+15.050000	0.000270
+15.060000	0.000268
+15.070000	0.000267
+15.080000	0.000266
+15.090000	0.000264
+15.100000	0.000263
+15.110000	0.000262
+15.120000	0.000260
+15.130000	0.000259
+15.140000	0.000258
+15.150000	0.000257
+15.160000	0.000255
+15.170000	0.000254
+15.180000	0.000253
+15.190000	0.000251
+15.200000	0.000250
+15.210000	0.000249
+15.220000	0.000248
+15.230000	0.000247
+15.240000	0.000245
+15.250000	0.000244
+15.260000	0.000243
+15.270000	0.000242
+15.280000	0.000240
+15.290000	0.000239
+15.300000	0.000238
+15.310000	0.000237
+15.320000	0.000236
+15.330000	0.000234
+15.340000	0.000233
+15.350000	0.000232
+15.360000	0.000231
+15.370000	0.000230
+15.380000	0.000229
+15.390000	0.000228
+15.400000	0.000226
+15.410000	0.000225
+15.420000	0.000224
+15.430000	0.000223
+15.440000	0.000222
+15.450000	0.000221
+15.460000	0.000220
+15.470000	0.000219
+15.480000	0.000218
+15.490000	0.000216
+15.500000	0.000215
+15.510000	0.000214
+15.520000	0.000213
+15.530000	0.000212
+15.540000	0.000211
+15.550000	0.000210
+15.560000	0.000209
+15.570000	0.000208
+15.580000	0.000207
+15.590000	0.000206
+15.600000	0.000205
+15.610000	0.000204
+15.620000	0.000203
+15.630000	0.000202
+15.640000	0.000201
+15.650000	0.000200
+15.660000	0.000199
+15.670000	0.000198
+15.680000	0.000197
+15.690000	0.000196
+15.700000	0.000195
+15.710000	0.000194
+15.720000	0.000193
+15.730000	0.000192
+15.740000	0.000191
+15.750000	0.000190
+15.760000	0.000189
+15.770000	0.000188
+15.780000	0.000187
+15.790000	0.000186
+15.800000	0.000185
+15.810000	0.000184
+15.820000	0.000184
+15.830000	0.000183
+15.840000	0.000182
+15.850000	0.000181
+15.860000	0.000180
+15.870000	0.000179
+15.880000	0.000178
+15.890000	0.000177
+15.900000	0.000176
+15.910000	0.000175
+15.920000	0.000175
+15.930000	0.000174
+15.940000	0.000173
+15.950000	0.000172
+15.960000	0.000171
+15.970000	0.000170
+15.980000	0.000169
+15.990000	0.000169
+16.000000	0.000168
+16.010000	0.000167
+16.020000	0.000166
+16.030000	0.000165
+16.040000	0.000164
+16.050000	0.000164
+16.060000	0.000163
+16.070000	0.000162
+16.080000	0.000161
+16.090000	0.000160
+16.100000	0.000160
+16.110000	0.000159
+16.120000	0.000158
+16.130000	0.000157
+16.140000	0.000156
+16.150000	0.000156
+16.160000	0.000155
+16.170000	0.000154
+16.180000	0.000153
+16.190000	0.000153
+16.200000	0.000152
+16.210000	0.000151
+16.220000	0.000150
+16.230000	0.000150
+16.240000	0.000149
+16.250000	0.000148
+16.260000	0.000147
+16.270000	0.000147
+16.280000	0.000146
+16.290000	0.000145
+16.300000	0.000144
+16.310000	0.000144
+16.320000	0.000143
+16.330000	0.000142
+16.340000	0.000142
+16.350000	0.000141
+16.360000	0.000140
+16.370000	0.000139
+16.380000	0.000139
+16.390000	0.000138
+16.400000	0.000137
+16.410000	0.000137
+16.420000	0.000136
+16.430000	0.000135
+16.440000	0.000135
+16.450000	0.000134
+16.460000	0.000133
+16.470000	0.000133
+16.480000	0.000132
+16.490000	0.000131
+16.500000	0.000131
+16.510000	0.000130
+16.520000	0.000129
+16.530000	0.000129
+16.540000	0.000128
+16.550000	0.000127
+16.560000	0.000127
+16.570000	0.000126
+16.580000	0.000126
+16.590000	0.000125
+16.600000	0.000124
+16.610000	0.000124
+16.620000	0.000123
+16.630000	0.000122
+16.640000	0.000122
+16.650000	0.000121
+16.660000	0.000121
+16.670000	0.000120
+16.680000	0.000119
+16.690000	0.000119
+16.700000	0.000118
+16.710000	0.000118
+16.720000	0.000117
+16.730000	0.000116
+16.740000	0.000116
+16.750000	0.000115
+16.760000	0.000115
+16.770000	0.000114
+16.780000	0.000114
+16.790000	0.000113
+16.800000	0.000112
+16.810000	0.000112
+16.820000	0.000111
+16.830000	0.000111
+16.840000	0.000110
+16.850000	0.000110
+16.860000	0.000109
+16.870000	0.000109
+16.880000	0.000108
+16.890000	0.000107
+16.900000	0.000107
+16.910000	0.000106
+16.920000	0.000106
+16.930000	0.000105
+16.940000	0.000105
+16.950000	0.000104
+16.960000	0.000104
+16.970000	0.000103
+16.980000	0.000103
+16.990000	0.000102
+17.000000	0.000102
+17.010000	0.000101
+17.020000	0.000101
+17.030000	0.000100
+17.040000	0.000100
+17.050000	0.000099
+17.060000	0.000099
+17.070000	0.000098
+17.080000	0.000098
+17.090000	0.000097
+17.100000	0.000097
+17.110000	0.000096
+17.120000	0.000096
+17.130000	0.000095
+17.140000	0.000095
+17.150000	0.000094
+17.160000	0.000094
+17.170000	0.000093
+17.180000	0.000093
+17.190000	0.000093
+17.200000	0.000092
+17.210000	0.000092
+17.220000	0.000091
+17.230000	0.000091
+17.240000	0.000090
+17.250000	0.000090
+17.260000	0.000089
+17.270000	0.000089
+17.280000	0.000088
+17.290000	0.000088
+17.300000	0.000088
+17.310000	0.000087
+17.320000	0.000087
+17.330000	0.000086
+17.340000	0.000086
+17.350000	0.000085
+17.360000	0.000085
+17.370000	0.000085
+17.380000	0.000084
+17.390000	0.000084
+17.400000	0.000083
+17.410000	0.000083
+17.420000	0.000082
+17.430000	0.000082
+17.440000	0.000082
+17.450000	0.000081
+17.460000	0.000081
+17.470000	0.000080
+17.480000	0.000080
+17.490000	0.000080
+17.500000	0.000079
+17.510000	0.000079
+17.520000	0.000078
+17.530000	0.000078
+17.540000	0.000078
+17.550000	0.000077
+17.560000	0.000077
+17.570000	0.000077
+17.580000	0.000076
+17.590000	0.000076
+17.600000	0.000075
+17.610000	0.000075
+17.620000	0.000075
+17.630000	0.000074
+17.640000	0.000074
+17.650000	0.000074
+17.660000	0.000073
+17.670000	0.000073
+17.680000	0.000072
+17.690000	0.000072
+17.700000	0.000072
+17.710000	0.000071
+17.720000	0.000071
+17.730000	0.000071
+17.740000	0.000070
+17.750000	0.000070
+17.760000	0.000070
+17.770000	0.000069
+17.780000	0.000069
+17.790000	0.000069
+17.800000	0.000068
+17.810000	0.000068
+17.820000	0.000068
+17.830000	0.000067
+17.840000	0.000067
+17.850000	0.000067
+17.860000	0.000066
+17.870000	0.000066
+17.880000	0.000066
+17.890000	0.000065
+17.900000	0.000065
+17.910000	0.000065
+17.920000	0.000064
+17.930000	0.000064
+17.940000	0.000064
+17.950000	0.000063
+17.960000	0.000063
+17.970000	0.000063
+17.980000	0.000062
+17.990000	0.000062
+18.000000	0.000062
+18.010000	0.000061
+18.020000	0.000061
+18.030000	0.000061
+18.040000	0.000060
+18.050000	0.000060
+18.060000	0.000060
+18.070000	0.000060
+18.080000	0.000059
+18.090000	0.000059
+18.100000	0.000059
+18.110000	0.000058
+18.120000	0.000058
+18.130000	0.000058
+18.140000	0.000058
+18.150000	0.000057
+18.160000	0.000057
+18.170000	0.000057
+18.180000	0.000056
+18.190000	0.000056
+18.200000	0.000056
+18.210000	0.000056
+18.220000	0.000055
+18.230000	0.000055
+18.240000	0.000055
+18.250000	0.000054
+18.260000	0.000054
+18.270000	0.000054
+18.280000	0.000054
+18.290000	0.000053
+18.300000	0.000053
+18.310000	0.000053
+18.320000	0.000053
+18.330000	0.000052
+18.340000	0.000052
+18.350000	0.000052
+18.360000	0.000052
+18.370000	0.000051
+18.380000	0.000051
+18.390000	0.000051
+18.400000	0.000051
+18.410000	0.000050
+18.420000	0.000050
+18.430000	0.000050
+18.440000	0.000050
+18.450000	0.000049
+18.460000	0.000049
+18.470000	0.000049
+18.480000	0.000049
+18.490000	0.000048
+18.500000	0.000048
+18.510000	0.000048
+18.520000	0.000048
+18.530000	0.000047
+18.540000	0.000047
+18.550000	0.000047
+18.560000	0.000047
+18.570000	0.000046
+18.580000	0.000046
+18.590000	0.000046
+18.600000	0.000046
+18.610000	0.000045
+18.620000	0.000045
+18.630000	0.000045
+18.640000	0.000045
+18.650000	0.000045
+18.660000	0.000044
+18.670000	0.000044
+18.680000	0.000044
+18.690000	0.000044
+18.700000	0.000043
+18.710000	0.000043
+18.720000	0.000043
+18.730000	0.000043
+18.740000	0.000043
+18.750000	0.000042
+18.760000	0.000042
+18.770000	0.000042
+18.780000	0.000042
+18.790000	0.000042
+18.800000	0.000041
+18.810000	0.000041
+18.820000	0.000041
+18.830000	0.000041
+18.840000	0.000041
+18.850000	0.000040
+18.860000	0.000040
+18.870000	0.000040
+18.880000	0.000040
+18.890000	0.000040
+18.900000	0.000039
+18.910000	0.000039
+18.920000	0.000039
+18.930000	0.000039
+18.940000	0.000039
+18.950000	0.000038
+18.960000	0.000038
+18.970000	0.000038
+18.980000	0.000038
+18.990000	0.000038
+19.000000	0.000037
+19.010000	0.000037
+19.020000	0.000037
+19.030000	0.000037
+19.040000	0.000037
+19.050000	0.000037
+19.060000	0.000036
+19.070000	0.000036
+19.080000	0.000036
+19.090000	0.000036
+19.100000	0.000036
+19.110000	0.000035
+19.120000	0.000035
+19.130000	0.000035
+19.140000	0.000035
+19.150000	0.000035
+19.160000	0.000035
+19.170000	0.000034
+19.180000	0.000034
+19.190000	0.000034
+19.200000	0.000034
+19.210000	0.000034
+19.220000	0.000034
+19.230000	0.000033
+19.240000	0.000033
+19.250000	0.000033
+19.260000	0.000033
+19.270000	0.000033
+19.280000	0.000033
+19.290000	0.000032
+19.300000	0.000032
+19.310000	0.000032
+19.320000	0.000032
+19.330000	0.000032
+19.340000	0.000032
+19.350000	0.000031
+19.360000	0.000031
+19.370000	0.000031
+19.380000	0.000031
+19.390000	0.000031
+19.400000	0.000031
+19.410000	0.000030
+19.420000	0.000030
+19.430000	0.000030
+19.440000	0.000030
+19.450000	0.000030
+19.460000	0.000030
+19.470000	0.000030
+19.480000	0.000029
+19.490000	0.000029
+19.500000	0.000029
+19.510000	0.000029
+19.520000	0.000029
+19.530000	0.000029
+19.540000	0.000029
+19.550000	0.000028
+19.560000	0.000028
+19.570000	0.000028
+19.580000	0.000028
+19.590000	0.000028
+19.600000	0.000028
+19.610000	0.000028
+19.620000	0.000027
+19.630000	0.000027
+19.640000	0.000027
+19.650000	0.000027
+19.660000	0.000027
+19.670000	0.000027
+19.680000	0.000027
+19.690000	0.000027
+19.700000	0.000026
+19.710000	0.000026
+19.720000	0.000026
+19.730000	0.000026
+19.740000	0.000026
+19.750000	0.000026
+19.760000	0.000026
+19.770000	0.000025
+19.780000	0.000025
+19.790000	0.000025
+19.800000	0.000025
+19.810000	0.000025
+19.820000	0.000025
+19.830000	0.000025
+19.840000	0.000025
+19.850000	0.000024
+19.860000	0.000024
+19.870000	0.000024
+19.880000	0.000024
+19.890000	0.000024
+19.900000	0.000024
+19.910000	0.000024
+19.920000	0.000024
+19.930000	0.000024
+19.940000	0.000023
+19.950000	0.000023
+19.960000	0.000023
+19.970000	0.000023
+19.980000	0.000023
+19.990000	0.000023
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/gamma_3.0_2.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/gamma_3.0_2.0.dat
new file mode 100644
index 0000000..ba2c5db
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/gamma_3.0_2.0.dat
@@ -0,0 +1,2012 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.010000	0.000006
+0.020000	0.000025
+0.030000	0.000055
+0.040000	0.000098
+0.050000	0.000152
+0.060000	0.000218
+0.070000	0.000296
+0.080000	0.000384
+0.090000	0.000484
+0.100000	0.000595
+0.110000	0.000716
+0.120000	0.000848
+0.130000	0.000990
+0.140000	0.001142
+0.150000	0.001305
+0.160000	0.001477
+0.170000	0.001659
+0.180000	0.001851
+0.190000	0.002052
+0.200000	0.002262
+0.210000	0.002482
+0.220000	0.002710
+0.230000	0.002947
+0.240000	0.003193
+0.250000	0.003447
+0.260000	0.003710
+0.270000	0.003981
+0.280000	0.004260
+0.290000	0.004547
+0.300000	0.004841
+0.310000	0.005144
+0.320000	0.005454
+0.330000	0.005771
+0.340000	0.006095
+0.350000	0.006427
+0.360000	0.006766
+0.370000	0.007111
+0.380000	0.007463
+0.390000	0.007822
+0.400000	0.008187
+0.410000	0.008559
+0.420000	0.008937
+0.430000	0.009321
+0.440000	0.009710
+0.450000	0.010106
+0.460000	0.010508
+0.470000	0.010915
+0.480000	0.011327
+0.490000	0.011745
+0.500000	0.012169
+0.510000	0.012597
+0.520000	0.013031
+0.530000	0.013469
+0.540000	0.013913
+0.550000	0.014361
+0.560000	0.014813
+0.570000	0.015271
+0.580000	0.015732
+0.590000	0.016198
+0.600000	0.016668
+0.610000	0.017143
+0.620000	0.017621
+0.630000	0.018103
+0.640000	0.018589
+0.650000	0.019079
+0.660000	0.019573
+0.670000	0.020070
+0.680000	0.020570
+0.690000	0.021074
+0.700000	0.021581
+0.710000	0.022091
+0.720000	0.022605
+0.730000	0.023121
+0.740000	0.023640
+0.750000	0.024163
+0.760000	0.024687
+0.770000	0.025215
+0.780000	0.025745
+0.790000	0.026278
+0.800000	0.026813
+0.810000	0.027350
+0.820000	0.027890
+0.830000	0.028432
+0.840000	0.028976
+0.850000	0.029522
+0.860000	0.030070
+0.870000	0.030620
+0.880000	0.031171
+0.890000	0.031725
+0.900000	0.032280
+0.910000	0.032837
+0.920000	0.033395
+0.930000	0.033955
+0.940000	0.034516
+0.950000	0.035078
+0.960000	0.035642
+0.970000	0.036207
+0.980000	0.036773
+0.990000	0.037340
+1.000000	0.037908
+1.010000	0.038477
+1.020000	0.039047
+1.030000	0.039618
+1.040000	0.040190
+1.050000	0.040762
+1.060000	0.041335
+1.070000	0.041908
+1.080000	0.042482
+1.090000	0.043057
+1.100000	0.043632
+1.110000	0.044207
+1.120000	0.044783
+1.130000	0.045359
+1.140000	0.045935
+1.150000	0.046511
+1.160000	0.047087
+1.170000	0.047664
+1.180000	0.048240
+1.190000	0.048817
+1.200000	0.049393
+1.210000	0.049969
+1.220000	0.050545
+1.230000	0.051121
+1.240000	0.051696
+1.250000	0.052272
+1.260000	0.052846
+1.270000	0.053421
+1.280000	0.053995
+1.290000	0.054568
+1.300000	0.055141
+1.310000	0.055713
+1.320000	0.056285
+1.330000	0.056856
+1.340000	0.057426
+1.350000	0.057996
+1.360000	0.058565
+1.370000	0.059133
+1.380000	0.059700
+1.390000	0.060266
+1.400000	0.060832
+1.410000	0.061396
+1.420000	0.061959
+1.430000	0.062522
+1.440000	0.063083
+1.450000	0.063643
+1.460000	0.064202
+1.470000	0.064760
+1.480000	0.065317
+1.490000	0.065872
+1.500000	0.066427
+1.510000	0.066979
+1.520000	0.067531
+1.530000	0.068081
+1.540000	0.068630
+1.550000	0.069178
+1.560000	0.069724
+1.570000	0.070268
+1.580000	0.070811
+1.590000	0.071353
+1.600000	0.071893
+1.610000	0.072431
+1.620000	0.072968
+1.630000	0.073503
+1.640000	0.074037
+1.650000	0.074568
+1.660000	0.075099
+1.670000	0.075627
+1.680000	0.076154
+1.690000	0.076679
+1.700000	0.077202
+1.710000	0.077723
+1.720000	0.078243
+1.730000	0.078760
+1.740000	0.079276
+1.750000	0.079790
+1.760000	0.080302
+1.770000	0.080812
+1.780000	0.081320
+1.790000	0.081826
+1.800000	0.082330
+1.810000	0.082832
+1.820000	0.083333
+1.830000	0.083831
+1.840000	0.084327
+1.850000	0.084821
+1.860000	0.085312
+1.870000	0.085802
+1.880000	0.086290
+1.890000	0.086775
+1.900000	0.087258
+1.910000	0.087740
+1.920000	0.088219
+1.930000	0.088695
+1.940000	0.089170
+1.950000	0.089642
+1.960000	0.090112
+1.970000	0.090580
+1.980000	0.091046
+1.990000	0.091509
+2.000000	0.091970
+2.010000	0.092429
+2.020000	0.092885
+2.030000	0.093339
+2.040000	0.093791
+2.050000	0.094240
+2.060000	0.094687
+2.070000	0.095132
+2.080000	0.095574
+2.090000	0.096014
+2.100000	0.096452
+2.110000	0.096887
+2.120000	0.097319
+2.130000	0.097750
+2.140000	0.098178
+2.150000	0.098603
+2.160000	0.099026
+2.170000	0.099447
+2.180000	0.099865
+2.190000	0.100280
+2.200000	0.100694
+2.210000	0.101104
+2.220000	0.101512
+2.230000	0.101918
+2.240000	0.102321
+2.250000	0.102722
+2.260000	0.103120
+2.270000	0.103516
+2.280000	0.103909
+2.290000	0.104300
+2.300000	0.104688
+2.310000	0.105074
+2.320000	0.105457
+2.330000	0.105837
+2.340000	0.106215
+2.350000	0.106591
+2.360000	0.106964
+2.370000	0.107334
+2.380000	0.107702
+2.390000	0.108067
+2.400000	0.108430
+2.410000	0.108790
+2.420000	0.109148
+2.430000	0.109503
+2.440000	0.109855
+2.450000	0.110205
+2.460000	0.110552
+2.470000	0.110897
+2.480000	0.111239
+2.490000	0.111579
+2.500000	0.111916
+2.510000	0.112250
+2.520000	0.112582
+2.530000	0.112912
+2.540000	0.113238
+2.550000	0.113562
+2.560000	0.113884
+2.570000	0.114203
+2.580000	0.114520
+2.590000	0.114833
+2.600000	0.115145
+2.610000	0.115453
+2.620000	0.115760
+2.630000	0.116063
+2.640000	0.116364
+2.650000	0.116663
+2.660000	0.116958
+2.670000	0.117252
+2.680000	0.117543
+2.690000	0.117831
+2.700000	0.118116
+2.710000	0.118399
+2.720000	0.118680
+2.730000	0.118958
+2.740000	0.119233
+2.750000	0.119506
+2.760000	0.119777
+2.770000	0.120044
+2.780000	0.120310
+2.790000	0.120572
+2.800000	0.120833
+2.810000	0.121090
+2.820000	0.121345
+2.830000	0.121598
+2.840000	0.121848
+2.850000	0.122096
+2.860000	0.122341
+2.870000	0.122583
+2.880000	0.122823
+2.890000	0.123061
+2.900000	0.123296
+2.910000	0.123529
+2.920000	0.123759
+2.930000	0.123986
+2.940000	0.124211
+2.950000	0.124434
+2.960000	0.124654
+2.970000	0.124872
+2.980000	0.125087
+2.990000	0.125300
+3.000000	0.125511
+3.010000	0.125719
+3.020000	0.125924
+3.030000	0.126127
+3.040000	0.126328
+3.050000	0.126526
+3.060000	0.126722
+3.070000	0.126916
+3.080000	0.127107
+3.090000	0.127295
+3.100000	0.127481
+3.110000	0.127665
+3.120000	0.127847
+3.130000	0.128026
+3.140000	0.128203
+3.150000	0.128377
+3.160000	0.128549
+3.170000	0.128719
+3.180000	0.128886
+3.190000	0.129051
+3.200000	0.129214
+3.210000	0.129374
+3.220000	0.129532
+3.230000	0.129688
+3.240000	0.129841
+3.250000	0.129992
+3.260000	0.130141
+3.270000	0.130288
+3.280000	0.130432
+3.290000	0.130574
+3.300000	0.130714
+3.310000	0.130851
+3.320000	0.130987
+3.330000	0.131120
+3.340000	0.131251
+3.350000	0.131379
+3.360000	0.131505
+3.370000	0.131630
+3.380000	0.131752
+3.390000	0.131871
+3.400000	0.131989
+3.410000	0.132104
+3.420000	0.132217
+3.430000	0.132328
+3.440000	0.132437
+3.450000	0.132544
+3.460000	0.132649
+3.470000	0.132751
+3.480000	0.132851
+3.490000	0.132950
+3.500000	0.133046
+3.510000	0.133140
+3.520000	0.133232
+3.530000	0.133321
+3.540000	0.133409
+3.550000	0.133495
+3.560000	0.133578
+3.570000	0.133660
+3.580000	0.133739
+3.590000	0.133817
+3.600000	0.133892
+3.610000	0.133965
+3.620000	0.134037
+3.630000	0.134106
+3.640000	0.134174
+3.650000	0.134239
+3.660000	0.134302
+3.670000	0.134364
+3.680000	0.134423
+3.690000	0.134481
+3.700000	0.134536
+3.710000	0.134590
+3.720000	0.134641
+3.730000	0.134691
+3.740000	0.134739
+3.750000	0.134785
+3.760000	0.134829
+3.770000	0.134871
+3.780000	0.134911
+3.790000	0.134949
+3.800000	0.134986
+3.810000	0.135020
+3.820000	0.135053
+3.830000	0.135084
+3.840000	0.135113
+3.850000	0.135140
+3.860000	0.135166
+3.870000	0.135189
+3.880000	0.135211
+3.890000	0.135231
+3.900000	0.135249
+3.910000	0.135266
+3.920000	0.135280
+3.930000	0.135293
+3.940000	0.135305
+3.950000	0.135314
+3.960000	0.135322
+3.970000	0.135328
+3.980000	0.135332
+3.990000	0.135334
+4.000000	0.135335
+4.010000	0.135334
+4.020000	0.135332
+4.030000	0.135328
+4.040000	0.135322
+4.050000	0.135314
+4.060000	0.135305
+4.070000	0.135294
+4.080000	0.135282
+4.090000	0.135268
+4.100000	0.135252
+4.110000	0.135235
+4.120000	0.135216
+4.130000	0.135195
+4.140000	0.135173
+4.150000	0.135150
+4.160000	0.135125
+4.170000	0.135098
+4.180000	0.135069
+4.190000	0.135040
+4.200000	0.135008
+4.210000	0.134975
+4.220000	0.134941
+4.230000	0.134905
+4.240000	0.134868
+4.250000	0.134829
+4.260000	0.134788
+4.270000	0.134746
+4.280000	0.134703
+4.290000	0.134658
+4.300000	0.134612
+4.310000	0.134564
+4.320000	0.134515
+4.330000	0.134465
+4.340000	0.134413
+4.350000	0.134359
+4.360000	0.134305
+4.370000	0.134249
+4.380000	0.134191
+4.390000	0.134132
+4.400000	0.134072
+4.410000	0.134010
+4.420000	0.133947
+4.430000	0.133883
+4.440000	0.133817
+4.450000	0.133750
+4.460000	0.133682
+4.470000	0.133612
+4.480000	0.133542
+4.490000	0.133469
+4.500000	0.133396
+4.510000	0.133321
+4.520000	0.133245
+4.530000	0.133168
+4.540000	0.133089
+4.550000	0.133010
+4.560000	0.132929
+4.570000	0.132846
+4.580000	0.132763
+4.590000	0.132678
+4.600000	0.132592
+4.610000	0.132505
+4.620000	0.132417
+4.630000	0.132328
+4.640000	0.132237
+4.650000	0.132145
+4.660000	0.132052
+4.670000	0.131958
+4.680000	0.131863
+4.690000	0.131767
+4.700000	0.131669
+4.710000	0.131570
+4.720000	0.131471
+4.730000	0.131370
+4.740000	0.131268
+4.750000	0.131165
+4.760000	0.131061
+4.770000	0.130956
+4.780000	0.130849
+4.790000	0.130742
+4.800000	0.130634
+4.810000	0.130524
+4.820000	0.130414
+4.830000	0.130303
+4.840000	0.130190
+4.850000	0.130077
+4.860000	0.129962
+4.870000	0.129847
+4.880000	0.129730
+4.890000	0.129613
+4.900000	0.129494
+4.910000	0.129375
+4.920000	0.129255
+4.930000	0.129133
+4.940000	0.129011
+4.950000	0.128888
+4.960000	0.128764
+4.970000	0.128639
+4.980000	0.128513
+4.990000	0.128386
+5.000000	0.128258
+5.010000	0.128129
+5.020000	0.128000
+5.030000	0.127869
+5.040000	0.127738
+5.050000	0.127605
+5.060000	0.127472
+5.070000	0.127338
+5.080000	0.127204
+5.090000	0.127068
+5.100000	0.126932
+5.110000	0.126794
+5.120000	0.126656
+5.130000	0.126517
+5.140000	0.126377
+5.150000	0.126237
+5.160000	0.126096
+5.170000	0.125953
+5.180000	0.125810
+5.190000	0.125667
+5.200000	0.125522
+5.210000	0.125377
+5.220000	0.125231
+5.230000	0.125084
+5.240000	0.124937
+5.250000	0.124789
+5.260000	0.124640
+5.270000	0.124490
+5.280000	0.124340
+5.290000	0.124189
+5.300000	0.124037
+5.310000	0.123885
+5.320000	0.123731
+5.330000	0.123578
+5.340000	0.123423
+5.350000	0.123268
+5.360000	0.123112
+5.370000	0.122955
+5.380000	0.122798
+5.390000	0.122641
+5.400000	0.122482
+5.410000	0.122323
+5.420000	0.122163
+5.430000	0.122003
+5.440000	0.121842
+5.450000	0.121680
+5.460000	0.121518
+5.470000	0.121355
+5.480000	0.121192
+5.490000	0.121028
+5.500000	0.120864
+5.510000	0.120699
+5.520000	0.120533
+5.530000	0.120367
+5.540000	0.120200
+5.550000	0.120032
+5.560000	0.119865
+5.570000	0.119696
+5.580000	0.119527
+5.590000	0.119358
+5.600000	0.119188
+5.610000	0.119017
+5.620000	0.118846
+5.630000	0.118675
+5.640000	0.118503
+5.650000	0.118330
+5.660000	0.118157
+5.670000	0.117984
+5.680000	0.117810
+5.690000	0.117635
+5.700000	0.117460
+5.710000	0.117285
+5.720000	0.117109
+5.730000	0.116933
+5.740000	0.116756
+5.750000	0.116579
+5.760000	0.116401
+5.770000	0.116223
+5.780000	0.116045
+5.790000	0.115866
+5.800000	0.115686
+5.810000	0.115507
+5.820000	0.115326
+5.830000	0.115146
+5.840000	0.114965
+5.850000	0.114784
+5.860000	0.114602
+5.870000	0.114420
+5.880000	0.114238
+5.890000	0.114055
+5.900000	0.113872
+5.910000	0.113688
+5.920000	0.113504
+5.930000	0.113320
+5.940000	0.113135
+5.950000	0.112950
+5.960000	0.112765
+5.970000	0.112580
+5.980000	0.112394
+5.990000	0.112207
+6.000000	0.112021
+6.010000	0.111834
+6.020000	0.111647
+6.030000	0.111459
+6.040000	0.111272
+6.050000	0.111084
+6.060000	0.110895
+6.070000	0.110707
+6.080000	0.110518
+6.090000	0.110329
+6.100000	0.110139
+6.110000	0.109949
+6.120000	0.109759
+6.130000	0.109569
+6.140000	0.109379
+6.150000	0.109188
+6.160000	0.108997
+6.170000	0.108806
+6.180000	0.108614
+6.190000	0.108423
+6.200000	0.108231
+6.210000	0.108039
+6.220000	0.107846
+6.230000	0.107654
+6.240000	0.107461
+6.250000	0.107268
+6.260000	0.107075
+6.270000	0.106881
+6.280000	0.106688
+6.290000	0.106494
+6.300000	0.106300
+6.310000	0.106106
+6.320000	0.105912
+6.330000	0.105717
+6.340000	0.105522
+6.350000	0.105328
+6.360000	0.105133
+6.370000	0.104938
+6.380000	0.104742
+6.390000	0.104547
+6.400000	0.104351
+6.410000	0.104156
+6.420000	0.103960
+6.430000	0.103764
+6.440000	0.103568
+6.450000	0.103371
+6.460000	0.103175
+6.470000	0.102978
+6.480000	0.102782
+6.490000	0.102585
+6.500000	0.102388
+6.510000	0.102191
+6.520000	0.101994
+6.530000	0.101797
+6.540000	0.101600
+6.550000	0.101402
+6.560000	0.101205
+6.570000	0.101007
+6.580000	0.100810
+6.590000	0.100612
+6.600000	0.100414
+6.610000	0.100217
+6.620000	0.100019
+6.630000	0.099821
+6.640000	0.099623
+6.650000	0.099425
+6.660000	0.099227
+6.670000	0.099028
+6.680000	0.098830
+6.690000	0.098632
+6.700000	0.098434
+6.710000	0.098235
+6.720000	0.098037
+6.730000	0.097838
+6.740000	0.097640
+6.750000	0.097441
+6.760000	0.097243
+6.770000	0.097044
+6.780000	0.096846
+6.790000	0.096647
+6.800000	0.096449
+6.810000	0.096250
+6.820000	0.096052
+6.830000	0.095853
+6.840000	0.095654
+6.850000	0.095456
+6.860000	0.095257
+6.870000	0.095059
+6.880000	0.094860
+6.890000	0.094662
+6.900000	0.094463
+6.910000	0.094265
+6.920000	0.094066
+6.930000	0.093868
+6.940000	0.093669
+6.950000	0.093471
+6.960000	0.093273
+6.970000	0.093074
+6.980000	0.092876
+6.990000	0.092678
+7.000000	0.092479
+7.010000	0.092281
+7.020000	0.092083
+7.030000	0.091885
+7.040000	0.091687
+7.050000	0.091489
+7.060000	0.091291
+7.070000	0.091094
+7.080000	0.090896
+7.090000	0.090698
+7.100000	0.090501
+7.110000	0.090303
+7.120000	0.090106
+7.130000	0.089908
+7.140000	0.089711
+7.150000	0.089514
+7.160000	0.089317
+7.170000	0.089119
+7.180000	0.088923
+7.190000	0.088726
+7.200000	0.088529
+7.210000	0.088332
+7.220000	0.088136
+7.230000	0.087939
+7.240000	0.087743
+7.250000	0.087546
+7.260000	0.087350
+7.270000	0.087154
+7.280000	0.086958
+7.290000	0.086762
+7.300000	0.086567
+7.310000	0.086371
+7.320000	0.086176
+7.330000	0.085980
+7.340000	0.085785
+7.350000	0.085590
+7.360000	0.085395
+7.370000	0.085200
+7.380000	0.085005
+7.390000	0.084811
+7.400000	0.084616
+7.410000	0.084422
+7.420000	0.084228
+7.430000	0.084034
+7.440000	0.083840
+7.450000	0.083646
+7.460000	0.083452
+7.470000	0.083259
+7.480000	0.083066
+7.490000	0.082873
+7.500000	0.082680
+7.510000	0.082487
+7.520000	0.082294
+7.530000	0.082102
+7.540000	0.081909
+7.550000	0.081717
+7.560000	0.081525
+7.570000	0.081333
+7.580000	0.081141
+7.590000	0.080950
+7.600000	0.080758
+7.610000	0.080567
+7.620000	0.080376
+7.630000	0.080185
+7.640000	0.079995
+7.650000	0.079804
+7.660000	0.079614
+7.670000	0.079424
+7.680000	0.079234
+7.690000	0.079044
+7.700000	0.078855
+7.710000	0.078665
+7.720000	0.078476
+7.730000	0.078287
+7.740000	0.078098
+7.750000	0.077910
+7.760000	0.077721
+7.770000	0.077533
+7.780000	0.077345
+7.790000	0.077157
+7.800000	0.076970
+7.810000	0.076782
+7.820000	0.076595
+7.830000	0.076408
+7.840000	0.076222
+7.850000	0.076035
+7.860000	0.075849
+7.870000	0.075663
+7.880000	0.075477
+7.890000	0.075291
+7.900000	0.075105
+7.910000	0.074920
+7.920000	0.074735
+7.930000	0.074550
+7.940000	0.074366
+7.950000	0.074181
+7.960000	0.073997
+7.970000	0.073813
+7.980000	0.073629
+7.990000	0.073446
+8.000000	0.073263
+8.010000	0.073080
+8.020000	0.072897
+8.030000	0.072714
+8.040000	0.072532
+8.050000	0.072350
+8.060000	0.072168
+8.070000	0.071986
+8.080000	0.071805
+8.090000	0.071624
+8.100000	0.071443
+8.110000	0.071262
+8.120000	0.071081
+8.130000	0.070901
+8.140000	0.070721
+8.150000	0.070542
+8.160000	0.070362
+8.170000	0.070183
+8.180000	0.070004
+8.190000	0.069825
+8.200000	0.069647
+8.210000	0.069468
+8.220000	0.069290
+8.230000	0.069113
+8.240000	0.068935
+8.250000	0.068758
+8.260000	0.068581
+8.270000	0.068404
+8.280000	0.068228
+8.290000	0.068052
+8.300000	0.067876
+8.310000	0.067700
+8.320000	0.067525
+8.330000	0.067349
+8.340000	0.067174
+8.350000	0.067000
+8.360000	0.066825
+8.370000	0.066651
+8.380000	0.066477
+8.390000	0.066304
+8.400000	0.066130
+8.410000	0.065957
+8.420000	0.065785
+8.430000	0.065612
+8.440000	0.065440
+8.450000	0.065268
+8.460000	0.065096
+8.470000	0.064925
+8.480000	0.064753
+8.490000	0.064583
+8.500000	0.064412
+8.510000	0.064242
+8.520000	0.064071
+8.530000	0.063902
+8.540000	0.063732
+8.550000	0.063563
+8.560000	0.063394
+8.570000	0.063225
+8.580000	0.063057
+8.590000	0.062889
+8.600000	0.062721
+8.610000	0.062553
+8.620000	0.062386
+8.630000	0.062219
+8.640000	0.062052
+8.650000	0.061885
+8.660000	0.061719
+8.670000	0.061553
+8.680000	0.061388
+8.690000	0.061222
+8.700000	0.061057
+8.710000	0.060893
+8.720000	0.060728
+8.730000	0.060564
+8.740000	0.060400
+8.750000	0.060236
+8.760000	0.060073
+8.770000	0.059910
+8.780000	0.059747
+8.790000	0.059585
+8.800000	0.059422
+8.810000	0.059260
+8.820000	0.059099
+8.830000	0.058937
+8.840000	0.058776
+8.850000	0.058616
+8.860000	0.058455
+8.870000	0.058295
+8.880000	0.058135
+8.890000	0.057976
+8.900000	0.057816
+8.910000	0.057657
+8.920000	0.057498
+8.930000	0.057340
+8.940000	0.057182
+8.950000	0.057024
+8.960000	0.056867
+8.970000	0.056709
+8.980000	0.056552
+8.990000	0.056396
+9.000000	0.056239
+9.010000	0.056083
+9.020000	0.055927
+9.030000	0.055772
+9.040000	0.055617
+9.050000	0.055462
+9.060000	0.055307
+9.070000	0.055153
+9.080000	0.054999
+9.090000	0.054845
+9.100000	0.054692
+9.110000	0.054539
+9.120000	0.054386
+9.130000	0.054233
+9.140000	0.054081
+9.150000	0.053929
+9.160000	0.053778
+9.170000	0.053626
+9.180000	0.053475
+9.190000	0.053325
+9.200000	0.053174
+9.210000	0.053024
+9.220000	0.052874
+9.230000	0.052725
+9.240000	0.052576
+9.250000	0.052427
+9.260000	0.052278
+9.270000	0.052130
+9.280000	0.051982
+9.290000	0.051834
+9.300000	0.051686
+9.310000	0.051539
+9.320000	0.051392
+9.330000	0.051246
+9.340000	0.051100
+9.350000	0.050954
+9.360000	0.050808
+9.370000	0.050663
+9.380000	0.050518
+9.390000	0.050373
+9.400000	0.050229
+9.410000	0.050085
+9.420000	0.049941
+9.430000	0.049797
+9.440000	0.049654
+9.450000	0.049511
+9.460000	0.049368
+9.470000	0.049226
+9.480000	0.049084
+9.490000	0.048942
+9.500000	0.048801
+9.510000	0.048660
+9.520000	0.048519
+9.530000	0.048379
+9.540000	0.048238
+9.550000	0.048098
+9.560000	0.047959
+9.570000	0.047819
+9.580000	0.047680
+9.590000	0.047542
+9.600000	0.047403
+9.610000	0.047265
+9.620000	0.047127
+9.630000	0.046990
+9.640000	0.046853
+9.650000	0.046716
+9.660000	0.046579
+9.670000	0.046443
+9.680000	0.046307
+9.690000	0.046171
+9.700000	0.046036
+9.710000	0.045901
+9.720000	0.045766
+9.730000	0.045631
+9.740000	0.045497
+9.750000	0.045363
+9.760000	0.045230
+9.770000	0.045096
+9.780000	0.044963
+9.790000	0.044831
+9.800000	0.044698
+9.810000	0.044566
+9.820000	0.044434
+9.830000	0.044303
+9.840000	0.044171
+9.850000	0.044040
+9.860000	0.043910
+9.870000	0.043780
+9.880000	0.043649
+9.890000	0.043520
+9.900000	0.043390
+9.910000	0.043261
+9.920000	0.043132
+9.930000	0.043004
+9.940000	0.042876
+9.950000	0.042748
+9.960000	0.042620
+9.970000	0.042493
+9.980000	0.042365
+9.990000	0.042239
+10.000000	0.042112
+10.010000	0.041986
+10.020000	0.041860
+10.030000	0.041734
+10.040000	0.041609
+10.050000	0.041484
+10.060000	0.041359
+10.070000	0.041235
+10.080000	0.041111
+10.090000	0.040987
+10.100000	0.040864
+10.110000	0.040740
+10.120000	0.040617
+10.130000	0.040495
+10.140000	0.040372
+10.150000	0.040250
+10.160000	0.040128
+10.170000	0.040007
+10.180000	0.039886
+10.190000	0.039765
+10.200000	0.039644
+10.210000	0.039524
+10.220000	0.039404
+10.230000	0.039284
+10.240000	0.039164
+10.250000	0.039045
+10.260000	0.038926
+10.270000	0.038808
+10.280000	0.038689
+10.290000	0.038571
+10.300000	0.038454
+10.310000	0.038336
+10.320000	0.038219
+10.330000	0.038102
+10.340000	0.037986
+10.350000	0.037869
+10.360000	0.037753
+10.370000	0.037637
+10.380000	0.037522
+10.390000	0.037407
+10.400000	0.037292
+10.410000	0.037177
+10.420000	0.037063
+10.430000	0.036949
+10.440000	0.036835
+10.450000	0.036722
+10.460000	0.036609
+10.470000	0.036496
+10.480000	0.036383
+10.490000	0.036271
+10.500000	0.036159
+10.510000	0.036047
+10.520000	0.035935
+10.530000	0.035824
+10.540000	0.035713
+10.550000	0.035603
+10.560000	0.035492
+10.570000	0.035382
+10.580000	0.035272
+10.590000	0.035163
+10.600000	0.035053
+10.610000	0.034944
+10.620000	0.034836
+10.630000	0.034727
+10.640000	0.034619
+10.650000	0.034511
+10.660000	0.034404
+10.670000	0.034296
+10.680000	0.034189
+10.690000	0.034082
+10.700000	0.033976
+10.710000	0.033870
+10.720000	0.033764
+10.730000	0.033658
+10.740000	0.033553
+10.750000	0.033448
+10.760000	0.033343
+10.770000	0.033238
+10.780000	0.033134
+10.790000	0.033030
+10.800000	0.032926
+10.810000	0.032822
+10.820000	0.032719
+10.830000	0.032616
+10.840000	0.032513
+10.850000	0.032411
+10.860000	0.032309
+10.870000	0.032207
+10.880000	0.032105
+10.890000	0.032004
+10.900000	0.031903
+10.910000	0.031802
+10.920000	0.031701
+10.930000	0.031601
+10.940000	0.031501
+10.950000	0.031401
+10.960000	0.031302
+10.970000	0.031202
+10.980000	0.031103
+10.990000	0.031005
+11.000000	0.030906
+11.010000	0.030808
+11.020000	0.030710
+11.030000	0.030612
+11.040000	0.030515
+11.050000	0.030418
+11.060000	0.030321
+11.070000	0.030224
+11.080000	0.030128
+11.090000	0.030032
+11.100000	0.029936
+11.110000	0.029840
+11.120000	0.029745
+11.130000	0.029650
+11.140000	0.029555
+11.150000	0.029460
+11.160000	0.029366
+11.170000	0.029272
+11.180000	0.029178
+11.190000	0.029085
+11.200000	0.028991
+11.210000	0.028898
+11.220000	0.028805
+11.230000	0.028713
+11.240000	0.028621
+11.250000	0.028528
+11.260000	0.028437
+11.270000	0.028345
+11.280000	0.028254
+11.290000	0.028163
+11.300000	0.028072
+11.310000	0.027981
+11.320000	0.027891
+11.330000	0.027801
+11.340000	0.027711
+11.350000	0.027622
+11.360000	0.027532
+11.370000	0.027443
+11.380000	0.027355
+11.390000	0.027266
+11.400000	0.027178
+11.410000	0.027090
+11.420000	0.027002
+11.430000	0.026914
+11.440000	0.026827
+11.450000	0.026740
+11.460000	0.026653
+11.470000	0.026566
+11.480000	0.026480
+11.490000	0.026394
+11.500000	0.026308
+11.510000	0.026222
+11.520000	0.026137
+11.530000	0.026051
+11.540000	0.025966
+11.550000	0.025882
+11.560000	0.025797
+11.570000	0.025713
+11.580000	0.025629
+11.590000	0.025545
+11.600000	0.025462
+11.610000	0.025378
+11.620000	0.025295
+11.630000	0.025213
+11.640000	0.025130
+11.650000	0.025048
+11.660000	0.024966
+11.670000	0.024884
+11.680000	0.024802
+11.690000	0.024721
+11.700000	0.024639
+11.710000	0.024558
+11.720000	0.024478
+11.730000	0.024397
+11.740000	0.024317
+11.750000	0.024237
+11.760000	0.024157
+11.770000	0.024077
+11.780000	0.023998
+11.790000	0.023919
+11.800000	0.023840
+11.810000	0.023761
+11.820000	0.023683
+11.830000	0.023605
+11.840000	0.023527
+11.850000	0.023449
+11.860000	0.023371
+11.870000	0.023294
+11.880000	0.023217
+11.890000	0.023140
+11.900000	0.023063
+11.910000	0.022987
+11.920000	0.022911
+11.930000	0.022835
+11.940000	0.022759
+11.950000	0.022683
+11.960000	0.022608
+11.970000	0.022533
+11.980000	0.022458
+11.990000	0.022383
+12.000000	0.022309
+12.010000	0.022235
+12.020000	0.022160
+12.030000	0.022087
+12.040000	0.022013
+12.050000	0.021940
+12.060000	0.021866
+12.070000	0.021794
+12.080000	0.021721
+12.090000	0.021648
+12.100000	0.021576
+12.110000	0.021504
+12.120000	0.021432
+12.130000	0.021360
+12.140000	0.021289
+12.150000	0.021217
+12.160000	0.021146
+12.170000	0.021076
+12.180000	0.021005
+12.190000	0.020934
+12.200000	0.020864
+12.210000	0.020794
+12.220000	0.020724
+12.230000	0.020655
+12.240000	0.020585
+12.250000	0.020516
+12.260000	0.020447
+12.270000	0.020379
+12.280000	0.020310
+12.290000	0.020242
+12.300000	0.020173
+12.310000	0.020105
+12.320000	0.020038
+12.330000	0.019970
+12.340000	0.019903
+12.350000	0.019836
+12.360000	0.019769
+12.370000	0.019702
+12.380000	0.019635
+12.390000	0.019569
+12.400000	0.019503
+12.410000	0.019437
+12.420000	0.019371
+12.430000	0.019306
+12.440000	0.019240
+12.450000	0.019175
+12.460000	0.019110
+12.470000	0.019045
+12.480000	0.018981
+12.490000	0.018916
+12.500000	0.018852
+12.510000	0.018788
+12.520000	0.018724
+12.530000	0.018661
+12.540000	0.018597
+12.550000	0.018534
+12.560000	0.018471
+12.570000	0.018408
+12.580000	0.018345
+12.590000	0.018283
+12.600000	0.018221
+12.610000	0.018159
+12.620000	0.018097
+12.630000	0.018035
+12.640000	0.017974
+12.650000	0.017912
+12.660000	0.017851
+12.670000	0.017790
+12.680000	0.017729
+12.690000	0.017669
+12.700000	0.017608
+12.710000	0.017548
+12.720000	0.017488
+12.730000	0.017428
+12.740000	0.017369
+12.750000	0.017309
+12.760000	0.017250
+12.770000	0.017191
+12.780000	0.017132
+12.790000	0.017073
+12.800000	0.017014
+12.810000	0.016956
+12.820000	0.016898
+12.830000	0.016840
+12.840000	0.016782
+12.850000	0.016724
+12.860000	0.016667
+12.870000	0.016609
+12.880000	0.016552
+12.890000	0.016495
+12.900000	0.016438
+12.910000	0.016382
+12.920000	0.016325
+12.930000	0.016269
+12.940000	0.016213
+12.950000	0.016157
+12.960000	0.016101
+12.970000	0.016046
+12.980000	0.015990
+12.990000	0.015935
+13.000000	0.015880
+13.010000	0.015825
+13.020000	0.015770
+13.030000	0.015716
+13.040000	0.015662
+13.050000	0.015607
+13.060000	0.015553
+13.070000	0.015499
+13.080000	0.015446
+13.090000	0.015392
+13.100000	0.015339
+13.110000	0.015286
+13.120000	0.015233
+13.130000	0.015180
+13.140000	0.015127
+13.150000	0.015075
+13.160000	0.015022
+13.170000	0.014970
+13.180000	0.014918
+13.190000	0.014866
+13.200000	0.014814
+13.210000	0.014763
+13.220000	0.014711
+13.230000	0.014660
+13.240000	0.014609
+13.250000	0.014558
+13.260000	0.014508
+13.270000	0.014457
+13.280000	0.014407
+13.290000	0.014356
+13.300000	0.014306
+13.310000	0.014256
+13.320000	0.014207
+13.330000	0.014157
+13.340000	0.014107
+13.350000	0.014058
+13.360000	0.014009
+13.370000	0.013960
+13.380000	0.013911
+13.390000	0.013862
+13.400000	0.013814
+13.410000	0.013766
+13.420000	0.013717
+13.430000	0.013669
+13.440000	0.013621
+13.450000	0.013574
+13.460000	0.013526
+13.470000	0.013479
+13.480000	0.013431
+13.490000	0.013384
+13.500000	0.013337
+13.510000	0.013290
+13.520000	0.013243
+13.530000	0.013197
+13.540000	0.013151
+13.550000	0.013104
+13.560000	0.013058
+13.570000	0.013012
+13.580000	0.012966
+13.590000	0.012921
+13.600000	0.012875
+13.610000	0.012830
+13.620000	0.012785
+13.630000	0.012740
+13.640000	0.012695
+13.650000	0.012650
+13.660000	0.012605
+13.670000	0.012561
+13.680000	0.012516
+13.690000	0.012472
+13.700000	0.012428
+13.710000	0.012384
+13.720000	0.012340
+13.730000	0.012297
+13.740000	0.012253
+13.750000	0.012210
+13.760000	0.012167
+13.770000	0.012124
+13.780000	0.012081
+13.790000	0.012038
+13.800000	0.011995
+13.810000	0.011953
+13.820000	0.011910
+13.830000	0.011868
+13.840000	0.011826
+13.850000	0.011784
+13.860000	0.011742
+13.870000	0.011700
+13.880000	0.011659
+13.890000	0.011617
+13.900000	0.011576
+13.910000	0.011535
+13.920000	0.011494
+13.930000	0.011453
+13.940000	0.011412
+13.950000	0.011372
+13.960000	0.011331
+13.970000	0.011291
+13.980000	0.011251
+13.990000	0.011211
+14.000000	0.011171
+14.010000	0.011131
+14.020000	0.011091
+14.030000	0.011051
+14.040000	0.011012
+14.050000	0.010973
+14.060000	0.010934
+14.070000	0.010894
+14.080000	0.010856
+14.090000	0.010817
+14.100000	0.010778
+14.110000	0.010740
+14.120000	0.010701
+14.130000	0.010663
+14.140000	0.010625
+14.150000	0.010587
+14.160000	0.010549
+14.170000	0.010511
+14.180000	0.010473
+14.190000	0.010436
+14.200000	0.010398
+14.210000	0.010361
+14.220000	0.010324
+14.230000	0.010287
+14.240000	0.010250
+14.250000	0.010213
+14.260000	0.010177
+14.270000	0.010140
+14.280000	0.010104
+14.290000	0.010067
+14.300000	0.010031
+14.310000	0.009995
+14.320000	0.009959
+14.330000	0.009923
+14.340000	0.009888
+14.350000	0.009852
+14.360000	0.009816
+14.370000	0.009781
+14.380000	0.009746
+14.390000	0.009711
+14.400000	0.009676
+14.410000	0.009641
+14.420000	0.009606
+14.430000	0.009571
+14.440000	0.009537
+14.450000	0.009503
+14.460000	0.009468
+14.470000	0.009434
+14.480000	0.009400
+14.490000	0.009366
+14.500000	0.009332
+14.510000	0.009298
+14.520000	0.009265
+14.530000	0.009231
+14.540000	0.009198
+14.550000	0.009165
+14.560000	0.009131
+14.570000	0.009098
+14.580000	0.009065
+14.590000	0.009033
+14.600000	0.009000
+14.610000	0.008967
+14.620000	0.008935
+14.630000	0.008902
+14.640000	0.008870
+14.650000	0.008838
+14.660000	0.008806
+14.670000	0.008774
+14.680000	0.008742
+14.690000	0.008710
+14.700000	0.008679
+14.710000	0.008647
+14.720000	0.008616
+14.730000	0.008584
+14.740000	0.008553
+14.750000	0.008522
+14.760000	0.008491
+14.770000	0.008460
+14.780000	0.008429
+14.790000	0.008399
+14.800000	0.008368
+14.810000	0.008338
+14.820000	0.008307
+14.830000	0.008277
+14.840000	0.008247
+14.850000	0.008217
+14.860000	0.008187
+14.870000	0.008157
+14.880000	0.008127
+14.890000	0.008097
+14.900000	0.008068
+14.910000	0.008038
+14.920000	0.008009
+14.930000	0.007980
+14.940000	0.007951
+14.950000	0.007922
+14.960000	0.007893
+14.970000	0.007864
+14.980000	0.007835
+14.990000	0.007806
+15.000000	0.007778
+15.010000	0.007749
+15.020000	0.007721
+15.030000	0.007693
+15.040000	0.007664
+15.050000	0.007636
+15.060000	0.007608
+15.070000	0.007580
+15.080000	0.007553
+15.090000	0.007525
+15.100000	0.007497
+15.110000	0.007470
+15.120000	0.007442
+15.130000	0.007415
+15.140000	0.007388
+15.150000	0.007361
+15.160000	0.007334
+15.170000	0.007307
+15.180000	0.007280
+15.190000	0.007253
+15.200000	0.007227
+15.210000	0.007200
+15.220000	0.007173
+15.230000	0.007147
+15.240000	0.007121
+15.250000	0.007095
+15.260000	0.007068
+15.270000	0.007042
+15.280000	0.007016
+15.290000	0.006991
+15.300000	0.006965
+15.310000	0.006939
+15.320000	0.006914
+15.330000	0.006888
+15.340000	0.006863
+15.350000	0.006837
+15.360000	0.006812
+15.370000	0.006787
+15.380000	0.006762
+15.390000	0.006737
+15.400000	0.006712
+15.410000	0.006687
+15.420000	0.006663
+15.430000	0.006638
+15.440000	0.006613
+15.450000	0.006589
+15.460000	0.006565
+15.470000	0.006540
+15.480000	0.006516
+15.490000	0.006492
+15.500000	0.006468
+15.510000	0.006444
+15.520000	0.006420
+15.530000	0.006396
+15.540000	0.006373
+15.550000	0.006349
+15.560000	0.006325
+15.570000	0.006302
+15.580000	0.006279
+15.590000	0.006255
+15.600000	0.006232
+15.610000	0.006209
+15.620000	0.006186
+15.630000	0.006163
+15.640000	0.006140
+15.650000	0.006117
+15.660000	0.006094
+15.670000	0.006072
+15.680000	0.006049
+15.690000	0.006027
+15.700000	0.006004
+15.710000	0.005982
+15.720000	0.005960
+15.730000	0.005938
+15.740000	0.005916
+15.750000	0.005893
+15.760000	0.005872
+15.770000	0.005850
+15.780000	0.005828
+15.790000	0.005806
+15.800000	0.005785
+15.810000	0.005763
+15.820000	0.005741
+15.830000	0.005720
+15.840000	0.005699
+15.850000	0.005677
+15.860000	0.005656
+15.870000	0.005635
+15.880000	0.005614
+15.890000	0.005593
+15.900000	0.005572
+15.910000	0.005551
+15.920000	0.005531
+15.930000	0.005510
+15.940000	0.005489
+15.950000	0.005469
+15.960000	0.005448
+15.970000	0.005428
+15.980000	0.005408
+15.990000	0.005388
+16.000000	0.005367
+16.010000	0.005347
+16.020000	0.005327
+16.030000	0.005307
+16.040000	0.005287
+16.050000	0.005268
+16.060000	0.005248
+16.070000	0.005228
+16.080000	0.005209
+16.090000	0.005189
+16.100000	0.005170
+16.110000	0.005150
+16.120000	0.005131
+16.130000	0.005112
+16.140000	0.005092
+16.150000	0.005073
+16.160000	0.005054
+16.170000	0.005035
+16.180000	0.005016
+16.190000	0.004998
+16.200000	0.004979
+16.210000	0.004960
+16.220000	0.004941
+16.230000	0.004923
+16.240000	0.004904
+16.250000	0.004886
+16.260000	0.004868
+16.270000	0.004849
+16.280000	0.004831
+16.290000	0.004813
+16.300000	0.004795
+16.310000	0.004777
+16.320000	0.004759
+16.330000	0.004741
+16.340000	0.004723
+16.350000	0.004705
+16.360000	0.004687
+16.370000	0.004670
+16.380000	0.004652
+16.390000	0.004634
+16.400000	0.004617
+16.410000	0.004600
+16.420000	0.004582
+16.430000	0.004565
+16.440000	0.004548
+16.450000	0.004530
+16.460000	0.004513
+16.470000	0.004496
+16.480000	0.004479
+16.490000	0.004462
+16.500000	0.004445
+16.510000	0.004429
+16.520000	0.004412
+16.530000	0.004395
+16.540000	0.004379
+16.550000	0.004362
+16.560000	0.004346
+16.570000	0.004329
+16.580000	0.004313
+16.590000	0.004296
+16.600000	0.004280
+16.610000	0.004264
+16.620000	0.004248
+16.630000	0.004232
+16.640000	0.004216
+16.650000	0.004200
+16.660000	0.004184
+16.670000	0.004168
+16.680000	0.004152
+16.690000	0.004136
+16.700000	0.004121
+16.710000	0.004105
+16.720000	0.004089
+16.730000	0.004074
+16.740000	0.004058
+16.750000	0.004043
+16.760000	0.004028
+16.770000	0.004012
+16.780000	0.003997
+16.790000	0.003982
+16.800000	0.003967
+16.810000	0.003952
+16.820000	0.003937
+16.830000	0.003922
+16.840000	0.003907
+16.850000	0.003892
+16.860000	0.003877
+16.870000	0.003862
+16.880000	0.003848
+16.890000	0.003833
+16.900000	0.003818
+16.910000	0.003804
+16.920000	0.003789
+16.930000	0.003775
+16.940000	0.003760
+16.950000	0.003746
+16.960000	0.003732
+16.970000	0.003718
+16.980000	0.003703
+16.990000	0.003689
+17.000000	0.003675
+17.010000	0.003661
+17.020000	0.003647
+17.030000	0.003633
+17.040000	0.003619
+17.050000	0.003606
+17.060000	0.003592
+17.070000	0.003578
+17.080000	0.003564
+17.090000	0.003551
+17.100000	0.003537
+17.110000	0.003524
+17.120000	0.003510
+17.130000	0.003497
+17.140000	0.003483
+17.150000	0.003470
+17.160000	0.003457
+17.170000	0.003444
+17.180000	0.003430
+17.190000	0.003417
+17.200000	0.003404
+17.210000	0.003391
+17.220000	0.003378
+17.230000	0.003365
+17.240000	0.003352
+17.250000	0.003339
+17.260000	0.003327
+17.270000	0.003314
+17.280000	0.003301
+17.290000	0.003288
+17.300000	0.003276
+17.310000	0.003263
+17.320000	0.003251
+17.330000	0.003238
+17.340000	0.003226
+17.350000	0.003213
+17.360000	0.003201
+17.370000	0.003189
+17.380000	0.003177
+17.390000	0.003164
+17.400000	0.003152
+17.410000	0.003140
+17.420000	0.003128
+17.430000	0.003116
+17.440000	0.003104
+17.450000	0.003092
+17.460000	0.003080
+17.470000	0.003068
+17.480000	0.003057
+17.490000	0.003045
+17.500000	0.003033
+17.510000	0.003021
+17.520000	0.003010
+17.530000	0.002998
+17.540000	0.002987
+17.550000	0.002975
+17.560000	0.002964
+17.570000	0.002952
+17.580000	0.002941
+17.590000	0.002929
+17.600000	0.002918
+17.610000	0.002907
+17.620000	0.002896
+17.630000	0.002885
+17.640000	0.002873
+17.650000	0.002862
+17.660000	0.002851
+17.670000	0.002840
+17.680000	0.002829
+17.690000	0.002818
+17.700000	0.002808
+17.710000	0.002797
+17.720000	0.002786
+17.730000	0.002775
+17.740000	0.002764
+17.750000	0.002754
+17.760000	0.002743
+17.770000	0.002732
+17.780000	0.002722
+17.790000	0.002711
+17.800000	0.002701
+17.810000	0.002690
+17.820000	0.002680
+17.830000	0.002670
+17.840000	0.002659
+17.850000	0.002649
+17.860000	0.002639
+17.870000	0.002628
+17.880000	0.002618
+17.890000	0.002608
+17.900000	0.002598
+17.910000	0.002588
+17.920000	0.002578
+17.930000	0.002568
+17.940000	0.002558
+17.950000	0.002548
+17.960000	0.002538
+17.970000	0.002528
+17.980000	0.002519
+17.990000	0.002509
+18.000000	0.002499
+18.010000	0.002489
+18.020000	0.002480
+18.030000	0.002470
+18.040000	0.002460
+18.050000	0.002451
+18.060000	0.002441
+18.070000	0.002432
+18.080000	0.002422
+18.090000	0.002413
+18.100000	0.002404
+18.110000	0.002394
+18.120000	0.002385
+18.130000	0.002376
+18.140000	0.002366
+18.150000	0.002357
+18.160000	0.002348
+18.170000	0.002339
+18.180000	0.002330
+18.190000	0.002321
+18.200000	0.002312
+18.210000	0.002303
+18.220000	0.002294
+18.230000	0.002285
+18.240000	0.002276
+18.250000	0.002267
+18.260000	0.002258
+18.270000	0.002249
+18.280000	0.002241
+18.290000	0.002232
+18.300000	0.002223
+18.310000	0.002215
+18.320000	0.002206
+18.330000	0.002197
+18.340000	0.002189
+18.350000	0.002180
+18.360000	0.002172
+18.370000	0.002163
+18.380000	0.002155
+18.390000	0.002146
+18.400000	0.002138
+18.410000	0.002130
+18.420000	0.002121
+18.430000	0.002113
+18.440000	0.002105
+18.450000	0.002097
+18.460000	0.002088
+18.470000	0.002080
+18.480000	0.002072
+18.490000	0.002064
+18.500000	0.002056
+18.510000	0.002048
+18.520000	0.002040
+18.530000	0.002032
+18.540000	0.002024
+18.550000	0.002016
+18.560000	0.002008
+18.570000	0.002000
+18.580000	0.001992
+18.590000	0.001985
+18.600000	0.001977
+18.610000	0.001969
+18.620000	0.001961
+18.630000	0.001954
+18.640000	0.001946
+18.650000	0.001938
+18.660000	0.001931
+18.670000	0.001923
+18.680000	0.001916
+18.690000	0.001908
+18.700000	0.001901
+18.710000	0.001893
+18.720000	0.001886
+18.730000	0.001878
+18.740000	0.001871
+18.750000	0.001864
+18.760000	0.001856
+18.770000	0.001849
+18.780000	0.001842
+18.790000	0.001835
+18.800000	0.001827
+18.810000	0.001820
+18.820000	0.001813
+18.830000	0.001806
+18.840000	0.001799
+18.850000	0.001792
+18.860000	0.001785
+18.870000	0.001778
+18.880000	0.001771
+18.890000	0.001764
+18.900000	0.001757
+18.910000	0.001750
+18.920000	0.001743
+18.930000	0.001736
+18.940000	0.001729
+18.950000	0.001722
+18.960000	0.001716
+18.970000	0.001709
+18.980000	0.001702
+18.990000	0.001696
+19.000000	0.001689
+19.010000	0.001682
+19.020000	0.001676
+19.030000	0.001669
+19.040000	0.001662
+19.050000	0.001656
+19.060000	0.001649
+19.070000	0.001643
+19.080000	0.001636
+19.090000	0.001630
+19.100000	0.001623
+19.110000	0.001617
+19.120000	0.001611
+19.130000	0.001604
+19.140000	0.001598
+19.150000	0.001592
+19.160000	0.001585
+19.170000	0.001579
+19.180000	0.001573
+19.190000	0.001567
+19.200000	0.001560
+19.210000	0.001554
+19.220000	0.001548
+19.230000	0.001542
+19.240000	0.001536
+19.250000	0.001530
+19.260000	0.001524
+19.270000	0.001518
+19.280000	0.001512
+19.290000	0.001506
+19.300000	0.001500
+19.310000	0.001494
+19.320000	0.001488
+19.330000	0.001482
+19.340000	0.001476
+19.350000	0.001470
+19.360000	0.001465
+19.370000	0.001459
+19.380000	0.001453
+19.390000	0.001447
+19.400000	0.001442
+19.410000	0.001436
+19.420000	0.001430
+19.430000	0.001424
+19.440000	0.001419
+19.450000	0.001413
+19.460000	0.001408
+19.470000	0.001402
+19.480000	0.001396
+19.490000	0.001391
+19.500000	0.001385
+19.510000	0.001380
+19.520000	0.001374
+19.530000	0.001369
+19.540000	0.001364
+19.550000	0.001358
+19.560000	0.001353
+19.570000	0.001347
+19.580000	0.001342
+19.590000	0.001337
+19.600000	0.001331
+19.610000	0.001326
+19.620000	0.001321
+19.630000	0.001316
+19.640000	0.001310
+19.650000	0.001305
+19.660000	0.001300
+19.670000	0.001295
+19.680000	0.001290
+19.690000	0.001285
+19.700000	0.001279
+19.710000	0.001274
+19.720000	0.001269
+19.730000	0.001264
+19.740000	0.001259
+19.750000	0.001254
+19.760000	0.001249
+19.770000	0.001244
+19.780000	0.001239
+19.790000	0.001234
+19.800000	0.001229
+19.810000	0.001225
+19.820000	0.001220
+19.830000	0.001215
+19.840000	0.001210
+19.850000	0.001205
+19.860000	0.001200
+19.870000	0.001196
+19.880000	0.001191
+19.890000	0.001186
+19.900000	0.001181
+19.910000	0.001177
+19.920000	0.001172
+19.930000	0.001167
+19.940000	0.001163
+19.950000	0.001158
+19.960000	0.001153
+19.970000	0.001149
+19.980000	0.001144
+19.990000	0.001140
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/gamma_6.0_0.5.dat b/v0.2-M1/chi/reference-manual/distribution_plots/gamma_6.0_0.5.dat
new file mode 100644
index 0000000..d689fbc
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/gamma_6.0_0.5.dat
@@ -0,0 +1,2012 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.010000	0.000000
+0.020000	0.000000
+0.030000	0.000000
+0.040000	0.000000
+0.050000	0.000000
+0.060000	0.000000
+0.070000	0.000001
+0.080000	0.000001
+0.090000	0.000003
+0.100000	0.000004
+0.110000	0.000007
+0.120000	0.000010
+0.130000	0.000015
+0.140000	0.000022
+0.150000	0.000030
+0.160000	0.000041
+0.170000	0.000054
+0.180000	0.000070
+0.190000	0.000090
+0.200000	0.000114
+0.210000	0.000143
+0.220000	0.000177
+0.230000	0.000217
+0.240000	0.000263
+0.250000	0.000316
+0.260000	0.000377
+0.270000	0.000446
+0.280000	0.000524
+0.290000	0.000612
+0.300000	0.000711
+0.310000	0.000821
+0.320000	0.000944
+0.330000	0.001079
+0.340000	0.001228
+0.350000	0.001391
+0.360000	0.001570
+0.370000	0.001765
+0.380000	0.001976
+0.390000	0.002206
+0.400000	0.002454
+0.410000	0.002721
+0.420000	0.003009
+0.430000	0.003318
+0.440000	0.003648
+0.450000	0.004001
+0.460000	0.004378
+0.470000	0.004778
+0.480000	0.005203
+0.490000	0.005654
+0.500000	0.006131
+0.510000	0.006635
+0.520000	0.007167
+0.530000	0.007727
+0.540000	0.008316
+0.550000	0.008935
+0.560000	0.009584
+0.570000	0.010263
+0.580000	0.010974
+0.590000	0.011716
+0.600000	0.012491
+0.610000	0.013299
+0.620000	0.014139
+0.630000	0.015014
+0.640000	0.015922
+0.650000	0.016865
+0.660000	0.017842
+0.670000	0.018855
+0.680000	0.019902
+0.690000	0.020985
+0.700000	0.022104
+0.710000	0.023259
+0.720000	0.024450
+0.730000	0.025677
+0.740000	0.026940
+0.750000	0.028240
+0.760000	0.029576
+0.770000	0.030948
+0.780000	0.032357
+0.790000	0.033803
+0.800000	0.035284
+0.810000	0.036802
+0.820000	0.038355
+0.830000	0.039945
+0.840000	0.041570
+0.850000	0.043231
+0.860000	0.044927
+0.870000	0.046658
+0.880000	0.048423
+0.890000	0.050223
+0.900000	0.052057
+0.910000	0.053925
+0.920000	0.055826
+0.930000	0.057760
+0.940000	0.059726
+0.950000	0.061724
+0.960000	0.063754
+0.970000	0.065815
+0.980000	0.067907
+0.990000	0.070028
+1.000000	0.072179
+1.010000	0.074359
+1.020000	0.076567
+1.030000	0.078802
+1.040000	0.081065
+1.050000	0.083354
+1.060000	0.085669
+1.070000	0.088009
+1.080000	0.090374
+1.090000	0.092762
+1.100000	0.095173
+1.110000	0.097607
+1.120000	0.100062
+1.130000	0.102538
+1.140000	0.105034
+1.150000	0.107550
+1.160000	0.110084
+1.170000	0.112636
+1.180000	0.115206
+1.190000	0.117791
+1.200000	0.120392
+1.210000	0.123008
+1.220000	0.125638
+1.230000	0.128280
+1.240000	0.130935
+1.250000	0.133602
+1.260000	0.136279
+1.270000	0.138966
+1.280000	0.141662
+1.290000	0.144367
+1.300000	0.147079
+1.310000	0.149797
+1.320000	0.152521
+1.330000	0.155251
+1.340000	0.157984
+1.350000	0.160721
+1.360000	0.163460
+1.370000	0.166201
+1.380000	0.168943
+1.390000	0.171686
+1.400000	0.174427
+1.410000	0.177167
+1.420000	0.179905
+1.430000	0.182640
+1.440000	0.185372
+1.450000	0.188098
+1.460000	0.190820
+1.470000	0.193535
+1.480000	0.196244
+1.490000	0.198945
+1.500000	0.201638
+1.510000	0.204322
+1.520000	0.206996
+1.530000	0.209660
+1.540000	0.212312
+1.550000	0.214953
+1.560000	0.217582
+1.570000	0.220197
+1.580000	0.222799
+1.590000	0.225386
+1.600000	0.227959
+1.610000	0.230515
+1.620000	0.233056
+1.630000	0.235579
+1.640000	0.238085
+1.650000	0.240573
+1.660000	0.243042
+1.670000	0.245492
+1.680000	0.247922
+1.690000	0.250332
+1.700000	0.252721
+1.710000	0.255089
+1.720000	0.257435
+1.730000	0.259759
+1.740000	0.262060
+1.750000	0.264337
+1.760000	0.266591
+1.770000	0.268821
+1.780000	0.271026
+1.790000	0.273206
+1.800000	0.275360
+1.810000	0.277489
+1.820000	0.279591
+1.830000	0.281667
+1.840000	0.283716
+1.850000	0.285738
+1.860000	0.287732
+1.870000	0.289698
+1.880000	0.291636
+1.890000	0.293545
+1.900000	0.295425
+1.910000	0.297277
+1.920000	0.299098
+1.930000	0.300891
+1.940000	0.302653
+1.950000	0.304385
+1.960000	0.306087
+1.970000	0.307758
+1.980000	0.309399
+1.990000	0.311008
+2.000000	0.312587
+2.010000	0.314134
+2.020000	0.315650
+2.030000	0.317134
+2.040000	0.318587
+2.050000	0.320008
+2.060000	0.321397
+2.070000	0.322754
+2.080000	0.324079
+2.090000	0.325371
+2.100000	0.326632
+2.110000	0.327860
+2.120000	0.329056
+2.130000	0.330219
+2.140000	0.331350
+2.150000	0.332449
+2.160000	0.333515
+2.170000	0.334549
+2.180000	0.335550
+2.190000	0.336519
+2.200000	0.337455
+2.210000	0.338360
+2.220000	0.339231
+2.230000	0.340071
+2.240000	0.340878
+2.250000	0.341654
+2.260000	0.342397
+2.270000	0.343108
+2.280000	0.343788
+2.290000	0.344435
+2.300000	0.345051
+2.310000	0.345635
+2.320000	0.346188
+2.330000	0.346710
+2.340000	0.347200
+2.350000	0.347659
+2.360000	0.348088
+2.370000	0.348485
+2.380000	0.348852
+2.390000	0.349189
+2.400000	0.349495
+2.410000	0.349772
+2.420000	0.350018
+2.430000	0.350234
+2.440000	0.350422
+2.450000	0.350579
+2.460000	0.350708
+2.470000	0.350807
+2.480000	0.350878
+2.490000	0.350921
+2.500000	0.350935
+2.510000	0.350921
+2.520000	0.350879
+2.530000	0.350809
+2.540000	0.350713
+2.550000	0.350589
+2.560000	0.350438
+2.570000	0.350260
+2.580000	0.350056
+2.590000	0.349826
+2.600000	0.349570
+2.610000	0.349288
+2.620000	0.348981
+2.630000	0.348649
+2.640000	0.348292
+2.650000	0.347910
+2.660000	0.347504
+2.670000	0.347074
+2.680000	0.346621
+2.690000	0.346143
+2.700000	0.345643
+2.710000	0.345119
+2.720000	0.344573
+2.730000	0.344004
+2.740000	0.343414
+2.750000	0.342801
+2.760000	0.342167
+2.770000	0.341512
+2.780000	0.340836
+2.790000	0.340139
+2.800000	0.339422
+2.810000	0.338685
+2.820000	0.337927
+2.830000	0.337151
+2.840000	0.336355
+2.850000	0.335540
+2.860000	0.334707
+2.870000	0.333855
+2.880000	0.332985
+2.890000	0.332098
+2.900000	0.331193
+2.910000	0.330271
+2.920000	0.329331
+2.930000	0.328376
+2.940000	0.327404
+2.950000	0.326416
+2.960000	0.325412
+2.970000	0.324393
+2.980000	0.323359
+2.990000	0.322310
+3.000000	0.321246
+3.010000	0.320168
+3.020000	0.319076
+3.030000	0.317971
+3.040000	0.316852
+3.050000	0.315720
+3.060000	0.314575
+3.070000	0.313417
+3.080000	0.312247
+3.090000	0.311065
+3.100000	0.309871
+3.110000	0.308666
+3.120000	0.307450
+3.130000	0.306222
+3.140000	0.304984
+3.150000	0.303736
+3.160000	0.302477
+3.170000	0.301209
+3.180000	0.299931
+3.190000	0.298644
+3.200000	0.297347
+3.210000	0.296042
+3.220000	0.294728
+3.230000	0.293406
+3.240000	0.292076
+3.250000	0.290738
+3.260000	0.289392
+3.270000	0.288039
+3.280000	0.286679
+3.290000	0.285312
+3.300000	0.283939
+3.310000	0.282559
+3.320000	0.281173
+3.330000	0.279781
+3.340000	0.278384
+3.350000	0.276981
+3.360000	0.275573
+3.370000	0.274160
+3.380000	0.272742
+3.390000	0.271319
+3.400000	0.269893
+3.410000	0.268462
+3.420000	0.267027
+3.430000	0.265588
+3.440000	0.264147
+3.450000	0.262701
+3.460000	0.261253
+3.470000	0.259802
+3.480000	0.258348
+3.490000	0.256892
+3.500000	0.255433
+3.510000	0.253973
+3.520000	0.252510
+3.530000	0.251046
+3.540000	0.249580
+3.550000	0.248113
+3.560000	0.246645
+3.570000	0.245176
+3.580000	0.243706
+3.590000	0.242235
+3.600000	0.240764
+3.610000	0.239292
+3.620000	0.237821
+3.630000	0.236349
+3.640000	0.234878
+3.650000	0.233407
+3.660000	0.231936
+3.670000	0.230466
+3.680000	0.228997
+3.690000	0.227529
+3.700000	0.226062
+3.710000	0.224597
+3.720000	0.223132
+3.730000	0.221670
+3.740000	0.220208
+3.750000	0.218749
+3.760000	0.217292
+3.770000	0.215837
+3.780000	0.214384
+3.790000	0.212933
+3.800000	0.211485
+3.810000	0.210039
+3.820000	0.208596
+3.830000	0.207156
+3.840000	0.205718
+3.850000	0.204284
+3.860000	0.202853
+3.870000	0.201425
+3.880000	0.200001
+3.890000	0.198580
+3.900000	0.197163
+3.910000	0.195749
+3.920000	0.194339
+3.930000	0.192933
+3.940000	0.191531
+3.950000	0.190133
+3.960000	0.188739
+3.970000	0.187350
+3.980000	0.185964
+3.990000	0.184584
+4.000000	0.183207
+4.010000	0.181836
+4.020000	0.180468
+4.030000	0.179106
+4.040000	0.177749
+4.050000	0.176396
+4.060000	0.175048
+4.070000	0.173706
+4.080000	0.172368
+4.090000	0.171036
+4.100000	0.169708
+4.110000	0.168386
+4.120000	0.167070
+4.130000	0.165759
+4.140000	0.164453
+4.150000	0.163153
+4.160000	0.161858
+4.170000	0.160569
+4.180000	0.159286
+4.190000	0.158009
+4.200000	0.156737
+4.210000	0.155471
+4.220000	0.154211
+4.230000	0.152957
+4.240000	0.151709
+4.250000	0.150467
+4.260000	0.149231
+4.270000	0.148001
+4.280000	0.146777
+4.290000	0.145559
+4.300000	0.144347
+4.310000	0.143142
+4.320000	0.141943
+4.330000	0.140750
+4.340000	0.139563
+4.350000	0.138383
+4.360000	0.137209
+4.370000	0.136042
+4.380000	0.134881
+4.390000	0.133726
+4.400000	0.132578
+4.410000	0.131436
+4.420000	0.130301
+4.430000	0.129172
+4.440000	0.128050
+4.450000	0.126934
+4.460000	0.125825
+4.470000	0.124722
+4.480000	0.123626
+4.490000	0.122537
+4.500000	0.121454
+4.510000	0.120377
+4.520000	0.119308
+4.530000	0.118245
+4.540000	0.117188
+4.550000	0.116138
+4.560000	0.115095
+4.570000	0.114059
+4.580000	0.113029
+4.590000	0.112005
+4.600000	0.110989
+4.610000	0.109979
+4.620000	0.108975
+4.630000	0.107978
+4.640000	0.106988
+4.650000	0.106005
+4.660000	0.105028
+4.670000	0.104057
+4.680000	0.103094
+4.690000	0.102136
+4.700000	0.101186
+4.710000	0.100242
+4.720000	0.099304
+4.730000	0.098374
+4.740000	0.097449
+4.750000	0.096532
+4.760000	0.095620
+4.770000	0.094716
+4.780000	0.093817
+4.790000	0.092926
+4.800000	0.092040
+4.810000	0.091161
+4.820000	0.090289
+4.830000	0.089423
+4.840000	0.088564
+4.850000	0.087710
+4.860000	0.086864
+4.870000	0.086023
+4.880000	0.085189
+4.890000	0.084361
+4.900000	0.083540
+4.910000	0.082725
+4.920000	0.081916
+4.930000	0.081113
+4.940000	0.080316
+4.950000	0.079526
+4.960000	0.078742
+4.970000	0.077964
+4.980000	0.077192
+4.990000	0.076426
+5.000000	0.075667
+5.010000	0.074913
+5.020000	0.074165
+5.030000	0.073424
+5.040000	0.072688
+5.050000	0.071958
+5.060000	0.071235
+5.070000	0.070517
+5.080000	0.069805
+5.090000	0.069099
+5.100000	0.068398
+5.110000	0.067704
+5.120000	0.067015
+5.130000	0.066332
+5.140000	0.065655
+5.150000	0.064983
+5.160000	0.064317
+5.170000	0.063657
+5.180000	0.063002
+5.190000	0.062353
+5.200000	0.061710
+5.210000	0.061072
+5.220000	0.060439
+5.230000	0.059812
+5.240000	0.059190
+5.250000	0.058574
+5.260000	0.057963
+5.270000	0.057357
+5.280000	0.056757
+5.290000	0.056162
+5.300000	0.055572
+5.310000	0.054987
+5.320000	0.054408
+5.330000	0.053834
+5.340000	0.053265
+5.350000	0.052701
+5.360000	0.052142
+5.370000	0.051588
+5.380000	0.051039
+5.390000	0.050495
+5.400000	0.049956
+5.410000	0.049422
+5.420000	0.048893
+5.430000	0.048368
+5.440000	0.047849
+5.450000	0.047334
+5.460000	0.046824
+5.470000	0.046318
+5.480000	0.045818
+5.490000	0.045322
+5.500000	0.044830
+5.510000	0.044344
+5.520000	0.043861
+5.530000	0.043384
+5.540000	0.042911
+5.550000	0.042442
+5.560000	0.041978
+5.570000	0.041518
+5.580000	0.041062
+5.590000	0.040611
+5.600000	0.040164
+5.610000	0.039722
+5.620000	0.039284
+5.630000	0.038849
+5.640000	0.038420
+5.650000	0.037994
+5.660000	0.037572
+5.670000	0.037155
+5.680000	0.036741
+5.690000	0.036332
+5.700000	0.035927
+5.710000	0.035525
+5.720000	0.035128
+5.730000	0.034734
+5.740000	0.034345
+5.750000	0.033959
+5.760000	0.033577
+5.770000	0.033199
+5.780000	0.032824
+5.790000	0.032453
+5.800000	0.032087
+5.810000	0.031723
+5.820000	0.031364
+5.830000	0.031008
+5.840000	0.030655
+5.850000	0.030306
+5.860000	0.029961
+5.870000	0.029619
+5.880000	0.029281
+5.890000	0.028946
+5.900000	0.028614
+5.910000	0.028286
+5.920000	0.027962
+5.930000	0.027640
+5.940000	0.027322
+5.950000	0.027007
+5.960000	0.026696
+5.970000	0.026387
+5.980000	0.026082
+5.990000	0.025780
+6.000000	0.025481
+6.010000	0.025186
+6.020000	0.024893
+6.030000	0.024603
+6.040000	0.024317
+6.050000	0.024033
+6.060000	0.023753
+6.070000	0.023475
+6.080000	0.023200
+6.090000	0.022929
+6.100000	0.022660
+6.110000	0.022394
+6.120000	0.022131
+6.130000	0.021870
+6.140000	0.021612
+6.150000	0.021358
+6.160000	0.021105
+6.170000	0.020856
+6.180000	0.020609
+6.190000	0.020365
+6.200000	0.020124
+6.210000	0.019885
+6.220000	0.019648
+6.230000	0.019415
+6.240000	0.019183
+6.250000	0.018955
+6.260000	0.018729
+6.270000	0.018505
+6.280000	0.018283
+6.290000	0.018065
+6.300000	0.017848
+6.310000	0.017634
+6.320000	0.017422
+6.330000	0.017213
+6.340000	0.017006
+6.350000	0.016801
+6.360000	0.016598
+6.370000	0.016398
+6.380000	0.016200
+6.390000	0.016004
+6.400000	0.015810
+6.410000	0.015618
+6.420000	0.015429
+6.430000	0.015241
+6.440000	0.015056
+6.450000	0.014873
+6.460000	0.014692
+6.470000	0.014513
+6.480000	0.014336
+6.490000	0.014161
+6.500000	0.013987
+6.510000	0.013816
+6.520000	0.013647
+6.530000	0.013480
+6.540000	0.013314
+6.550000	0.013151
+6.560000	0.012989
+6.570000	0.012829
+6.580000	0.012671
+6.590000	0.012515
+6.600000	0.012360
+6.610000	0.012208
+6.620000	0.012057
+6.630000	0.011908
+6.640000	0.011760
+6.650000	0.011614
+6.660000	0.011470
+6.670000	0.011328
+6.680000	0.011187
+6.690000	0.011048
+6.700000	0.010910
+6.710000	0.010774
+6.720000	0.010640
+6.730000	0.010507
+6.740000	0.010375
+6.750000	0.010246
+6.760000	0.010117
+6.770000	0.009991
+6.780000	0.009865
+6.790000	0.009742
+6.800000	0.009619
+6.810000	0.009498
+6.820000	0.009379
+6.830000	0.009261
+6.840000	0.009144
+6.850000	0.009029
+6.860000	0.008915
+6.870000	0.008802
+6.880000	0.008691
+6.890000	0.008581
+6.900000	0.008472
+6.910000	0.008364
+6.920000	0.008258
+6.930000	0.008153
+6.940000	0.008050
+6.950000	0.007947
+6.960000	0.007846
+6.970000	0.007746
+6.980000	0.007648
+6.990000	0.007550
+7.000000	0.007454
+7.010000	0.007358
+7.020000	0.007264
+7.030000	0.007171
+7.040000	0.007079
+7.050000	0.006989
+7.060000	0.006899
+7.070000	0.006810
+7.080000	0.006723
+7.090000	0.006636
+7.100000	0.006551
+7.110000	0.006467
+7.120000	0.006383
+7.130000	0.006301
+7.140000	0.006220
+7.150000	0.006139
+7.160000	0.006060
+7.170000	0.005982
+7.180000	0.005904
+7.190000	0.005828
+7.200000	0.005752
+7.210000	0.005677
+7.220000	0.005604
+7.230000	0.005531
+7.240000	0.005459
+7.250000	0.005388
+7.260000	0.005318
+7.270000	0.005248
+7.280000	0.005180
+7.290000	0.005112
+7.300000	0.005046
+7.310000	0.004980
+7.320000	0.004915
+7.330000	0.004850
+7.340000	0.004787
+7.350000	0.004724
+7.360000	0.004662
+7.370000	0.004601
+7.380000	0.004540
+7.390000	0.004481
+7.400000	0.004422
+7.410000	0.004364
+7.420000	0.004306
+7.430000	0.004249
+7.440000	0.004193
+7.450000	0.004138
+7.460000	0.004083
+7.470000	0.004029
+7.480000	0.003976
+7.490000	0.003924
+7.500000	0.003872
+7.510000	0.003820
+7.520000	0.003770
+7.530000	0.003720
+7.540000	0.003670
+7.550000	0.003621
+7.560000	0.003573
+7.570000	0.003526
+7.580000	0.003479
+7.590000	0.003433
+7.600000	0.003387
+7.610000	0.003342
+7.620000	0.003297
+7.630000	0.003253
+7.640000	0.003210
+7.650000	0.003167
+7.660000	0.003124
+7.670000	0.003082
+7.680000	0.003041
+7.690000	0.003000
+7.700000	0.002960
+7.710000	0.002920
+7.720000	0.002881
+7.730000	0.002843
+7.740000	0.002804
+7.750000	0.002767
+7.760000	0.002729
+7.770000	0.002693
+7.780000	0.002656
+7.790000	0.002620
+7.800000	0.002585
+7.810000	0.002550
+7.820000	0.002516
+7.830000	0.002482
+7.840000	0.002448
+7.850000	0.002415
+7.860000	0.002382
+7.870000	0.002350
+7.880000	0.002318
+7.890000	0.002287
+7.900000	0.002256
+7.910000	0.002225
+7.920000	0.002195
+7.930000	0.002165
+7.940000	0.002136
+7.950000	0.002106
+7.960000	0.002078
+7.970000	0.002049
+7.980000	0.002021
+7.990000	0.001994
+8.000000	0.001967
+8.010000	0.001940
+8.020000	0.001913
+8.030000	0.001887
+8.040000	0.001861
+8.050000	0.001836
+8.060000	0.001811
+8.070000	0.001786
+8.080000	0.001761
+8.090000	0.001737
+8.100000	0.001713
+8.110000	0.001690
+8.120000	0.001667
+8.130000	0.001644
+8.140000	0.001621
+8.150000	0.001599
+8.160000	0.001577
+8.170000	0.001555
+8.180000	0.001534
+8.190000	0.001512
+8.200000	0.001492
+8.210000	0.001471
+8.220000	0.001451
+8.230000	0.001431
+8.240000	0.001411
+8.250000	0.001391
+8.260000	0.001372
+8.270000	0.001353
+8.280000	0.001334
+8.290000	0.001316
+8.300000	0.001297
+8.310000	0.001279
+8.320000	0.001262
+8.330000	0.001244
+8.340000	0.001227
+8.350000	0.001210
+8.360000	0.001193
+8.370000	0.001176
+8.380000	0.001160
+8.390000	0.001144
+8.400000	0.001128
+8.410000	0.001112
+8.420000	0.001097
+8.430000	0.001081
+8.440000	0.001066
+8.450000	0.001051
+8.460000	0.001037
+8.470000	0.001022
+8.480000	0.001008
+8.490000	0.000994
+8.500000	0.000980
+8.510000	0.000966
+8.520000	0.000952
+8.530000	0.000939
+8.540000	0.000926
+8.550000	0.000913
+8.560000	0.000900
+8.570000	0.000887
+8.580000	0.000875
+8.590000	0.000863
+8.600000	0.000850
+8.610000	0.000838
+8.620000	0.000827
+8.630000	0.000815
+8.640000	0.000803
+8.650000	0.000792
+8.660000	0.000781
+8.670000	0.000770
+8.680000	0.000759
+8.690000	0.000748
+8.700000	0.000738
+8.710000	0.000727
+8.720000	0.000717
+8.730000	0.000707
+8.740000	0.000697
+8.750000	0.000687
+8.760000	0.000677
+8.770000	0.000668
+8.780000	0.000658
+8.790000	0.000649
+8.800000	0.000639
+8.810000	0.000630
+8.820000	0.000621
+8.830000	0.000613
+8.840000	0.000604
+8.850000	0.000595
+8.860000	0.000587
+8.870000	0.000578
+8.880000	0.000570
+8.890000	0.000562
+8.900000	0.000554
+8.910000	0.000546
+8.920000	0.000538
+8.930000	0.000531
+8.940000	0.000523
+8.950000	0.000516
+8.960000	0.000508
+8.970000	0.000501
+8.980000	0.000494
+8.990000	0.000487
+9.000000	0.000480
+9.010000	0.000473
+9.020000	0.000466
+9.030000	0.000459
+9.040000	0.000453
+9.050000	0.000446
+9.060000	0.000440
+9.070000	0.000433
+9.080000	0.000427
+9.090000	0.000421
+9.100000	0.000415
+9.110000	0.000409
+9.120000	0.000403
+9.130000	0.000397
+9.140000	0.000392
+9.150000	0.000386
+9.160000	0.000380
+9.170000	0.000375
+9.180000	0.000369
+9.190000	0.000364
+9.200000	0.000359
+9.210000	0.000354
+9.220000	0.000349
+9.230000	0.000344
+9.240000	0.000339
+9.250000	0.000334
+9.260000	0.000329
+9.270000	0.000324
+9.280000	0.000319
+9.290000	0.000315
+9.300000	0.000310
+9.310000	0.000306
+9.320000	0.000301
+9.330000	0.000297
+9.340000	0.000292
+9.350000	0.000288
+9.360000	0.000284
+9.370000	0.000280
+9.380000	0.000276
+9.390000	0.000272
+9.400000	0.000268
+9.410000	0.000264
+9.420000	0.000260
+9.430000	0.000256
+9.440000	0.000253
+9.450000	0.000249
+9.460000	0.000245
+9.470000	0.000242
+9.480000	0.000238
+9.490000	0.000235
+9.500000	0.000231
+9.510000	0.000228
+9.520000	0.000225
+9.530000	0.000221
+9.540000	0.000218
+9.550000	0.000215
+9.560000	0.000212
+9.570000	0.000209
+9.580000	0.000205
+9.590000	0.000202
+9.600000	0.000199
+9.610000	0.000197
+9.620000	0.000194
+9.630000	0.000191
+9.640000	0.000188
+9.650000	0.000185
+9.660000	0.000183
+9.670000	0.000180
+9.680000	0.000177
+9.690000	0.000175
+9.700000	0.000172
+9.710000	0.000169
+9.720000	0.000167
+9.730000	0.000165
+9.740000	0.000162
+9.750000	0.000160
+9.760000	0.000157
+9.770000	0.000155
+9.780000	0.000153
+9.790000	0.000150
+9.800000	0.000148
+9.810000	0.000146
+9.820000	0.000144
+9.830000	0.000142
+9.840000	0.000140
+9.850000	0.000138
+9.860000	0.000136
+9.870000	0.000134
+9.880000	0.000132
+9.890000	0.000130
+9.900000	0.000128
+9.910000	0.000126
+9.920000	0.000124
+9.930000	0.000122
+9.940000	0.000120
+9.950000	0.000118
+9.960000	0.000117
+9.970000	0.000115
+9.980000	0.000113
+9.990000	0.000112
+10.000000	0.000110
+10.010000	0.000108
+10.020000	0.000107
+10.030000	0.000105
+10.040000	0.000104
+10.050000	0.000102
+10.060000	0.000100
+10.070000	0.000099
+10.080000	0.000097
+10.090000	0.000096
+10.100000	0.000095
+10.110000	0.000093
+10.120000	0.000092
+10.130000	0.000090
+10.140000	0.000089
+10.150000	0.000088
+10.160000	0.000086
+10.170000	0.000085
+10.180000	0.000084
+10.190000	0.000083
+10.200000	0.000081
+10.210000	0.000080
+10.220000	0.000079
+10.230000	0.000078
+10.240000	0.000077
+10.250000	0.000075
+10.260000	0.000074
+10.270000	0.000073
+10.280000	0.000072
+10.290000	0.000071
+10.300000	0.000070
+10.310000	0.000069
+10.320000	0.000068
+10.330000	0.000067
+10.340000	0.000066
+10.350000	0.000065
+10.360000	0.000064
+10.370000	0.000063
+10.380000	0.000062
+10.390000	0.000061
+10.400000	0.000060
+10.410000	0.000059
+10.420000	0.000058
+10.430000	0.000057
+10.440000	0.000057
+10.450000	0.000056
+10.460000	0.000055
+10.470000	0.000054
+10.480000	0.000053
+10.490000	0.000052
+10.500000	0.000052
+10.510000	0.000051
+10.520000	0.000050
+10.530000	0.000049
+10.540000	0.000049
+10.550000	0.000048
+10.560000	0.000047
+10.570000	0.000046
+10.580000	0.000046
+10.590000	0.000045
+10.600000	0.000044
+10.610000	0.000044
+10.620000	0.000043
+10.630000	0.000042
+10.640000	0.000042
+10.650000	0.000041
+10.660000	0.000040
+10.670000	0.000040
+10.680000	0.000039
+10.690000	0.000039
+10.700000	0.000038
+10.710000	0.000037
+10.720000	0.000037
+10.730000	0.000036
+10.740000	0.000036
+10.750000	0.000035
+10.760000	0.000035
+10.770000	0.000034
+10.780000	0.000034
+10.790000	0.000033
+10.800000	0.000033
+10.810000	0.000032
+10.820000	0.000032
+10.830000	0.000031
+10.840000	0.000031
+10.850000	0.000030
+10.860000	0.000030
+10.870000	0.000029
+10.880000	0.000029
+10.890000	0.000028
+10.900000	0.000028
+10.910000	0.000028
+10.920000	0.000027
+10.930000	0.000027
+10.940000	0.000026
+10.950000	0.000026
+10.960000	0.000025
+10.970000	0.000025
+10.980000	0.000025
+10.990000	0.000024
+11.000000	0.000024
+11.010000	0.000024
+11.020000	0.000023
+11.030000	0.000023
+11.040000	0.000023
+11.050000	0.000022
+11.060000	0.000022
+11.070000	0.000022
+11.080000	0.000021
+11.090000	0.000021
+11.100000	0.000021
+11.110000	0.000020
+11.120000	0.000020
+11.130000	0.000020
+11.140000	0.000019
+11.150000	0.000019
+11.160000	0.000019
+11.170000	0.000018
+11.180000	0.000018
+11.190000	0.000018
+11.200000	0.000018
+11.210000	0.000017
+11.220000	0.000017
+11.230000	0.000017
+11.240000	0.000017
+11.250000	0.000016
+11.260000	0.000016
+11.270000	0.000016
+11.280000	0.000016
+11.290000	0.000015
+11.300000	0.000015
+11.310000	0.000015
+11.320000	0.000015
+11.330000	0.000014
+11.340000	0.000014
+11.350000	0.000014
+11.360000	0.000014
+11.370000	0.000013
+11.380000	0.000013
+11.390000	0.000013
+11.400000	0.000013
+11.410000	0.000013
+11.420000	0.000012
+11.430000	0.000012
+11.440000	0.000012
+11.450000	0.000012
+11.460000	0.000012
+11.470000	0.000012
+11.480000	0.000011
+11.490000	0.000011
+11.500000	0.000011
+11.510000	0.000011
+11.520000	0.000011
+11.530000	0.000011
+11.540000	0.000010
+11.550000	0.000010
+11.560000	0.000010
+11.570000	0.000010
+11.580000	0.000010
+11.590000	0.000010
+11.600000	0.000009
+11.610000	0.000009
+11.620000	0.000009
+11.630000	0.000009
+11.640000	0.000009
+11.650000	0.000009
+11.660000	0.000009
+11.670000	0.000008
+11.680000	0.000008
+11.690000	0.000008
+11.700000	0.000008
+11.710000	0.000008
+11.720000	0.000008
+11.730000	0.000008
+11.740000	0.000008
+11.750000	0.000007
+11.760000	0.000007
+11.770000	0.000007
+11.780000	0.000007
+11.790000	0.000007
+11.800000	0.000007
+11.810000	0.000007
+11.820000	0.000007
+11.830000	0.000007
+11.840000	0.000006
+11.850000	0.000006
+11.860000	0.000006
+11.870000	0.000006
+11.880000	0.000006
+11.890000	0.000006
+11.900000	0.000006
+11.910000	0.000006
+11.920000	0.000006
+11.930000	0.000006
+11.940000	0.000006
+11.950000	0.000005
+11.960000	0.000005
+11.970000	0.000005
+11.980000	0.000005
+11.990000	0.000005
+12.000000	0.000005
+12.010000	0.000005
+12.020000	0.000005
+12.030000	0.000005
+12.040000	0.000005
+12.050000	0.000005
+12.060000	0.000005
+12.070000	0.000004
+12.080000	0.000004
+12.090000	0.000004
+12.100000	0.000004
+12.110000	0.000004
+12.120000	0.000004
+12.130000	0.000004
+12.140000	0.000004
+12.150000	0.000004
+12.160000	0.000004
+12.170000	0.000004
+12.180000	0.000004
+12.190000	0.000004
+12.200000	0.000004
+12.210000	0.000004
+12.220000	0.000004
+12.230000	0.000003
+12.240000	0.000003
+12.250000	0.000003
+12.260000	0.000003
+12.270000	0.000003
+12.280000	0.000003
+12.290000	0.000003
+12.300000	0.000003
+12.310000	0.000003
+12.320000	0.000003
+12.330000	0.000003
+12.340000	0.000003
+12.350000	0.000003
+12.360000	0.000003
+12.370000	0.000003
+12.380000	0.000003
+12.390000	0.000003
+12.400000	0.000003
+12.410000	0.000003
+12.420000	0.000003
+12.430000	0.000003
+12.440000	0.000002
+12.450000	0.000002
+12.460000	0.000002
+12.470000	0.000002
+12.480000	0.000002
+12.490000	0.000002
+12.500000	0.000002
+12.510000	0.000002
+12.520000	0.000002
+12.530000	0.000002
+12.540000	0.000002
+12.550000	0.000002
+12.560000	0.000002
+12.570000	0.000002
+12.580000	0.000002
+12.590000	0.000002
+12.600000	0.000002
+12.610000	0.000002
+12.620000	0.000002
+12.630000	0.000002
+12.640000	0.000002
+12.650000	0.000002
+12.660000	0.000002
+12.670000	0.000002
+12.680000	0.000002
+12.690000	0.000002
+12.700000	0.000002
+12.710000	0.000002
+12.720000	0.000002
+12.730000	0.000002
+12.740000	0.000002
+12.750000	0.000002
+12.760000	0.000001
+12.770000	0.000001
+12.780000	0.000001
+12.790000	0.000001
+12.800000	0.000001
+12.810000	0.000001
+12.820000	0.000001
+12.830000	0.000001
+12.840000	0.000001
+12.850000	0.000001
+12.860000	0.000001
+12.870000	0.000001
+12.880000	0.000001
+12.890000	0.000001
+12.900000	0.000001
+12.910000	0.000001
+12.920000	0.000001
+12.930000	0.000001
+12.940000	0.000001
+12.950000	0.000001
+12.960000	0.000001
+12.970000	0.000001
+12.980000	0.000001
+12.990000	0.000001
+13.000000	0.000001
+13.010000	0.000001
+13.020000	0.000001
+13.030000	0.000001
+13.040000	0.000001
+13.050000	0.000001
+13.060000	0.000001
+13.070000	0.000001
+13.080000	0.000001
+13.090000	0.000001
+13.100000	0.000001
+13.110000	0.000001
+13.120000	0.000001
+13.130000	0.000001
+13.140000	0.000001
+13.150000	0.000001
+13.160000	0.000001
+13.170000	0.000001
+13.180000	0.000001
+13.190000	0.000001
+13.200000	0.000001
+13.210000	0.000001
+13.220000	0.000001
+13.230000	0.000001
+13.240000	0.000001
+13.250000	0.000001
+13.260000	0.000001
+13.270000	0.000001
+13.280000	0.000001
+13.290000	0.000001
+13.300000	0.000001
+13.310000	0.000001
+13.320000	0.000001
+13.330000	0.000001
+13.340000	0.000001
+13.350000	0.000001
+13.360000	0.000001
+13.370000	0.000001
+13.380000	0.000001
+13.390000	0.000001
+13.400000	0.000001
+13.410000	0.000001
+13.420000	0.000001
+13.430000	0.000001
+13.440000	0.000000
+13.450000	0.000000
+13.460000	0.000000
+13.470000	0.000000
+13.480000	0.000000
+13.490000	0.000000
+13.500000	0.000000
+13.510000	0.000000
+13.520000	0.000000
+13.530000	0.000000
+13.540000	0.000000
+13.550000	0.000000
+13.560000	0.000000
+13.570000	0.000000
+13.580000	0.000000
+13.590000	0.000000
+13.600000	0.000000
+13.610000	0.000000
+13.620000	0.000000
+13.630000	0.000000
+13.640000	0.000000
+13.650000	0.000000
+13.660000	0.000000
+13.670000	0.000000
+13.680000	0.000000
+13.690000	0.000000
+13.700000	0.000000
+13.710000	0.000000
+13.720000	0.000000
+13.730000	0.000000
+13.740000	0.000000
+13.750000	0.000000
+13.760000	0.000000
+13.770000	0.000000
+13.780000	0.000000
+13.790000	0.000000
+13.800000	0.000000
+13.810000	0.000000
+13.820000	0.000000
+13.830000	0.000000
+13.840000	0.000000
+13.850000	0.000000
+13.860000	0.000000
+13.870000	0.000000
+13.880000	0.000000
+13.890000	0.000000
+13.900000	0.000000
+13.910000	0.000000
+13.920000	0.000000
+13.930000	0.000000
+13.940000	0.000000
+13.950000	0.000000
+13.960000	0.000000
+13.970000	0.000000
+13.980000	0.000000
+13.990000	0.000000
+14.000000	0.000000
+14.010000	0.000000
+14.020000	0.000000
+14.030000	0.000000
+14.040000	0.000000
+14.050000	0.000000
+14.060000	0.000000
+14.070000	0.000000
+14.080000	0.000000
+14.090000	0.000000
+14.100000	0.000000
+14.110000	0.000000
+14.120000	0.000000
+14.130000	0.000000
+14.140000	0.000000
+14.150000	0.000000
+14.160000	0.000000
+14.170000	0.000000
+14.180000	0.000000
+14.190000	0.000000
+14.200000	0.000000
+14.210000	0.000000
+14.220000	0.000000
+14.230000	0.000000
+14.240000	0.000000
+14.250000	0.000000
+14.260000	0.000000
+14.270000	0.000000
+14.280000	0.000000
+14.290000	0.000000
+14.300000	0.000000
+14.310000	0.000000
+14.320000	0.000000
+14.330000	0.000000
+14.340000	0.000000
+14.350000	0.000000
+14.360000	0.000000
+14.370000	0.000000
+14.380000	0.000000
+14.390000	0.000000
+14.400000	0.000000
+14.410000	0.000000
+14.420000	0.000000
+14.430000	0.000000
+14.440000	0.000000
+14.450000	0.000000
+14.460000	0.000000
+14.470000	0.000000
+14.480000	0.000000
+14.490000	0.000000
+14.500000	0.000000
+14.510000	0.000000
+14.520000	0.000000
+14.530000	0.000000
+14.540000	0.000000
+14.550000	0.000000
+14.560000	0.000000
+14.570000	0.000000
+14.580000	0.000000
+14.590000	0.000000
+14.600000	0.000000
+14.610000	0.000000
+14.620000	0.000000
+14.630000	0.000000
+14.640000	0.000000
+14.650000	0.000000
+14.660000	0.000000
+14.670000	0.000000
+14.680000	0.000000
+14.690000	0.000000
+14.700000	0.000000
+14.710000	0.000000
+14.720000	0.000000
+14.730000	0.000000
+14.740000	0.000000
+14.750000	0.000000
+14.760000	0.000000
+14.770000	0.000000
+14.780000	0.000000
+14.790000	0.000000
+14.800000	0.000000
+14.810000	0.000000
+14.820000	0.000000
+14.830000	0.000000
+14.840000	0.000000
+14.850000	0.000000
+14.860000	0.000000
+14.870000	0.000000
+14.880000	0.000000
+14.890000	0.000000
+14.900000	0.000000
+14.910000	0.000000
+14.920000	0.000000
+14.930000	0.000000
+14.940000	0.000000
+14.950000	0.000000
+14.960000	0.000000
+14.970000	0.000000
+14.980000	0.000000
+14.990000	0.000000
+15.000000	0.000000
+15.010000	0.000000
+15.020000	0.000000
+15.030000	0.000000
+15.040000	0.000000
+15.050000	0.000000
+15.060000	0.000000
+15.070000	0.000000
+15.080000	0.000000
+15.090000	0.000000
+15.100000	0.000000
+15.110000	0.000000
+15.120000	0.000000
+15.130000	0.000000
+15.140000	0.000000
+15.150000	0.000000
+15.160000	0.000000
+15.170000	0.000000
+15.180000	0.000000
+15.190000	0.000000
+15.200000	0.000000
+15.210000	0.000000
+15.220000	0.000000
+15.230000	0.000000
+15.240000	0.000000
+15.250000	0.000000
+15.260000	0.000000
+15.270000	0.000000
+15.280000	0.000000
+15.290000	0.000000
+15.300000	0.000000
+15.310000	0.000000
+15.320000	0.000000
+15.330000	0.000000
+15.340000	0.000000
+15.350000	0.000000
+15.360000	0.000000
+15.370000	0.000000
+15.380000	0.000000
+15.390000	0.000000
+15.400000	0.000000
+15.410000	0.000000
+15.420000	0.000000
+15.430000	0.000000
+15.440000	0.000000
+15.450000	0.000000
+15.460000	0.000000
+15.470000	0.000000
+15.480000	0.000000
+15.490000	0.000000
+15.500000	0.000000
+15.510000	0.000000
+15.520000	0.000000
+15.530000	0.000000
+15.540000	0.000000
+15.550000	0.000000
+15.560000	0.000000
+15.570000	0.000000
+15.580000	0.000000
+15.590000	0.000000
+15.600000	0.000000
+15.610000	0.000000
+15.620000	0.000000
+15.630000	0.000000
+15.640000	0.000000
+15.650000	0.000000
+15.660000	0.000000
+15.670000	0.000000
+15.680000	0.000000
+15.690000	0.000000
+15.700000	0.000000
+15.710000	0.000000
+15.720000	0.000000
+15.730000	0.000000
+15.740000	0.000000
+15.750000	0.000000
+15.760000	0.000000
+15.770000	0.000000
+15.780000	0.000000
+15.790000	0.000000
+15.800000	0.000000
+15.810000	0.000000
+15.820000	0.000000
+15.830000	0.000000
+15.840000	0.000000
+15.850000	0.000000
+15.860000	0.000000
+15.870000	0.000000
+15.880000	0.000000
+15.890000	0.000000
+15.900000	0.000000
+15.910000	0.000000
+15.920000	0.000000
+15.930000	0.000000
+15.940000	0.000000
+15.950000	0.000000
+15.960000	0.000000
+15.970000	0.000000
+15.980000	0.000000
+15.990000	0.000000
+16.000000	0.000000
+16.010000	0.000000
+16.020000	0.000000
+16.030000	0.000000
+16.040000	0.000000
+16.050000	0.000000
+16.060000	0.000000
+16.070000	0.000000
+16.080000	0.000000
+16.090000	0.000000
+16.100000	0.000000
+16.110000	0.000000
+16.120000	0.000000
+16.130000	0.000000
+16.140000	0.000000
+16.150000	0.000000
+16.160000	0.000000
+16.170000	0.000000
+16.180000	0.000000
+16.190000	0.000000
+16.200000	0.000000
+16.210000	0.000000
+16.220000	0.000000
+16.230000	0.000000
+16.240000	0.000000
+16.250000	0.000000
+16.260000	0.000000
+16.270000	0.000000
+16.280000	0.000000
+16.290000	0.000000
+16.300000	0.000000
+16.310000	0.000000
+16.320000	0.000000
+16.330000	0.000000
+16.340000	0.000000
+16.350000	0.000000
+16.360000	0.000000
+16.370000	0.000000
+16.380000	0.000000
+16.390000	0.000000
+16.400000	0.000000
+16.410000	0.000000
+16.420000	0.000000
+16.430000	0.000000
+16.440000	0.000000
+16.450000	0.000000
+16.460000	0.000000
+16.470000	0.000000
+16.480000	0.000000
+16.490000	0.000000
+16.500000	0.000000
+16.510000	0.000000
+16.520000	0.000000
+16.530000	0.000000
+16.540000	0.000000
+16.550000	0.000000
+16.560000	0.000000
+16.570000	0.000000
+16.580000	0.000000
+16.590000	0.000000
+16.600000	0.000000
+16.610000	0.000000
+16.620000	0.000000
+16.630000	0.000000
+16.640000	0.000000
+16.650000	0.000000
+16.660000	0.000000
+16.670000	0.000000
+16.680000	0.000000
+16.690000	0.000000
+16.700000	0.000000
+16.710000	0.000000
+16.720000	0.000000
+16.730000	0.000000
+16.740000	0.000000
+16.750000	0.000000
+16.760000	0.000000
+16.770000	0.000000
+16.780000	0.000000
+16.790000	0.000000
+16.800000	0.000000
+16.810000	0.000000
+16.820000	0.000000
+16.830000	0.000000
+16.840000	0.000000
+16.850000	0.000000
+16.860000	0.000000
+16.870000	0.000000
+16.880000	0.000000
+16.890000	0.000000
+16.900000	0.000000
+16.910000	0.000000
+16.920000	0.000000
+16.930000	0.000000
+16.940000	0.000000
+16.950000	0.000000
+16.960000	0.000000
+16.970000	0.000000
+16.980000	0.000000
+16.990000	0.000000
+17.000000	0.000000
+17.010000	0.000000
+17.020000	0.000000
+17.030000	0.000000
+17.040000	0.000000
+17.050000	0.000000
+17.060000	0.000000
+17.070000	0.000000
+17.080000	0.000000
+17.090000	0.000000
+17.100000	0.000000
+17.110000	0.000000
+17.120000	0.000000
+17.130000	0.000000
+17.140000	0.000000
+17.150000	0.000000
+17.160000	0.000000
+17.170000	0.000000
+17.180000	0.000000
+17.190000	0.000000
+17.200000	0.000000
+17.210000	0.000000
+17.220000	0.000000
+17.230000	0.000000
+17.240000	0.000000
+17.250000	0.000000
+17.260000	0.000000
+17.270000	0.000000
+17.280000	0.000000
+17.290000	0.000000
+17.300000	0.000000
+17.310000	0.000000
+17.320000	0.000000
+17.330000	0.000000
+17.340000	0.000000
+17.350000	0.000000
+17.360000	0.000000
+17.370000	0.000000
+17.380000	0.000000
+17.390000	0.000000
+17.400000	0.000000
+17.410000	0.000000
+17.420000	0.000000
+17.430000	0.000000
+17.440000	0.000000
+17.450000	0.000000
+17.460000	0.000000
+17.470000	0.000000
+17.480000	0.000000
+17.490000	0.000000
+17.500000	0.000000
+17.510000	0.000000
+17.520000	0.000000
+17.530000	0.000000
+17.540000	0.000000
+17.550000	0.000000
+17.560000	0.000000
+17.570000	0.000000
+17.580000	0.000000
+17.590000	0.000000
+17.600000	0.000000
+17.610000	0.000000
+17.620000	0.000000
+17.630000	0.000000
+17.640000	0.000000
+17.650000	0.000000
+17.660000	0.000000
+17.670000	0.000000
+17.680000	0.000000
+17.690000	0.000000
+17.700000	0.000000
+17.710000	0.000000
+17.720000	0.000000
+17.730000	0.000000
+17.740000	0.000000
+17.750000	0.000000
+17.760000	0.000000
+17.770000	0.000000
+17.780000	0.000000
+17.790000	0.000000
+17.800000	0.000000
+17.810000	0.000000
+17.820000	0.000000
+17.830000	0.000000
+17.840000	0.000000
+17.850000	0.000000
+17.860000	0.000000
+17.870000	0.000000
+17.880000	0.000000
+17.890000	0.000000
+17.900000	0.000000
+17.910000	0.000000
+17.920000	0.000000
+17.930000	0.000000
+17.940000	0.000000
+17.950000	0.000000
+17.960000	0.000000
+17.970000	0.000000
+17.980000	0.000000
+17.990000	0.000000
+18.000000	0.000000
+18.010000	0.000000
+18.020000	0.000000
+18.030000	0.000000
+18.040000	0.000000
+18.050000	0.000000
+18.060000	0.000000
+18.070000	0.000000
+18.080000	0.000000
+18.090000	0.000000
+18.100000	0.000000
+18.110000	0.000000
+18.120000	0.000000
+18.130000	0.000000
+18.140000	0.000000
+18.150000	0.000000
+18.160000	0.000000
+18.170000	0.000000
+18.180000	0.000000
+18.190000	0.000000
+18.200000	0.000000
+18.210000	0.000000
+18.220000	0.000000
+18.230000	0.000000
+18.240000	0.000000
+18.250000	0.000000
+18.260000	0.000000
+18.270000	0.000000
+18.280000	0.000000
+18.290000	0.000000
+18.300000	0.000000
+18.310000	0.000000
+18.320000	0.000000
+18.330000	0.000000
+18.340000	0.000000
+18.350000	0.000000
+18.360000	0.000000
+18.370000	0.000000
+18.380000	0.000000
+18.390000	0.000000
+18.400000	0.000000
+18.410000	0.000000
+18.420000	0.000000
+18.430000	0.000000
+18.440000	0.000000
+18.450000	0.000000
+18.460000	0.000000
+18.470000	0.000000
+18.480000	0.000000
+18.490000	0.000000
+18.500000	0.000000
+18.510000	0.000000
+18.520000	0.000000
+18.530000	0.000000
+18.540000	0.000000
+18.550000	0.000000
+18.560000	0.000000
+18.570000	0.000000
+18.580000	0.000000
+18.590000	0.000000
+18.600000	0.000000
+18.610000	0.000000
+18.620000	0.000000
+18.630000	0.000000
+18.640000	0.000000
+18.650000	0.000000
+18.660000	0.000000
+18.670000	0.000000
+18.680000	0.000000
+18.690000	0.000000
+18.700000	0.000000
+18.710000	0.000000
+18.720000	0.000000
+18.730000	0.000000
+18.740000	0.000000
+18.750000	0.000000
+18.760000	0.000000
+18.770000	0.000000
+18.780000	0.000000
+18.790000	0.000000
+18.800000	0.000000
+18.810000	0.000000
+18.820000	0.000000
+18.830000	0.000000
+18.840000	0.000000
+18.850000	0.000000
+18.860000	0.000000
+18.870000	0.000000
+18.880000	0.000000
+18.890000	0.000000
+18.900000	0.000000
+18.910000	0.000000
+18.920000	0.000000
+18.930000	0.000000
+18.940000	0.000000
+18.950000	0.000000
+18.960000	0.000000
+18.970000	0.000000
+18.980000	0.000000
+18.990000	0.000000
+19.000000	0.000000
+19.010000	0.000000
+19.020000	0.000000
+19.030000	0.000000
+19.040000	0.000000
+19.050000	0.000000
+19.060000	0.000000
+19.070000	0.000000
+19.080000	0.000000
+19.090000	0.000000
+19.100000	0.000000
+19.110000	0.000000
+19.120000	0.000000
+19.130000	0.000000
+19.140000	0.000000
+19.150000	0.000000
+19.160000	0.000000
+19.170000	0.000000
+19.180000	0.000000
+19.190000	0.000000
+19.200000	0.000000
+19.210000	0.000000
+19.220000	0.000000
+19.230000	0.000000
+19.240000	0.000000
+19.250000	0.000000
+19.260000	0.000000
+19.270000	0.000000
+19.280000	0.000000
+19.290000	0.000000
+19.300000	0.000000
+19.310000	0.000000
+19.320000	0.000000
+19.330000	0.000000
+19.340000	0.000000
+19.350000	0.000000
+19.360000	0.000000
+19.370000	0.000000
+19.380000	0.000000
+19.390000	0.000000
+19.400000	0.000000
+19.410000	0.000000
+19.420000	0.000000
+19.430000	0.000000
+19.440000	0.000000
+19.450000	0.000000
+19.460000	0.000000
+19.470000	0.000000
+19.480000	0.000000
+19.490000	0.000000
+19.500000	0.000000
+19.510000	0.000000
+19.520000	0.000000
+19.530000	0.000000
+19.540000	0.000000
+19.550000	0.000000
+19.560000	0.000000
+19.570000	0.000000
+19.580000	0.000000
+19.590000	0.000000
+19.600000	0.000000
+19.610000	0.000000
+19.620000	0.000000
+19.630000	0.000000
+19.640000	0.000000
+19.650000	0.000000
+19.660000	0.000000
+19.670000	0.000000
+19.680000	0.000000
+19.690000	0.000000
+19.700000	0.000000
+19.710000	0.000000
+19.720000	0.000000
+19.730000	0.000000
+19.740000	0.000000
+19.750000	0.000000
+19.760000	0.000000
+19.770000	0.000000
+19.780000	0.000000
+19.790000	0.000000
+19.800000	0.000000
+19.810000	0.000000
+19.820000	0.000000
+19.830000	0.000000
+19.840000	0.000000
+19.850000	0.000000
+19.860000	0.000000
+19.870000	0.000000
+19.880000	0.000000
+19.890000	0.000000
+19.900000	0.000000
+19.910000	0.000000
+19.920000	0.000000
+19.930000	0.000000
+19.940000	0.000000
+19.950000	0.000000
+19.960000	0.000000
+19.970000	0.000000
+19.980000	0.000000
+19.990000	0.000000
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/gamma_6.0_2.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/gamma_6.0_2.0.dat
new file mode 100644
index 0000000..1f4efb8
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/gamma_6.0_2.0.dat
@@ -0,0 +1,2012 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.010000	0.000000
+0.020000	0.000000
+0.030000	0.000000
+0.040000	0.000000
+0.050000	0.000000
+0.060000	0.000000
+0.070000	0.000000
+0.080000	0.000000
+0.090000	0.000000
+0.100000	0.000000
+0.110000	0.000000
+0.120000	0.000000
+0.130000	0.000000
+0.140000	0.000000
+0.150000	0.000000
+0.160000	0.000000
+0.170000	0.000000
+0.180000	0.000000
+0.190000	0.000000
+0.200000	0.000000
+0.210000	0.000000
+0.220000	0.000000
+0.230000	0.000000
+0.240000	0.000000
+0.250000	0.000000
+0.260000	0.000000
+0.270000	0.000000
+0.280000	0.000000
+0.290000	0.000000
+0.300000	0.000000
+0.310000	0.000000
+0.320000	0.000000
+0.330000	0.000000
+0.340000	0.000000
+0.350000	0.000001
+0.360000	0.000001
+0.370000	0.000001
+0.380000	0.000001
+0.390000	0.000001
+0.400000	0.000001
+0.410000	0.000001
+0.420000	0.000001
+0.430000	0.000002
+0.440000	0.000002
+0.450000	0.000002
+0.460000	0.000002
+0.470000	0.000002
+0.480000	0.000003
+0.490000	0.000003
+0.500000	0.000003
+0.510000	0.000003
+0.520000	0.000004
+0.530000	0.000004
+0.540000	0.000005
+0.550000	0.000005
+0.560000	0.000005
+0.570000	0.000006
+0.580000	0.000006
+0.590000	0.000007
+0.600000	0.000008
+0.610000	0.000008
+0.620000	0.000009
+0.630000	0.000009
+0.640000	0.000010
+0.650000	0.000011
+0.660000	0.000012
+0.670000	0.000013
+0.680000	0.000013
+0.690000	0.000014
+0.700000	0.000015
+0.710000	0.000016
+0.720000	0.000018
+0.730000	0.000019
+0.740000	0.000020
+0.750000	0.000021
+0.760000	0.000023
+0.770000	0.000024
+0.780000	0.000025
+0.790000	0.000027
+0.800000	0.000029
+0.810000	0.000030
+0.820000	0.000032
+0.830000	0.000034
+0.840000	0.000036
+0.850000	0.000038
+0.860000	0.000040
+0.870000	0.000042
+0.880000	0.000044
+0.890000	0.000047
+0.900000	0.000049
+0.910000	0.000052
+0.920000	0.000054
+0.930000	0.000057
+0.940000	0.000060
+0.950000	0.000063
+0.960000	0.000066
+0.970000	0.000069
+0.980000	0.000072
+0.990000	0.000075
+1.000000	0.000079
+1.010000	0.000083
+1.020000	0.000086
+1.030000	0.000090
+1.040000	0.000094
+1.050000	0.000098
+1.060000	0.000103
+1.070000	0.000107
+1.080000	0.000111
+1.090000	0.000116
+1.100000	0.000121
+1.110000	0.000126
+1.120000	0.000131
+1.130000	0.000136
+1.140000	0.000142
+1.150000	0.000147
+1.160000	0.000153
+1.170000	0.000159
+1.180000	0.000165
+1.190000	0.000171
+1.200000	0.000178
+1.210000	0.000184
+1.220000	0.000191
+1.230000	0.000198
+1.240000	0.000205
+1.250000	0.000213
+1.260000	0.000220
+1.270000	0.000228
+1.280000	0.000236
+1.290000	0.000244
+1.300000	0.000252
+1.310000	0.000261
+1.320000	0.000270
+1.330000	0.000279
+1.340000	0.000288
+1.350000	0.000297
+1.360000	0.000307
+1.370000	0.000317
+1.380000	0.000327
+1.390000	0.000337
+1.400000	0.000348
+1.410000	0.000359
+1.420000	0.000370
+1.430000	0.000381
+1.440000	0.000392
+1.450000	0.000404
+1.460000	0.000416
+1.470000	0.000429
+1.480000	0.000441
+1.490000	0.000454
+1.500000	0.000467
+1.510000	0.000480
+1.520000	0.000494
+1.530000	0.000508
+1.540000	0.000522
+1.550000	0.000537
+1.560000	0.000551
+1.570000	0.000567
+1.580000	0.000582
+1.590000	0.000598
+1.600000	0.000613
+1.610000	0.000630
+1.620000	0.000646
+1.630000	0.000663
+1.640000	0.000680
+1.650000	0.000698
+1.660000	0.000716
+1.670000	0.000734
+1.680000	0.000752
+1.690000	0.000771
+1.700000	0.000790
+1.710000	0.000810
+1.720000	0.000829
+1.730000	0.000850
+1.740000	0.000870
+1.750000	0.000891
+1.760000	0.000912
+1.770000	0.000934
+1.780000	0.000955
+1.790000	0.000978
+1.800000	0.001000
+1.810000	0.001023
+1.820000	0.001047
+1.830000	0.001070
+1.840000	0.001094
+1.850000	0.001119
+1.860000	0.001144
+1.870000	0.001169
+1.880000	0.001195
+1.890000	0.001221
+1.900000	0.001247
+1.910000	0.001274
+1.920000	0.001301
+1.930000	0.001328
+1.940000	0.001356
+1.950000	0.001385
+1.960000	0.001414
+1.970000	0.001443
+1.980000	0.001472
+1.990000	0.001502
+2.000000	0.001533
+2.010000	0.001564
+2.020000	0.001595
+2.030000	0.001627
+2.040000	0.001659
+2.050000	0.001691
+2.060000	0.001724
+2.070000	0.001758
+2.080000	0.001792
+2.090000	0.001826
+2.100000	0.001861
+2.110000	0.001896
+2.120000	0.001932
+2.130000	0.001968
+2.140000	0.002005
+2.150000	0.002042
+2.160000	0.002079
+2.170000	0.002117
+2.180000	0.002155
+2.190000	0.002194
+2.200000	0.002234
+2.210000	0.002274
+2.220000	0.002314
+2.230000	0.002355
+2.240000	0.002396
+2.250000	0.002438
+2.260000	0.002480
+2.270000	0.002523
+2.280000	0.002566
+2.290000	0.002609
+2.300000	0.002654
+2.310000	0.002698
+2.320000	0.002743
+2.330000	0.002789
+2.340000	0.002835
+2.350000	0.002882
+2.360000	0.002929
+2.370000	0.002977
+2.380000	0.003025
+2.390000	0.003074
+2.400000	0.003123
+2.410000	0.003172
+2.420000	0.003223
+2.430000	0.003273
+2.440000	0.003325
+2.450000	0.003376
+2.460000	0.003429
+2.470000	0.003482
+2.480000	0.003535
+2.490000	0.003589
+2.500000	0.003643
+2.510000	0.003698
+2.520000	0.003753
+2.530000	0.003809
+2.540000	0.003866
+2.550000	0.003923
+2.560000	0.003981
+2.570000	0.004039
+2.580000	0.004097
+2.590000	0.004156
+2.600000	0.004216
+2.610000	0.004276
+2.620000	0.004337
+2.630000	0.004399
+2.640000	0.004461
+2.650000	0.004523
+2.660000	0.004586
+2.670000	0.004650
+2.680000	0.004714
+2.690000	0.004778
+2.700000	0.004844
+2.710000	0.004909
+2.720000	0.004976
+2.730000	0.005042
+2.740000	0.005110
+2.750000	0.005178
+2.760000	0.005246
+2.770000	0.005315
+2.780000	0.005385
+2.790000	0.005455
+2.800000	0.005526
+2.810000	0.005597
+2.820000	0.005669
+2.830000	0.005742
+2.840000	0.005815
+2.850000	0.005888
+2.860000	0.005962
+2.870000	0.006037
+2.880000	0.006112
+2.890000	0.006188
+2.900000	0.006265
+2.910000	0.006342
+2.920000	0.006419
+2.930000	0.006497
+2.940000	0.006576
+2.950000	0.006655
+2.960000	0.006735
+2.970000	0.006815
+2.980000	0.006896
+2.990000	0.006978
+3.000000	0.007060
+3.010000	0.007143
+3.020000	0.007226
+3.030000	0.007310
+3.040000	0.007394
+3.050000	0.007479
+3.060000	0.007564
+3.070000	0.007650
+3.080000	0.007737
+3.090000	0.007824
+3.100000	0.007912
+3.110000	0.008000
+3.120000	0.008089
+3.130000	0.008179
+3.140000	0.008269
+3.150000	0.008359
+3.160000	0.008451
+3.170000	0.008542
+3.180000	0.008635
+3.190000	0.008728
+3.200000	0.008821
+3.210000	0.008915
+3.220000	0.009010
+3.230000	0.009105
+3.240000	0.009200
+3.250000	0.009297
+3.260000	0.009393
+3.270000	0.009491
+3.280000	0.009589
+3.290000	0.009687
+3.300000	0.009786
+3.310000	0.009886
+3.320000	0.009986
+3.330000	0.010087
+3.340000	0.010188
+3.350000	0.010290
+3.360000	0.010393
+3.370000	0.010495
+3.380000	0.010599
+3.390000	0.010703
+3.400000	0.010808
+3.410000	0.010913
+3.420000	0.011019
+3.430000	0.011125
+3.440000	0.011232
+3.450000	0.011339
+3.460000	0.011447
+3.470000	0.011555
+3.480000	0.011664
+3.490000	0.011774
+3.500000	0.011884
+3.510000	0.011995
+3.520000	0.012106
+3.530000	0.012218
+3.540000	0.012330
+3.550000	0.012443
+3.560000	0.012556
+3.570000	0.012670
+3.580000	0.012784
+3.590000	0.012899
+3.600000	0.013014
+3.610000	0.013130
+3.620000	0.013247
+3.630000	0.013364
+3.640000	0.013481
+3.650000	0.013599
+3.660000	0.013718
+3.670000	0.013837
+3.680000	0.013956
+3.690000	0.014077
+3.700000	0.014197
+3.710000	0.014318
+3.720000	0.014440
+3.730000	0.014562
+3.740000	0.014685
+3.750000	0.014808
+3.760000	0.014932
+3.770000	0.015056
+3.780000	0.015180
+3.790000	0.015305
+3.800000	0.015431
+3.810000	0.015557
+3.820000	0.015684
+3.830000	0.015811
+3.840000	0.015939
+3.850000	0.016067
+3.860000	0.016195
+3.870000	0.016324
+3.880000	0.016454
+3.890000	0.016584
+3.900000	0.016714
+3.910000	0.016845
+3.920000	0.016977
+3.930000	0.017109
+3.940000	0.017241
+3.950000	0.017374
+3.960000	0.017507
+3.970000	0.017641
+3.980000	0.017775
+3.990000	0.017910
+4.000000	0.018045
+4.010000	0.018180
+4.020000	0.018316
+4.030000	0.018453
+4.040000	0.018590
+4.050000	0.018727
+4.060000	0.018865
+4.070000	0.019003
+4.080000	0.019142
+4.090000	0.019281
+4.100000	0.019420
+4.110000	0.019560
+4.120000	0.019701
+4.130000	0.019841
+4.140000	0.019983
+4.150000	0.020124
+4.160000	0.020266
+4.170000	0.020409
+4.180000	0.020552
+4.190000	0.020695
+4.200000	0.020839
+4.210000	0.020983
+4.220000	0.021127
+4.230000	0.021272
+4.240000	0.021417
+4.250000	0.021563
+4.260000	0.021709
+4.270000	0.021855
+4.280000	0.022002
+4.290000	0.022149
+4.300000	0.022297
+4.310000	0.022445
+4.320000	0.022593
+4.330000	0.022742
+4.340000	0.022891
+4.350000	0.023041
+4.360000	0.023190
+4.370000	0.023341
+4.380000	0.023491
+4.390000	0.023642
+4.400000	0.023793
+4.410000	0.023945
+4.420000	0.024097
+4.430000	0.024249
+4.440000	0.024402
+4.450000	0.024555
+4.460000	0.024708
+4.470000	0.024862
+4.480000	0.025016
+4.490000	0.025170
+4.500000	0.025324
+4.510000	0.025479
+4.520000	0.025635
+4.530000	0.025790
+4.540000	0.025946
+4.550000	0.026102
+4.560000	0.026259
+4.570000	0.026415
+4.580000	0.026572
+4.590000	0.026730
+4.600000	0.026888
+4.610000	0.027045
+4.620000	0.027204
+4.630000	0.027362
+4.640000	0.027521
+4.650000	0.027680
+4.660000	0.027840
+4.670000	0.027999
+4.680000	0.028159
+4.690000	0.028319
+4.700000	0.028480
+4.710000	0.028640
+4.720000	0.028801
+4.730000	0.028963
+4.740000	0.029124
+4.750000	0.029286
+4.760000	0.029448
+4.770000	0.029610
+4.780000	0.029772
+4.790000	0.029935
+4.800000	0.030098
+4.810000	0.030261
+4.820000	0.030425
+4.830000	0.030588
+4.840000	0.030752
+4.850000	0.030916
+4.860000	0.031080
+4.870000	0.031245
+4.880000	0.031409
+4.890000	0.031574
+4.900000	0.031739
+4.910000	0.031905
+4.920000	0.032070
+4.930000	0.032236
+4.940000	0.032402
+4.950000	0.032568
+4.960000	0.032734
+4.970000	0.032900
+4.980000	0.033067
+4.990000	0.033234
+5.000000	0.033400
+5.010000	0.033568
+5.020000	0.033735
+5.030000	0.033902
+5.040000	0.034070
+5.050000	0.034238
+5.060000	0.034405
+5.070000	0.034573
+5.080000	0.034742
+5.090000	0.034910
+5.100000	0.035078
+5.110000	0.035247
+5.120000	0.035416
+5.130000	0.035584
+5.140000	0.035753
+5.150000	0.035923
+5.160000	0.036092
+5.170000	0.036261
+5.180000	0.036430
+5.190000	0.036600
+5.200000	0.036770
+5.210000	0.036939
+5.220000	0.037109
+5.230000	0.037279
+5.240000	0.037449
+5.250000	0.037619
+5.260000	0.037790
+5.270000	0.037960
+5.280000	0.038130
+5.290000	0.038301
+5.300000	0.038471
+5.310000	0.038642
+5.320000	0.038813
+5.330000	0.038983
+5.340000	0.039154
+5.350000	0.039325
+5.360000	0.039496
+5.370000	0.039667
+5.380000	0.039838
+5.390000	0.040009
+5.400000	0.040180
+5.410000	0.040351
+5.420000	0.040523
+5.430000	0.040694
+5.440000	0.040865
+5.450000	0.041036
+5.460000	0.041208
+5.470000	0.041379
+5.480000	0.041550
+5.490000	0.041722
+5.500000	0.041893
+5.510000	0.042064
+5.520000	0.042236
+5.530000	0.042407
+5.540000	0.042579
+5.550000	0.042750
+5.560000	0.042921
+5.570000	0.043093
+5.580000	0.043264
+5.590000	0.043435
+5.600000	0.043607
+5.610000	0.043778
+5.620000	0.043949
+5.630000	0.044121
+5.640000	0.044292
+5.650000	0.044463
+5.660000	0.044634
+5.670000	0.044805
+5.680000	0.044976
+5.690000	0.045147
+5.700000	0.045318
+5.710000	0.045489
+5.720000	0.045660
+5.730000	0.045831
+5.740000	0.046002
+5.750000	0.046172
+5.760000	0.046343
+5.770000	0.046513
+5.780000	0.046684
+5.790000	0.046854
+5.800000	0.047025
+5.810000	0.047195
+5.820000	0.047365
+5.830000	0.047535
+5.840000	0.047705
+5.850000	0.047875
+5.860000	0.048045
+5.870000	0.048214
+5.880000	0.048384
+5.890000	0.048553
+5.900000	0.048723
+5.910000	0.048892
+5.920000	0.049061
+5.930000	0.049230
+5.940000	0.049399
+5.950000	0.049568
+5.960000	0.049736
+5.970000	0.049905
+5.980000	0.050073
+5.990000	0.050241
+6.000000	0.050409
+6.010000	0.050577
+6.020000	0.050745
+6.030000	0.050913
+6.040000	0.051080
+6.050000	0.051248
+6.060000	0.051415
+6.070000	0.051582
+6.080000	0.051749
+6.090000	0.051916
+6.100000	0.052082
+6.110000	0.052249
+6.120000	0.052415
+6.130000	0.052581
+6.140000	0.052747
+6.150000	0.052913
+6.160000	0.053078
+6.170000	0.053243
+6.180000	0.053409
+6.190000	0.053574
+6.200000	0.053738
+6.210000	0.053903
+6.220000	0.054067
+6.230000	0.054232
+6.240000	0.054395
+6.250000	0.054559
+6.260000	0.054723
+6.270000	0.054886
+6.280000	0.055049
+6.290000	0.055212
+6.300000	0.055375
+6.310000	0.055538
+6.320000	0.055700
+6.330000	0.055862
+6.340000	0.056024
+6.350000	0.056185
+6.360000	0.056347
+6.370000	0.056508
+6.380000	0.056669
+6.390000	0.056829
+6.400000	0.056990
+6.410000	0.057150
+6.420000	0.057310
+6.430000	0.057469
+6.440000	0.057629
+6.450000	0.057788
+6.460000	0.057947
+6.470000	0.058106
+6.480000	0.058264
+6.490000	0.058422
+6.500000	0.058580
+6.510000	0.058737
+6.520000	0.058895
+6.530000	0.059052
+6.540000	0.059209
+6.550000	0.059365
+6.560000	0.059521
+6.570000	0.059677
+6.580000	0.059833
+6.590000	0.059988
+6.600000	0.060143
+6.610000	0.060298
+6.620000	0.060452
+6.630000	0.060607
+6.640000	0.060761
+6.650000	0.060914
+6.660000	0.061067
+6.670000	0.061220
+6.680000	0.061373
+6.690000	0.061525
+6.700000	0.061677
+6.710000	0.061829
+6.720000	0.061981
+6.730000	0.062132
+6.740000	0.062282
+6.750000	0.062433
+6.760000	0.062583
+6.770000	0.062733
+6.780000	0.062882
+6.790000	0.063032
+6.800000	0.063180
+6.810000	0.063329
+6.820000	0.063477
+6.830000	0.063625
+6.840000	0.063772
+6.850000	0.063919
+6.860000	0.064066
+6.870000	0.064213
+6.880000	0.064359
+6.890000	0.064505
+6.900000	0.064650
+6.910000	0.064795
+6.920000	0.064940
+6.930000	0.065084
+6.940000	0.065228
+6.950000	0.065372
+6.960000	0.065515
+6.970000	0.065658
+6.980000	0.065800
+6.990000	0.065943
+7.000000	0.066084
+7.010000	0.066226
+7.020000	0.066367
+7.030000	0.066507
+7.040000	0.066648
+7.050000	0.066788
+7.060000	0.066927
+7.070000	0.067066
+7.080000	0.067205
+7.090000	0.067344
+7.100000	0.067482
+7.110000	0.067619
+7.120000	0.067756
+7.130000	0.067893
+7.140000	0.068030
+7.150000	0.068166
+7.160000	0.068301
+7.170000	0.068437
+7.180000	0.068572
+7.190000	0.068706
+7.200000	0.068840
+7.210000	0.068974
+7.220000	0.069107
+7.230000	0.069240
+7.240000	0.069372
+7.250000	0.069504
+7.260000	0.069636
+7.270000	0.069767
+7.280000	0.069898
+7.290000	0.070028
+7.300000	0.070158
+7.310000	0.070288
+7.320000	0.070417
+7.330000	0.070546
+7.340000	0.070674
+7.350000	0.070802
+7.360000	0.070929
+7.370000	0.071056
+7.380000	0.071183
+7.390000	0.071309
+7.400000	0.071434
+7.410000	0.071560
+7.420000	0.071685
+7.430000	0.071809
+7.440000	0.071933
+7.450000	0.072057
+7.460000	0.072180
+7.470000	0.072302
+7.480000	0.072424
+7.490000	0.072546
+7.500000	0.072668
+7.510000	0.072788
+7.520000	0.072909
+7.530000	0.073029
+7.540000	0.073148
+7.550000	0.073268
+7.560000	0.073386
+7.570000	0.073504
+7.580000	0.073622
+7.590000	0.073739
+7.600000	0.073856
+7.610000	0.073973
+7.620000	0.074089
+7.630000	0.074204
+7.640000	0.074319
+7.650000	0.074434
+7.660000	0.074548
+7.670000	0.074661
+7.680000	0.074775
+7.690000	0.074887
+7.700000	0.075000
+7.710000	0.075111
+7.720000	0.075223
+7.730000	0.075333
+7.740000	0.075444
+7.750000	0.075554
+7.760000	0.075663
+7.770000	0.075772
+7.780000	0.075881
+7.790000	0.075989
+7.800000	0.076096
+7.810000	0.076203
+7.820000	0.076310
+7.830000	0.076416
+7.840000	0.076522
+7.850000	0.076627
+7.860000	0.076732
+7.870000	0.076836
+7.880000	0.076940
+7.890000	0.077043
+7.900000	0.077146
+7.910000	0.077248
+7.920000	0.077350
+7.930000	0.077451
+7.940000	0.077552
+7.950000	0.077652
+7.960000	0.077752
+7.970000	0.077851
+7.980000	0.077950
+7.990000	0.078049
+8.000000	0.078147
+8.010000	0.078244
+8.020000	0.078341
+8.030000	0.078438
+8.040000	0.078534
+8.050000	0.078629
+8.060000	0.078724
+8.070000	0.078819
+8.080000	0.078913
+8.090000	0.079006
+8.100000	0.079099
+8.110000	0.079192
+8.120000	0.079284
+8.130000	0.079375
+8.140000	0.079466
+8.150000	0.079557
+8.160000	0.079647
+8.170000	0.079736
+8.180000	0.079825
+8.190000	0.079914
+8.200000	0.080002
+8.210000	0.080090
+8.220000	0.080177
+8.230000	0.080263
+8.240000	0.080349
+8.250000	0.080435
+8.260000	0.080520
+8.270000	0.080604
+8.280000	0.080688
+8.290000	0.080772
+8.300000	0.080855
+8.310000	0.080938
+8.320000	0.081020
+8.330000	0.081101
+8.340000	0.081182
+8.350000	0.081263
+8.360000	0.081343
+8.370000	0.081422
+8.380000	0.081501
+8.390000	0.081580
+8.400000	0.081658
+8.410000	0.081735
+8.420000	0.081812
+8.430000	0.081889
+8.440000	0.081965
+8.450000	0.082040
+8.460000	0.082115
+8.470000	0.082190
+8.480000	0.082264
+8.490000	0.082337
+8.500000	0.082410
+8.510000	0.082483
+8.520000	0.082555
+8.530000	0.082626
+8.540000	0.082697
+8.550000	0.082768
+8.560000	0.082838
+8.570000	0.082907
+8.580000	0.082976
+8.590000	0.083044
+8.600000	0.083112
+8.610000	0.083180
+8.620000	0.083246
+8.630000	0.083313
+8.640000	0.083379
+8.650000	0.083444
+8.660000	0.083509
+8.670000	0.083573
+8.680000	0.083637
+8.690000	0.083701
+8.700000	0.083763
+8.710000	0.083826
+8.720000	0.083888
+8.730000	0.083949
+8.740000	0.084010
+8.750000	0.084070
+8.760000	0.084130
+8.770000	0.084189
+8.780000	0.084248
+8.790000	0.084306
+8.800000	0.084364
+8.810000	0.084421
+8.820000	0.084478
+8.830000	0.084534
+8.840000	0.084590
+8.850000	0.084645
+8.860000	0.084700
+8.870000	0.084754
+8.880000	0.084808
+8.890000	0.084861
+8.900000	0.084914
+8.910000	0.084966
+8.920000	0.085018
+8.930000	0.085069
+8.940000	0.085120
+8.950000	0.085170
+8.960000	0.085220
+8.970000	0.085269
+8.980000	0.085318
+8.990000	0.085366
+9.000000	0.085413
+9.010000	0.085461
+9.020000	0.085507
+9.030000	0.085554
+9.040000	0.085599
+9.050000	0.085644
+9.060000	0.085689
+9.070000	0.085733
+9.080000	0.085777
+9.090000	0.085820
+9.100000	0.085863
+9.110000	0.085905
+9.120000	0.085947
+9.130000	0.085988
+9.140000	0.086029
+9.150000	0.086069
+9.160000	0.086109
+9.170000	0.086148
+9.180000	0.086187
+9.190000	0.086225
+9.200000	0.086263
+9.210000	0.086300
+9.220000	0.086337
+9.230000	0.086373
+9.240000	0.086409
+9.250000	0.086444
+9.260000	0.086479
+9.270000	0.086513
+9.280000	0.086547
+9.290000	0.086580
+9.300000	0.086613
+9.310000	0.086646
+9.320000	0.086677
+9.330000	0.086709
+9.340000	0.086740
+9.350000	0.086770
+9.360000	0.086800
+9.370000	0.086829
+9.380000	0.086858
+9.390000	0.086887
+9.400000	0.086915
+9.410000	0.086942
+9.420000	0.086969
+9.430000	0.086996
+9.440000	0.087022
+9.450000	0.087048
+9.460000	0.087073
+9.470000	0.087097
+9.480000	0.087121
+9.490000	0.087145
+9.500000	0.087168
+9.510000	0.087191
+9.520000	0.087213
+9.530000	0.087235
+9.540000	0.087256
+9.550000	0.087277
+9.560000	0.087297
+9.570000	0.087317
+9.580000	0.087336
+9.590000	0.087355
+9.600000	0.087374
+9.610000	0.087392
+9.620000	0.087409
+9.630000	0.087426
+9.640000	0.087443
+9.650000	0.087459
+9.660000	0.087475
+9.670000	0.087490
+9.680000	0.087504
+9.690000	0.087519
+9.700000	0.087532
+9.710000	0.087546
+9.720000	0.087559
+9.730000	0.087571
+9.740000	0.087583
+9.750000	0.087594
+9.760000	0.087605
+9.770000	0.087616
+9.780000	0.087626
+9.790000	0.087636
+9.800000	0.087645
+9.810000	0.087654
+9.820000	0.087662
+9.830000	0.087670
+9.840000	0.087677
+9.850000	0.087684
+9.860000	0.087690
+9.870000	0.087696
+9.880000	0.087702
+9.890000	0.087707
+9.900000	0.087712
+9.910000	0.087716
+9.920000	0.087720
+9.930000	0.087723
+9.940000	0.087726
+9.950000	0.087728
+9.960000	0.087730
+9.970000	0.087732
+9.980000	0.087733
+9.990000	0.087733
+10.000000	0.087734
+10.010000	0.087733
+10.020000	0.087733
+10.030000	0.087732
+10.040000	0.087730
+10.050000	0.087728
+10.060000	0.087726
+10.070000	0.087723
+10.080000	0.087720
+10.090000	0.087716
+10.100000	0.087712
+10.110000	0.087707
+10.120000	0.087702
+10.130000	0.087697
+10.140000	0.087691
+10.150000	0.087685
+10.160000	0.087678
+10.170000	0.087671
+10.180000	0.087663
+10.190000	0.087656
+10.200000	0.087647
+10.210000	0.087638
+10.220000	0.087629
+10.230000	0.087619
+10.240000	0.087609
+10.250000	0.087599
+10.260000	0.087588
+10.270000	0.087577
+10.280000	0.087565
+10.290000	0.087553
+10.300000	0.087540
+10.310000	0.087527
+10.320000	0.087514
+10.330000	0.087500
+10.340000	0.087486
+10.350000	0.087472
+10.360000	0.087457
+10.370000	0.087441
+10.380000	0.087425
+10.390000	0.087409
+10.400000	0.087393
+10.410000	0.087375
+10.420000	0.087358
+10.430000	0.087340
+10.440000	0.087322
+10.450000	0.087303
+10.460000	0.087284
+10.470000	0.087265
+10.480000	0.087245
+10.490000	0.087225
+10.500000	0.087205
+10.510000	0.087184
+10.520000	0.087162
+10.530000	0.087141
+10.540000	0.087118
+10.550000	0.087096
+10.560000	0.087073
+10.570000	0.087050
+10.580000	0.087026
+10.590000	0.087002
+10.600000	0.086978
+10.610000	0.086953
+10.620000	0.086928
+10.630000	0.086902
+10.640000	0.086876
+10.650000	0.086850
+10.660000	0.086823
+10.670000	0.086796
+10.680000	0.086769
+10.690000	0.086741
+10.700000	0.086713
+10.710000	0.086684
+10.720000	0.086655
+10.730000	0.086626
+10.740000	0.086596
+10.750000	0.086566
+10.760000	0.086536
+10.770000	0.086505
+10.780000	0.086474
+10.790000	0.086442
+10.800000	0.086411
+10.810000	0.086378
+10.820000	0.086346
+10.830000	0.086313
+10.840000	0.086280
+10.850000	0.086246
+10.860000	0.086212
+10.870000	0.086178
+10.880000	0.086143
+10.890000	0.086108
+10.900000	0.086073
+10.910000	0.086037
+10.920000	0.086001
+10.930000	0.085965
+10.940000	0.085928
+10.950000	0.085891
+10.960000	0.085853
+10.970000	0.085816
+10.980000	0.085778
+10.990000	0.085739
+11.000000	0.085700
+11.010000	0.085661
+11.020000	0.085622
+11.030000	0.085582
+11.040000	0.085542
+11.050000	0.085501
+11.060000	0.085461
+11.070000	0.085419
+11.080000	0.085378
+11.090000	0.085336
+11.100000	0.085294
+11.110000	0.085252
+11.120000	0.085209
+11.130000	0.085166
+11.140000	0.085123
+11.150000	0.085079
+11.160000	0.085035
+11.170000	0.084990
+11.180000	0.084946
+11.190000	0.084901
+11.200000	0.084855
+11.210000	0.084810
+11.220000	0.084764
+11.230000	0.084718
+11.240000	0.084671
+11.250000	0.084624
+11.260000	0.084577
+11.270000	0.084530
+11.280000	0.084482
+11.290000	0.084434
+11.300000	0.084385
+11.310000	0.084337
+11.320000	0.084288
+11.330000	0.084238
+11.340000	0.084189
+11.350000	0.084139
+11.360000	0.084089
+11.370000	0.084038
+11.380000	0.083987
+11.390000	0.083936
+11.400000	0.083885
+11.410000	0.083833
+11.420000	0.083781
+11.430000	0.083729
+11.440000	0.083677
+11.450000	0.083624
+11.460000	0.083571
+11.470000	0.083517
+11.480000	0.083464
+11.490000	0.083410
+11.500000	0.083356
+11.510000	0.083301
+11.520000	0.083246
+11.530000	0.083191
+11.540000	0.083136
+11.550000	0.083080
+11.560000	0.083024
+11.570000	0.082968
+11.580000	0.082912
+11.590000	0.082855
+11.600000	0.082798
+11.610000	0.082741
+11.620000	0.082683
+11.630000	0.082626
+11.640000	0.082568
+11.650000	0.082509
+11.660000	0.082451
+11.670000	0.082392
+11.680000	0.082333
+11.690000	0.082274
+11.700000	0.082214
+11.710000	0.082154
+11.720000	0.082094
+11.730000	0.082034
+11.740000	0.081973
+11.750000	0.081912
+11.760000	0.081851
+11.770000	0.081790
+11.780000	0.081728
+11.790000	0.081666
+11.800000	0.081604
+11.810000	0.081542
+11.820000	0.081479
+11.830000	0.081416
+11.840000	0.081353
+11.850000	0.081290
+11.860000	0.081226
+11.870000	0.081162
+11.880000	0.081098
+11.890000	0.081034
+11.900000	0.080969
+11.910000	0.080905
+11.920000	0.080840
+11.930000	0.080775
+11.940000	0.080709
+11.950000	0.080643
+11.960000	0.080577
+11.970000	0.080511
+11.980000	0.080445
+11.990000	0.080378
+12.000000	0.080312
+12.010000	0.080245
+12.020000	0.080177
+12.030000	0.080110
+12.040000	0.080042
+12.050000	0.079974
+12.060000	0.079906
+12.070000	0.079838
+12.080000	0.079769
+12.090000	0.079700
+12.100000	0.079631
+12.110000	0.079562
+12.120000	0.079493
+12.130000	0.079423
+12.140000	0.079353
+12.150000	0.079283
+12.160000	0.079213
+12.170000	0.079142
+12.180000	0.079072
+12.190000	0.079001
+12.200000	0.078930
+12.210000	0.078859
+12.220000	0.078787
+12.230000	0.078716
+12.240000	0.078644
+12.250000	0.078572
+12.260000	0.078499
+12.270000	0.078427
+12.280000	0.078354
+12.290000	0.078281
+12.300000	0.078208
+12.310000	0.078135
+12.320000	0.078062
+12.330000	0.077988
+12.340000	0.077914
+12.350000	0.077840
+12.360000	0.077766
+12.370000	0.077692
+12.380000	0.077617
+12.390000	0.077543
+12.400000	0.077468
+12.410000	0.077393
+12.420000	0.077318
+12.430000	0.077242
+12.440000	0.077167
+12.450000	0.077091
+12.460000	0.077015
+12.470000	0.076939
+12.480000	0.076862
+12.490000	0.076786
+12.500000	0.076709
+12.510000	0.076633
+12.520000	0.076556
+12.530000	0.076478
+12.540000	0.076401
+12.550000	0.076324
+12.560000	0.076246
+12.570000	0.076168
+12.580000	0.076090
+12.590000	0.076012
+12.600000	0.075934
+12.610000	0.075856
+12.620000	0.075777
+12.630000	0.075698
+12.640000	0.075619
+12.650000	0.075540
+12.660000	0.075461
+12.670000	0.075382
+12.680000	0.075302
+12.690000	0.075223
+12.700000	0.075143
+12.710000	0.075063
+12.720000	0.074983
+12.730000	0.074903
+12.740000	0.074822
+12.750000	0.074742
+12.760000	0.074661
+12.770000	0.074580
+12.780000	0.074499
+12.790000	0.074418
+12.800000	0.074337
+12.810000	0.074255
+12.820000	0.074174
+12.830000	0.074092
+12.840000	0.074010
+12.850000	0.073929
+12.860000	0.073847
+12.870000	0.073764
+12.880000	0.073682
+12.890000	0.073600
+12.900000	0.073517
+12.910000	0.073434
+12.920000	0.073351
+12.930000	0.073269
+12.940000	0.073185
+12.950000	0.073102
+12.960000	0.073019
+12.970000	0.072935
+12.980000	0.072852
+12.990000	0.072768
+13.000000	0.072684
+13.010000	0.072601
+13.020000	0.072516
+13.030000	0.072432
+13.040000	0.072348
+13.050000	0.072264
+13.060000	0.072179
+13.070000	0.072095
+13.080000	0.072010
+13.090000	0.071925
+13.100000	0.071840
+13.110000	0.071755
+13.120000	0.071670
+13.130000	0.071585
+13.140000	0.071499
+13.150000	0.071414
+13.160000	0.071328
+13.170000	0.071242
+13.180000	0.071157
+13.190000	0.071071
+13.200000	0.070985
+13.210000	0.070899
+13.220000	0.070812
+13.230000	0.070726
+13.240000	0.070640
+13.250000	0.070553
+13.260000	0.070467
+13.270000	0.070380
+13.280000	0.070293
+13.290000	0.070206
+13.300000	0.070119
+13.310000	0.070032
+13.320000	0.069945
+13.330000	0.069858
+13.340000	0.069771
+13.350000	0.069683
+13.360000	0.069596
+13.370000	0.069508
+13.380000	0.069421
+13.390000	0.069333
+13.400000	0.069245
+13.410000	0.069157
+13.420000	0.069069
+13.430000	0.068981
+13.440000	0.068893
+13.450000	0.068805
+13.460000	0.068717
+13.470000	0.068628
+13.480000	0.068540
+13.490000	0.068451
+13.500000	0.068363
+13.510000	0.068274
+13.520000	0.068185
+13.530000	0.068097
+13.540000	0.068008
+13.550000	0.067919
+13.560000	0.067830
+13.570000	0.067741
+13.580000	0.067652
+13.590000	0.067562
+13.600000	0.067473
+13.610000	0.067384
+13.620000	0.067294
+13.630000	0.067205
+13.640000	0.067115
+13.650000	0.067026
+13.660000	0.066936
+13.670000	0.066846
+13.680000	0.066757
+13.690000	0.066667
+13.700000	0.066577
+13.710000	0.066487
+13.720000	0.066397
+13.730000	0.066307
+13.740000	0.066217
+13.750000	0.066127
+13.760000	0.066037
+13.770000	0.065946
+13.780000	0.065856
+13.790000	0.065766
+13.800000	0.065675
+13.810000	0.065585
+13.820000	0.065494
+13.830000	0.065404
+13.840000	0.065313
+13.850000	0.065223
+13.860000	0.065132
+13.870000	0.065041
+13.880000	0.064950
+13.890000	0.064860
+13.900000	0.064769
+13.910000	0.064678
+13.920000	0.064587
+13.930000	0.064496
+13.940000	0.064405
+13.950000	0.064314
+13.960000	0.064223
+13.970000	0.064132
+13.980000	0.064041
+13.990000	0.063950
+14.000000	0.063858
+14.010000	0.063767
+14.020000	0.063676
+14.030000	0.063585
+14.040000	0.063493
+14.050000	0.063402
+14.060000	0.063310
+14.070000	0.063219
+14.080000	0.063128
+14.090000	0.063036
+14.100000	0.062945
+14.110000	0.062853
+14.120000	0.062761
+14.130000	0.062670
+14.140000	0.062578
+14.150000	0.062487
+14.160000	0.062395
+14.170000	0.062303
+14.180000	0.062212
+14.190000	0.062120
+14.200000	0.062028
+14.210000	0.061937
+14.220000	0.061845
+14.230000	0.061753
+14.240000	0.061661
+14.250000	0.061569
+14.260000	0.061478
+14.270000	0.061386
+14.280000	0.061294
+14.290000	0.061202
+14.300000	0.061110
+14.310000	0.061018
+14.320000	0.060926
+14.330000	0.060834
+14.340000	0.060743
+14.350000	0.060651
+14.360000	0.060559
+14.370000	0.060467
+14.380000	0.060375
+14.390000	0.060283
+14.400000	0.060191
+14.410000	0.060099
+14.420000	0.060007
+14.430000	0.059915
+14.440000	0.059823
+14.450000	0.059731
+14.460000	0.059639
+14.470000	0.059547
+14.480000	0.059455
+14.490000	0.059363
+14.500000	0.059271
+14.510000	0.059179
+14.520000	0.059087
+14.530000	0.058995
+14.540000	0.058903
+14.550000	0.058811
+14.560000	0.058719
+14.570000	0.058627
+14.580000	0.058536
+14.590000	0.058444
+14.600000	0.058352
+14.610000	0.058260
+14.620000	0.058168
+14.630000	0.058076
+14.640000	0.057984
+14.650000	0.057892
+14.660000	0.057800
+14.670000	0.057708
+14.680000	0.057617
+14.690000	0.057525
+14.700000	0.057433
+14.710000	0.057341
+14.720000	0.057249
+14.730000	0.057158
+14.740000	0.057066
+14.750000	0.056974
+14.760000	0.056882
+14.770000	0.056791
+14.780000	0.056699
+14.790000	0.056607
+14.800000	0.056516
+14.810000	0.056424
+14.820000	0.056332
+14.830000	0.056241
+14.840000	0.056149
+14.850000	0.056058
+14.860000	0.055966
+14.870000	0.055875
+14.880000	0.055783
+14.890000	0.055692
+14.900000	0.055600
+14.910000	0.055509
+14.920000	0.055417
+14.930000	0.055326
+14.940000	0.055235
+14.950000	0.055143
+14.960000	0.055052
+14.970000	0.054961
+14.980000	0.054870
+14.990000	0.054778
+15.000000	0.054687
+15.010000	0.054596
+15.020000	0.054505
+15.030000	0.054414
+15.040000	0.054323
+15.050000	0.054232
+15.060000	0.054141
+15.070000	0.054050
+15.080000	0.053959
+15.090000	0.053868
+15.100000	0.053777
+15.110000	0.053687
+15.120000	0.053596
+15.130000	0.053505
+15.140000	0.053414
+15.150000	0.053324
+15.160000	0.053233
+15.170000	0.053143
+15.180000	0.053052
+15.190000	0.052962
+15.200000	0.052871
+15.210000	0.052781
+15.220000	0.052690
+15.230000	0.052600
+15.240000	0.052510
+15.250000	0.052419
+15.260000	0.052329
+15.270000	0.052239
+15.280000	0.052149
+15.290000	0.052059
+15.300000	0.051969
+15.310000	0.051879
+15.320000	0.051789
+15.330000	0.051699
+15.340000	0.051609
+15.350000	0.051519
+15.360000	0.051430
+15.370000	0.051340
+15.380000	0.051250
+15.390000	0.051161
+15.400000	0.051071
+15.410000	0.050982
+15.420000	0.050892
+15.430000	0.050803
+15.440000	0.050713
+15.450000	0.050624
+15.460000	0.050535
+15.470000	0.050446
+15.480000	0.050356
+15.490000	0.050267
+15.500000	0.050178
+15.510000	0.050089
+15.520000	0.050000
+15.530000	0.049911
+15.540000	0.049823
+15.550000	0.049734
+15.560000	0.049645
+15.570000	0.049556
+15.580000	0.049468
+15.590000	0.049379
+15.600000	0.049291
+15.610000	0.049202
+15.620000	0.049114
+15.630000	0.049026
+15.640000	0.048937
+15.650000	0.048849
+15.660000	0.048761
+15.670000	0.048673
+15.680000	0.048585
+15.690000	0.048497
+15.700000	0.048409
+15.710000	0.048321
+15.720000	0.048233
+15.730000	0.048146
+15.740000	0.048058
+15.750000	0.047970
+15.760000	0.047883
+15.770000	0.047795
+15.780000	0.047708
+15.790000	0.047621
+15.800000	0.047533
+15.810000	0.047446
+15.820000	0.047359
+15.830000	0.047272
+15.840000	0.047185
+15.850000	0.047098
+15.860000	0.047011
+15.870000	0.046924
+15.880000	0.046837
+15.890000	0.046751
+15.900000	0.046664
+15.910000	0.046578
+15.920000	0.046491
+15.930000	0.046405
+15.940000	0.046318
+15.950000	0.046232
+15.960000	0.046146
+15.970000	0.046060
+15.980000	0.045974
+15.990000	0.045888
+16.000000	0.045802
+16.010000	0.045716
+16.020000	0.045630
+16.030000	0.045545
+16.040000	0.045459
+16.050000	0.045373
+16.060000	0.045288
+16.070000	0.045202
+16.080000	0.045117
+16.090000	0.045032
+16.100000	0.044947
+16.110000	0.044862
+16.120000	0.044777
+16.130000	0.044692
+16.140000	0.044607
+16.150000	0.044522
+16.160000	0.044437
+16.170000	0.044352
+16.180000	0.044268
+16.190000	0.044183
+16.200000	0.044099
+16.210000	0.044015
+16.220000	0.043930
+16.230000	0.043846
+16.240000	0.043762
+16.250000	0.043678
+16.260000	0.043594
+16.270000	0.043510
+16.280000	0.043426
+16.290000	0.043343
+16.300000	0.043259
+16.310000	0.043175
+16.320000	0.043092
+16.330000	0.043009
+16.340000	0.042925
+16.350000	0.042842
+16.360000	0.042759
+16.370000	0.042676
+16.380000	0.042593
+16.390000	0.042510
+16.400000	0.042427
+16.410000	0.042344
+16.420000	0.042262
+16.430000	0.042179
+16.440000	0.042097
+16.450000	0.042014
+16.460000	0.041932
+16.470000	0.041850
+16.480000	0.041767
+16.490000	0.041685
+16.500000	0.041603
+16.510000	0.041522
+16.520000	0.041440
+16.530000	0.041358
+16.540000	0.041276
+16.550000	0.041195
+16.560000	0.041113
+16.570000	0.041032
+16.580000	0.040951
+16.590000	0.040869
+16.600000	0.040788
+16.610000	0.040707
+16.620000	0.040626
+16.630000	0.040545
+16.640000	0.040465
+16.650000	0.040384
+16.660000	0.040303
+16.670000	0.040223
+16.680000	0.040142
+16.690000	0.040062
+16.700000	0.039982
+16.710000	0.039902
+16.720000	0.039822
+16.730000	0.039742
+16.740000	0.039662
+16.750000	0.039582
+16.760000	0.039502
+16.770000	0.039423
+16.780000	0.039343
+16.790000	0.039264
+16.800000	0.039184
+16.810000	0.039105
+16.820000	0.039026
+16.830000	0.038947
+16.840000	0.038868
+16.850000	0.038789
+16.860000	0.038710
+16.870000	0.038631
+16.880000	0.038553
+16.890000	0.038474
+16.900000	0.038396
+16.910000	0.038317
+16.920000	0.038239
+16.930000	0.038161
+16.940000	0.038083
+16.950000	0.038005
+16.960000	0.037927
+16.970000	0.037849
+16.980000	0.037772
+16.990000	0.037694
+17.000000	0.037617
+17.010000	0.037539
+17.020000	0.037462
+17.030000	0.037385
+17.040000	0.037308
+17.050000	0.037231
+17.060000	0.037154
+17.070000	0.037077
+17.080000	0.037000
+17.090000	0.036923
+17.100000	0.036847
+17.110000	0.036770
+17.120000	0.036694
+17.130000	0.036618
+17.140000	0.036542
+17.150000	0.036466
+17.160000	0.036390
+17.170000	0.036314
+17.180000	0.036238
+17.190000	0.036162
+17.200000	0.036087
+17.210000	0.036011
+17.220000	0.035936
+17.230000	0.035861
+17.240000	0.035785
+17.250000	0.035710
+17.260000	0.035635
+17.270000	0.035560
+17.280000	0.035486
+17.290000	0.035411
+17.300000	0.035336
+17.310000	0.035262
+17.320000	0.035187
+17.330000	0.035113
+17.340000	0.035039
+17.350000	0.034965
+17.360000	0.034891
+17.370000	0.034817
+17.380000	0.034743
+17.390000	0.034669
+17.400000	0.034596
+17.410000	0.034522
+17.420000	0.034449
+17.430000	0.034376
+17.440000	0.034302
+17.450000	0.034229
+17.460000	0.034156
+17.470000	0.034083
+17.480000	0.034010
+17.490000	0.033938
+17.500000	0.033865
+17.510000	0.033793
+17.520000	0.033720
+17.530000	0.033648
+17.540000	0.033576
+17.550000	0.033504
+17.560000	0.033431
+17.570000	0.033360
+17.580000	0.033288
+17.590000	0.033216
+17.600000	0.033144
+17.610000	0.033073
+17.620000	0.033002
+17.630000	0.032930
+17.640000	0.032859
+17.650000	0.032788
+17.660000	0.032717
+17.670000	0.032646
+17.680000	0.032575
+17.690000	0.032504
+17.700000	0.032434
+17.710000	0.032363
+17.720000	0.032293
+17.730000	0.032223
+17.740000	0.032153
+17.750000	0.032082
+17.760000	0.032012
+17.770000	0.031943
+17.780000	0.031873
+17.790000	0.031803
+17.800000	0.031733
+17.810000	0.031664
+17.820000	0.031595
+17.830000	0.031525
+17.840000	0.031456
+17.850000	0.031387
+17.860000	0.031318
+17.870000	0.031249
+17.880000	0.031181
+17.890000	0.031112
+17.900000	0.031043
+17.910000	0.030975
+17.920000	0.030907
+17.930000	0.030838
+17.940000	0.030770
+17.950000	0.030702
+17.960000	0.030634
+17.970000	0.030566
+17.980000	0.030499
+17.990000	0.030431
+18.000000	0.030363
+18.010000	0.030296
+18.020000	0.030229
+18.030000	0.030161
+18.040000	0.030094
+18.050000	0.030027
+18.060000	0.029960
+18.070000	0.029894
+18.080000	0.029827
+18.090000	0.029760
+18.100000	0.029694
+18.110000	0.029627
+18.120000	0.029561
+18.130000	0.029495
+18.140000	0.029429
+18.150000	0.029363
+18.160000	0.029297
+18.170000	0.029231
+18.180000	0.029166
+18.190000	0.029100
+18.200000	0.029035
+18.210000	0.028969
+18.220000	0.028904
+18.230000	0.028839
+18.240000	0.028774
+18.250000	0.028709
+18.260000	0.028644
+18.270000	0.028579
+18.280000	0.028515
+18.290000	0.028450
+18.300000	0.028386
+18.310000	0.028321
+18.320000	0.028257
+18.330000	0.028193
+18.340000	0.028129
+18.350000	0.028065
+18.360000	0.028001
+18.370000	0.027938
+18.380000	0.027874
+18.390000	0.027811
+18.400000	0.027747
+18.410000	0.027684
+18.420000	0.027621
+18.430000	0.027558
+18.440000	0.027495
+18.450000	0.027432
+18.460000	0.027369
+18.470000	0.027306
+18.480000	0.027244
+18.490000	0.027181
+18.500000	0.027119
+18.510000	0.027057
+18.520000	0.026995
+18.530000	0.026933
+18.540000	0.026871
+18.550000	0.026809
+18.560000	0.026747
+18.570000	0.026685
+18.580000	0.026624
+18.590000	0.026562
+18.600000	0.026501
+18.610000	0.026440
+18.620000	0.026379
+18.630000	0.026318
+18.640000	0.026257
+18.650000	0.026196
+18.660000	0.026135
+18.670000	0.026075
+18.680000	0.026014
+18.690000	0.025954
+18.700000	0.025894
+18.710000	0.025833
+18.720000	0.025773
+18.730000	0.025713
+18.740000	0.025654
+18.750000	0.025594
+18.760000	0.025534
+18.770000	0.025475
+18.780000	0.025415
+18.790000	0.025356
+18.800000	0.025296
+18.810000	0.025237
+18.820000	0.025178
+18.830000	0.025119
+18.840000	0.025060
+18.850000	0.025002
+18.860000	0.024943
+18.870000	0.024885
+18.880000	0.024826
+18.890000	0.024768
+18.900000	0.024710
+18.910000	0.024651
+18.920000	0.024593
+18.930000	0.024535
+18.940000	0.024478
+18.950000	0.024420
+18.960000	0.024362
+18.970000	0.024305
+18.980000	0.024247
+18.990000	0.024190
+19.000000	0.024133
+19.010000	0.024076
+19.020000	0.024019
+19.030000	0.023962
+19.040000	0.023905
+19.050000	0.023848
+19.060000	0.023792
+19.070000	0.023735
+19.080000	0.023679
+19.090000	0.023623
+19.100000	0.023566
+19.110000	0.023510
+19.120000	0.023454
+19.130000	0.023398
+19.140000	0.023343
+19.150000	0.023287
+19.160000	0.023231
+19.170000	0.023176
+19.180000	0.023121
+19.190000	0.023065
+19.200000	0.023010
+19.210000	0.022955
+19.220000	0.022900
+19.230000	0.022845
+19.240000	0.022790
+19.250000	0.022736
+19.260000	0.022681
+19.270000	0.022627
+19.280000	0.022572
+19.290000	0.022518
+19.300000	0.022464
+19.310000	0.022410
+19.320000	0.022356
+19.330000	0.022302
+19.340000	0.022248
+19.350000	0.022194
+19.360000	0.022141
+19.370000	0.022087
+19.380000	0.022034
+19.390000	0.021981
+19.400000	0.021928
+19.410000	0.021875
+19.420000	0.021822
+19.430000	0.021769
+19.440000	0.021716
+19.450000	0.021663
+19.460000	0.021611
+19.470000	0.021558
+19.480000	0.021506
+19.490000	0.021454
+19.500000	0.021401
+19.510000	0.021349
+19.520000	0.021297
+19.530000	0.021245
+19.540000	0.021194
+19.550000	0.021142
+19.560000	0.021090
+19.570000	0.021039
+19.580000	0.020987
+19.590000	0.020936
+19.600000	0.020885
+19.610000	0.020834
+19.620000	0.020783
+19.630000	0.020732
+19.640000	0.020681
+19.650000	0.020630
+19.660000	0.020580
+19.670000	0.020529
+19.680000	0.020479
+19.690000	0.020429
+19.700000	0.020378
+19.710000	0.020328
+19.720000	0.020278
+19.730000	0.020228
+19.740000	0.020178
+19.750000	0.020129
+19.760000	0.020079
+19.770000	0.020030
+19.780000	0.019980
+19.790000	0.019931
+19.800000	0.019882
+19.810000	0.019832
+19.820000	0.019783
+19.830000	0.019734
+19.840000	0.019685
+19.850000	0.019637
+19.860000	0.019588
+19.870000	0.019539
+19.880000	0.019491
+19.890000	0.019443
+19.900000	0.019394
+19.910000	0.019346
+19.920000	0.019298
+19.930000	0.019250
+19.940000	0.019202
+19.950000	0.019154
+19.960000	0.019107
+19.970000	0.019059
+19.980000	0.019011
+19.990000	0.018964
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/lognormal.plt b/v0.2-M1/chi/reference-manual/distribution_plots/lognormal.plt
new file mode 100644
index 0000000..f8927ae
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/lognormal.plt
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+#set xrange [0:20]
+#set yrange [0:0.5]
+set xlabel "x"
+set ylabel "lognormal(real m, v2)"
+#set samples 2000
+set output "lognormal.svg"
+set nokey
+set label "lognormal(0.0, 1.0)" at 2.7, 0.17
+set label "lognormal(0.0, 0.5)" at 1.7, 0.35
+set label "lognormal(0.0, 0.25)" at 1.25, 1.2
+set style data lines
+plot "lognormal_0.0_1.0.dat" using 1:2 linetype 1, \
+     "lognormal_0.0_0.5.dat" using 1:2 linetype 2, \
+     "lognormal_0.0_0.25.dat" using 1:2 linetype 3
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/lognormal.svg b/v0.2-M1/chi/reference-manual/distribution_plots/lognormal.svg
new file mode 100644
index 0000000..fee2dc5
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/lognormal.svg
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L80.9,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(63.6,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M71.9,377.3 L80.9,377.3 M575.0,377.3 L566.0,377.3 '></path>
+	<g transform="translate(63.6,381.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.2</text>
+	</g>
+	<path  d='M71.9,332.2 L80.9,332.2 M575.0,332.2 L566.0,332.2 '></path>
+	<g transform="translate(63.6,336.7)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.4</text>
+	</g>
+	<path  d='M71.9,287.2 L80.9,287.2 M575.0,287.2 L566.0,287.2 '></path>
+	<g transform="translate(63.6,291.7)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.6</text>
+	</g>
+	<path  d='M71.9,242.1 L80.9,242.1 M575.0,242.1 L566.0,242.1 '></path>
+	<g transform="translate(63.6,246.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.8</text>
+	</g>
+	<path  d='M71.9,197.0 L80.9,197.0 M575.0,197.0 L566.0,197.0 '></path>
+	<g transform="translate(63.6,201.5)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1</text>
+	</g>
+	<path  d='M71.9,151.9 L80.9,151.9 M575.0,151.9 L566.0,151.9 '></path>
+	<g transform="translate(63.6,156.4)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1.2</text>
+	</g>
+	<path  d='M71.9,106.9 L80.9,106.9 M575.0,106.9 L566.0,106.9 '></path>
+	<g transform="translate(63.6,111.4)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1.4</text>
+	</g>
+	<path  d='M71.9,61.8 L80.9,61.8 M575.0,61.8 L566.0,61.8 '></path>
+	<g transform="translate(63.6,66.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1.6</text>
+	</g>
+	<path  d='M71.9,16.7 L80.9,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(63.6,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1.8</text>
+	</g>
+	<path  d='M71.9,422.4 L71.9,413.4 M71.9,16.7 L71.9,25.7 '></path>
+	<g transform="translate(71.9,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0</text>
+	</g>
+	<path  d='M134.8,422.4 L134.8,413.4 M134.8,16.7 L134.8,25.7 '></path>
+	<g transform="translate(134.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.5</text>
+	</g>
+	<path  d='M197.7,422.4 L197.7,413.4 M197.7,16.7 L197.7,25.7 '></path>
+	<g transform="translate(197.7,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 1</text>
+	</g>
+	<path  d='M260.6,422.4 L260.6,413.4 M260.6,16.7 L260.6,25.7 '></path>
+	<g transform="translate(260.6,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 1.5</text>
+	</g>
+	<path  d='M323.5,422.4 L323.5,413.4 M323.5,16.7 L323.5,25.7 '></path>
+	<g transform="translate(323.5,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 2</text>
+	</g>
+	<path  d='M386.3,422.4 L386.3,413.4 M386.3,16.7 L386.3,25.7 '></path>
+	<g transform="translate(386.3,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 2.5</text>
+	</g>
+	<path  d='M449.2,422.4 L449.2,413.4 M449.2,16.7 L449.2,25.7 '></path>
+	<g transform="translate(449.2,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 3</text>
+	</g>
+	<path  d='M512.1,422.4 L512.1,413.4 M512.1,16.7 L512.1,25.7 '></path>
+	<g transform="translate(512.1,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 3.5</text>
+	</g>
+	<path  d='M575.0,422.4 L575.0,413.4 M575.0,16.7 L575.0,25.7 '></path>
+	<g transform="translate(575.0,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 4</text>
+	</g>
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>lognormal(real m, v2)</text>
+	</g>
+	<g transform="translate(323.4,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(411.5,388.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>lognormal(0.0, 1.0)</text>
+	</g>
+	<g transform="translate(285.7,348.0)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>lognormal(0.0, 0.5)</text>
+	</g>
+	<g transform="translate(229.1,156.4)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>lognormal(0.0, 0.25)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L73.2,422.2 L74.4,420.3 L75.7,416.0 L76.9,409.8 L78.2,402.2 L79.4,393.8 L80.7,385.0 
+		L82.0,376.1 L83.2,367.4 L84.5,358.9 L85.7,350.9 L87.0,343.2 L88.3,336.1 L89.5,329.4 L90.8,323.3 
+		L92.0,317.6 L93.3,312.4 L94.5,307.6 L95.8,303.2 L97.1,299.3 L98.3,295.7 L99.6,292.5 L100.8,289.6 
+		L102.1,287.1 L103.3,284.8 L104.6,282.8 L105.9,281.1 L107.1,279.6 L108.4,278.3 L109.6,277.2 L110.9,276.3 
+		L112.1,275.6 L113.4,275.0 L114.7,274.6 L115.9,274.3 L117.2,274.2 L118.4,274.2 L119.7,274.2 L121.0,274.4 
+		L122.2,274.7 L123.5,275.0 L124.7,275.4 L126.0,275.9 L127.2,276.5 L128.5,277.1 L129.8,277.8 L131.0,278.5 
+		L132.3,279.3 L133.5,280.1 L134.8,281.0 L136.0,281.9 L137.3,282.8 L138.6,283.7 L139.8,284.7 L141.1,285.7 
+		L142.3,286.7 L143.6,287.7 L144.8,288.7 L146.1,289.8 L147.4,290.9 L148.6,291.9 L149.9,293.0 L151.1,294.1 
+		L152.4,295.2 L153.7,296.3 L154.9,297.4 L156.2,298.5 L157.4,299.6 L158.7,300.8 L159.9,301.9 L161.2,303.0 
+		L162.5,304.1 L163.7,305.2 L165.0,306.3 L166.2,307.4 L167.5,308.5 L168.7,309.5 L170.0,310.6 L171.3,311.7 
+		L172.5,312.8 L173.8,313.8 L175.0,314.9 L176.3,315.9 L177.6,317.0 L178.8,318.0 L180.1,319.0 L181.3,320.0 
+		L182.6,321.1 L183.8,322.1 L185.1,323.0 L186.4,324.0 L187.6,325.0 L188.9,326.0 L190.1,326.9 L191.4,327.9 
+		L192.6,328.8 L193.9,329.7 L195.2,330.7 L196.4,331.6 L197.7,332.5 L198.9,333.4 L200.2,334.3 L201.4,335.1 
+		L202.7,336.0 L204.0,336.9 L205.2,337.7 L206.5,338.6 L207.7,339.4 L209.0,340.2 L210.3,341.0 L211.5,341.8 
+		L212.8,342.6 L214.0,343.4 L215.3,344.2 L216.5,345.0 L217.8,345.7 L219.1,346.5 L220.3,347.2 L221.6,348.0 
+		L222.8,348.7 L224.1,349.4 L225.3,350.1 L226.6,350.8 L227.9,351.5 L229.1,352.2 L230.4,352.9 L231.6,353.6 
+		L232.9,354.3 L234.1,354.9 L235.4,355.6 L236.7,356.2 L237.9,356.9 L239.2,357.5 L240.4,358.1 L241.7,358.7 
+		L243.0,359.3 L244.2,359.9 L245.5,360.5 L246.7,361.1 L248.0,361.7 L249.2,362.3 L250.5,362.9 L251.8,363.4 
+		L253.0,364.0 L254.3,364.5 L255.5,365.1 L256.8,365.6 L258.0,366.1 L259.3,366.7 L260.6,367.2 L261.8,367.7 
+		L263.1,368.2 L264.3,368.7 L265.6,369.2 L266.9,369.7 L268.1,370.2 L269.4,370.7 L270.6,371.1 L271.9,371.6 
+		L273.1,372.1 L274.4,372.5 L275.7,373.0 L276.9,373.4 L278.2,373.9 L279.4,374.3 L280.7,374.8 L281.9,375.2 
+		L283.2,375.6 L284.5,376.0 L285.7,376.5 L287.0,376.9 L288.2,377.3 L289.5,377.7 L290.7,378.1 L292.0,378.5 
+		L293.3,378.9 L294.5,379.2 L295.8,379.6 L297.0,380.0 L298.3,380.4 L299.6,380.7 L300.8,381.1 L302.1,381.5 
+		L303.3,381.8 L304.6,382.2 L305.8,382.5 L307.1,382.9 L308.4,383.2 L309.6,383.6 L310.9,383.9 L312.1,384.2 
+		L313.4,384.5 L314.6,384.9 L315.9,385.2 L317.2,385.5 L318.4,385.8 L319.7,386.1 L320.9,386.4 L322.2,386.7 
+		L323.5,387.0 L324.7,387.3 L326.0,387.6 L327.2,387.9 L328.5,388.2 L329.7,388.5 L331.0,388.8 L332.3,389.1 
+		L333.5,389.3 L334.8,389.6 L336.0,389.9 L337.3,390.2 L338.5,390.4 L339.8,390.7 L341.1,390.9 L342.3,391.2 
+		L343.6,391.5 L344.8,391.7 L346.1,392.0 L347.3,392.2 L348.6,392.4 L349.9,392.7 L351.1,392.9 L352.4,393.2 
+		L353.6,393.4 L354.9,393.6 L356.2,393.9 L357.4,394.1 L358.7,394.3 L359.9,394.5 L361.2,394.8 L362.4,395.0 
+		L363.7,395.2 L365.0,395.4 L366.2,395.6 L367.5,395.8 L368.7,396.0 L370.0,396.3 L371.2,396.5 L372.5,396.7 
+		L373.8,396.9 L375.0,397.1 L376.3,397.3 L377.5,397.5 L378.8,397.6 L380.0,397.8 L381.3,398.0 L382.6,398.2 
+		L383.8,398.4 L385.1,398.6 L386.3,398.8 L387.6,398.9 L388.9,399.1 L390.1,399.3 L391.4,399.5 L392.6,399.6 
+		L393.9,399.8 L395.1,400.0 L396.4,400.2 L397.7,400.3 L398.9,400.5 L400.2,400.7 L401.4,400.8 L402.7,401.0 
+		L403.9,401.1 L405.2,401.3 L406.5,401.5 L407.7,401.6 L409.0,401.8 L410.2,401.9 L411.5,402.1 L412.8,402.2 
+		L414.0,402.4 L415.3,402.5 L416.5,402.7 L417.8,402.8 L419.0,402.9 L420.3,403.1 L421.6,403.2 L422.8,403.4 
+		L424.1,403.5 L425.3,403.6 L426.6,403.8 L427.8,403.9 L429.1,404.0 L430.4,404.2 L431.6,404.3 L432.9,404.4 
+		L434.1,404.6 L435.4,404.7 L436.6,404.8 L437.9,404.9 L439.2,405.1 L440.4,405.2 L441.7,405.3 L442.9,405.4 
+		L444.2,405.5 L445.5,405.7 L446.7,405.8 L448.0,405.9 L449.2,406.0 L450.5,406.1 L451.7,406.2 L453.0,406.3 
+		L454.3,406.5 L455.5,406.6 L456.8,406.7 L458.0,406.8 L459.3,406.9 L460.5,407.0 L461.8,407.1 L463.1,407.2 
+		L464.3,407.3 L465.6,407.4 L466.8,407.5 L468.1,407.6 L469.3,407.7 L470.6,407.8 L471.9,407.9 L473.1,408.0 
+		L474.4,408.1 L475.6,408.2 L476.9,408.3 L478.2,408.4 L479.4,408.5 L480.7,408.6 L481.9,408.7 L483.2,408.8 
+		L484.4,408.9 L485.7,409.0 L487.0,409.0 L488.2,409.1 L489.5,409.2 L490.7,409.3 L492.0,409.4 L493.2,409.5 
+		L494.5,409.6 L495.8,409.6 L497.0,409.7 L498.3,409.8 L499.5,409.9 L500.8,410.0 L502.1,410.1 L503.3,410.1 
+		L504.6,410.2 L505.8,410.3 L507.1,410.4 L508.3,410.4 L509.6,410.5 L510.9,410.6 L512.1,410.7 L513.4,410.8 
+		L514.6,410.8 L515.9,410.9 L517.1,411.0 L518.4,411.0 L519.7,411.1 L520.9,411.2 L522.2,411.3 L523.4,411.3 
+		L524.7,411.4 L525.9,411.5 L527.2,411.5 L528.5,411.6 L529.7,411.7 L531.0,411.7 L532.2,411.8 L533.5,411.9 
+		L534.8,411.9 L536.0,412.0 L537.3,412.1 L538.5,412.1 L539.8,412.2 L541.0,412.3 L542.3,412.3 L543.6,412.4 
+		L544.8,412.5 L546.1,412.5 L547.3,412.6 L548.6,412.6 L549.8,412.7 L551.1,412.8 L552.4,412.8 L553.6,412.9 
+		L554.9,412.9 L556.1,413.0 L557.4,413.0 L558.6,413.1 L559.9,413.2 L561.2,413.2 L562.4,413.3 L563.7,413.3 
+		L564.9,413.4 L566.2,413.4 L567.5,413.5 L568.7,413.5 L570.0,413.6 L571.2,413.6 L572.5,413.7 L573.7,413.7 
+		L575.0,413.8 '></path>
+</g>
+	</g>
+	<g id="Plot_2"><title>Plot_2</title>
+<g style="fill:none; color:green; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L73.2,422.4 L74.4,422.4 L75.7,422.4 L76.9,422.4 L78.2,422.4 L79.4,422.4 L80.7,422.4 
+		L82.0,422.4 L83.2,422.4 L84.5,422.4 L85.7,422.3 L87.0,422.2 L88.3,422.1 L89.5,421.8 L90.8,421.5 
+		L92.0,421.0 L93.3,420.4 L94.5,419.6 L95.8,418.6 L97.1,417.3 L98.3,415.8 L99.6,414.1 L100.8,412.0 
+		L102.1,409.6 L103.3,407.0 L104.6,404.0 L105.9,400.8 L107.1,397.3 L108.4,393.5 L109.6,389.4 L110.9,385.1 
+		L112.1,380.5 L113.4,375.8 L114.7,370.8 L115.9,365.7 L117.2,360.5 L118.4,355.1 L119.7,349.6 L121.0,344.1 
+		L122.2,338.5 L123.5,332.9 L124.7,327.3 L126.0,321.8 L127.2,316.2 L128.5,310.8 L129.8,305.4 L131.0,300.0 
+		L132.3,294.8 L133.5,289.8 L134.8,284.8 L136.0,280.0 L137.3,275.4 L138.6,270.9 L139.8,266.6 L141.1,262.4 
+		L142.3,258.5 L143.6,254.7 L144.8,251.1 L146.1,247.7 L147.4,244.5 L148.6,241.5 L149.9,238.7 L151.1,236.1 
+		L152.4,233.7 L153.7,231.5 L154.9,229.5 L156.2,227.6 L157.4,226.0 L158.7,224.5 L159.9,223.2 L161.2,222.1 
+		L162.5,221.1 L163.7,220.3 L165.0,219.7 L166.2,219.2 L167.5,218.9 L168.7,218.7 L170.0,218.6 L171.3,218.7 
+		L172.5,218.9 L173.8,219.2 L175.0,219.7 L176.3,220.3 L177.6,220.9 L178.8,221.7 L180.1,222.6 L181.3,223.6 
+		L182.6,224.6 L183.8,225.8 L185.1,227.0 L186.4,228.3 L187.6,229.6 L188.9,231.1 L190.1,232.5 L191.4,234.1 
+		L192.6,235.7 L193.9,237.3 L195.2,239.0 L196.4,240.8 L197.7,242.6 L198.9,244.4 L200.2,246.2 L201.4,248.1 
+		L202.7,250.0 L204.0,251.9 L205.2,253.9 L206.5,255.9 L207.7,257.8 L209.0,259.8 L210.3,261.9 L211.5,263.9 
+		L212.8,265.9 L214.0,267.9 L215.3,270.0 L216.5,272.0 L217.8,274.1 L219.1,276.1 L220.3,278.1 L221.6,280.2 
+		L222.8,282.2 L224.1,284.2 L225.3,286.2 L226.6,288.2 L227.9,290.2 L229.1,292.2 L230.4,294.1 L231.6,296.1 
+		L232.9,298.0 L234.1,299.9 L235.4,301.9 L236.7,303.7 L237.9,305.6 L239.2,307.5 L240.4,309.3 L241.7,311.1 
+		L243.0,313.0 L244.2,314.7 L245.5,316.5 L246.7,318.2 L248.0,320.0 L249.2,321.7 L250.5,323.4 L251.8,325.0 
+		L253.0,326.7 L254.3,328.3 L255.5,329.9 L256.8,331.5 L258.0,333.0 L259.3,334.6 L260.6,336.1 L261.8,337.6 
+		L263.1,339.1 L264.3,340.5 L265.6,342.0 L266.9,343.4 L268.1,344.8 L269.4,346.1 L270.6,347.5 L271.9,348.8 
+		L273.1,350.1 L274.4,351.4 L275.7,352.7 L276.9,354.0 L278.2,355.2 L279.4,356.4 L280.7,357.6 L281.9,358.8 
+		L283.2,359.9 L284.5,361.0 L285.7,362.2 L287.0,363.3 L288.2,364.3 L289.5,365.4 L290.7,366.4 L292.0,367.5 
+		L293.3,368.5 L294.5,369.5 L295.8,370.4 L297.0,371.4 L298.3,372.3 L299.6,373.3 L300.8,374.2 L302.1,375.1 
+		L303.3,375.9 L304.6,376.8 L305.8,377.6 L307.1,378.5 L308.4,379.3 L309.6,380.1 L310.9,380.9 L312.1,381.7 
+		L313.4,382.4 L314.6,383.2 L315.9,383.9 L317.2,384.6 L318.4,385.3 L319.7,386.0 L320.9,386.7 L322.2,387.3 
+		L323.5,388.0 L324.7,388.6 L326.0,389.3 L327.2,389.9 L328.5,390.5 L329.7,391.1 L331.0,391.7 L332.3,392.3 
+		L333.5,392.8 L334.8,393.4 L336.0,393.9 L337.3,394.5 L338.5,395.0 L339.8,395.5 L341.1,396.0 L342.3,396.5 
+		L343.6,397.0 L344.8,397.4 L346.1,397.9 L347.3,398.4 L348.6,398.8 L349.9,399.3 L351.1,399.7 L352.4,400.1 
+		L353.6,400.5 L354.9,400.9 L356.2,401.3 L357.4,401.7 L358.7,402.1 L359.9,402.5 L361.2,402.9 L362.4,403.2 
+		L363.7,403.6 L365.0,403.9 L366.2,404.3 L367.5,404.6 L368.7,405.0 L370.0,405.3 L371.2,405.6 L372.5,405.9 
+		L373.8,406.2 L375.0,406.5 L376.3,406.8 L377.5,407.1 L378.8,407.4 L380.0,407.7 L381.3,407.9 L382.6,408.2 
+		L383.8,408.5 L385.1,408.7 L386.3,409.0 L387.6,409.2 L388.9,409.5 L390.1,409.7 L391.4,409.9 L392.6,410.2 
+		L393.9,410.4 L395.1,410.6 L396.4,410.8 L397.7,411.1 L398.9,411.3 L400.2,411.5 L401.4,411.7 L402.7,411.9 
+		L403.9,412.1 L405.2,412.2 L406.5,412.4 L407.7,412.6 L409.0,412.8 L410.2,413.0 L411.5,413.1 L412.8,413.3 
+		L414.0,413.5 L415.3,413.6 L416.5,413.8 L417.8,414.0 L419.0,414.1 L420.3,414.3 L421.6,414.4 L422.8,414.6 
+		L424.1,414.7 L425.3,414.8 L426.6,415.0 L427.8,415.1 L429.1,415.2 L430.4,415.4 L431.6,415.5 L432.9,415.6 
+		L434.1,415.7 L435.4,415.9 L436.6,416.0 L437.9,416.1 L439.2,416.2 L440.4,416.3 L441.7,416.4 L442.9,416.5 
+		L444.2,416.6 L445.5,416.7 L446.7,416.8 L448.0,416.9 L449.2,417.0 L450.5,417.1 L451.7,417.2 L453.0,417.3 
+		L454.3,417.4 L455.5,417.5 L456.8,417.6 L458.0,417.7 L459.3,417.8 L460.5,417.8 L461.8,417.9 L463.1,418.0 
+		L464.3,418.1 L465.6,418.1 L466.8,418.2 L468.1,418.3 L469.3,418.4 L470.6,418.4 L471.9,418.5 L473.1,418.6 
+		L474.4,418.6 L475.6,418.7 L476.9,418.8 L478.2,418.8 L479.4,418.9 L480.7,419.0 L481.9,419.0 L483.2,419.1 
+		L484.4,419.1 L485.7,419.2 L487.0,419.3 L488.2,419.3 L489.5,419.4 L490.7,419.4 L492.0,419.5 L493.2,419.5 
+		L494.5,419.6 L495.8,419.6 L497.0,419.7 L498.3,419.7 L499.5,419.8 L500.8,419.8 L502.1,419.8 L503.3,419.9 
+		L504.6,419.9 L505.8,420.0 L507.1,420.0 L508.3,420.1 L509.6,420.1 L510.9,420.1 L512.1,420.2 L513.4,420.2 
+		L514.6,420.2 L515.9,420.3 L517.1,420.3 L518.4,420.4 L519.7,420.4 L520.9,420.4 L522.2,420.5 L523.4,420.5 
+		L524.7,420.5 L525.9,420.6 L527.2,420.6 L528.5,420.6 L529.7,420.6 L531.0,420.7 L532.2,420.7 L533.5,420.7 
+		L534.8,420.8 L536.0,420.8 L537.3,420.8 L538.5,420.8 L539.8,420.9 L541.0,420.9 L542.3,420.9 L543.6,420.9 
+		L544.8,421.0 L546.1,421.0 L547.3,421.0 L548.6,421.0 L549.8,421.1 L551.1,421.1 L552.4,421.1 L553.6,421.1 
+		L554.9,421.1 L556.1,421.2 L557.4,421.2 L558.6,421.2 L559.9,421.2 L561.2,421.2 L562.4,421.3 L563.7,421.3 
+		L564.9,421.3 L566.2,421.3 L567.5,421.3 L568.7,421.4 L570.0,421.4 L571.2,421.4 L572.5,421.4 L573.7,421.4 
+		L575.0,421.4 '></path>
+</g>
+	</g>
+	<g id="Plot_3"><title>Plot_3</title>
+<g style="fill:none; color:blue; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L73.2,422.4 L74.4,422.4 L75.7,422.4 L76.9,422.4 L78.2,422.4 L79.4,422.4 L80.7,422.4 
+		L82.0,422.4 L83.2,422.4 L84.5,422.4 L85.7,422.4 L87.0,422.4 L88.3,422.4 L89.5,422.4 L90.8,422.4 
+		L92.0,422.4 L93.3,422.4 L94.5,422.4 L95.8,422.4 L97.1,422.4 L98.3,422.4 L99.6,422.4 L100.8,422.4 
+		L102.1,422.4 L103.3,422.4 L104.6,422.4 L105.9,422.4 L107.1,422.4 L108.4,422.4 L109.6,422.4 L110.9,422.4 
+		L112.1,422.4 L113.4,422.3 L114.7,422.3 L115.9,422.2 L117.2,422.2 L118.4,422.0 L119.7,421.9 L121.0,421.6 
+		L122.2,421.3 L123.5,420.9 L124.7,420.3 L126.0,419.6 L127.2,418.7 L128.5,417.5 L129.8,416.1 L131.0,414.4 
+		L132.3,412.3 L133.5,409.9 L134.8,407.0 L136.0,403.6 L137.3,399.8 L138.6,395.4 L139.8,390.5 L141.1,384.9 
+		L142.3,378.8 L143.6,372.0 L144.8,364.7 L146.1,356.7 L147.4,348.1 L148.6,338.9 L149.9,329.2 L151.1,318.9 
+		L152.4,308.2 L153.7,297.0 L154.9,285.5 L156.2,273.6 L157.4,261.5 L158.7,249.1 L159.9,236.7 L161.2,224.2 
+		L162.5,211.7 L163.7,199.3 L165.0,187.1 L166.2,175.1 L167.5,163.3 L168.7,152.0 L170.0,141.0 L171.3,130.5 
+		L172.5,120.5 L173.8,111.1 L175.0,102.3 L176.3,94.2 L177.6,86.7 L178.8,79.9 L180.1,73.8 L181.3,68.4 
+		L182.6,63.8 L183.8,59.9 L185.1,56.7 L186.4,54.3 L187.6,52.6 L188.9,51.6 L190.1,51.3 L191.4,51.7 
+		L192.6,52.7 L193.9,54.3 L195.2,56.6 L196.4,59.4 L197.7,62.7 L198.9,66.6 L200.2,70.9 L201.4,75.6 
+		L202.7,80.8 L204.0,86.3 L205.2,92.2 L206.5,98.3 L207.7,104.8 L209.0,111.5 L210.3,118.3 L211.5,125.4 
+		L212.8,132.6 L214.0,140.0 L215.3,147.4 L216.5,154.9 L217.8,162.4 L219.1,170.0 L220.3,177.6 L221.6,185.1 
+		L222.8,192.7 L224.1,200.1 L225.3,207.5 L226.6,214.9 L227.9,222.1 L229.1,229.2 L230.4,236.2 L231.6,243.1 
+		L232.9,249.8 L234.1,256.4 L235.4,262.9 L236.7,269.2 L237.9,275.3 L239.2,281.3 L240.4,287.1 L241.7,292.8 
+		L243.0,298.3 L244.2,303.6 L245.5,308.7 L246.7,313.7 L248.0,318.5 L249.2,323.2 L250.5,327.7 L251.8,332.0 
+		L253.0,336.2 L254.3,340.2 L255.5,344.1 L256.8,347.8 L258.0,351.3 L259.3,354.8 L260.6,358.0 L261.8,361.2 
+		L263.1,364.2 L264.3,367.1 L265.6,369.8 L266.9,372.5 L268.1,375.0 L269.4,377.4 L270.6,379.7 L271.9,381.9 
+		L273.1,384.0 L274.4,386.0 L275.7,387.9 L276.9,389.7 L278.2,391.4 L279.4,393.1 L280.7,394.6 L281.9,396.1 
+		L283.2,397.5 L284.5,398.9 L285.7,400.2 L287.0,401.4 L288.2,402.5 L289.5,403.6 L290.7,404.6 L292.0,405.6 
+		L293.3,406.5 L294.5,407.4 L295.8,408.3 L297.0,409.1 L298.3,409.8 L299.6,410.5 L300.8,411.2 L302.1,411.8 
+		L303.3,412.4 L304.6,413.0 L305.8,413.5 L307.1,414.0 L308.4,414.5 L309.6,415.0 L310.9,415.4 L312.1,415.8 
+		L313.4,416.2 L314.6,416.5 L315.9,416.9 L317.2,417.2 L318.4,417.5 L319.7,417.8 L320.9,418.1 L322.2,418.3 
+		L323.5,418.5 L324.7,418.8 L326.0,419.0 L327.2,419.2 L328.5,419.4 L329.7,419.6 L331.0,419.7 L332.3,419.9 
+		L333.5,420.0 L334.8,420.2 L336.0,420.3 L337.3,420.4 L338.5,420.5 L339.8,420.7 L341.1,420.8 L342.3,420.9 
+		L343.6,421.0 L344.8,421.0 L346.1,421.1 L347.3,421.2 L348.6,421.3 L349.9,421.3 L351.1,421.4 L352.4,421.5 
+		L353.6,421.5 L354.9,421.6 L356.2,421.6 L357.4,421.7 L358.7,421.7 L359.9,421.8 L361.2,421.8 L362.4,421.8 
+		L363.7,421.9 L365.0,421.9 L366.2,421.9 L367.5,422.0 L368.7,422.0 L370.0,422.0 L371.2,422.0 L372.5,422.1 
+		L373.8,422.1 L375.0,422.1 L376.3,422.1 L377.5,422.1 L378.8,422.1 L380.0,422.2 L381.3,422.2 L382.6,422.2 
+		L383.8,422.2 L385.1,422.2 L386.3,422.2 L387.6,422.2 L388.9,422.2 L390.1,422.3 L391.4,422.3 L392.6,422.3 
+		L393.9,422.3 L395.1,422.3 L396.4,422.3 L397.7,422.3 L398.9,422.3 L400.2,422.3 L401.4,422.3 L402.7,422.3 
+		L403.9,422.3 L405.2,422.3 L406.5,422.3 L407.7,422.3 L409.0,422.3 L410.2,422.3 L411.5,422.4 L412.8,422.4 
+		L414.0,422.4 L415.3,422.4 L416.5,422.4 L417.8,422.4 L419.0,422.4 L420.3,422.4 L421.6,422.4 L422.8,422.4 
+		L424.1,422.4 L425.3,422.4 L426.6,422.4 L427.8,422.4 L429.1,422.4 L430.4,422.4 L431.6,422.4 L432.9,422.4 
+		L434.1,422.4 L435.4,422.4 L436.6,422.4 L437.9,422.4 L439.2,422.4 L440.4,422.4 L441.7,422.4 L442.9,422.4 
+		L444.2,422.4 L445.5,422.4 L446.7,422.4 L448.0,422.4 L449.2,422.4 L450.5,422.4 L451.7,422.4 L453.0,422.4 
+		L454.3,422.4 L455.5,422.4 L456.8,422.4 L458.0,422.4 L459.3,422.4 L460.5,422.4 L461.8,422.4 L463.1,422.4 
+		L464.3,422.4 L465.6,422.4 L466.8,422.4 L468.1,422.4 L469.3,422.4 L470.6,422.4 L471.9,422.4 L473.1,422.4 
+		L474.4,422.4 L475.6,422.4 L476.9,422.4 L478.2,422.4 L479.4,422.4 L480.7,422.4 L481.9,422.4 L483.2,422.4 
+		L484.4,422.4 L485.7,422.4 L487.0,422.4 L488.2,422.4 L489.5,422.4 L490.7,422.4 L492.0,422.4 L493.2,422.4 
+		L494.5,422.4 L495.8,422.4 L497.0,422.4 L498.3,422.4 L499.5,422.4 L500.8,422.4 L502.1,422.4 L503.3,422.4 
+		L504.6,422.4 L505.8,422.4 L507.1,422.4 L508.3,422.4 L509.6,422.4 L510.9,422.4 L512.1,422.4 L513.4,422.4 
+		L514.6,422.4 L515.9,422.4 L517.1,422.4 L518.4,422.4 L519.7,422.4 L520.9,422.4 L522.2,422.4 L523.4,422.4 
+		L524.7,422.4 L525.9,422.4 L527.2,422.4 L528.5,422.4 L529.7,422.4 L531.0,422.4 L532.2,422.4 L533.5,422.4 
+		L534.8,422.4 L536.0,422.4 L537.3,422.4 L538.5,422.4 L539.8,422.4 L541.0,422.4 L542.3,422.4 L543.6,422.4 
+		L544.8,422.4 L546.1,422.4 L547.3,422.4 L548.6,422.4 L549.8,422.4 L551.1,422.4 L552.4,422.4 L553.6,422.4 
+		L554.9,422.4 L556.1,422.4 L557.4,422.4 L558.6,422.4 L559.9,422.4 L561.2,422.4 L562.4,422.4 L563.7,422.4 
+		L564.9,422.4 L566.2,422.4 L567.5,422.4 L568.7,422.4 L570.0,422.4 L571.2,422.4 L572.5,422.4 L573.7,422.4 
+		L575.0,422.4 '></path>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/lognormal_0.0_0.25.dat b/v0.2-M1/chi/reference-manual/distribution_plots/lognormal_0.0_0.25.dat
new file mode 100644
index 0000000..63c6ad3
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/lognormal_0.0_0.25.dat
@@ -0,0 +1,413 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.010000	0.000000
+0.020000	0.000000
+0.030000	0.000000
+0.040000	0.000000
+0.050000	0.000000
+0.060000	0.000000
+0.070000	0.000000
+0.080000	0.000000
+0.090000	0.000000
+0.100000	0.000000
+0.110000	0.000000
+0.120000	0.000000
+0.130000	0.000000
+0.140000	0.000000
+0.150000	0.000000
+0.160000	0.000000
+0.170000	0.000000
+0.180000	0.000000
+0.190000	0.000000
+0.200000	0.000000
+0.210000	0.000000
+0.220000	0.000000
+0.230000	0.000000
+0.240000	0.000001
+0.250000	0.000001
+0.260000	0.000003
+0.270000	0.000007
+0.280000	0.000013
+0.290000	0.000026
+0.300000	0.000049
+0.310000	0.000088
+0.320000	0.000154
+0.330000	0.000259
+0.340000	0.000425
+0.350000	0.000676
+0.360000	0.001048
+0.370000	0.001586
+0.380000	0.002347
+0.390000	0.003400
+0.400000	0.004829
+0.410000	0.006734
+0.420000	0.009227
+0.430000	0.012439
+0.440000	0.016511
+0.450000	0.021600
+0.460000	0.027873
+0.470000	0.035505
+0.480000	0.044674
+0.490000	0.055563
+0.500000	0.068349
+0.510000	0.083205
+0.520000	0.100291
+0.530000	0.119752
+0.540000	0.141714
+0.550000	0.166280
+0.560000	0.193526
+0.570000	0.223499
+0.580000	0.256215
+0.590000	0.291656
+0.600000	0.329770
+0.610000	0.370472
+0.620000	0.413642
+0.630000	0.459130
+0.640000	0.506752
+0.650000	0.556297
+0.660000	0.607530
+0.670000	0.660192
+0.680000	0.714004
+0.690000	0.768675
+0.700000	0.823901
+0.710000	0.879369
+0.720000	0.934766
+0.730000	0.989776
+0.740000	1.044091
+0.750000	1.097407
+0.760000	1.149432
+0.770000	1.199888
+0.780000	1.248512
+0.790000	1.295061
+0.800000	1.339311
+0.810000	1.381058
+0.820000	1.420125
+0.830000	1.456354
+0.840000	1.489613
+0.850000	1.519795
+0.860000	1.546816
+0.870000	1.570614
+0.880000	1.591152
+0.890000	1.608414
+0.900000	1.622405
+0.910000	1.633150
+0.920000	1.640691
+0.930000	1.645089
+0.940000	1.646419
+0.950000	1.644771
+0.960000	1.640246
+0.970000	1.632958
+0.980000	1.623028
+0.990000	1.610586
+1.000000	1.595769
+1.010000	1.578718
+1.020000	1.559579
+1.030000	1.538499
+1.040000	1.515627
+1.050000	1.491112
+1.060000	1.465102
+1.070000	1.437745
+1.080000	1.409184
+1.090000	1.379561
+1.100000	1.349013
+1.110000	1.317674
+1.120000	1.285670
+1.130000	1.253126
+1.140000	1.220158
+1.150000	1.186878
+1.160000	1.153393
+1.170000	1.119801
+1.180000	1.086195
+1.190000	1.052664
+1.200000	1.019289
+1.210000	0.986143
+1.220000	0.953297
+1.230000	0.920814
+1.240000	0.888750
+1.250000	0.857159
+1.260000	0.826086
+1.270000	0.795572
+1.280000	0.765655
+1.290000	0.736366
+1.300000	0.707733
+1.310000	0.679778
+1.320000	0.652522
+1.330000	0.625978
+1.340000	0.600161
+1.350000	0.575077
+1.360000	0.550734
+1.370000	0.527134
+1.380000	0.504277
+1.390000	0.482162
+1.400000	0.460784
+1.410000	0.440139
+1.420000	0.420217
+1.430000	0.401011
+1.440000	0.382509
+1.450000	0.364699
+1.460000	0.347568
+1.470000	0.331104
+1.480000	0.315290
+1.490000	0.300112
+1.500000	0.285554
+1.510000	0.271599
+1.520000	0.258231
+1.530000	0.245433
+1.540000	0.233187
+1.550000	0.221477
+1.560000	0.210285
+1.570000	0.199593
+1.580000	0.189386
+1.590000	0.179645
+1.600000	0.170354
+1.610000	0.161497
+1.620000	0.153056
+1.630000	0.145017
+1.640000	0.137362
+1.650000	0.130077
+1.660000	0.123147
+1.670000	0.116557
+1.680000	0.110293
+1.690000	0.104341
+1.700000	0.098687
+1.710000	0.093318
+1.720000	0.088222
+1.730000	0.083387
+1.740000	0.078800
+1.750000	0.074451
+1.760000	0.070327
+1.770000	0.066419
+1.780000	0.062717
+1.790000	0.059210
+1.800000	0.055890
+1.810000	0.052746
+1.820000	0.049771
+1.830000	0.046956
+1.840000	0.044293
+1.850000	0.041775
+1.860000	0.039394
+1.870000	0.037143
+1.880000	0.035016
+1.890000	0.033006
+1.900000	0.031107
+1.910000	0.029314
+1.920000	0.027621
+1.930000	0.026022
+1.940000	0.024512
+1.950000	0.023088
+1.960000	0.021744
+1.970000	0.020476
+1.980000	0.019280
+1.990000	0.018151
+2.000000	0.017087
+2.010000	0.016084
+2.020000	0.015139
+2.030000	0.014247
+2.040000	0.013407
+2.050000	0.012615
+2.060000	0.011870
+2.070000	0.011167
+2.080000	0.010505
+2.090000	0.009881
+2.100000	0.009294
+2.110000	0.008741
+2.120000	0.008221
+2.130000	0.007731
+2.140000	0.007270
+2.150000	0.006835
+2.160000	0.006427
+2.170000	0.006042
+2.180000	0.005680
+2.190000	0.005340
+2.200000	0.005020
+2.210000	0.004718
+2.220000	0.004435
+2.230000	0.004168
+2.240000	0.003917
+2.250000	0.003681
+2.260000	0.003460
+2.270000	0.003251
+2.280000	0.003055
+2.290000	0.002871
+2.300000	0.002697
+2.310000	0.002534
+2.320000	0.002381
+2.330000	0.002237
+2.340000	0.002102
+2.350000	0.001975
+2.360000	0.001855
+2.370000	0.001743
+2.380000	0.001637
+2.390000	0.001538
+2.400000	0.001445
+2.410000	0.001357
+2.420000	0.001275
+2.430000	0.001198
+2.440000	0.001125
+2.450000	0.001057
+2.460000	0.000993
+2.470000	0.000932
+2.480000	0.000876
+2.490000	0.000823
+2.500000	0.000773
+2.510000	0.000726
+2.520000	0.000682
+2.530000	0.000640
+2.540000	0.000601
+2.550000	0.000565
+2.560000	0.000531
+2.570000	0.000498
+2.580000	0.000468
+2.590000	0.000440
+2.600000	0.000413
+2.610000	0.000388
+2.620000	0.000364
+2.630000	0.000342
+2.640000	0.000321
+2.650000	0.000302
+2.660000	0.000284
+2.670000	0.000266
+2.680000	0.000250
+2.690000	0.000235
+2.700000	0.000221
+2.710000	0.000207
+2.720000	0.000195
+2.730000	0.000183
+2.740000	0.000172
+2.750000	0.000162
+2.760000	0.000152
+2.770000	0.000143
+2.780000	0.000134
+2.790000	0.000126
+2.800000	0.000118
+2.810000	0.000111
+2.820000	0.000104
+2.830000	0.000098
+2.840000	0.000092
+2.850000	0.000087
+2.860000	0.000081
+2.870000	0.000076
+2.880000	0.000072
+2.890000	0.000067
+2.900000	0.000063
+2.910000	0.000060
+2.920000	0.000056
+2.930000	0.000053
+2.940000	0.000049
+2.950000	0.000046
+2.960000	0.000044
+2.970000	0.000041
+2.980000	0.000039
+2.990000	0.000036
+3.000000	0.000034
+3.010000	0.000032
+3.020000	0.000030
+3.030000	0.000028
+3.040000	0.000027
+3.050000	0.000025
+3.060000	0.000024
+3.070000	0.000022
+3.080000	0.000021
+3.090000	0.000020
+3.100000	0.000018
+3.110000	0.000017
+3.120000	0.000016
+3.130000	0.000015
+3.140000	0.000014
+3.150000	0.000014
+3.160000	0.000013
+3.170000	0.000012
+3.180000	0.000011
+3.190000	0.000011
+3.200000	0.000010
+3.210000	0.000009
+3.220000	0.000009
+3.230000	0.000008
+3.240000	0.000008
+3.250000	0.000007
+3.260000	0.000007
+3.270000	0.000006
+3.280000	0.000006
+3.290000	0.000006
+3.300000	0.000005
+3.310000	0.000005
+3.320000	0.000005
+3.330000	0.000004
+3.340000	0.000004
+3.350000	0.000004
+3.360000	0.000004
+3.370000	0.000004
+3.380000	0.000003
+3.390000	0.000003
+3.400000	0.000003
+3.410000	0.000003
+3.420000	0.000003
+3.430000	0.000002
+3.440000	0.000002
+3.450000	0.000002
+3.460000	0.000002
+3.470000	0.000002
+3.480000	0.000002
+3.490000	0.000002
+3.500000	0.000002
+3.510000	0.000002
+3.520000	0.000001
+3.530000	0.000001
+3.540000	0.000001
+3.550000	0.000001
+3.560000	0.000001
+3.570000	0.000001
+3.580000	0.000001
+3.590000	0.000001
+3.600000	0.000001
+3.610000	0.000001
+3.620000	0.000001
+3.630000	0.000001
+3.640000	0.000001
+3.650000	0.000001
+3.660000	0.000001
+3.670000	0.000001
+3.680000	0.000001
+3.690000	0.000001
+3.700000	0.000000
+3.710000	0.000000
+3.720000	0.000000
+3.730000	0.000000
+3.740000	0.000000
+3.750000	0.000000
+3.760000	0.000000
+3.770000	0.000000
+3.780000	0.000000
+3.790000	0.000000
+3.800000	0.000000
+3.810000	0.000000
+3.820000	0.000000
+3.830000	0.000000
+3.840000	0.000000
+3.850000	0.000000
+3.860000	0.000000
+3.870000	0.000000
+3.880000	0.000000
+3.890000	0.000000
+3.900000	0.000000
+3.910000	0.000000
+3.920000	0.000000
+3.930000	0.000000
+3.940000	0.000000
+3.950000	0.000000
+3.960000	0.000000
+3.970000	0.000000
+3.980000	0.000000
+3.990000	0.000000
+4.000000	0.000000
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/lognormal_0.0_0.5.dat b/v0.2-M1/chi/reference-manual/distribution_plots/lognormal_0.0_0.5.dat
new file mode 100644
index 0000000..c46f845
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/lognormal_0.0_0.5.dat
@@ -0,0 +1,413 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.010000	0.000000
+0.020000	0.000000
+0.030000	0.000000
+0.040000	0.000000
+0.050000	0.000000
+0.060000	0.000002
+0.070000	0.000008
+0.080000	0.000029
+0.090000	0.000082
+0.100000	0.000198
+0.110000	0.000425
+0.120000	0.000828
+0.130000	0.001488
+0.140000	0.002501
+0.150000	0.003979
+0.160000	0.006037
+0.170000	0.008796
+0.180000	0.012375
+0.190000	0.016889
+0.200000	0.022439
+0.210000	0.029118
+0.220000	0.037000
+0.230000	0.046143
+0.240000	0.056586
+0.250000	0.068349
+0.260000	0.081436
+0.270000	0.095831
+0.280000	0.111502
+0.290000	0.128403
+0.300000	0.146472
+0.310000	0.165639
+0.320000	0.185820
+0.330000	0.206926
+0.340000	0.228861
+0.350000	0.251523
+0.360000	0.274808
+0.370000	0.298611
+0.380000	0.322825
+0.390000	0.347345
+0.400000	0.372068
+0.410000	0.396893
+0.420000	0.421724
+0.430000	0.446466
+0.440000	0.471032
+0.450000	0.495339
+0.460000	0.519309
+0.470000	0.542869
+0.480000	0.565953
+0.490000	0.588500
+0.500000	0.610455
+0.510000	0.631768
+0.520000	0.652395
+0.530000	0.672298
+0.540000	0.691442
+0.550000	0.709800
+0.560000	0.727347
+0.570000	0.744064
+0.580000	0.759937
+0.590000	0.774954
+0.600000	0.789109
+0.610000	0.802396
+0.620000	0.814817
+0.630000	0.826373
+0.640000	0.837069
+0.650000	0.846914
+0.660000	0.855917
+0.670000	0.864090
+0.680000	0.871447
+0.690000	0.878004
+0.700000	0.883777
+0.710000	0.888785
+0.720000	0.893046
+0.730000	0.896581
+0.740000	0.899411
+0.750000	0.901558
+0.760000	0.903042
+0.770000	0.903888
+0.780000	0.904117
+0.790000	0.903753
+0.800000	0.902818
+0.810000	0.901336
+0.820000	0.899329
+0.830000	0.896821
+0.840000	0.893833
+0.850000	0.890389
+0.860000	0.886509
+0.870000	0.882217
+0.880000	0.877533
+0.890000	0.872478
+0.900000	0.867073
+0.910000	0.861337
+0.920000	0.855290
+0.930000	0.848951
+0.940000	0.842339
+0.950000	0.835471
+0.960000	0.828364
+0.970000	0.821037
+0.980000	0.813504
+0.990000	0.805781
+1.000000	0.797885
+1.010000	0.789828
+1.020000	0.781627
+1.030000	0.773293
+1.040000	0.764840
+1.050000	0.756281
+1.060000	0.747627
+1.070000	0.738891
+1.080000	0.730082
+1.090000	0.721212
+1.100000	0.712290
+1.110000	0.703327
+1.120000	0.694331
+1.130000	0.685310
+1.140000	0.676274
+1.150000	0.667230
+1.160000	0.658186
+1.170000	0.649147
+1.180000	0.640122
+1.190000	0.631117
+1.200000	0.622137
+1.210000	0.613188
+1.220000	0.604275
+1.230000	0.595404
+1.240000	0.586579
+1.250000	0.577804
+1.260000	0.569083
+1.270000	0.560421
+1.280000	0.551821
+1.290000	0.543286
+1.300000	0.534820
+1.310000	0.526424
+1.320000	0.518103
+1.330000	0.509857
+1.340000	0.501690
+1.350000	0.493604
+1.360000	0.485600
+1.370000	0.477680
+1.380000	0.469846
+1.390000	0.462099
+1.400000	0.454439
+1.410000	0.446869
+1.420000	0.439390
+1.430000	0.432001
+1.440000	0.424704
+1.450000	0.417499
+1.460000	0.410386
+1.470000	0.403367
+1.480000	0.396441
+1.490000	0.389609
+1.500000	0.382870
+1.510000	0.376224
+1.520000	0.369672
+1.530000	0.363214
+1.540000	0.356848
+1.550000	0.350575
+1.560000	0.344394
+1.570000	0.338306
+1.580000	0.332309
+1.590000	0.326403
+1.600000	0.320587
+1.610000	0.314861
+1.620000	0.309225
+1.630000	0.303677
+1.640000	0.298216
+1.650000	0.292843
+1.660000	0.287556
+1.670000	0.282355
+1.680000	0.277238
+1.690000	0.272205
+1.700000	0.267255
+1.710000	0.262387
+1.720000	0.257600
+1.730000	0.252893
+1.740000	0.248266
+1.750000	0.243717
+1.760000	0.239246
+1.770000	0.234850
+1.780000	0.230531
+1.790000	0.226286
+1.800000	0.222114
+1.810000	0.218015
+1.820000	0.213987
+1.830000	0.210030
+1.840000	0.206143
+1.850000	0.202324
+1.860000	0.198573
+1.870000	0.194889
+1.880000	0.191270
+1.890000	0.187715
+1.900000	0.184225
+1.910000	0.180797
+1.920000	0.177431
+1.930000	0.174126
+1.940000	0.170881
+1.950000	0.167694
+1.960000	0.164566
+1.970000	0.161495
+1.980000	0.158479
+1.990000	0.155519
+2.000000	0.152614
+2.010000	0.149762
+2.020000	0.146962
+2.030000	0.144214
+2.040000	0.141517
+2.050000	0.138870
+2.060000	0.136272
+2.070000	0.133722
+2.080000	0.131219
+2.090000	0.128764
+2.100000	0.126354
+2.110000	0.123989
+2.120000	0.121668
+2.130000	0.119391
+2.140000	0.117156
+2.150000	0.114963
+2.160000	0.112812
+2.170000	0.110701
+2.180000	0.108630
+2.190000	0.106597
+2.200000	0.104603
+2.210000	0.102647
+2.220000	0.100728
+2.230000	0.098845
+2.240000	0.096997
+2.250000	0.095185
+2.260000	0.093406
+2.270000	0.091662
+2.280000	0.089950
+2.290000	0.088271
+2.300000	0.086624
+2.310000	0.085008
+2.320000	0.083423
+2.330000	0.081868
+2.340000	0.080343
+2.350000	0.078846
+2.360000	0.077378
+2.370000	0.075938
+2.380000	0.074525
+2.390000	0.073139
+2.400000	0.071780
+2.410000	0.070446
+2.420000	0.069138
+2.430000	0.067855
+2.440000	0.066596
+2.450000	0.065361
+2.460000	0.064150
+2.470000	0.062962
+2.480000	0.061796
+2.490000	0.060653
+2.500000	0.059531
+2.510000	0.058431
+2.520000	0.057351
+2.530000	0.056293
+2.540000	0.055254
+2.550000	0.054235
+2.560000	0.053236
+2.570000	0.052255
+2.580000	0.051294
+2.590000	0.050350
+2.600000	0.049425
+2.610000	0.048517
+2.620000	0.047626
+2.630000	0.046752
+2.640000	0.045895
+2.650000	0.045054
+2.660000	0.044230
+2.670000	0.043420
+2.680000	0.042627
+2.690000	0.041848
+2.700000	0.041084
+2.710000	0.040334
+2.720000	0.039599
+2.730000	0.038878
+2.740000	0.038170
+2.750000	0.037476
+2.760000	0.036794
+2.770000	0.036126
+2.780000	0.035470
+2.790000	0.034827
+2.800000	0.034196
+2.810000	0.033577
+2.820000	0.032969
+2.830000	0.032373
+2.840000	0.031789
+2.850000	0.031215
+2.860000	0.030652
+2.870000	0.030099
+2.880000	0.029557
+2.890000	0.029026
+2.900000	0.028504
+2.910000	0.027992
+2.920000	0.027489
+2.930000	0.026996
+2.940000	0.026513
+2.950000	0.026038
+2.960000	0.025572
+2.970000	0.025115
+2.980000	0.024667
+2.990000	0.024226
+3.000000	0.023794
+3.010000	0.023371
+3.020000	0.022955
+3.030000	0.022546
+3.040000	0.022146
+3.050000	0.021753
+3.060000	0.021367
+3.070000	0.020988
+3.080000	0.020617
+3.090000	0.020252
+3.100000	0.019894
+3.110000	0.019543
+3.120000	0.019198
+3.130000	0.018860
+3.140000	0.018527
+3.150000	0.018201
+3.160000	0.017881
+3.170000	0.017567
+3.180000	0.017259
+3.190000	0.016956
+3.200000	0.016659
+3.210000	0.016368
+3.220000	0.016082
+3.230000	0.015801
+3.240000	0.015525
+3.250000	0.015254
+3.260000	0.014988
+3.270000	0.014728
+3.280000	0.014471
+3.290000	0.014220
+3.300000	0.013973
+3.310000	0.013731
+3.320000	0.013493
+3.330000	0.013259
+3.340000	0.013030
+3.350000	0.012805
+3.360000	0.012584
+3.370000	0.012367
+3.380000	0.012154
+3.390000	0.011945
+3.400000	0.011739
+3.410000	0.011538
+3.420000	0.011339
+3.430000	0.011145
+3.440000	0.010954
+3.450000	0.010767
+3.460000	0.010582
+3.470000	0.010402
+3.480000	0.010224
+3.490000	0.010050
+3.500000	0.009879
+3.510000	0.009710
+3.520000	0.009545
+3.530000	0.009383
+3.540000	0.009224
+3.550000	0.009068
+3.560000	0.008914
+3.570000	0.008763
+3.580000	0.008615
+3.590000	0.008469
+3.600000	0.008327
+3.610000	0.008186
+3.620000	0.008048
+3.630000	0.007913
+3.640000	0.007780
+3.650000	0.007649
+3.660000	0.007521
+3.670000	0.007395
+3.680000	0.007271
+3.690000	0.007149
+3.700000	0.007030
+3.710000	0.006912
+3.720000	0.006797
+3.730000	0.006684
+3.740000	0.006573
+3.750000	0.006463
+3.760000	0.006356
+3.770000	0.006250
+3.780000	0.006147
+3.790000	0.006045
+3.800000	0.005945
+3.810000	0.005846
+3.820000	0.005750
+3.830000	0.005655
+3.840000	0.005562
+3.850000	0.005470
+3.860000	0.005380
+3.870000	0.005292
+3.880000	0.005205
+3.890000	0.005119
+3.900000	0.005035
+3.910000	0.004953
+3.920000	0.004872
+3.930000	0.004792
+3.940000	0.004714
+3.950000	0.004637
+3.960000	0.004561
+3.970000	0.004487
+3.980000	0.004414
+3.990000	0.004342
+4.000000	0.004272
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/lognormal_0.0_1.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/lognormal_0.0_1.0.dat
new file mode 100644
index 0000000..0bb81cd
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/lognormal_0.0_1.0.dat
@@ -0,0 +1,413 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.010000	0.000990
+0.020000	0.009477
+0.030000	0.028429
+0.040000	0.056099
+0.050000	0.089778
+0.060000	0.127051
+0.070000	0.166043
+0.080000	0.205386
+0.090000	0.244120
+0.100000	0.281590
+0.110000	0.317367
+0.120000	0.351188
+0.130000	0.382905
+0.140000	0.412456
+0.150000	0.439837
+0.160000	0.465085
+0.170000	0.488265
+0.180000	0.509458
+0.190000	0.528760
+0.200000	0.546268
+0.210000	0.562085
+0.220000	0.576314
+0.230000	0.589055
+0.240000	0.600404
+0.250000	0.610455
+0.260000	0.619298
+0.270000	0.627017
+0.280000	0.633691
+0.290000	0.639396
+0.300000	0.644203
+0.310000	0.648178
+0.320000	0.651382
+0.330000	0.653873
+0.340000	0.655705
+0.350000	0.656929
+0.360000	0.657590
+0.370000	0.657734
+0.380000	0.657399
+0.390000	0.656624
+0.400000	0.655444
+0.410000	0.653891
+0.420000	0.651996
+0.430000	0.649787
+0.440000	0.647289
+0.450000	0.644527
+0.460000	0.641524
+0.470000	0.638301
+0.480000	0.634877
+0.490000	0.631269
+0.500000	0.627496
+0.510000	0.623572
+0.520000	0.619513
+0.530000	0.615331
+0.540000	0.611039
+0.550000	0.606648
+0.560000	0.602170
+0.570000	0.597615
+0.580000	0.592992
+0.590000	0.588308
+0.600000	0.583574
+0.610000	0.578795
+0.620000	0.573979
+0.630000	0.569133
+0.640000	0.564261
+0.650000	0.559371
+0.660000	0.554466
+0.670000	0.549552
+0.680000	0.544633
+0.690000	0.539712
+0.700000	0.534795
+0.710000	0.529884
+0.720000	0.524982
+0.730000	0.520092
+0.740000	0.515218
+0.750000	0.510361
+0.760000	0.505524
+0.770000	0.500709
+0.780000	0.495918
+0.790000	0.491153
+0.800000	0.486416
+0.810000	0.481707
+0.820000	0.477029
+0.830000	0.472382
+0.840000	0.467767
+0.850000	0.463186
+0.860000	0.458640
+0.870000	0.454129
+0.880000	0.449654
+0.890000	0.445216
+0.900000	0.440816
+0.910000	0.436453
+0.920000	0.432128
+0.930000	0.427842
+0.940000	0.423595
+0.950000	0.419387
+0.960000	0.415219
+0.970000	0.411090
+0.980000	0.407001
+0.990000	0.402952
+1.000000	0.398942
+1.010000	0.394973
+1.020000	0.391043
+1.030000	0.387153
+1.040000	0.383303
+1.050000	0.379493
+1.060000	0.375722
+1.070000	0.371991
+1.080000	0.368299
+1.090000	0.364646
+1.100000	0.361031
+1.110000	0.357456
+1.120000	0.353918
+1.130000	0.350419
+1.140000	0.346958
+1.150000	0.343535
+1.160000	0.340149
+1.170000	0.336800
+1.180000	0.333487
+1.190000	0.330212
+1.200000	0.326972
+1.210000	0.323768
+1.220000	0.320600
+1.230000	0.317467
+1.240000	0.314369
+1.250000	0.311306
+1.260000	0.308277
+1.270000	0.305282
+1.280000	0.302320
+1.290000	0.299392
+1.300000	0.296496
+1.310000	0.293633
+1.320000	0.290803
+1.330000	0.288004
+1.340000	0.285237
+1.350000	0.282501
+1.360000	0.279795
+1.370000	0.277121
+1.380000	0.274476
+1.390000	0.271861
+1.400000	0.269276
+1.410000	0.266720
+1.420000	0.264193
+1.430000	0.261694
+1.440000	0.259224
+1.450000	0.256781
+1.460000	0.254366
+1.470000	0.251978
+1.480000	0.249617
+1.490000	0.247282
+1.500000	0.244974
+1.510000	0.242691
+1.520000	0.240434
+1.530000	0.238203
+1.540000	0.235996
+1.550000	0.233815
+1.560000	0.231657
+1.570000	0.229524
+1.580000	0.227414
+1.590000	0.225328
+1.600000	0.223265
+1.610000	0.221226
+1.620000	0.219208
+1.630000	0.217214
+1.640000	0.215241
+1.650000	0.213290
+1.660000	0.211361
+1.670000	0.209453
+1.680000	0.207566
+1.690000	0.205700
+1.700000	0.203854
+1.710000	0.202029
+1.720000	0.200224
+1.730000	0.198438
+1.740000	0.196672
+1.750000	0.194925
+1.760000	0.193198
+1.770000	0.191489
+1.780000	0.189798
+1.790000	0.188126
+1.800000	0.186472
+1.810000	0.184836
+1.820000	0.183218
+1.830000	0.181617
+1.840000	0.180034
+1.850000	0.178467
+1.860000	0.176917
+1.870000	0.175384
+1.880000	0.173867
+1.890000	0.172367
+1.900000	0.170882
+1.910000	0.169413
+1.920000	0.167960
+1.930000	0.166523
+1.940000	0.165100
+1.950000	0.163692
+1.960000	0.162300
+1.970000	0.160922
+1.980000	0.159558
+1.990000	0.158209
+2.000000	0.156874
+2.010000	0.155553
+2.020000	0.154246
+2.030000	0.152952
+2.040000	0.151672
+2.050000	0.150405
+2.060000	0.149151
+2.070000	0.147910
+2.080000	0.146682
+2.090000	0.145467
+2.100000	0.144264
+2.110000	0.143073
+2.120000	0.141895
+2.130000	0.140729
+2.140000	0.139574
+2.150000	0.138432
+2.160000	0.137301
+2.170000	0.136181
+2.180000	0.135073
+2.190000	0.133976
+2.200000	0.132891
+2.210000	0.131816
+2.220000	0.130752
+2.230000	0.129698
+2.240000	0.128656
+2.250000	0.127623
+2.260000	0.126601
+2.270000	0.125589
+2.280000	0.124588
+2.290000	0.123596
+2.300000	0.122614
+2.310000	0.121641
+2.320000	0.120679
+2.330000	0.119726
+2.340000	0.118782
+2.350000	0.117847
+2.360000	0.116922
+2.370000	0.116005
+2.380000	0.115098
+2.390000	0.114200
+2.400000	0.113310
+2.410000	0.112429
+2.420000	0.111556
+2.430000	0.110692
+2.440000	0.109836
+2.450000	0.108988
+2.460000	0.108149
+2.470000	0.107318
+2.480000	0.106494
+2.490000	0.105679
+2.500000	0.104871
+2.510000	0.104071
+2.520000	0.103279
+2.530000	0.102494
+2.540000	0.101716
+2.550000	0.100946
+2.560000	0.100183
+2.570000	0.099428
+2.580000	0.098679
+2.590000	0.097938
+2.600000	0.097203
+2.610000	0.096476
+2.620000	0.095755
+2.630000	0.095041
+2.640000	0.094333
+2.650000	0.093632
+2.660000	0.092938
+2.670000	0.092250
+2.680000	0.091568
+2.690000	0.090893
+2.700000	0.090224
+2.710000	0.089561
+2.720000	0.088904
+2.730000	0.088253
+2.740000	0.087608
+2.750000	0.086969
+2.760000	0.086335
+2.770000	0.085708
+2.780000	0.085086
+2.790000	0.084470
+2.800000	0.083859
+2.810000	0.083254
+2.820000	0.082654
+2.830000	0.082060
+2.840000	0.081471
+2.850000	0.080887
+2.860000	0.080309
+2.870000	0.079736
+2.880000	0.079168
+2.890000	0.078604
+2.900000	0.078046
+2.910000	0.077493
+2.920000	0.076945
+2.930000	0.076401
+2.940000	0.075863
+2.950000	0.075329
+2.960000	0.074799
+2.970000	0.074275
+2.980000	0.073755
+2.990000	0.073239
+3.000000	0.072728
+3.010000	0.072222
+3.020000	0.071720
+3.030000	0.071222
+3.040000	0.070728
+3.050000	0.070239
+3.060000	0.069754
+3.070000	0.069273
+3.080000	0.068797
+3.090000	0.068324
+3.100000	0.067855
+3.110000	0.067391
+3.120000	0.066930
+3.130000	0.066474
+3.140000	0.066021
+3.150000	0.065572
+3.160000	0.065127
+3.170000	0.064685
+3.180000	0.064248
+3.190000	0.063814
+3.200000	0.063384
+3.210000	0.062957
+3.220000	0.062534
+3.230000	0.062114
+3.240000	0.061698
+3.250000	0.061286
+3.260000	0.060877
+3.270000	0.060471
+3.280000	0.060069
+3.290000	0.059670
+3.300000	0.059274
+3.310000	0.058881
+3.320000	0.058492
+3.330000	0.058106
+3.340000	0.057723
+3.350000	0.057344
+3.360000	0.056967
+3.370000	0.056594
+3.380000	0.056223
+3.390000	0.055856
+3.400000	0.055491
+3.410000	0.055130
+3.420000	0.054771
+3.430000	0.054416
+3.440000	0.054063
+3.450000	0.053713
+3.460000	0.053366
+3.470000	0.053022
+3.480000	0.052680
+3.490000	0.052341
+3.500000	0.052005
+3.510000	0.051672
+3.520000	0.051341
+3.530000	0.051013
+3.540000	0.050688
+3.550000	0.050365
+3.560000	0.050044
+3.570000	0.049727
+3.580000	0.049411
+3.590000	0.049098
+3.600000	0.048788
+3.610000	0.048480
+3.620000	0.048175
+3.630000	0.047872
+3.640000	0.047571
+3.650000	0.047273
+3.660000	0.046977
+3.670000	0.046683
+3.680000	0.046391
+3.690000	0.046102
+3.700000	0.045815
+3.710000	0.045531
+3.720000	0.045248
+3.730000	0.044968
+3.740000	0.044689
+3.750000	0.044413
+3.760000	0.044139
+3.770000	0.043868
+3.780000	0.043598
+3.790000	0.043330
+3.800000	0.043065
+3.810000	0.042801
+3.820000	0.042539
+3.830000	0.042280
+3.840000	0.042022
+3.850000	0.041766
+3.860000	0.041513
+3.870000	0.041261
+3.880000	0.041011
+3.890000	0.040763
+3.900000	0.040517
+3.910000	0.040272
+3.920000	0.040030
+3.930000	0.039789
+3.940000	0.039550
+3.950000	0.039313
+3.960000	0.039078
+3.970000	0.038844
+3.980000	0.038612
+3.990000	0.038382
+4.000000	0.038153
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/normal.plt b/v0.2-M1/chi/reference-manual/distribution_plots/normal.plt
new file mode 100644
index 0000000..be03709
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/normal.plt
@@ -0,0 +1,27 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+set xrange [0:10]
+set yrange [0:0.5]
+set xlabel "x"
+set ylabel "normal(real m, v2)"
+#set samples 2000
+set output "normal.svg"
+set nokey
+set label "normal(3.0, 1.0)" at 4.2, 0.25
+set label "normal(5.0, 2.0)" at 6.5, 0.17
+set style data lines
+plot "normal_3_1.dat" using 1:2 linetype 1, \
+     "normal_5_2.dat" using 1:2 linetype 2
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/normal.svg b/v0.2-M1/chi/reference-manual/distribution_plots/normal.svg
new file mode 100644
index 0000000..cbca5c8
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/normal.svg
@@ -0,0 +1,369 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L80.9,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(63.6,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M71.9,341.3 L80.9,341.3 M575.0,341.3 L566.0,341.3 '></path>
+	<g transform="translate(63.6,345.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.1</text>
+	</g>
+	<path  d='M71.9,260.1 L80.9,260.1 M575.0,260.1 L566.0,260.1 '></path>
+	<g transform="translate(63.6,264.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.2</text>
+	</g>
+	<path  d='M71.9,179.0 L80.9,179.0 M575.0,179.0 L566.0,179.0 '></path>
+	<g transform="translate(63.6,183.5)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.3</text>
+	</g>
+	<path  d='M71.9,97.8 L80.9,97.8 M575.0,97.8 L566.0,97.8 '></path>
+	<g transform="translate(63.6,102.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.4</text>
+	</g>
+	<path  d='M71.9,16.7 L80.9,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(63.6,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.5</text>
+	</g>
+	<path  d='M71.9,422.4 L71.9,413.4 M71.9,16.7 L71.9,25.7 '></path>
+	<g transform="translate(71.9,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0</text>
+	</g>
+	<path  d='M172.5,422.4 L172.5,413.4 M172.5,16.7 L172.5,25.7 '></path>
+	<g transform="translate(172.5,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 2</text>
+	</g>
+	<path  d='M273.1,422.4 L273.1,413.4 M273.1,16.7 L273.1,25.7 '></path>
+	<g transform="translate(273.1,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 4</text>
+	</g>
+	<path  d='M373.8,422.4 L373.8,413.4 M373.8,16.7 L373.8,25.7 '></path>
+	<g transform="translate(373.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 6</text>
+	</g>
+	<path  d='M474.4,422.4 L474.4,413.4 M474.4,16.7 L474.4,25.7 '></path>
+	<g transform="translate(474.4,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 8</text>
+	</g>
+	<path  d='M575.0,422.4 L575.0,413.4 M575.0,16.7 L575.0,25.7 '></path>
+	<g transform="translate(575.0,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 10</text>
+	</g>
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>normal(real m, v2)</text>
+	</g>
+	<g transform="translate(323.4,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(283.2,224.0)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>normal(3.0, 1.0)</text>
+	</g>
+	<g transform="translate(398.9,289.0)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>normal(5.0, 2.0)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,418.8 L72.4,418.7 L72.9,418.6 L73.4,418.5 L73.9,418.3 L74.4,418.2 L74.9,418.1 L75.4,418.0 
+		L75.9,417.8 L76.4,417.7 L76.9,417.6 L77.4,417.4 L77.9,417.3 L78.4,417.1 L78.9,417.0 L79.4,416.8 
+		L79.9,416.7 L80.5,416.5 L81.0,416.3 L81.5,416.2 L82.0,416.0 L82.5,415.8 L83.0,415.6 L83.5,415.4 
+		L84.0,415.2 L84.5,415.0 L85.0,414.8 L85.5,414.6 L86.0,414.4 L86.5,414.2 L87.0,413.9 L87.5,413.7 
+		L88.0,413.5 L88.5,413.2 L89.0,413.0 L89.5,412.7 L90.0,412.5 L90.5,412.2 L91.0,411.9 L91.5,411.7 
+		L92.0,411.4 L92.5,411.1 L93.0,410.8 L93.5,410.5 L94.0,410.2 L94.5,409.9 L95.0,409.5 L95.5,409.2 
+		L96.0,408.9 L96.6,408.5 L97.1,408.2 L97.6,407.8 L98.1,407.5 L98.6,407.1 L99.1,406.7 L99.6,406.3 
+		L100.1,405.9 L100.6,405.5 L101.1,405.1 L101.6,404.7 L102.1,404.2 L102.6,403.8 L103.1,403.3 L103.6,402.9 
+		L104.1,402.4 L104.6,401.9 L105.1,401.5 L105.6,401.0 L106.1,400.5 L106.6,399.9 L107.1,399.4 L107.6,398.9 
+		L108.1,398.3 L108.6,397.8 L109.1,397.2 L109.6,396.6 L110.1,396.1 L110.6,395.5 L111.1,394.9 L111.6,394.2 
+		L112.1,393.6 L112.7,393.0 L113.2,392.3 L113.7,391.7 L114.2,391.0 L114.7,390.3 L115.2,389.6 L115.7,388.9 
+		L116.2,388.2 L116.7,387.5 L117.2,386.7 L117.7,386.0 L118.2,385.2 L118.7,384.4 L119.2,383.6 L119.7,382.8 
+		L120.2,382.0 L120.7,381.2 L121.2,380.3 L121.7,379.5 L122.2,378.6 L122.7,377.7 L123.2,376.8 L123.7,375.9 
+		L124.2,375.0 L124.7,374.0 L125.2,373.1 L125.7,372.1 L126.2,371.2 L126.7,370.2 L127.2,369.2 L127.7,368.1 
+		L128.2,367.1 L128.8,366.1 L129.3,365.0 L129.8,363.9 L130.3,362.8 L130.8,361.7 L131.3,360.6 L131.8,359.5 
+		L132.3,358.3 L132.8,357.2 L133.3,356.0 L133.8,354.8 L134.3,353.6 L134.8,352.4 L135.3,351.2 L135.8,349.9 
+		L136.3,348.7 L136.8,347.4 L137.3,346.1 L137.8,344.8 L138.3,343.5 L138.8,342.1 L139.3,340.8 L139.8,339.4 
+		L140.3,338.0 L140.8,336.7 L141.3,335.3 L141.8,333.8 L142.3,332.4 L142.8,331.0 L143.3,329.5 L143.8,328.0 
+		L144.3,326.5 L144.8,325.0 L145.4,323.5 L145.9,322.0 L146.4,320.4 L146.9,318.9 L147.4,317.3 L147.9,315.7 
+		L148.4,314.1 L148.9,312.5 L149.4,310.9 L149.9,309.3 L150.4,307.6 L150.9,306.0 L151.4,304.3 L151.9,302.6 
+		L152.4,300.9 L152.9,299.2 L153.4,297.5 L153.9,295.8 L154.4,294.0 L154.9,292.3 L155.4,290.5 L155.9,288.7 
+		L156.4,286.9 L156.9,285.2 L157.4,283.4 L157.9,281.5 L158.4,279.7 L158.9,277.9 L159.4,276.0 L159.9,274.2 
+		L160.4,272.3 L160.9,270.5 L161.5,268.6 L162.0,266.7 L162.5,264.8 L163.0,262.9 L163.5,261.0 L164.0,259.1 
+		L164.5,257.2 L165.0,255.3 L165.5,253.4 L166.0,251.4 L166.5,249.5 L167.0,247.6 L167.5,245.6 L168.0,243.7 
+		L168.5,241.7 L169.0,239.8 L169.5,237.8 L170.0,235.9 L170.5,233.9 L171.0,232.0 L171.5,230.0 L172.0,228.0 
+		L172.5,226.1 L173.0,224.1 L173.5,222.1 L174.0,220.2 L174.5,218.2 L175.0,216.3 L175.5,214.3 L176.0,212.3 
+		L176.5,210.4 L177.0,208.4 L177.6,206.5 L178.1,204.6 L178.6,202.6 L179.1,200.7 L179.6,198.8 L180.1,196.8 
+		L180.6,194.9 L181.1,193.0 L181.6,191.1 L182.1,189.2 L182.6,187.3 L183.1,185.5 L183.6,183.6 L184.1,181.7 
+		L184.6,179.9 L185.1,178.1 L185.6,176.2 L186.1,174.4 L186.6,172.6 L187.1,170.8 L187.6,169.0 L188.1,167.3 
+		L188.6,165.5 L189.1,163.8 L189.6,162.1 L190.1,160.3 L190.6,158.6 L191.1,157.0 L191.6,155.3 L192.1,153.7 
+		L192.6,152.0 L193.1,150.4 L193.7,148.8 L194.2,147.2 L194.7,145.7 L195.2,144.1 L195.7,142.6 L196.2,141.1 
+		L196.7,139.6 L197.2,138.2 L197.7,136.7 L198.2,135.3 L198.7,133.9 L199.2,132.5 L199.7,131.2 L200.2,129.9 
+		L200.7,128.6 L201.2,127.3 L201.7,126.0 L202.2,124.8 L202.7,123.6 L203.2,122.4 L203.7,121.2 L204.2,120.1 
+		L204.7,119.0 L205.2,117.9 L205.7,116.9 L206.2,115.9 L206.7,114.9 L207.2,113.9 L207.7,112.9 L208.2,112.0 
+		L208.7,111.1 L209.2,110.3 L209.7,109.5 L210.3,108.7 L210.8,107.9 L211.3,107.1 L211.8,106.4 L212.3,105.8 
+		L212.8,105.1 L213.3,104.5 L213.8,103.9 L214.3,103.3 L214.8,102.8 L215.3,102.3 L215.8,101.9 L216.3,101.4 
+		L216.8,101.0 L217.3,100.7 L217.8,100.3 L218.3,100.0 L218.8,99.7 L219.3,99.5 L219.8,99.3 L220.3,99.1 
+		L220.8,99.0 L221.3,98.8 L221.8,98.8 L222.3,98.7 L222.8,98.7 L223.3,98.7 L223.8,98.8 L224.3,98.8 
+		L224.8,99.0 L225.3,99.1 L225.8,99.3 L226.4,99.5 L226.9,99.7 L227.4,100.0 L227.9,100.3 L228.4,100.7 
+		L228.9,101.0 L229.4,101.4 L229.9,101.9 L230.4,102.3 L230.9,102.8 L231.4,103.3 L231.9,103.9 L232.4,104.5 
+		L232.9,105.1 L233.4,105.8 L233.9,106.4 L234.4,107.1 L234.9,107.9 L235.4,108.7 L235.9,109.5 L236.4,110.3 
+		L236.9,111.1 L237.4,112.0 L237.9,112.9 L238.4,113.9 L238.9,114.9 L239.4,115.9 L239.9,116.9 L240.4,117.9 
+		L240.9,119.0 L241.4,120.1 L241.9,121.2 L242.5,122.4 L243.0,123.6 L243.5,124.8 L244.0,126.0 L244.5,127.3 
+		L245.0,128.6 L245.5,129.9 L246.0,131.2 L246.5,132.5 L247.0,133.9 L247.5,135.3 L248.0,136.7 L248.5,138.2 
+		L249.0,139.6 L249.5,141.1 L250.0,142.6 L250.5,144.1 L251.0,145.7 L251.5,147.2 L252.0,148.8 L252.5,150.4 
+		L253.0,152.0 L253.5,153.7 L254.0,155.3 L254.5,157.0 L255.0,158.6 L255.5,160.3 L256.0,162.1 L256.5,163.8 
+		L257.0,165.5 L257.5,167.3 L258.0,169.0 L258.6,170.8 L259.1,172.6 L259.6,174.4 L260.1,176.2 L260.6,178.1 
+		L261.1,179.9 L261.6,181.7 L262.1,183.6 L262.6,185.5 L263.1,187.3 L263.6,189.2 L264.1,191.1 L264.6,193.0 
+		L265.1,194.9 L265.6,196.8 L266.1,198.8 L266.6,200.7 L267.1,202.6 L267.6,204.6 L268.1,206.5 L268.6,208.4 
+		L269.1,210.4 L269.6,212.3 L270.1,214.3 L270.6,216.3 L271.1,218.2 L271.6,220.2 L272.1,222.1 L272.6,224.1 
+		L273.1,226.1 L273.6,228.0 L274.1,230.0 L274.6,232.0 L275.2,233.9 L275.7,235.9 L276.2,237.8 L276.7,239.8 
+		L277.2,241.7 L277.7,243.7 L278.2,245.6 L278.7,247.6 L279.2,249.5 L279.7,251.4 L280.2,253.4 L280.7,255.3 
+		L281.2,257.2 L281.7,259.1 L282.2,261.0 L282.7,262.9 L283.2,264.8 L283.7,266.7 L284.2,268.6 L284.7,270.5 
+		L285.2,272.3 L285.7,274.2 L286.2,276.0 L286.7,277.9 L287.2,279.7 L287.7,281.5 L288.2,283.4 L288.7,285.2 
+		L289.2,286.9 L289.7,288.7 L290.2,290.5 L290.7,292.3 L291.3,294.0 L291.8,295.8 L292.3,297.5 L292.8,299.2 
+		L293.3,300.9 L293.8,302.6 L294.3,304.3 L294.8,306.0 L295.3,307.6 L295.8,309.3 L296.3,310.9 L296.8,312.5 
+		L297.3,314.1 L297.8,315.7 L298.3,317.3 L298.8,318.9 L299.3,320.4 L299.8,322.0 L300.3,323.5 L300.8,325.0 
+		L301.3,326.5 L301.8,328.0 L302.3,329.5 L302.8,331.0 L303.3,332.4 L303.8,333.8 L304.3,335.3 L304.8,336.7 
+		L305.3,338.0 L305.8,339.4 L306.3,340.8 L306.8,342.1 L307.4,343.5 L307.9,344.8 L308.4,346.1 L308.9,347.4 
+		L309.4,348.7 L309.9,349.9 L310.4,351.2 L310.9,352.4 L311.4,353.6 L311.9,354.8 L312.4,356.0 L312.9,357.2 
+		L313.4,358.3 L313.9,359.5 L314.4,360.6 L314.9,361.7 L315.4,362.8 L315.9,363.9 L316.4,365.0 L316.9,366.1 
+		L317.4,367.1 L317.9,368.1 L318.4,369.2 L318.9,370.2 L319.4,371.2 L319.9,372.1 L320.4,373.1 L320.9,374.0 
+		L321.4,375.0 L321.9,375.9 L322.4,376.8 L322.9,377.7 L323.5,378.6 L324.0,379.5 L324.5,380.3 L325.0,381.2 
+		L325.5,382.0 L326.0,382.8 L326.5,383.6 L327.0,384.4 L327.5,385.2 L328.0,386.0 L328.5,386.7 L329.0,387.5 
+		L329.5,388.2 L330.0,388.9 L330.5,389.6 L331.0,390.3 L331.5,391.0 L332.0,391.7 L332.5,392.3 L333.0,393.0 
+		L333.5,393.6 L334.0,394.2 L334.5,394.9 L335.0,395.5 L335.5,396.1 L336.0,396.6 L336.5,397.2 L337.0,397.8 
+		L337.5,398.3 L338.0,398.9 L338.5,399.4 L339.0,399.9 L339.5,400.5 L340.1,401.0 L340.6,401.5 L341.1,401.9 
+		L341.6,402.4 L342.1,402.9 L342.6,403.3 L343.1,403.8 L343.6,404.2 L344.1,404.7 L344.6,405.1 L345.1,405.5 
+		L345.6,405.9 L346.1,406.3 L346.6,406.7 L347.1,407.1 L347.6,407.5 L348.1,407.8 L348.6,408.2 L349.1,408.5 
+		L349.6,408.9 L350.1,409.2 L350.6,409.5 L351.1,409.9 L351.6,410.2 L352.1,410.5 L352.6,410.8 L353.1,411.1 
+		L353.6,411.4 L354.1,411.7 L354.6,411.9 L355.1,412.2 L355.6,412.5 L356.2,412.7 L356.7,413.0 L357.2,413.2 
+		L357.7,413.5 L358.2,413.7 L358.7,413.9 L359.2,414.2 L359.7,414.4 L360.2,414.6 L360.7,414.8 L361.2,415.0 
+		L361.7,415.2 L362.2,415.4 L362.7,415.6 L363.2,415.8 L363.7,416.0 L364.2,416.2 L364.7,416.3 L365.2,416.5 
+		L365.7,416.7 L366.2,416.8 L366.7,417.0 L367.2,417.1 L367.7,417.3 L368.2,417.4 L368.7,417.6 L369.2,417.7 
+		L369.7,417.8 L370.2,418.0 L370.7,418.1 L371.2,418.2 L371.7,418.3 L372.3,418.5 L372.8,418.6 L373.3,418.7 
+		L373.8,418.8 L374.3,418.9 L374.8,419.0 L375.3,419.1 L375.8,419.2 L376.3,419.3 L376.8,419.4 L377.3,419.5 
+		L377.8,419.6 L378.3,419.7 L378.8,419.7 L379.3,419.8 L379.8,419.9 L380.3,420.0 L380.8,420.1 L381.3,420.1 
+		L381.8,420.2 L382.3,420.3 L382.8,420.3 L383.3,420.4 L383.8,420.5 L384.3,420.5 L384.8,420.6 L385.3,420.6 
+		L385.8,420.7 L386.3,420.8 L386.8,420.8 L387.3,420.9 L387.8,420.9 L388.3,421.0 L388.9,421.0 L389.4,421.0 
+		L389.9,421.1 L390.4,421.1 L390.9,421.2 L391.4,421.2 L391.9,421.3 L392.4,421.3 L392.9,421.3 L393.4,421.4 
+		L393.9,421.4 L394.4,421.4 L394.9,421.5 L395.4,421.5 L395.9,421.5 L396.4,421.6 L396.9,421.6 L397.4,421.6 
+		L397.9,421.6 L398.4,421.7 L398.9,421.7 L399.4,421.7 L399.9,421.7 L400.4,421.8 L400.9,421.8 L401.4,421.8 
+		L401.9,421.8 L402.4,421.8 L402.9,421.9 L403.4,421.9 L403.9,421.9 L404.4,421.9 L405.0,421.9 L405.5,422.0 
+		L406.0,422.0 L406.5,422.0 L407.0,422.0 L407.5,422.0 L408.0,422.0 L408.5,422.0 L409.0,422.1 L409.5,422.1 
+		L410.0,422.1 L410.5,422.1 L411.0,422.1 L411.5,422.1 L412.0,422.1 L412.5,422.1 L413.0,422.1 L413.5,422.2 
+		L414.0,422.2 L414.5,422.2 L415.0,422.2 L415.5,422.2 L416.0,422.2 L416.5,422.2 L417.0,422.2 L417.5,422.2 
+		L418.0,422.2 L418.5,422.2 L419.0,422.2 L419.5,422.2 L420.0,422.3 L420.5,422.3 L421.1,422.3 L421.6,422.3 
+		L422.1,422.3 L422.6,422.3 L423.1,422.3 L423.6,422.3 L424.1,422.3 L424.6,422.3 L425.1,422.3 L425.6,422.3 
+		L426.1,422.3 L426.6,422.3 L427.1,422.3 L427.6,422.3 L428.1,422.3 L428.6,422.3 L429.1,422.3 L429.6,422.3 
+		L430.1,422.3 L430.6,422.3 L431.1,422.3 L431.6,422.3 L432.1,422.3 L432.6,422.3 L433.1,422.3 L433.6,422.4 
+		L434.1,422.4 L434.6,422.4 L435.1,422.4 L435.6,422.4 L436.1,422.4 L436.6,422.4 L437.2,422.4 L437.7,422.4 
+		L438.2,422.4 L438.7,422.4 L439.2,422.4 L439.7,422.4 L440.2,422.4 L440.7,422.4 L441.2,422.4 L441.7,422.4 
+		L442.2,422.4 L442.7,422.4 L443.2,422.4 L443.7,422.4 L444.2,422.4 L444.7,422.4 L445.2,422.4 L445.7,422.4 
+		L446.2,422.4 L446.7,422.4 L447.2,422.4 L447.7,422.4 L448.2,422.4 L448.7,422.4 L449.2,422.4 L449.7,422.4 
+		L450.2,422.4 L450.7,422.4 L451.2,422.4 L451.7,422.4 L452.2,422.4 L452.7,422.4 L453.2,422.4 L453.8,422.4 
+		L454.3,422.4 L454.8,422.4 L455.3,422.4 L455.8,422.4 L456.3,422.4 L456.8,422.4 L457.3,422.4 L457.8,422.4 
+		L458.3,422.4 L458.8,422.4 L459.3,422.4 L459.8,422.4 L460.3,422.4 L460.8,422.4 L461.3,422.4 L461.8,422.4 
+		L462.3,422.4 L462.8,422.4 L463.3,422.4 L463.8,422.4 L464.3,422.4 L464.8,422.4 L465.3,422.4 L465.8,422.4 
+		L466.3,422.4 L466.8,422.4 L467.3,422.4 L467.8,422.4 L468.3,422.4 L468.8,422.4 L469.3,422.4 L469.9,422.4 
+		L470.4,422.4 L470.9,422.4 L471.4,422.4 L471.9,422.4 L472.4,422.4 L472.9,422.4 L473.4,422.4 L473.9,422.4 
+		L474.4,422.4 L474.9,422.4 L475.4,422.4 L475.9,422.4 L476.4,422.4 L476.9,422.4 L477.4,422.4 L477.9,422.4 
+		L478.4,422.4 L478.9,422.4 L479.4,422.4 L479.9,422.4 L480.4,422.4 L480.9,422.4 L481.4,422.4 L481.9,422.4 
+		L482.4,422.4 L482.9,422.4 L483.4,422.4 L483.9,422.4 L484.4,422.4 L484.9,422.4 L485.4,422.4 L486.0,422.4 
+		L486.5,422.4 L487.0,422.4 L487.5,422.4 L488.0,422.4 L488.5,422.4 L489.0,422.4 L489.5,422.4 L490.0,422.4 
+		L490.5,422.4 L491.0,422.4 L491.5,422.4 L492.0,422.4 L492.5,422.4 L493.0,422.4 L493.5,422.4 L494.0,422.4 
+		L494.5,422.4 L495.0,422.4 L495.5,422.4 L496.0,422.4 L496.5,422.4 L497.0,422.4 L497.5,422.4 L498.0,422.4 
+		L498.5,422.4 L499.0,422.4 L499.5,422.4 L500.0,422.4 L500.5,422.4 L501.0,422.4 L501.5,422.4 L502.1,422.4 
+		L502.6,422.4 L503.1,422.4 L503.6,422.4 L504.1,422.4 L504.6,422.4 L505.1,422.4 L505.6,422.4 L506.1,422.4 
+		L506.6,422.4 L507.1,422.4 L507.6,422.4 L508.1,422.4 L508.6,422.4 L509.1,422.4 L509.6,422.4 L510.1,422.4 
+		L510.6,422.4 L511.1,422.4 L511.6,422.4 L512.1,422.4 L512.6,422.4 L513.1,422.4 L513.6,422.4 L514.1,422.4 
+		L514.6,422.4 L515.1,422.4 L515.6,422.4 L516.1,422.4 L516.6,422.4 L517.1,422.4 L517.6,422.4 L518.1,422.4 
+		L518.7,422.4 L519.2,422.4 L519.7,422.4 L520.2,422.4 L520.7,422.4 L521.2,422.4 L521.7,422.4 L522.2,422.4 
+		L522.7,422.4 L523.2,422.4 L523.7,422.4 L524.2,422.4 L524.7,422.4 L525.2,422.4 L525.7,422.4 L526.2,422.4 
+		L526.7,422.4 L527.2,422.4 L527.7,422.4 L528.2,422.4 L528.7,422.4 L529.2,422.4 L529.7,422.4 L530.2,422.4 
+		L530.7,422.4 L531.2,422.4 L531.7,422.4 L532.2,422.4 L532.7,422.4 L533.2,422.4 L533.7,422.4 L534.2,422.4 
+		L534.8,422.4 L535.3,422.4 L535.8,422.4 L536.3,422.4 L536.8,422.4 L537.3,422.4 L537.8,422.4 L538.3,422.4 
+		L538.8,422.4 L539.3,422.4 L539.8,422.4 L540.3,422.4 L540.8,422.4 L541.3,422.4 L541.8,422.4 L542.3,422.4 
+		L542.8,422.4 L543.3,422.4 L543.8,422.4 L544.3,422.4 L544.8,422.4 L545.3,422.4 L545.8,422.4 L546.3,422.4 
+		L546.8,422.4 L547.3,422.4 L547.8,422.4 L548.3,422.4 L548.8,422.4 L549.3,422.4 L549.8,422.4 L550.3,422.4 
+		L550.9,422.4 L551.4,422.4 L551.9,422.4 L552.4,422.4 L552.9,422.4 L553.4,422.4 L553.9,422.4 L554.4,422.4 
+		L554.9,422.4 L555.4,422.4 L555.9,422.4 L556.4,422.4 L556.9,422.4 L557.4,422.4 L557.9,422.4 L558.4,422.4 
+		L558.9,422.4 L559.4,422.4 L559.9,422.4 L560.4,422.4 L560.9,422.4 L561.4,422.4 L561.9,422.4 L562.4,422.4 
+		L562.9,422.4 L563.4,422.4 L563.9,422.4 L564.4,422.4 L564.9,422.4 L565.4,422.4 L565.9,422.4 L566.4,422.4 
+		L567.0,422.4 L567.5,422.4 L568.0,422.4 L568.5,422.4 L569.0,422.4 L569.5,422.4 L570.0,422.4 L570.5,422.4 
+		L571.0,422.4 L571.5,422.4 L572.0,422.4 L572.5,422.4 L573.0,422.4 L573.5,422.4 L574.0,422.4 L574.5,422.4 
+		L575.0,422.4 '></path>
+</g>
+	</g>
+	<g id="Plot_2"><title>Plot_2</title>
+<g style="fill:none; color:green; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,415.3 L72.4,415.2 L72.9,415.1 L73.4,415.0 L73.9,414.9 L74.4,414.8 L74.9,414.7 L75.4,414.6 
+		L75.9,414.5 L76.4,414.4 L76.9,414.4 L77.4,414.3 L77.9,414.2 L78.4,414.1 L78.9,413.9 L79.4,413.8 
+		L79.9,413.7 L80.5,413.6 L81.0,413.5 L81.5,413.4 L82.0,413.3 L82.5,413.2 L83.0,413.1 L83.5,413.0 
+		L84.0,412.9 L84.5,412.8 L85.0,412.6 L85.5,412.5 L86.0,412.4 L86.5,412.3 L87.0,412.2 L87.5,412.0 
+		L88.0,411.9 L88.5,411.8 L89.0,411.7 L89.5,411.6 L90.0,411.4 L90.5,411.3 L91.0,411.2 L91.5,411.0 
+		L92.0,410.9 L92.5,410.8 L93.0,410.6 L93.5,410.5 L94.0,410.4 L94.5,410.2 L95.0,410.1 L95.5,410.0 
+		L96.0,409.8 L96.6,409.7 L97.1,409.5 L97.6,409.4 L98.1,409.2 L98.6,409.1 L99.1,408.9 L99.6,408.8 
+		L100.1,408.6 L100.6,408.5 L101.1,408.3 L101.6,408.2 L102.1,408.0 L102.6,407.8 L103.1,407.7 L103.6,407.5 
+		L104.1,407.4 L104.6,407.2 L105.1,407.0 L105.6,406.9 L106.1,406.7 L106.6,406.5 L107.1,406.4 L107.6,406.2 
+		L108.1,406.0 L108.6,405.8 L109.1,405.7 L109.6,405.5 L110.1,405.3 L110.6,405.1 L111.1,404.9 L111.6,404.7 
+		L112.1,404.6 L112.7,404.4 L113.2,404.2 L113.7,404.0 L114.2,403.8 L114.7,403.6 L115.2,403.4 L115.7,403.2 
+		L116.2,403.0 L116.7,402.8 L117.2,402.6 L117.7,402.4 L118.2,402.2 L118.7,402.0 L119.2,401.8 L119.7,401.6 
+		L120.2,401.4 L120.7,401.1 L121.2,400.9 L121.7,400.7 L122.2,400.5 L122.7,400.3 L123.2,400.1 L123.7,399.8 
+		L124.2,399.6 L124.7,399.4 L125.2,399.2 L125.7,398.9 L126.2,398.7 L126.7,398.5 L127.2,398.2 L127.7,398.0 
+		L128.2,397.7 L128.8,397.5 L129.3,397.3 L129.8,397.0 L130.3,396.8 L130.8,396.5 L131.3,396.3 L131.8,396.0 
+		L132.3,395.8 L132.8,395.5 L133.3,395.3 L133.8,395.0 L134.3,394.8 L134.8,394.5 L135.3,394.2 L135.8,394.0 
+		L136.3,393.7 L136.8,393.4 L137.3,393.2 L137.8,392.9 L138.3,392.6 L138.8,392.3 L139.3,392.1 L139.8,391.8 
+		L140.3,391.5 L140.8,391.2 L141.3,390.9 L141.8,390.7 L142.3,390.4 L142.8,390.1 L143.3,389.8 L143.8,389.5 
+		L144.3,389.2 L144.8,388.9 L145.4,388.6 L145.9,388.3 L146.4,388.0 L146.9,387.7 L147.4,387.4 L147.9,387.1 
+		L148.4,386.8 L148.9,386.5 L149.4,386.2 L149.9,385.8 L150.4,385.5 L150.9,385.2 L151.4,384.9 L151.9,384.6 
+		L152.4,384.2 L152.9,383.9 L153.4,383.6 L153.9,383.3 L154.4,382.9 L154.9,382.6 L155.4,382.3 L155.9,381.9 
+		L156.4,381.6 L156.9,381.3 L157.4,380.9 L157.9,380.6 L158.4,380.2 L158.9,379.9 L159.4,379.5 L159.9,379.2 
+		L160.4,378.8 L160.9,378.5 L161.5,378.1 L162.0,377.8 L162.5,377.4 L163.0,377.0 L163.5,376.7 L164.0,376.3 
+		L164.5,375.9 L165.0,375.6 L165.5,375.2 L166.0,374.8 L166.5,374.5 L167.0,374.1 L167.5,373.7 L168.0,373.3 
+		L168.5,373.0 L169.0,372.6 L169.5,372.2 L170.0,371.8 L170.5,371.4 L171.0,371.0 L171.5,370.6 L172.0,370.2 
+		L172.5,369.9 L173.0,369.5 L173.5,369.1 L174.0,368.7 L174.5,368.3 L175.0,367.9 L175.5,367.5 L176.0,367.1 
+		L176.5,366.7 L177.0,366.2 L177.6,365.8 L178.1,365.4 L178.6,365.0 L179.1,364.6 L179.6,364.2 L180.1,363.8 
+		L180.6,363.3 L181.1,362.9 L181.6,362.5 L182.1,362.1 L182.6,361.7 L183.1,361.2 L183.6,360.8 L184.1,360.4 
+		L184.6,359.9 L185.1,359.5 L185.6,359.1 L186.1,358.6 L186.6,358.2 L187.1,357.8 L187.6,357.3 L188.1,356.9 
+		L188.6,356.5 L189.1,356.0 L189.6,355.6 L190.1,355.1 L190.6,354.7 L191.1,354.2 L191.6,353.8 L192.1,353.3 
+		L192.6,352.9 L193.1,352.4 L193.7,352.0 L194.2,351.5 L194.7,351.1 L195.2,350.6 L195.7,350.1 L196.2,349.7 
+		L196.7,349.2 L197.2,348.8 L197.7,348.3 L198.2,347.8 L198.7,347.4 L199.2,346.9 L199.7,346.4 L200.2,346.0 
+		L200.7,345.5 L201.2,345.0 L201.7,344.6 L202.2,344.1 L202.7,343.6 L203.2,343.1 L203.7,342.7 L204.2,342.2 
+		L204.7,341.7 L205.2,341.2 L205.7,340.8 L206.2,340.3 L206.7,339.8 L207.2,339.3 L207.7,338.9 L208.2,338.4 
+		L208.7,337.9 L209.2,337.4 L209.7,336.9 L210.3,336.4 L210.8,336.0 L211.3,335.5 L211.8,335.0 L212.3,334.5 
+		L212.8,334.0 L213.3,333.5 L213.8,333.0 L214.3,332.6 L214.8,332.1 L215.3,331.6 L215.8,331.1 L216.3,330.6 
+		L216.8,330.1 L217.3,329.6 L217.8,329.1 L218.3,328.6 L218.8,328.2 L219.3,327.7 L219.8,327.2 L220.3,326.7 
+		L220.8,326.2 L221.3,325.7 L221.8,325.2 L222.3,324.7 L222.8,324.2 L223.3,323.7 L223.8,323.3 L224.3,322.8 
+		L224.8,322.3 L225.3,321.8 L225.8,321.3 L226.4,320.8 L226.9,320.3 L227.4,319.8 L227.9,319.3 L228.4,318.8 
+		L228.9,318.3 L229.4,317.9 L229.9,317.4 L230.4,316.9 L230.9,316.4 L231.4,315.9 L231.9,315.4 L232.4,314.9 
+		L232.9,314.4 L233.4,314.0 L233.9,313.5 L234.4,313.0 L234.9,312.5 L235.4,312.0 L235.9,311.5 L236.4,311.1 
+		L236.9,310.6 L237.4,310.1 L237.9,309.6 L238.4,309.1 L238.9,308.7 L239.4,308.2 L239.9,307.7 L240.4,307.2 
+		L240.9,306.8 L241.4,306.3 L241.9,305.8 L242.5,305.3 L243.0,304.9 L243.5,304.4 L244.0,303.9 L244.5,303.5 
+		L245.0,303.0 L245.5,302.5 L246.0,302.1 L246.5,301.6 L247.0,301.1 L247.5,300.7 L248.0,300.2 L248.5,299.8 
+		L249.0,299.3 L249.5,298.9 L250.0,298.4 L250.5,298.0 L251.0,297.5 L251.5,297.1 L252.0,296.6 L252.5,296.2 
+		L253.0,295.7 L253.5,295.3 L254.0,294.8 L254.5,294.4 L255.0,294.0 L255.5,293.5 L256.0,293.1 L256.5,292.7 
+		L257.0,292.2 L257.5,291.8 L258.0,291.4 L258.6,290.9 L259.1,290.5 L259.6,290.1 L260.1,289.7 L260.6,289.3 
+		L261.1,288.9 L261.6,288.4 L262.1,288.0 L262.6,287.6 L263.1,287.2 L263.6,286.8 L264.1,286.4 L264.6,286.0 
+		L265.1,285.6 L265.6,285.2 L266.1,284.8 L266.6,284.4 L267.1,284.0 L267.6,283.7 L268.1,283.3 L268.6,282.9 
+		L269.1,282.5 L269.6,282.1 L270.1,281.8 L270.6,281.4 L271.1,281.0 L271.6,280.7 L272.1,280.3 L272.6,279.9 
+		L273.1,279.6 L273.6,279.2 L274.1,278.9 L274.6,278.5 L275.2,278.2 L275.7,277.8 L276.2,277.5 L276.7,277.1 
+		L277.2,276.8 L277.7,276.5 L278.2,276.1 L278.7,275.8 L279.2,275.5 L279.7,275.2 L280.2,274.8 L280.7,274.5 
+		L281.2,274.2 L281.7,273.9 L282.2,273.6 L282.7,273.3 L283.2,273.0 L283.7,272.7 L284.2,272.4 L284.7,272.1 
+		L285.2,271.8 L285.7,271.5 L286.2,271.3 L286.7,271.0 L287.2,270.7 L287.7,270.4 L288.2,270.2 L288.7,269.9 
+		L289.2,269.6 L289.7,269.4 L290.2,269.1 L290.7,268.9 L291.3,268.6 L291.8,268.4 L292.3,268.1 L292.8,267.9 
+		L293.3,267.7 L293.8,267.4 L294.3,267.2 L294.8,267.0 L295.3,266.8 L295.8,266.6 L296.3,266.3 L296.8,266.1 
+		L297.3,265.9 L297.8,265.7 L298.3,265.5 L298.8,265.3 L299.3,265.1 L299.8,265.0 L300.3,264.8 L300.8,264.6 
+		L301.3,264.4 L301.8,264.2 L302.3,264.1 L302.8,263.9 L303.3,263.8 L303.8,263.6 L304.3,263.4 L304.8,263.3 
+		L305.3,263.1 L305.8,263.0 L306.3,262.9 L306.8,262.7 L307.4,262.6 L307.9,262.5 L308.4,262.4 L308.9,262.2 
+		L309.4,262.1 L309.9,262.0 L310.4,261.9 L310.9,261.8 L311.4,261.7 L311.9,261.6 L312.4,261.5 L312.9,261.4 
+		L313.4,261.4 L313.9,261.3 L314.4,261.2 L314.9,261.1 L315.4,261.1 L315.9,261.0 L316.4,260.9 L316.9,260.9 
+		L317.4,260.8 L317.9,260.8 L318.4,260.8 L318.9,260.7 L319.4,260.7 L319.9,260.6 L320.4,260.6 L320.9,260.6 
+		L321.4,260.6 L321.9,260.6 L322.4,260.6 L322.9,260.6 L323.5,260.5 L324.0,260.6 L324.5,260.6 L325.0,260.6 
+		L325.5,260.6 L326.0,260.6 L326.5,260.6 L327.0,260.6 L327.5,260.7 L328.0,260.7 L328.5,260.8 L329.0,260.8 
+		L329.5,260.8 L330.0,260.9 L330.5,260.9 L331.0,261.0 L331.5,261.1 L332.0,261.1 L332.5,261.2 L333.0,261.3 
+		L333.5,261.4 L334.0,261.4 L334.5,261.5 L335.0,261.6 L335.5,261.7 L336.0,261.8 L336.5,261.9 L337.0,262.0 
+		L337.5,262.1 L338.0,262.2 L338.5,262.4 L339.0,262.5 L339.5,262.6 L340.1,262.7 L340.6,262.9 L341.1,263.0 
+		L341.6,263.1 L342.1,263.3 L342.6,263.4 L343.1,263.6 L343.6,263.8 L344.1,263.9 L344.6,264.1 L345.1,264.2 
+		L345.6,264.4 L346.1,264.6 L346.6,264.8 L347.1,265.0 L347.6,265.1 L348.1,265.3 L348.6,265.5 L349.1,265.7 
+		L349.6,265.9 L350.1,266.1 L350.6,266.3 L351.1,266.6 L351.6,266.8 L352.1,267.0 L352.6,267.2 L353.1,267.4 
+		L353.6,267.7 L354.1,267.9 L354.6,268.1 L355.1,268.4 L355.6,268.6 L356.2,268.9 L356.7,269.1 L357.2,269.4 
+		L357.7,269.6 L358.2,269.9 L358.7,270.2 L359.2,270.4 L359.7,270.7 L360.2,271.0 L360.7,271.3 L361.2,271.5 
+		L361.7,271.8 L362.2,272.1 L362.7,272.4 L363.2,272.7 L363.7,273.0 L364.2,273.3 L364.7,273.6 L365.2,273.9 
+		L365.7,274.2 L366.2,274.5 L366.7,274.8 L367.2,275.2 L367.7,275.5 L368.2,275.8 L368.7,276.1 L369.2,276.5 
+		L369.7,276.8 L370.2,277.1 L370.7,277.5 L371.2,277.8 L371.7,278.2 L372.3,278.5 L372.8,278.9 L373.3,279.2 
+		L373.8,279.6 L374.3,279.9 L374.8,280.3 L375.3,280.7 L375.8,281.0 L376.3,281.4 L376.8,281.8 L377.3,282.1 
+		L377.8,282.5 L378.3,282.9 L378.8,283.3 L379.3,283.7 L379.8,284.0 L380.3,284.4 L380.8,284.8 L381.3,285.2 
+		L381.8,285.6 L382.3,286.0 L382.8,286.4 L383.3,286.8 L383.8,287.2 L384.3,287.6 L384.8,288.0 L385.3,288.4 
+		L385.8,288.9 L386.3,289.3 L386.8,289.7 L387.3,290.1 L387.8,290.5 L388.3,290.9 L388.9,291.4 L389.4,291.8 
+		L389.9,292.2 L390.4,292.7 L390.9,293.1 L391.4,293.5 L391.9,294.0 L392.4,294.4 L392.9,294.8 L393.4,295.3 
+		L393.9,295.7 L394.4,296.2 L394.9,296.6 L395.4,297.1 L395.9,297.5 L396.4,298.0 L396.9,298.4 L397.4,298.9 
+		L397.9,299.3 L398.4,299.8 L398.9,300.2 L399.4,300.7 L399.9,301.1 L400.4,301.6 L400.9,302.1 L401.4,302.5 
+		L401.9,303.0 L402.4,303.5 L402.9,303.9 L403.4,304.4 L403.9,304.9 L404.4,305.3 L405.0,305.8 L405.5,306.3 
+		L406.0,306.8 L406.5,307.2 L407.0,307.7 L407.5,308.2 L408.0,308.7 L408.5,309.1 L409.0,309.6 L409.5,310.1 
+		L410.0,310.6 L410.5,311.1 L411.0,311.5 L411.5,312.0 L412.0,312.5 L412.5,313.0 L413.0,313.5 L413.5,314.0 
+		L414.0,314.4 L414.5,314.9 L415.0,315.4 L415.5,315.9 L416.0,316.4 L416.5,316.9 L417.0,317.4 L417.5,317.9 
+		L418.0,318.3 L418.5,318.8 L419.0,319.3 L419.5,319.8 L420.0,320.3 L420.5,320.8 L421.1,321.3 L421.6,321.8 
+		L422.1,322.3 L422.6,322.8 L423.1,323.3 L423.6,323.7 L424.1,324.2 L424.6,324.7 L425.1,325.2 L425.6,325.7 
+		L426.1,326.2 L426.6,326.7 L427.1,327.2 L427.6,327.7 L428.1,328.2 L428.6,328.6 L429.1,329.1 L429.6,329.6 
+		L430.1,330.1 L430.6,330.6 L431.1,331.1 L431.6,331.6 L432.1,332.1 L432.6,332.6 L433.1,333.0 L433.6,333.5 
+		L434.1,334.0 L434.6,334.5 L435.1,335.0 L435.6,335.5 L436.1,336.0 L436.6,336.4 L437.2,336.9 L437.7,337.4 
+		L438.2,337.9 L438.7,338.4 L439.2,338.9 L439.7,339.3 L440.2,339.8 L440.7,340.3 L441.2,340.8 L441.7,341.2 
+		L442.2,341.7 L442.7,342.2 L443.2,342.7 L443.7,343.1 L444.2,343.6 L444.7,344.1 L445.2,344.6 L445.7,345.0 
+		L446.2,345.5 L446.7,346.0 L447.2,346.4 L447.7,346.9 L448.2,347.4 L448.7,347.8 L449.2,348.3 L449.7,348.8 
+		L450.2,349.2 L450.7,349.7 L451.2,350.1 L451.7,350.6 L452.2,351.1 L452.7,351.5 L453.2,352.0 L453.8,352.4 
+		L454.3,352.9 L454.8,353.3 L455.3,353.8 L455.8,354.2 L456.3,354.7 L456.8,355.1 L457.3,355.6 L457.8,356.0 
+		L458.3,356.5 L458.8,356.9 L459.3,357.3 L459.8,357.8 L460.3,358.2 L460.8,358.6 L461.3,359.1 L461.8,359.5 
+		L462.3,359.9 L462.8,360.4 L463.3,360.8 L463.8,361.2 L464.3,361.7 L464.8,362.1 L465.3,362.5 L465.8,362.9 
+		L466.3,363.3 L466.8,363.8 L467.3,364.2 L467.8,364.6 L468.3,365.0 L468.8,365.4 L469.3,365.8 L469.9,366.2 
+		L470.4,366.7 L470.9,367.1 L471.4,367.5 L471.9,367.9 L472.4,368.3 L472.9,368.7 L473.4,369.1 L473.9,369.5 
+		L474.4,369.9 L474.9,370.2 L475.4,370.6 L475.9,371.0 L476.4,371.4 L476.9,371.8 L477.4,372.2 L477.9,372.6 
+		L478.4,373.0 L478.9,373.3 L479.4,373.7 L479.9,374.1 L480.4,374.5 L480.9,374.8 L481.4,375.2 L481.9,375.6 
+		L482.4,375.9 L482.9,376.3 L483.4,376.7 L483.9,377.0 L484.4,377.4 L484.9,377.8 L485.4,378.1 L486.0,378.5 
+		L486.5,378.8 L487.0,379.2 L487.5,379.5 L488.0,379.9 L488.5,380.2 L489.0,380.6 L489.5,380.9 L490.0,381.3 
+		L490.5,381.6 L491.0,381.9 L491.5,382.3 L492.0,382.6 L492.5,382.9 L493.0,383.3 L493.5,383.6 L494.0,383.9 
+		L494.5,384.2 L495.0,384.6 L495.5,384.9 L496.0,385.2 L496.5,385.5 L497.0,385.8 L497.5,386.2 L498.0,386.5 
+		L498.5,386.8 L499.0,387.1 L499.5,387.4 L500.0,387.7 L500.5,388.0 L501.0,388.3 L501.5,388.6 L502.1,388.9 
+		L502.6,389.2 L503.1,389.5 L503.6,389.8 L504.1,390.1 L504.6,390.4 L505.1,390.7 L505.6,390.9 L506.1,391.2 
+		L506.6,391.5 L507.1,391.8 L507.6,392.1 L508.1,392.3 L508.6,392.6 L509.1,392.9 L509.6,393.2 L510.1,393.4 
+		L510.6,393.7 L511.1,394.0 L511.6,394.2 L512.1,394.5 L512.6,394.8 L513.1,395.0 L513.6,395.3 L514.1,395.5 
+		L514.6,395.8 L515.1,396.0 L515.6,396.3 L516.1,396.5 L516.6,396.8 L517.1,397.0 L517.6,397.3 L518.1,397.5 
+		L518.7,397.7 L519.2,398.0 L519.7,398.2 L520.2,398.5 L520.7,398.7 L521.2,398.9 L521.7,399.2 L522.2,399.4 
+		L522.7,399.6 L523.2,399.8 L523.7,400.1 L524.2,400.3 L524.7,400.5 L525.2,400.7 L525.7,400.9 L526.2,401.1 
+		L526.7,401.4 L527.2,401.6 L527.7,401.8 L528.2,402.0 L528.7,402.2 L529.2,402.4 L529.7,402.6 L530.2,402.8 
+		L530.7,403.0 L531.2,403.2 L531.7,403.4 L532.2,403.6 L532.7,403.8 L533.2,404.0 L533.7,404.2 L534.2,404.4 
+		L534.8,404.6 L535.3,404.7 L535.8,404.9 L536.3,405.1 L536.8,405.3 L537.3,405.5 L537.8,405.7 L538.3,405.8 
+		L538.8,406.0 L539.3,406.2 L539.8,406.4 L540.3,406.5 L540.8,406.7 L541.3,406.9 L541.8,407.0 L542.3,407.2 
+		L542.8,407.4 L543.3,407.5 L543.8,407.7 L544.3,407.8 L544.8,408.0 L545.3,408.2 L545.8,408.3 L546.3,408.5 
+		L546.8,408.6 L547.3,408.8 L547.8,408.9 L548.3,409.1 L548.8,409.2 L549.3,409.4 L549.8,409.5 L550.3,409.7 
+		L550.9,409.8 L551.4,410.0 L551.9,410.1 L552.4,410.2 L552.9,410.4 L553.4,410.5 L553.9,410.6 L554.4,410.8 
+		L554.9,410.9 L555.4,411.0 L555.9,411.2 L556.4,411.3 L556.9,411.4 L557.4,411.6 L557.9,411.7 L558.4,411.8 
+		L558.9,411.9 L559.4,412.0 L559.9,412.2 L560.4,412.3 L560.9,412.4 L561.4,412.5 L561.9,412.6 L562.4,412.8 
+		L562.9,412.9 L563.4,413.0 L563.9,413.1 L564.4,413.2 L564.9,413.3 L565.4,413.4 L565.9,413.5 L566.4,413.6 
+		L567.0,413.7 L567.5,413.8 L568.0,413.9 L568.5,414.1 L569.0,414.2 L569.5,414.3 L570.0,414.4 L570.5,414.4 
+		L571.0,414.5 L571.5,414.6 L572.0,414.7 L572.5,414.8 L573.0,414.9 L573.5,415.0 L574.0,415.1 L574.5,415.2 
+		L575.0,415.3 '></path>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/normal_3_1.dat b/v0.2-M1/chi/reference-manual/distribution_plots/normal_3_1.dat
new file mode 100644
index 0000000..6cfe806
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/normal_3_1.dat
@@ -0,0 +1,1014 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.004432
+0.010000	0.004567
+0.020000	0.004705
+0.030000	0.004847
+0.040000	0.004993
+0.050000	0.005143
+0.060000	0.005296
+0.070000	0.005454
+0.080000	0.005616
+0.090000	0.005782
+0.100000	0.005953
+0.110000	0.006127
+0.120000	0.006307
+0.130000	0.006491
+0.140000	0.006679
+0.150000	0.006873
+0.160000	0.007071
+0.170000	0.007274
+0.180000	0.007483
+0.190000	0.007697
+0.200000	0.007915
+0.210000	0.008140
+0.220000	0.008370
+0.230000	0.008605
+0.240000	0.008846
+0.250000	0.009094
+0.260000	0.009347
+0.270000	0.009606
+0.280000	0.009871
+0.290000	0.010143
+0.300000	0.010421
+0.310000	0.010706
+0.320000	0.010997
+0.330000	0.011295
+0.340000	0.011600
+0.350000	0.011912
+0.360000	0.012232
+0.370000	0.012558
+0.380000	0.012892
+0.390000	0.013234
+0.400000	0.013583
+0.410000	0.013940
+0.420000	0.014305
+0.430000	0.014678
+0.440000	0.015060
+0.450000	0.015449
+0.460000	0.015848
+0.470000	0.016254
+0.480000	0.016670
+0.490000	0.017095
+0.500000	0.017528
+0.510000	0.017971
+0.520000	0.018423
+0.530000	0.018885
+0.540000	0.019356
+0.550000	0.019837
+0.560000	0.020328
+0.570000	0.020829
+0.580000	0.021341
+0.590000	0.021862
+0.600000	0.022395
+0.610000	0.022937
+0.620000	0.023491
+0.630000	0.024056
+0.640000	0.024631
+0.650000	0.025218
+0.660000	0.025817
+0.670000	0.026426
+0.680000	0.027048
+0.690000	0.027682
+0.700000	0.028327
+0.710000	0.028985
+0.720000	0.029655
+0.730000	0.030337
+0.740000	0.031032
+0.750000	0.031740
+0.760000	0.032460
+0.770000	0.033194
+0.780000	0.033941
+0.790000	0.034701
+0.800000	0.035475
+0.810000	0.036262
+0.820000	0.037063
+0.830000	0.037878
+0.840000	0.038707
+0.850000	0.039550
+0.860000	0.040408
+0.870000	0.041280
+0.880000	0.042166
+0.890000	0.043067
+0.900000	0.043984
+0.910000	0.044915
+0.920000	0.045861
+0.930000	0.046823
+0.940000	0.047800
+0.950000	0.048792
+0.960000	0.049800
+0.970000	0.050824
+0.980000	0.051864
+0.990000	0.052919
+1.000000	0.053991
+1.010000	0.055079
+1.020000	0.056183
+1.030000	0.057304
+1.040000	0.058441
+1.050000	0.059595
+1.060000	0.060765
+1.070000	0.061952
+1.080000	0.063157
+1.090000	0.064378
+1.100000	0.065616
+1.110000	0.066871
+1.120000	0.068144
+1.130000	0.069433
+1.140000	0.070740
+1.150000	0.072065
+1.160000	0.073407
+1.170000	0.074766
+1.180000	0.076143
+1.190000	0.077538
+1.200000	0.078950
+1.210000	0.080380
+1.220000	0.081828
+1.230000	0.083293
+1.240000	0.084776
+1.250000	0.086277
+1.260000	0.087796
+1.270000	0.089333
+1.280000	0.090887
+1.290000	0.092459
+1.300000	0.094049
+1.310000	0.095657
+1.320000	0.097282
+1.330000	0.098925
+1.340000	0.100586
+1.350000	0.102265
+1.360000	0.103961
+1.370000	0.105675
+1.380000	0.107406
+1.390000	0.109155
+1.400000	0.110921
+1.410000	0.112704
+1.420000	0.114505
+1.430000	0.116323
+1.440000	0.118157
+1.450000	0.120009
+1.460000	0.121878
+1.470000	0.123763
+1.480000	0.125665
+1.490000	0.127583
+1.500000	0.129518
+1.510000	0.131468
+1.520000	0.133435
+1.530000	0.135418
+1.540000	0.137417
+1.550000	0.139431
+1.560000	0.141460
+1.570000	0.143505
+1.580000	0.145564
+1.590000	0.147639
+1.600000	0.149727
+1.610000	0.151831
+1.620000	0.153948
+1.630000	0.156080
+1.640000	0.158225
+1.650000	0.160383
+1.660000	0.162555
+1.670000	0.164740
+1.680000	0.166937
+1.690000	0.169147
+1.700000	0.171369
+1.710000	0.173602
+1.720000	0.175847
+1.730000	0.178104
+1.740000	0.180371
+1.750000	0.182649
+1.760000	0.184937
+1.770000	0.187235
+1.780000	0.189543
+1.790000	0.191860
+1.800000	0.194186
+1.810000	0.196520
+1.820000	0.198863
+1.830000	0.201214
+1.840000	0.203571
+1.850000	0.205936
+1.860000	0.208308
+1.870000	0.210686
+1.880000	0.213069
+1.890000	0.215458
+1.900000	0.217852
+1.910000	0.220251
+1.920000	0.222653
+1.930000	0.225060
+1.940000	0.227470
+1.950000	0.229882
+1.960000	0.232297
+1.970000	0.234714
+1.980000	0.237132
+1.990000	0.239551
+2.000000	0.241971
+2.010000	0.244390
+2.020000	0.246809
+2.030000	0.249228
+2.040000	0.251644
+2.050000	0.254059
+2.060000	0.256471
+2.070000	0.258881
+2.080000	0.261286
+2.090000	0.263688
+2.100000	0.266085
+2.110000	0.268477
+2.120000	0.270864
+2.130000	0.273244
+2.140000	0.275618
+2.150000	0.277985
+2.160000	0.280344
+2.170000	0.282694
+2.180000	0.285036
+2.190000	0.287369
+2.200000	0.289692
+2.210000	0.292004
+2.220000	0.294305
+2.230000	0.296595
+2.240000	0.298872
+2.250000	0.301137
+2.260000	0.303389
+2.270000	0.305627
+2.280000	0.307851
+2.290000	0.310060
+2.300000	0.312254
+2.310000	0.314432
+2.320000	0.316593
+2.330000	0.318737
+2.340000	0.320864
+2.350000	0.322972
+2.360000	0.325062
+2.370000	0.327133
+2.380000	0.329184
+2.390000	0.331215
+2.400000	0.333225
+2.410000	0.335213
+2.420000	0.337180
+2.430000	0.339124
+2.440000	0.341046
+2.450000	0.342944
+2.460000	0.344818
+2.470000	0.346668
+2.480000	0.348493
+2.490000	0.350292
+2.500000	0.352065
+2.510000	0.353812
+2.520000	0.355533
+2.530000	0.357225
+2.540000	0.358890
+2.550000	0.360527
+2.560000	0.362135
+2.570000	0.363714
+2.580000	0.365263
+2.590000	0.366782
+2.600000	0.368270
+2.610000	0.369728
+2.620000	0.371154
+2.630000	0.372548
+2.640000	0.373911
+2.650000	0.375240
+2.660000	0.376537
+2.670000	0.377801
+2.680000	0.379031
+2.690000	0.380226
+2.700000	0.381388
+2.710000	0.382515
+2.720000	0.383606
+2.730000	0.384663
+2.740000	0.385683
+2.750000	0.386668
+2.760000	0.387617
+2.770000	0.388529
+2.780000	0.389404
+2.790000	0.390242
+2.800000	0.391043
+2.810000	0.391806
+2.820000	0.392531
+2.830000	0.393219
+2.840000	0.393868
+2.850000	0.394479
+2.860000	0.395052
+2.870000	0.395585
+2.880000	0.396080
+2.890000	0.396536
+2.900000	0.396953
+2.910000	0.397330
+2.920000	0.397668
+2.930000	0.397966
+2.940000	0.398225
+2.950000	0.398444
+2.960000	0.398623
+2.970000	0.398763
+2.980000	0.398862
+2.990000	0.398922
+3.000000	0.398942
+3.010000	0.398922
+3.020000	0.398862
+3.030000	0.398763
+3.040000	0.398623
+3.050000	0.398444
+3.060000	0.398225
+3.070000	0.397966
+3.080000	0.397668
+3.090000	0.397330
+3.100000	0.396953
+3.110000	0.396536
+3.120000	0.396080
+3.130000	0.395585
+3.140000	0.395052
+3.150000	0.394479
+3.160000	0.393868
+3.170000	0.393219
+3.180000	0.392531
+3.190000	0.391806
+3.200000	0.391043
+3.210000	0.390242
+3.220000	0.389404
+3.230000	0.388529
+3.240000	0.387617
+3.250000	0.386668
+3.260000	0.385683
+3.270000	0.384663
+3.280000	0.383606
+3.290000	0.382515
+3.300000	0.381388
+3.310000	0.380226
+3.320000	0.379031
+3.330000	0.377801
+3.340000	0.376537
+3.350000	0.375240
+3.360000	0.373911
+3.370000	0.372548
+3.380000	0.371154
+3.390000	0.369728
+3.400000	0.368270
+3.410000	0.366782
+3.420000	0.365263
+3.430000	0.363714
+3.440000	0.362135
+3.450000	0.360527
+3.460000	0.358890
+3.470000	0.357225
+3.480000	0.355533
+3.490000	0.353812
+3.500000	0.352065
+3.510000	0.350292
+3.520000	0.348493
+3.530000	0.346668
+3.540000	0.344818
+3.550000	0.342944
+3.560000	0.341046
+3.570000	0.339124
+3.580000	0.337180
+3.590000	0.335213
+3.600000	0.333225
+3.610000	0.331215
+3.620000	0.329184
+3.630000	0.327133
+3.640000	0.325062
+3.650000	0.322972
+3.660000	0.320864
+3.670000	0.318737
+3.680000	0.316593
+3.690000	0.314432
+3.700000	0.312254
+3.710000	0.310060
+3.720000	0.307851
+3.730000	0.305627
+3.740000	0.303389
+3.750000	0.301137
+3.760000	0.298872
+3.770000	0.296595
+3.780000	0.294305
+3.790000	0.292004
+3.800000	0.289692
+3.810000	0.287369
+3.820000	0.285036
+3.830000	0.282694
+3.840000	0.280344
+3.850000	0.277985
+3.860000	0.275618
+3.870000	0.273244
+3.880000	0.270864
+3.890000	0.268477
+3.900000	0.266085
+3.910000	0.263688
+3.920000	0.261286
+3.930000	0.258881
+3.940000	0.256471
+3.950000	0.254059
+3.960000	0.251644
+3.970000	0.249228
+3.980000	0.246809
+3.990000	0.244390
+4.000000	0.241971
+4.010000	0.239551
+4.020000	0.237132
+4.030000	0.234714
+4.040000	0.232297
+4.050000	0.229882
+4.060000	0.227470
+4.070000	0.225060
+4.080000	0.222653
+4.090000	0.220251
+4.100000	0.217852
+4.110000	0.215458
+4.120000	0.213069
+4.130000	0.210686
+4.140000	0.208308
+4.150000	0.205936
+4.160000	0.203571
+4.170000	0.201214
+4.180000	0.198863
+4.190000	0.196520
+4.200000	0.194186
+4.210000	0.191860
+4.220000	0.189543
+4.230000	0.187235
+4.240000	0.184937
+4.250000	0.182649
+4.260000	0.180371
+4.270000	0.178104
+4.280000	0.175847
+4.290000	0.173602
+4.300000	0.171369
+4.310000	0.169147
+4.320000	0.166937
+4.330000	0.164740
+4.340000	0.162555
+4.350000	0.160383
+4.360000	0.158225
+4.370000	0.156080
+4.380000	0.153948
+4.390000	0.151831
+4.400000	0.149727
+4.410000	0.147639
+4.420000	0.145564
+4.430000	0.143505
+4.440000	0.141460
+4.450000	0.139431
+4.460000	0.137417
+4.470000	0.135418
+4.480000	0.133435
+4.490000	0.131468
+4.500000	0.129518
+4.510000	0.127583
+4.520000	0.125665
+4.530000	0.123763
+4.540000	0.121878
+4.550000	0.120009
+4.560000	0.118157
+4.570000	0.116323
+4.580000	0.114505
+4.590000	0.112704
+4.600000	0.110921
+4.610000	0.109155
+4.620000	0.107406
+4.630000	0.105675
+4.640000	0.103961
+4.650000	0.102265
+4.660000	0.100586
+4.670000	0.098925
+4.680000	0.097282
+4.690000	0.095657
+4.700000	0.094049
+4.710000	0.092459
+4.720000	0.090887
+4.730000	0.089333
+4.740000	0.087796
+4.750000	0.086277
+4.760000	0.084776
+4.770000	0.083293
+4.780000	0.081828
+4.790000	0.080380
+4.800000	0.078950
+4.810000	0.077538
+4.820000	0.076143
+4.830000	0.074766
+4.840000	0.073407
+4.850000	0.072065
+4.860000	0.070740
+4.870000	0.069433
+4.880000	0.068144
+4.890000	0.066871
+4.900000	0.065616
+4.910000	0.064378
+4.920000	0.063157
+4.930000	0.061952
+4.940000	0.060765
+4.950000	0.059595
+4.960000	0.058441
+4.970000	0.057304
+4.980000	0.056183
+4.990000	0.055079
+5.000000	0.053991
+5.010000	0.052919
+5.020000	0.051864
+5.030000	0.050824
+5.040000	0.049800
+5.050000	0.048792
+5.060000	0.047800
+5.070000	0.046823
+5.080000	0.045861
+5.090000	0.044915
+5.100000	0.043984
+5.110000	0.043067
+5.120000	0.042166
+5.130000	0.041280
+5.140000	0.040408
+5.150000	0.039550
+5.160000	0.038707
+5.170000	0.037878
+5.180000	0.037063
+5.190000	0.036262
+5.200000	0.035475
+5.210000	0.034701
+5.220000	0.033941
+5.230000	0.033194
+5.240000	0.032460
+5.250000	0.031740
+5.260000	0.031032
+5.270000	0.030337
+5.280000	0.029655
+5.290000	0.028985
+5.300000	0.028327
+5.310000	0.027682
+5.320000	0.027048
+5.330000	0.026426
+5.340000	0.025817
+5.350000	0.025218
+5.360000	0.024631
+5.370000	0.024056
+5.380000	0.023491
+5.390000	0.022937
+5.400000	0.022395
+5.410000	0.021862
+5.420000	0.021341
+5.430000	0.020829
+5.440000	0.020328
+5.450000	0.019837
+5.460000	0.019356
+5.470000	0.018885
+5.480000	0.018423
+5.490000	0.017971
+5.500000	0.017528
+5.510000	0.017095
+5.520000	0.016670
+5.530000	0.016254
+5.540000	0.015848
+5.550000	0.015449
+5.560000	0.015060
+5.570000	0.014678
+5.580000	0.014305
+5.590000	0.013940
+5.600000	0.013583
+5.610000	0.013234
+5.620000	0.012892
+5.630000	0.012558
+5.640000	0.012232
+5.650000	0.011912
+5.660000	0.011600
+5.670000	0.011295
+5.680000	0.010997
+5.690000	0.010706
+5.700000	0.010421
+5.710000	0.010143
+5.720000	0.009871
+5.730000	0.009606
+5.740000	0.009347
+5.750000	0.009094
+5.760000	0.008846
+5.770000	0.008605
+5.780000	0.008370
+5.790000	0.008140
+5.800000	0.007915
+5.810000	0.007697
+5.820000	0.007483
+5.830000	0.007274
+5.840000	0.007071
+5.850000	0.006873
+5.860000	0.006679
+5.870000	0.006491
+5.880000	0.006307
+5.890000	0.006127
+5.900000	0.005953
+5.910000	0.005782
+5.920000	0.005616
+5.930000	0.005454
+5.940000	0.005296
+5.950000	0.005143
+5.960000	0.004993
+5.970000	0.004847
+5.980000	0.004705
+5.990000	0.004567
+6.000000	0.004432
+6.010000	0.004301
+6.020000	0.004173
+6.030000	0.004049
+6.040000	0.003928
+6.050000	0.003810
+6.060000	0.003695
+6.070000	0.003584
+6.080000	0.003475
+6.090000	0.003370
+6.100000	0.003267
+6.110000	0.003167
+6.120000	0.003070
+6.130000	0.002975
+6.140000	0.002884
+6.150000	0.002794
+6.160000	0.002707
+6.170000	0.002623
+6.180000	0.002541
+6.190000	0.002461
+6.200000	0.002384
+6.210000	0.002309
+6.220000	0.002236
+6.230000	0.002165
+6.240000	0.002096
+6.250000	0.002029
+6.260000	0.001964
+6.270000	0.001901
+6.280000	0.001840
+6.290000	0.001780
+6.300000	0.001723
+6.310000	0.001667
+6.320000	0.001612
+6.330000	0.001560
+6.340000	0.001508
+6.350000	0.001459
+6.360000	0.001411
+6.370000	0.001364
+6.380000	0.001319
+6.390000	0.001275
+6.400000	0.001232
+6.410000	0.001191
+6.420000	0.001151
+6.430000	0.001112
+6.440000	0.001075
+6.450000	0.001038
+6.460000	0.001003
+6.470000	0.000969
+6.480000	0.000936
+6.490000	0.000904
+6.500000	0.000873
+6.510000	0.000843
+6.520000	0.000814
+6.530000	0.000785
+6.540000	0.000758
+6.550000	0.000732
+6.560000	0.000706
+6.570000	0.000681
+6.580000	0.000657
+6.590000	0.000634
+6.600000	0.000612
+6.610000	0.000590
+6.620000	0.000569
+6.630000	0.000549
+6.640000	0.000529
+6.650000	0.000510
+6.660000	0.000492
+6.670000	0.000474
+6.680000	0.000457
+6.690000	0.000441
+6.700000	0.000425
+6.710000	0.000409
+6.720000	0.000394
+6.730000	0.000380
+6.740000	0.000366
+6.750000	0.000353
+6.760000	0.000340
+6.770000	0.000327
+6.780000	0.000315
+6.790000	0.000303
+6.800000	0.000292
+6.810000	0.000281
+6.820000	0.000271
+6.830000	0.000260
+6.840000	0.000251
+6.850000	0.000241
+6.860000	0.000232
+6.870000	0.000223
+6.880000	0.000215
+6.890000	0.000207
+6.900000	0.000199
+6.910000	0.000191
+6.920000	0.000184
+6.930000	0.000177
+6.940000	0.000170
+6.950000	0.000163
+6.960000	0.000157
+6.970000	0.000151
+6.980000	0.000145
+6.990000	0.000139
+7.000000	0.000134
+7.010000	0.000129
+7.020000	0.000124
+7.030000	0.000119
+7.040000	0.000114
+7.050000	0.000109
+7.060000	0.000105
+7.070000	0.000101
+7.080000	0.000097
+7.090000	0.000093
+7.100000	0.000089
+7.110000	0.000086
+7.120000	0.000082
+7.130000	0.000079
+7.140000	0.000076
+7.150000	0.000073
+7.160000	0.000070
+7.170000	0.000067
+7.180000	0.000064
+7.190000	0.000061
+7.200000	0.000059
+7.210000	0.000057
+7.220000	0.000054
+7.230000	0.000052
+7.240000	0.000050
+7.250000	0.000048
+7.260000	0.000046
+7.270000	0.000044
+7.280000	0.000042
+7.290000	0.000040
+7.300000	0.000039
+7.310000	0.000037
+7.320000	0.000035
+7.330000	0.000034
+7.340000	0.000032
+7.350000	0.000031
+7.360000	0.000030
+7.370000	0.000028
+7.380000	0.000027
+7.390000	0.000026
+7.400000	0.000025
+7.410000	0.000024
+7.420000	0.000023
+7.430000	0.000022
+7.440000	0.000021
+7.450000	0.000020
+7.460000	0.000019
+7.470000	0.000018
+7.480000	0.000017
+7.490000	0.000017
+7.500000	0.000016
+7.510000	0.000015
+7.520000	0.000015
+7.530000	0.000014
+7.540000	0.000013
+7.550000	0.000013
+7.560000	0.000012
+7.570000	0.000012
+7.580000	0.000011
+7.590000	0.000011
+7.600000	0.000010
+7.610000	0.000010
+7.620000	0.000009
+7.630000	0.000009
+7.640000	0.000008
+7.650000	0.000008
+7.660000	0.000008
+7.670000	0.000007
+7.680000	0.000007
+7.690000	0.000007
+7.700000	0.000006
+7.710000	0.000006
+7.720000	0.000006
+7.730000	0.000006
+7.740000	0.000005
+7.750000	0.000005
+7.760000	0.000005
+7.770000	0.000005
+7.780000	0.000004
+7.790000	0.000004
+7.800000	0.000004
+7.810000	0.000004
+7.820000	0.000004
+7.830000	0.000003
+7.840000	0.000003
+7.850000	0.000003
+7.860000	0.000003
+7.870000	0.000003
+7.880000	0.000003
+7.890000	0.000003
+7.900000	0.000002
+7.910000	0.000002
+7.920000	0.000002
+7.930000	0.000002
+7.940000	0.000002
+7.950000	0.000002
+7.960000	0.000002
+7.970000	0.000002
+7.980000	0.000002
+7.990000	0.000002
+8.000000	0.000001
+8.010000	0.000001
+8.020000	0.000001
+8.030000	0.000001
+8.040000	0.000001
+8.050000	0.000001
+8.060000	0.000001
+8.070000	0.000001
+8.080000	0.000001
+8.090000	0.000001
+8.100000	0.000001
+8.110000	0.000001
+8.120000	0.000001
+8.130000	0.000001
+8.140000	0.000001
+8.150000	0.000001
+8.160000	0.000001
+8.170000	0.000001
+8.180000	0.000001
+8.190000	0.000001
+8.200000	0.000001
+8.210000	0.000001
+8.220000	0.000000
+8.230000	0.000000
+8.240000	0.000000
+8.250000	0.000000
+8.260000	0.000000
+8.270000	0.000000
+8.280000	0.000000
+8.290000	0.000000
+8.300000	0.000000
+8.310000	0.000000
+8.320000	0.000000
+8.330000	0.000000
+8.340000	0.000000
+8.350000	0.000000
+8.360000	0.000000
+8.370000	0.000000
+8.380000	0.000000
+8.390000	0.000000
+8.400000	0.000000
+8.410000	0.000000
+8.420000	0.000000
+8.430000	0.000000
+8.440000	0.000000
+8.450000	0.000000
+8.460000	0.000000
+8.470000	0.000000
+8.480000	0.000000
+8.490000	0.000000
+8.500000	0.000000
+8.510000	0.000000
+8.520000	0.000000
+8.530000	0.000000
+8.540000	0.000000
+8.550000	0.000000
+8.560000	0.000000
+8.570000	0.000000
+8.580000	0.000000
+8.590000	0.000000
+8.600000	0.000000
+8.610000	0.000000
+8.620000	0.000000
+8.630000	0.000000
+8.640000	0.000000
+8.650000	0.000000
+8.660000	0.000000
+8.670000	0.000000
+8.680000	0.000000
+8.690000	0.000000
+8.700000	0.000000
+8.710000	0.000000
+8.720000	0.000000
+8.730000	0.000000
+8.740000	0.000000
+8.750000	0.000000
+8.760000	0.000000
+8.770000	0.000000
+8.780000	0.000000
+8.790000	0.000000
+8.800000	0.000000
+8.810000	0.000000
+8.820000	0.000000
+8.830000	0.000000
+8.840000	0.000000
+8.850000	0.000000
+8.860000	0.000000
+8.870000	0.000000
+8.880000	0.000000
+8.890000	0.000000
+8.900000	0.000000
+8.910000	0.000000
+8.920000	0.000000
+8.930000	0.000000
+8.940000	0.000000
+8.950000	0.000000
+8.960000	0.000000
+8.970000	0.000000
+8.980000	0.000000
+8.990000	0.000000
+9.000000	0.000000
+9.010000	0.000000
+9.020000	0.000000
+9.030000	0.000000
+9.040000	0.000000
+9.050000	0.000000
+9.060000	0.000000
+9.070000	0.000000
+9.080000	0.000000
+9.090000	0.000000
+9.100000	0.000000
+9.110000	0.000000
+9.120000	0.000000
+9.130000	0.000000
+9.140000	0.000000
+9.150000	0.000000
+9.160000	0.000000
+9.170000	0.000000
+9.180000	0.000000
+9.190000	0.000000
+9.200000	0.000000
+9.210000	0.000000
+9.220000	0.000000
+9.230000	0.000000
+9.240000	0.000000
+9.250000	0.000000
+9.260000	0.000000
+9.270000	0.000000
+9.280000	0.000000
+9.290000	0.000000
+9.300000	0.000000
+9.310000	0.000000
+9.320000	0.000000
+9.330000	0.000000
+9.340000	0.000000
+9.350000	0.000000
+9.360000	0.000000
+9.370000	0.000000
+9.380000	0.000000
+9.390000	0.000000
+9.400000	0.000000
+9.410000	0.000000
+9.420000	0.000000
+9.430000	0.000000
+9.440000	0.000000
+9.450000	0.000000
+9.460000	0.000000
+9.470000	0.000000
+9.480000	0.000000
+9.490000	0.000000
+9.500000	0.000000
+9.510000	0.000000
+9.520000	0.000000
+9.530000	0.000000
+9.540000	0.000000
+9.550000	0.000000
+9.560000	0.000000
+9.570000	0.000000
+9.580000	0.000000
+9.590000	0.000000
+9.600000	0.000000
+9.610000	0.000000
+9.620000	0.000000
+9.630000	0.000000
+9.640000	0.000000
+9.650000	0.000000
+9.660000	0.000000
+9.670000	0.000000
+9.680000	0.000000
+9.690000	0.000000
+9.700000	0.000000
+9.710000	0.000000
+9.720000	0.000000
+9.730000	0.000000
+9.740000	0.000000
+9.750000	0.000000
+9.760000	0.000000
+9.770000	0.000000
+9.780000	0.000000
+9.790000	0.000000
+9.800000	0.000000
+9.810000	0.000000
+9.820000	0.000000
+9.830000	0.000000
+9.840000	0.000000
+9.850000	0.000000
+9.860000	0.000000
+9.870000	0.000000
+9.880000	0.000000
+9.890000	0.000000
+9.900000	0.000000
+9.910000	0.000000
+9.920000	0.000000
+9.930000	0.000000
+9.940000	0.000000
+9.950000	0.000000
+9.960000	0.000000
+9.970000	0.000000
+9.980000	0.000000
+9.990000	0.000000
+10.000000	0.000000
+10.010000	0.000000
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/normal_5_2.dat b/v0.2-M1/chi/reference-manual/distribution_plots/normal_5_2.dat
new file mode 100644
index 0000000..ef5247c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/normal_5_2.dat
@@ -0,0 +1,1014 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.008764
+0.010000	0.008874
+0.020000	0.008986
+0.030000	0.009098
+0.040000	0.009212
+0.050000	0.009326
+0.060000	0.009442
+0.070000	0.009560
+0.080000	0.009678
+0.090000	0.009798
+0.100000	0.009919
+0.110000	0.010041
+0.120000	0.010164
+0.130000	0.010289
+0.140000	0.010415
+0.150000	0.010542
+0.160000	0.010670
+0.170000	0.010800
+0.180000	0.010931
+0.190000	0.011064
+0.200000	0.011197
+0.210000	0.011332
+0.220000	0.011469
+0.230000	0.011606
+0.240000	0.011745
+0.250000	0.011886
+0.260000	0.012028
+0.270000	0.012171
+0.280000	0.012316
+0.290000	0.012462
+0.300000	0.012609
+0.310000	0.012758
+0.320000	0.012908
+0.330000	0.013060
+0.340000	0.013213
+0.350000	0.013368
+0.360000	0.013524
+0.370000	0.013682
+0.380000	0.013841
+0.390000	0.014001
+0.400000	0.014164
+0.410000	0.014327
+0.420000	0.014492
+0.430000	0.014659
+0.440000	0.014827
+0.450000	0.014997
+0.460000	0.015168
+0.470000	0.015341
+0.480000	0.015516
+0.490000	0.015692
+0.500000	0.015870
+0.510000	0.016049
+0.520000	0.016230
+0.530000	0.016413
+0.540000	0.016597
+0.550000	0.016783
+0.560000	0.016970
+0.570000	0.017160
+0.580000	0.017350
+0.590000	0.017543
+0.600000	0.017737
+0.610000	0.017933
+0.620000	0.018131
+0.630000	0.018330
+0.640000	0.018531
+0.650000	0.018734
+0.660000	0.018939
+0.670000	0.019145
+0.680000	0.019353
+0.690000	0.019563
+0.700000	0.019775
+0.710000	0.019988
+0.720000	0.020204
+0.730000	0.020421
+0.740000	0.020640
+0.750000	0.020860
+0.760000	0.021083
+0.770000	0.021307
+0.780000	0.021534
+0.790000	0.021762
+0.800000	0.021992
+0.810000	0.022224
+0.820000	0.022457
+0.830000	0.022693
+0.840000	0.022931
+0.850000	0.023170
+0.860000	0.023411
+0.870000	0.023655
+0.880000	0.023900
+0.890000	0.024147
+0.900000	0.024396
+0.910000	0.024647
+0.920000	0.024900
+0.930000	0.025155
+0.940000	0.025412
+0.950000	0.025671
+0.960000	0.025932
+0.970000	0.026195
+0.980000	0.026460
+0.990000	0.026727
+1.000000	0.026995
+1.010000	0.027266
+1.020000	0.027539
+1.030000	0.027814
+1.040000	0.028092
+1.050000	0.028371
+1.060000	0.028652
+1.070000	0.028935
+1.080000	0.029220
+1.090000	0.029508
+1.100000	0.029797
+1.110000	0.030089
+1.120000	0.030383
+1.130000	0.030678
+1.140000	0.030976
+1.150000	0.031276
+1.160000	0.031578
+1.170000	0.031882
+1.180000	0.032189
+1.190000	0.032497
+1.200000	0.032808
+1.210000	0.033121
+1.220000	0.033436
+1.230000	0.033753
+1.240000	0.034072
+1.250000	0.034393
+1.260000	0.034717
+1.270000	0.035042
+1.280000	0.035370
+1.290000	0.035700
+1.300000	0.036032
+1.310000	0.036367
+1.320000	0.036703
+1.330000	0.037042
+1.340000	0.037383
+1.350000	0.037726
+1.360000	0.038072
+1.370000	0.038419
+1.380000	0.038769
+1.390000	0.039121
+1.400000	0.039475
+1.410000	0.039831
+1.420000	0.040190
+1.430000	0.040551
+1.440000	0.040914
+1.450000	0.041279
+1.460000	0.041647
+1.470000	0.042016
+1.480000	0.042388
+1.490000	0.042762
+1.500000	0.043139
+1.510000	0.043517
+1.520000	0.043898
+1.530000	0.044281
+1.540000	0.044666
+1.550000	0.045054
+1.560000	0.045443
+1.570000	0.045835
+1.580000	0.046230
+1.590000	0.046626
+1.600000	0.047025
+1.610000	0.047425
+1.620000	0.047828
+1.630000	0.048234
+1.640000	0.048641
+1.650000	0.049051
+1.660000	0.049463
+1.670000	0.049877
+1.680000	0.050293
+1.690000	0.050712
+1.700000	0.051132
+1.710000	0.051555
+1.720000	0.051981
+1.730000	0.052408
+1.740000	0.052837
+1.750000	0.053269
+1.760000	0.053703
+1.770000	0.054139
+1.780000	0.054577
+1.790000	0.055018
+1.800000	0.055460
+1.810000	0.055905
+1.820000	0.056352
+1.830000	0.056801
+1.840000	0.057252
+1.850000	0.057706
+1.860000	0.058161
+1.870000	0.058619
+1.880000	0.059079
+1.890000	0.059541
+1.900000	0.060005
+1.910000	0.060471
+1.920000	0.060939
+1.930000	0.061409
+1.940000	0.061881
+1.950000	0.062356
+1.960000	0.062832
+1.970000	0.063311
+1.980000	0.063791
+1.990000	0.064274
+2.000000	0.064759
+2.010000	0.065245
+2.020000	0.065734
+2.030000	0.066225
+2.040000	0.066718
+2.050000	0.067212
+2.060000	0.067709
+2.070000	0.068208
+2.080000	0.068708
+2.090000	0.069211
+2.100000	0.069715
+2.110000	0.070222
+2.120000	0.070730
+2.130000	0.071240
+2.140000	0.071752
+2.150000	0.072266
+2.160000	0.072782
+2.170000	0.073300
+2.180000	0.073819
+2.190000	0.074341
+2.200000	0.074864
+2.210000	0.075389
+2.220000	0.075915
+2.230000	0.076444
+2.240000	0.076974
+2.250000	0.077506
+2.260000	0.078040
+2.270000	0.078575
+2.280000	0.079112
+2.290000	0.079651
+2.300000	0.080192
+2.310000	0.080734
+2.320000	0.081278
+2.330000	0.081823
+2.340000	0.082370
+2.350000	0.082918
+2.360000	0.083469
+2.370000	0.084020
+2.380000	0.084573
+2.390000	0.085128
+2.400000	0.085684
+2.410000	0.086242
+2.420000	0.086801
+2.430000	0.087362
+2.440000	0.087924
+2.450000	0.088487
+2.460000	0.089052
+2.470000	0.089618
+2.480000	0.090186
+2.490000	0.090754
+2.500000	0.091325
+2.510000	0.091896
+2.520000	0.092469
+2.530000	0.093043
+2.540000	0.093618
+2.550000	0.094194
+2.560000	0.094772
+2.570000	0.095350
+2.580000	0.095930
+2.590000	0.096511
+2.600000	0.097093
+2.610000	0.097676
+2.620000	0.098260
+2.630000	0.098845
+2.640000	0.099432
+2.650000	0.100019
+2.660000	0.100607
+2.670000	0.101196
+2.680000	0.101786
+2.690000	0.102376
+2.700000	0.102968
+2.710000	0.103561
+2.720000	0.104154
+2.730000	0.104748
+2.740000	0.105343
+2.750000	0.105938
+2.760000	0.106535
+2.770000	0.107132
+2.780000	0.107729
+2.790000	0.108327
+2.800000	0.108926
+2.810000	0.109525
+2.820000	0.110125
+2.830000	0.110726
+2.840000	0.111327
+2.850000	0.111928
+2.860000	0.112530
+2.870000	0.113132
+2.880000	0.113735
+2.890000	0.114338
+2.900000	0.114941
+2.910000	0.115545
+2.920000	0.116149
+2.930000	0.116753
+2.940000	0.117357
+2.950000	0.117961
+2.960000	0.118566
+2.970000	0.119171
+2.980000	0.119776
+2.990000	0.120380
+3.000000	0.120985
+3.010000	0.121590
+3.020000	0.122195
+3.030000	0.122800
+3.040000	0.123405
+3.050000	0.124009
+3.060000	0.124614
+3.070000	0.125218
+3.080000	0.125822
+3.090000	0.126426
+3.100000	0.127030
+3.110000	0.127633
+3.120000	0.128236
+3.130000	0.128838
+3.140000	0.129440
+3.150000	0.130042
+3.160000	0.130643
+3.170000	0.131244
+3.180000	0.131844
+3.190000	0.132444
+3.200000	0.133043
+3.210000	0.133641
+3.220000	0.134239
+3.230000	0.134836
+3.240000	0.135432
+3.250000	0.136027
+3.260000	0.136622
+3.270000	0.137216
+3.280000	0.137809
+3.290000	0.138401
+3.300000	0.138992
+3.310000	0.139583
+3.320000	0.140172
+3.330000	0.140760
+3.340000	0.141347
+3.350000	0.141933
+3.360000	0.142518
+3.370000	0.143102
+3.380000	0.143684
+3.390000	0.144266
+3.400000	0.144846
+3.410000	0.145425
+3.420000	0.146002
+3.430000	0.146578
+3.440000	0.147153
+3.450000	0.147726
+3.460000	0.148297
+3.470000	0.148868
+3.480000	0.149436
+3.490000	0.150003
+3.500000	0.150569
+3.510000	0.151133
+3.520000	0.151695
+3.530000	0.152255
+3.540000	0.152814
+3.550000	0.153371
+3.560000	0.153926
+3.570000	0.154479
+3.580000	0.155030
+3.590000	0.155580
+3.600000	0.156127
+3.610000	0.156672
+3.620000	0.157216
+3.630000	0.157757
+3.640000	0.158296
+3.650000	0.158834
+3.660000	0.159369
+3.670000	0.159901
+3.680000	0.160432
+3.690000	0.160960
+3.700000	0.161486
+3.710000	0.162010
+3.720000	0.162531
+3.730000	0.163050
+3.740000	0.163566
+3.750000	0.164080
+3.760000	0.164592
+3.770000	0.165101
+3.780000	0.165607
+3.790000	0.166111
+3.800000	0.166612
+3.810000	0.167111
+3.820000	0.167607
+3.830000	0.168100
+3.840000	0.168590
+3.850000	0.169077
+3.860000	0.169562
+3.870000	0.170044
+3.880000	0.170523
+3.890000	0.170999
+3.900000	0.171472
+3.910000	0.171942
+3.920000	0.172409
+3.930000	0.172873
+3.940000	0.173334
+3.950000	0.173792
+3.960000	0.174246
+3.970000	0.174698
+3.980000	0.175146
+3.990000	0.175591
+4.000000	0.176033
+4.010000	0.176471
+4.020000	0.176906
+4.030000	0.177338
+4.040000	0.177766
+4.050000	0.178191
+4.060000	0.178613
+4.070000	0.179031
+4.080000	0.179445
+4.090000	0.179856
+4.100000	0.180263
+4.110000	0.180667
+4.120000	0.181067
+4.130000	0.181464
+4.140000	0.181857
+4.150000	0.182246
+4.160000	0.182631
+4.170000	0.183013
+4.180000	0.183391
+4.190000	0.183765
+4.200000	0.184135
+4.210000	0.184501
+4.220000	0.184864
+4.230000	0.185222
+4.240000	0.185577
+4.250000	0.185928
+4.260000	0.186274
+4.270000	0.186617
+4.280000	0.186955
+4.290000	0.187290
+4.300000	0.187620
+4.310000	0.187946
+4.320000	0.188269
+4.330000	0.188587
+4.340000	0.188900
+4.350000	0.189210
+4.360000	0.189515
+4.370000	0.189816
+4.380000	0.190113
+4.390000	0.190406
+4.400000	0.190694
+4.410000	0.190978
+4.420000	0.191257
+4.430000	0.191532
+4.440000	0.191803
+4.450000	0.192069
+4.460000	0.192331
+4.470000	0.192589
+4.480000	0.192842
+4.490000	0.193090
+4.500000	0.193334
+4.510000	0.193573
+4.520000	0.193808
+4.530000	0.194039
+4.540000	0.194264
+4.550000	0.194485
+4.560000	0.194702
+4.570000	0.194914
+4.580000	0.195121
+4.590000	0.195323
+4.600000	0.195521
+4.610000	0.195715
+4.620000	0.195903
+4.630000	0.196087
+4.640000	0.196266
+4.650000	0.196440
+4.660000	0.196610
+4.670000	0.196774
+4.680000	0.196934
+4.690000	0.197089
+4.700000	0.197240
+4.710000	0.197385
+4.720000	0.197526
+4.730000	0.197662
+4.740000	0.197793
+4.750000	0.197919
+4.760000	0.198040
+4.770000	0.198156
+4.780000	0.198268
+4.790000	0.198375
+4.800000	0.198476
+4.810000	0.198573
+4.820000	0.198665
+4.830000	0.198752
+4.840000	0.198834
+4.850000	0.198911
+4.860000	0.198983
+4.870000	0.199050
+4.880000	0.199112
+4.890000	0.199170
+4.900000	0.199222
+4.910000	0.199269
+4.920000	0.199312
+4.930000	0.199349
+4.940000	0.199381
+4.950000	0.199409
+4.960000	0.199431
+4.970000	0.199449
+4.980000	0.199461
+4.990000	0.199469
+5.000000	0.199471
+5.010000	0.199469
+5.020000	0.199461
+5.030000	0.199449
+5.040000	0.199431
+5.050000	0.199409
+5.060000	0.199381
+5.070000	0.199349
+5.080000	0.199312
+5.090000	0.199269
+5.100000	0.199222
+5.110000	0.199170
+5.120000	0.199112
+5.130000	0.199050
+5.140000	0.198983
+5.150000	0.198911
+5.160000	0.198834
+5.170000	0.198752
+5.180000	0.198665
+5.190000	0.198573
+5.200000	0.198476
+5.210000	0.198375
+5.220000	0.198268
+5.230000	0.198156
+5.240000	0.198040
+5.250000	0.197919
+5.260000	0.197793
+5.270000	0.197662
+5.280000	0.197526
+5.290000	0.197385
+5.300000	0.197240
+5.310000	0.197089
+5.320000	0.196934
+5.330000	0.196774
+5.340000	0.196610
+5.350000	0.196440
+5.360000	0.196266
+5.370000	0.196087
+5.380000	0.195903
+5.390000	0.195715
+5.400000	0.195521
+5.410000	0.195323
+5.420000	0.195121
+5.430000	0.194914
+5.440000	0.194702
+5.450000	0.194485
+5.460000	0.194264
+5.470000	0.194039
+5.480000	0.193808
+5.490000	0.193573
+5.500000	0.193334
+5.510000	0.193090
+5.520000	0.192842
+5.530000	0.192589
+5.540000	0.192331
+5.550000	0.192069
+5.560000	0.191803
+5.570000	0.191532
+5.580000	0.191257
+5.590000	0.190978
+5.600000	0.190694
+5.610000	0.190406
+5.620000	0.190113
+5.630000	0.189816
+5.640000	0.189515
+5.650000	0.189210
+5.660000	0.188900
+5.670000	0.188587
+5.680000	0.188269
+5.690000	0.187946
+5.700000	0.187620
+5.710000	0.187290
+5.720000	0.186955
+5.730000	0.186617
+5.740000	0.186274
+5.750000	0.185928
+5.760000	0.185577
+5.770000	0.185222
+5.780000	0.184864
+5.790000	0.184501
+5.800000	0.184135
+5.810000	0.183765
+5.820000	0.183391
+5.830000	0.183013
+5.840000	0.182631
+5.850000	0.182246
+5.860000	0.181857
+5.870000	0.181464
+5.880000	0.181067
+5.890000	0.180667
+5.900000	0.180263
+5.910000	0.179856
+5.920000	0.179445
+5.930000	0.179031
+5.940000	0.178613
+5.950000	0.178191
+5.960000	0.177766
+5.970000	0.177338
+5.980000	0.176906
+5.990000	0.176471
+6.000000	0.176033
+6.010000	0.175591
+6.020000	0.175146
+6.030000	0.174698
+6.040000	0.174246
+6.050000	0.173792
+6.060000	0.173334
+6.070000	0.172873
+6.080000	0.172409
+6.090000	0.171942
+6.100000	0.171472
+6.110000	0.170999
+6.120000	0.170523
+6.130000	0.170044
+6.140000	0.169562
+6.150000	0.169077
+6.160000	0.168590
+6.170000	0.168100
+6.180000	0.167607
+6.190000	0.167111
+6.200000	0.166612
+6.210000	0.166111
+6.220000	0.165607
+6.230000	0.165101
+6.240000	0.164592
+6.250000	0.164080
+6.260000	0.163566
+6.270000	0.163050
+6.280000	0.162531
+6.290000	0.162010
+6.300000	0.161486
+6.310000	0.160960
+6.320000	0.160432
+6.330000	0.159901
+6.340000	0.159369
+6.350000	0.158834
+6.360000	0.158296
+6.370000	0.157757
+6.380000	0.157216
+6.390000	0.156672
+6.400000	0.156127
+6.410000	0.155580
+6.420000	0.155030
+6.430000	0.154479
+6.440000	0.153926
+6.450000	0.153371
+6.460000	0.152814
+6.470000	0.152255
+6.480000	0.151695
+6.490000	0.151133
+6.500000	0.150569
+6.510000	0.150003
+6.520000	0.149436
+6.530000	0.148868
+6.540000	0.148297
+6.550000	0.147726
+6.560000	0.147153
+6.570000	0.146578
+6.580000	0.146002
+6.590000	0.145425
+6.600000	0.144846
+6.610000	0.144266
+6.620000	0.143684
+6.630000	0.143102
+6.640000	0.142518
+6.650000	0.141933
+6.660000	0.141347
+6.670000	0.140760
+6.680000	0.140172
+6.690000	0.139583
+6.700000	0.138992
+6.710000	0.138401
+6.720000	0.137809
+6.730000	0.137216
+6.740000	0.136622
+6.750000	0.136027
+6.760000	0.135432
+6.770000	0.134836
+6.780000	0.134239
+6.790000	0.133641
+6.800000	0.133043
+6.810000	0.132444
+6.820000	0.131844
+6.830000	0.131244
+6.840000	0.130643
+6.850000	0.130042
+6.860000	0.129440
+6.870000	0.128838
+6.880000	0.128236
+6.890000	0.127633
+6.900000	0.127030
+6.910000	0.126426
+6.920000	0.125822
+6.930000	0.125218
+6.940000	0.124614
+6.950000	0.124009
+6.960000	0.123405
+6.970000	0.122800
+6.980000	0.122195
+6.990000	0.121590
+7.000000	0.120985
+7.010000	0.120380
+7.020000	0.119776
+7.030000	0.119171
+7.040000	0.118566
+7.050000	0.117961
+7.060000	0.117357
+7.070000	0.116753
+7.080000	0.116149
+7.090000	0.115545
+7.100000	0.114941
+7.110000	0.114338
+7.120000	0.113735
+7.130000	0.113132
+7.140000	0.112530
+7.150000	0.111928
+7.160000	0.111327
+7.170000	0.110726
+7.180000	0.110125
+7.190000	0.109525
+7.200000	0.108926
+7.210000	0.108327
+7.220000	0.107729
+7.230000	0.107132
+7.240000	0.106535
+7.250000	0.105938
+7.260000	0.105343
+7.270000	0.104748
+7.280000	0.104154
+7.290000	0.103561
+7.300000	0.102968
+7.310000	0.102376
+7.320000	0.101786
+7.330000	0.101196
+7.340000	0.100607
+7.350000	0.100019
+7.360000	0.099432
+7.370000	0.098845
+7.380000	0.098260
+7.390000	0.097676
+7.400000	0.097093
+7.410000	0.096511
+7.420000	0.095930
+7.430000	0.095350
+7.440000	0.094772
+7.450000	0.094194
+7.460000	0.093618
+7.470000	0.093043
+7.480000	0.092469
+7.490000	0.091896
+7.500000	0.091325
+7.510000	0.090754
+7.520000	0.090186
+7.530000	0.089618
+7.540000	0.089052
+7.550000	0.088487
+7.560000	0.087924
+7.570000	0.087362
+7.580000	0.086801
+7.590000	0.086242
+7.600000	0.085684
+7.610000	0.085128
+7.620000	0.084573
+7.630000	0.084020
+7.640000	0.083469
+7.650000	0.082918
+7.660000	0.082370
+7.670000	0.081823
+7.680000	0.081278
+7.690000	0.080734
+7.700000	0.080192
+7.710000	0.079651
+7.720000	0.079112
+7.730000	0.078575
+7.740000	0.078040
+7.750000	0.077506
+7.760000	0.076974
+7.770000	0.076444
+7.780000	0.075915
+7.790000	0.075389
+7.800000	0.074864
+7.810000	0.074341
+7.820000	0.073819
+7.830000	0.073300
+7.840000	0.072782
+7.850000	0.072266
+7.860000	0.071752
+7.870000	0.071240
+7.880000	0.070730
+7.890000	0.070222
+7.900000	0.069715
+7.910000	0.069211
+7.920000	0.068708
+7.930000	0.068208
+7.940000	0.067709
+7.950000	0.067212
+7.960000	0.066718
+7.970000	0.066225
+7.980000	0.065734
+7.990000	0.065245
+8.000000	0.064759
+8.010000	0.064274
+8.020000	0.063791
+8.030000	0.063311
+8.040000	0.062832
+8.050000	0.062356
+8.060000	0.061881
+8.070000	0.061409
+8.080000	0.060939
+8.090000	0.060471
+8.100000	0.060005
+8.110000	0.059541
+8.120000	0.059079
+8.130000	0.058619
+8.140000	0.058161
+8.150000	0.057706
+8.160000	0.057252
+8.170000	0.056801
+8.180000	0.056352
+8.190000	0.055905
+8.200000	0.055460
+8.210000	0.055018
+8.220000	0.054577
+8.230000	0.054139
+8.240000	0.053703
+8.250000	0.053269
+8.260000	0.052837
+8.270000	0.052408
+8.280000	0.051981
+8.290000	0.051555
+8.300000	0.051132
+8.310000	0.050712
+8.320000	0.050293
+8.330000	0.049877
+8.340000	0.049463
+8.350000	0.049051
+8.360000	0.048641
+8.370000	0.048234
+8.380000	0.047828
+8.390000	0.047425
+8.400000	0.047025
+8.410000	0.046626
+8.420000	0.046230
+8.430000	0.045835
+8.440000	0.045443
+8.450000	0.045054
+8.460000	0.044666
+8.470000	0.044281
+8.480000	0.043898
+8.490000	0.043517
+8.500000	0.043139
+8.510000	0.042762
+8.520000	0.042388
+8.530000	0.042016
+8.540000	0.041647
+8.550000	0.041279
+8.560000	0.040914
+8.570000	0.040551
+8.580000	0.040190
+8.590000	0.039831
+8.600000	0.039475
+8.610000	0.039121
+8.620000	0.038769
+8.630000	0.038419
+8.640000	0.038072
+8.650000	0.037726
+8.660000	0.037383
+8.670000	0.037042
+8.680000	0.036703
+8.690000	0.036367
+8.700000	0.036032
+8.710000	0.035700
+8.720000	0.035370
+8.730000	0.035042
+8.740000	0.034717
+8.750000	0.034393
+8.760000	0.034072
+8.770000	0.033753
+8.780000	0.033436
+8.790000	0.033121
+8.800000	0.032808
+8.810000	0.032497
+8.820000	0.032189
+8.830000	0.031882
+8.840000	0.031578
+8.850000	0.031276
+8.860000	0.030976
+8.870000	0.030678
+8.880000	0.030383
+8.890000	0.030089
+8.900000	0.029797
+8.910000	0.029508
+8.920000	0.029220
+8.930000	0.028935
+8.940000	0.028652
+8.950000	0.028371
+8.960000	0.028092
+8.970000	0.027814
+8.980000	0.027539
+8.990000	0.027266
+9.000000	0.026995
+9.010000	0.026727
+9.020000	0.026460
+9.030000	0.026195
+9.040000	0.025932
+9.050000	0.025671
+9.060000	0.025412
+9.070000	0.025155
+9.080000	0.024900
+9.090000	0.024647
+9.100000	0.024396
+9.110000	0.024147
+9.120000	0.023900
+9.130000	0.023655
+9.140000	0.023411
+9.150000	0.023170
+9.160000	0.022931
+9.170000	0.022693
+9.180000	0.022457
+9.190000	0.022224
+9.200000	0.021992
+9.210000	0.021762
+9.220000	0.021534
+9.230000	0.021307
+9.240000	0.021083
+9.250000	0.020860
+9.260000	0.020640
+9.270000	0.020421
+9.280000	0.020204
+9.290000	0.019988
+9.300000	0.019775
+9.310000	0.019563
+9.320000	0.019353
+9.330000	0.019145
+9.340000	0.018939
+9.350000	0.018734
+9.360000	0.018531
+9.370000	0.018330
+9.380000	0.018131
+9.390000	0.017933
+9.400000	0.017737
+9.410000	0.017543
+9.420000	0.017350
+9.430000	0.017160
+9.440000	0.016970
+9.450000	0.016783
+9.460000	0.016597
+9.470000	0.016413
+9.480000	0.016230
+9.490000	0.016049
+9.500000	0.015870
+9.510000	0.015692
+9.520000	0.015516
+9.530000	0.015341
+9.540000	0.015168
+9.550000	0.014997
+9.560000	0.014827
+9.570000	0.014659
+9.580000	0.014492
+9.590000	0.014327
+9.600000	0.014164
+9.610000	0.014001
+9.620000	0.013841
+9.630000	0.013682
+9.640000	0.013524
+9.650000	0.013368
+9.660000	0.013213
+9.670000	0.013060
+9.680000	0.012908
+9.690000	0.012758
+9.700000	0.012609
+9.710000	0.012462
+9.720000	0.012316
+9.730000	0.012171
+9.740000	0.012028
+9.750000	0.011886
+9.760000	0.011745
+9.770000	0.011606
+9.780000	0.011469
+9.790000	0.011332
+9.800000	0.011197
+9.810000	0.011064
+9.820000	0.010931
+9.830000	0.010800
+9.840000	0.010670
+9.850000	0.010542
+9.860000	0.010415
+9.870000	0.010289
+9.880000	0.010164
+9.890000	0.010041
+9.900000	0.009919
+9.910000	0.009798
+9.920000	0.009678
+9.930000	0.009560
+9.940000	0.009442
+9.950000	0.009326
+9.960000	0.009212
+9.970000	0.009098
+9.980000	0.008986
+9.990000	0.008874
+10.000000	0.008764
+10.010000	0.008655
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/poisson.plt b/v0.2-M1/chi/reference-manual/distribution_plots/poisson.plt
new file mode 100644
index 0000000..79ec045
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/poisson.plt
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+#set xrange [0:10]
+set yrange [0:0.22]
+set xlabel "x"
+set ylabel "poisson(real lambda)"
+#set samples 2000
+set output "poisson.svg"
+set nokey
+set label "poisson(4.0)" at 4.4, 0.18
+set label "poisson(10.0)" at 11.5, 0.11
+set style data impulses
+plot "poisson_4.0.dat" using 1:2 with impulses linetype 1, \
+     "poisson_4.0.dat" using 1:2 with points linetype 1, \
+     "poisson_10.0.dat" using 1:2 with impulses linetype 2, \
+     "poisson_10.0.dat" using 1:2 with points linetype 2
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/poisson.svg b/v0.2-M1/chi/reference-manual/distribution_plots/poisson.svg
new file mode 100644
index 0000000..0f35eee
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/poisson.svg
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg 
+ width="600" height="480"
+ viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>Gnuplot</title>
+<desc>Produced by GNUPLOT 5.2 patchlevel 2 </desc>
+
+<g id="gnuplot_canvas">
+
+<rect x="0" y="0" width="600" height="480" fill="none"/>
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+	<path id='gpPt13' stroke-width='0.222' stroke='currentColor' d='M0,1.330 L1.265,0.411 L0.782,-1.067 L-0.782,-1.076 L-1.265,0.411 z'/>
+	<use xlink:href='#gpPt13' id='gpPt14' fill='currentColor' stroke='none'/>
+	<filter id='textbox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>
+	  <feFlood flood-color='white' flood-opacity='1' result='bgnd'/>
+	  <feComposite in='SourceGraphic' in2='bgnd' operator='atop'/>
+	</filter>
+	<filter id='greybox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>
+	  <feFlood flood-color='lightgrey' flood-opacity='1' result='grey'/>
+	  <feComposite in='SourceGraphic' in2='grey' operator='atop'/>
+	</filter>
+</defs>
+<g fill="none" color="white" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M80.2,422.4 L89.2,422.4 M575.0,422.4 L566.0,422.4  '/>	<g transform="translate(71.9,426.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="end">
+		<text><tspan font-family="Arial" > 0</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M80.2,330.5 L89.2,330.5 M575.0,330.5 L566.0,330.5  '/>	<g transform="translate(71.9,334.4)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="end">
+		<text><tspan font-family="Arial" > 0.05</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M80.2,238.6 L89.2,238.6 M575.0,238.6 L566.0,238.6  '/>	<g transform="translate(71.9,242.5)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="end">
+		<text><tspan font-family="Arial" > 0.1</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M80.2,146.7 L89.2,146.7 M575.0,146.7 L566.0,146.7  '/>	<g transform="translate(71.9,150.6)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="end">
+		<text><tspan font-family="Arial" > 0.15</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M80.2,54.9 L89.2,54.9 M575.0,54.9 L566.0,54.9  '/>	<g transform="translate(71.9,58.8)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="end">
+		<text><tspan font-family="Arial" > 0.2</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M80.2,422.4 L80.2,413.4 M80.2,18.1 L80.2,27.1  '/>	<g transform="translate(80.2,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 0</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M129.7,422.4 L129.7,413.4 M129.7,18.1 L129.7,27.1  '/>	<g transform="translate(129.7,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 2</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M179.2,422.4 L179.2,413.4 M179.2,18.1 L179.2,27.1  '/>	<g transform="translate(179.2,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 4</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M228.6,422.4 L228.6,413.4 M228.6,18.1 L228.6,27.1  '/>	<g transform="translate(228.6,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 6</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M278.1,422.4 L278.1,413.4 M278.1,18.1 L278.1,27.1  '/>	<g transform="translate(278.1,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 8</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M327.6,422.4 L327.6,413.4 M327.6,18.1 L327.6,27.1  '/>	<g transform="translate(327.6,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 10</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M377.1,422.4 L377.1,413.4 M377.1,18.1 L377.1,27.1  '/>	<g transform="translate(377.1,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 12</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M426.6,422.4 L426.6,413.4 M426.6,18.1 L426.6,27.1  '/>	<g transform="translate(426.6,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 14</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M476.0,422.4 L476.0,413.4 M476.0,18.1 L476.0,27.1  '/>	<g transform="translate(476.0,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 16</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M525.5,422.4 L525.5,413.4 M525.5,18.1 L525.5,27.1  '/>	<g transform="translate(525.5,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 18</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M575.0,422.4 L575.0,413.4 M575.0,18.1 L575.0,27.1  '/>	<g transform="translate(575.0,444.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" > 20</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M80.2,18.1 L80.2,422.4 L575.0,422.4 L575.0,18.1 L80.2,18.1 Z  '/>	<g transform="translate(189.1,95.5)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="start">
+		<text><tspan font-family="Arial" >poisson(4.0)</tspan></text>
+	</g>
+	<g transform="translate(364.7,224.1)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="start">
+		<text><tspan font-family="Arial" >poisson(10.0)</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<g transform="translate(16.3,220.3) rotate(270)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" >poisson(real lambda)</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<g transform="translate(327.6,471.3)" stroke="none" fill="black" font-family="Arial" font-size="12.00"  text-anchor="middle">
+		<text><tspan font-family="Arial" >x</tspan></text>
+	</g>
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+	<g id="gnuplot_plot_1" ><title>"poisson_4.0.dat" using 1:2</title>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='rgb(148,   0, 211)'  d='M80.2,422.4 L80.2,388.7 M104.9,422.4 L104.9,287.8 M129.7,422.4 L129.7,153.1 M154.4,422.4 L154.4,63.4
+		M179.2,422.4 L179.2,63.4 M203.9,422.4 L203.9,135.2 M228.6,422.4 L228.6,230.9 M253.4,422.4 L253.4,313.0
+		M278.1,422.4 L278.1,367.7 M302.9,422.4 L302.9,398.1 M327.6,422.4 L327.6,412.7 M352.3,422.4 L352.3,418.9
+		M377.1,422.4 L377.1,421.2 M401.8,422.4 L401.8,422.0 M426.6,422.4 L426.6,422.3 M451.3,422.4 M476.0,422.4
+		M500.8,422.4 M525.5,422.4 M550.3,422.4  '/></g>
+	</g>
+	<g id="gnuplot_plot_2" ><title>"poisson_4.0.dat" using 1:2</title>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<use xlink:href='#gpPt0' transform='translate(80.2,388.7) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(104.9,287.8) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(129.7,153.1) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(154.4,63.4) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(179.2,63.4) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(203.9,135.2) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(228.6,230.9) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(253.4,313.0) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(278.1,367.7) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(302.9,398.1) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(327.6,412.7) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(352.3,418.9) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(377.1,421.2) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(401.8,422.0) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(426.6,422.3) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(451.3,422.4) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(476.0,422.4) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(500.8,422.4) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(525.5,422.4) scale(4.50)' color='rgb(148,   0, 211)'/>
+	<use xlink:href='#gpPt0' transform='translate(550.3,422.4) scale(4.50)' color='rgb(148,   0, 211)'/>
+</g>
+	</g>
+	<g id="gnuplot_plot_3" ><title>"poisson_10.0.dat" using 1:2</title>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='rgb(  0, 158, 115)'  d='M80.2,422.4 L80.2,422.3 M104.9,422.4 L104.9,421.6 M129.7,422.4 L129.7,418.2 M154.4,422.4 L154.4,408.5
+		M179.2,422.4 L179.2,387.6 M203.9,422.4 L203.9,352.9 M228.6,422.4 L228.6,306.5 M253.4,422.4 L253.4,256.9
+		M278.1,422.4 L278.1,215.5 M302.9,422.4 L302.9,192.5 M327.6,422.4 L327.6,192.5 M352.3,422.4 L352.3,213.4
+		M377.1,422.4 L377.1,248.2 M401.8,422.4 L401.8,288.4 M426.6,422.4 L426.6,326.7 M451.3,422.4 L451.3,358.6
+		M476.0,422.4 L476.0,382.5 M500.8,422.4 L500.8,398.9 M525.5,422.4 L525.5,409.4 M550.3,422.4 L550.3,415.5
+		 '/></g>
+	</g>
+	<g id="gnuplot_plot_4" ><title>"poisson_10.0.dat" using 1:2</title>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<use xlink:href='#gpPt1' transform='translate(80.2,422.3) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(104.9,421.6) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(129.7,418.2) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(154.4,408.5) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(179.2,387.6) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(203.9,352.9) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(228.6,306.5) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(253.4,256.9) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(278.1,215.5) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(302.9,192.5) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(327.6,192.5) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(352.3,213.4) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(377.1,248.2) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(401.8,288.4) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(426.6,326.7) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(451.3,358.6) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(476.0,382.5) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(500.8,398.9) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(525.5,409.4) scale(4.50)' color='rgb(  0, 158, 115)'/>
+	<use xlink:href='#gpPt1' transform='translate(550.3,415.5) scale(4.50)' color='rgb(  0, 158, 115)'/>
+</g>
+	</g>
+<g fill="none" color="white" stroke="rgb(  0, 158, 115)" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="black" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+	<path stroke='black'  d='M80.2,18.1 L80.2,422.4 L575.0,422.4 L575.0,18.1 L80.2,18.1 Z  '/></g>
+<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
+</g>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/poisson_10.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/poisson_10.0.dat
new file mode 100644
index 0000000..2a9fb78
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/poisson_10.0.dat
@@ -0,0 +1,32 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0	0.000045
+1	0.000454
+2	0.002270
+3	0.007567
+4	0.018917
+5	0.037833
+6	0.063055
+7	0.090079
+8	0.112599
+9	0.125110
+10	0.125110
+11	0.113736
+12	0.094780
+13	0.072908
+14	0.052077
+15	0.034718
+16	0.021699
+17	0.012764
+18	0.007091
+19	0.003732
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/poisson_4.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/poisson_4.0.dat
new file mode 100644
index 0000000..4e7f40c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/poisson_4.0.dat
@@ -0,0 +1,32 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0	0.018316
+1	0.073263
+2	0.146525
+3	0.195367
+4	0.195367
+5	0.156293
+6	0.104196
+7	0.059540
+8	0.029770
+9	0.013231
+10	0.005292
+11	0.001925
+12	0.000642
+13	0.000197
+14	0.000056
+15	0.000015
+16	0.000004
+17	0.000001
+18	0.000000
+19	0.000000
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/triangle.plt b/v0.2-M1/chi/reference-manual/distribution_plots/triangle.plt
new file mode 100644
index 0000000..fa6cf20
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/triangle.plt
@@ -0,0 +1,25 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+set xrange [0:5]
+set yrange [0:0.9]
+set xlabel "x"
+set ylabel "triangle(real a, b, c)"
+#set samples 2000
+set output "triangle.svg"
+set nokey
+set label "triangle(1.0, 2.0, 4.0)" at 2.5, 0.55
+set style data lines
+plot "triangle_1_2_4.dat" using 1:2 linetype 1
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/triangle.svg b/v0.2-M1/chi/reference-manual/distribution_plots/triangle.svg
new file mode 100644
index 0000000..dcfc83d
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/triangle.svg
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L80.9,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(63.6,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M71.9,377.3 L80.9,377.3 M575.0,377.3 L566.0,377.3 '></path>
+	<g transform="translate(63.6,381.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.1</text>
+	</g>
+	<path  d='M71.9,332.2 L80.9,332.2 M575.0,332.2 L566.0,332.2 '></path>
+	<g transform="translate(63.6,336.7)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.2</text>
+	</g>
+	<path  d='M71.9,287.2 L80.9,287.2 M575.0,287.2 L566.0,287.2 '></path>
+	<g transform="translate(63.6,291.7)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.3</text>
+	</g>
+	<path  d='M71.9,242.1 L80.9,242.1 M575.0,242.1 L566.0,242.1 '></path>
+	<g transform="translate(63.6,246.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.4</text>
+	</g>
+	<path  d='M71.9,197.0 L80.9,197.0 M575.0,197.0 L566.0,197.0 '></path>
+	<g transform="translate(63.6,201.5)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.5</text>
+	</g>
+	<path  d='M71.9,151.9 L80.9,151.9 M575.0,151.9 L566.0,151.9 '></path>
+	<g transform="translate(63.6,156.4)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.6</text>
+	</g>
+	<path  d='M71.9,106.9 L80.9,106.9 M575.0,106.9 L566.0,106.9 '></path>
+	<g transform="translate(63.6,111.4)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.7</text>
+	</g>
+	<path  d='M71.9,61.8 L80.9,61.8 M575.0,61.8 L566.0,61.8 '></path>
+	<g transform="translate(63.6,66.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.8</text>
+	</g>
+	<path  d='M71.9,16.7 L80.9,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(63.6,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.9</text>
+	</g>
+	<path  d='M71.9,422.4 L71.9,413.4 M71.9,16.7 L71.9,25.7 '></path>
+	<g transform="translate(71.9,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0</text>
+	</g>
+	<path  d='M172.5,422.4 L172.5,413.4 M172.5,16.7 L172.5,25.7 '></path>
+	<g transform="translate(172.5,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 1</text>
+	</g>
+	<path  d='M273.1,422.4 L273.1,413.4 M273.1,16.7 L273.1,25.7 '></path>
+	<g transform="translate(273.1,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 2</text>
+	</g>
+	<path  d='M373.8,422.4 L373.8,413.4 M373.8,16.7 L373.8,25.7 '></path>
+	<g transform="translate(373.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 3</text>
+	</g>
+	<path  d='M474.4,422.4 L474.4,413.4 M474.4,16.7 L474.4,25.7 '></path>
+	<g transform="translate(474.4,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 4</text>
+	</g>
+	<path  d='M575.0,422.4 L575.0,413.4 M575.0,16.7 L575.0,25.7 '></path>
+	<g transform="translate(575.0,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 5</text>
+	</g>
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>triangle(real a, b, c)</text>
+	</g>
+	<g transform="translate(323.4,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(323.5,179.0)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>triangle(1.0, 2.0, 4.0)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M172.5,422.4 L173.5,419.4 L174.5,416.4 L175.5,413.4 L176.5,410.4 L177.6,407.4 L178.6,404.4 L179.6,401.4 
+		L180.6,398.4 L181.6,395.4 L182.6,392.3 L183.6,389.3 L184.6,386.3 L185.6,383.3 L186.6,380.3 L187.6,377.3 
+		L188.6,374.3 L189.6,371.3 L190.6,368.3 L191.6,365.3 L192.6,362.3 L193.7,359.3 L194.7,356.3 L195.7,353.3 
+		L196.7,350.3 L197.7,347.3 L198.7,344.3 L199.7,341.3 L200.7,338.3 L201.7,335.2 L202.7,332.2 L203.7,329.2 
+		L204.7,326.2 L205.7,323.2 L206.7,320.2 L207.7,317.2 L208.7,314.2 L209.7,311.2 L210.8,308.2 L211.8,305.2 
+		L212.8,302.2 L213.8,299.2 L214.8,296.2 L215.8,293.2 L216.8,290.2 L217.8,287.2 L218.8,284.2 L219.8,281.2 
+		L220.8,278.2 L221.8,275.1 L222.8,272.1 L223.8,269.1 L224.8,266.1 L225.8,263.1 L226.9,260.1 L227.9,257.1 
+		L228.9,254.1 L229.9,251.1 L230.9,248.1 L231.9,245.1 L232.9,242.1 L233.9,239.1 L234.9,236.1 L235.9,233.1 
+		L236.9,230.1 L237.9,227.1 L238.9,224.1 L239.9,221.1 L240.9,218.0 L241.9,215.0 L243.0,212.0 L244.0,209.0 
+		L245.0,206.0 L246.0,203.0 L247.0,200.0 L248.0,197.0 L249.0,194.0 L250.0,191.0 L251.0,188.0 L252.0,185.0 
+		L253.0,182.0 L254.0,179.0 L255.0,176.0 L256.0,173.0 L257.0,170.0 L258.0,167.0 L259.1,164.0 L260.1,160.9 
+		L261.1,157.9 L262.1,154.9 L263.1,151.9 L264.1,148.9 L265.1,145.9 L266.1,142.9 L267.1,139.9 L268.1,136.9 
+		L269.1,133.9 L270.1,130.9 L271.1,127.9 L272.1,124.9 L273.1,121.9 L274.1,123.4 L275.2,124.9 L276.2,126.4 
+		L277.2,127.9 L278.2,129.4 L279.2,130.9 L280.2,132.4 L281.2,133.9 L282.2,135.4 L283.2,136.9 L284.2,138.4 
+		L285.2,139.9 L286.2,141.4 L287.2,142.9 L288.2,144.4 L289.2,145.9 L290.2,147.4 L291.3,148.9 L292.3,150.4 
+		L293.3,151.9 L294.3,153.4 L295.3,154.9 L296.3,156.4 L297.3,157.9 L298.3,159.4 L299.3,160.9 L300.3,162.5 
+		L301.3,164.0 L302.3,165.5 L303.3,167.0 L304.3,168.5 L305.3,170.0 L306.3,171.5 L307.4,173.0 L308.4,174.5 
+		L309.4,176.0 L310.4,177.5 L311.4,179.0 L312.4,180.5 L313.4,182.0 L314.4,183.5 L315.4,185.0 L316.4,186.5 
+		L317.4,188.0 L318.4,189.5 L319.4,191.0 L320.4,192.5 L321.4,194.0 L322.4,195.5 L323.5,197.0 L324.5,198.5 
+		L325.5,200.0 L326.5,201.5 L327.5,203.0 L328.5,204.5 L329.5,206.0 L330.5,207.5 L331.5,209.0 L332.5,210.5 
+		L333.5,212.0 L334.5,213.5 L335.5,215.0 L336.5,216.5 L337.5,218.0 L338.5,219.6 L339.5,221.1 L340.6,222.6 
+		L341.6,224.1 L342.6,225.6 L343.6,227.1 L344.6,228.6 L345.6,230.1 L346.6,231.6 L347.6,233.1 L348.6,234.6 
+		L349.6,236.1 L350.6,237.6 L351.6,239.1 L352.6,240.6 L353.6,242.1 L354.6,243.6 L355.6,245.1 L356.7,246.6 
+		L357.7,248.1 L358.7,249.6 L359.7,251.1 L360.7,252.6 L361.7,254.1 L362.7,255.6 L363.7,257.1 L364.7,258.6 
+		L365.7,260.1 L366.7,261.6 L367.7,263.1 L368.7,264.6 L369.7,266.1 L370.7,267.6 L371.7,269.1 L372.8,270.6 
+		L373.8,272.1 L374.8,273.6 L375.8,275.1 L376.8,276.6 L377.8,278.2 L378.8,279.7 L379.8,281.2 L380.8,282.7 
+		L381.8,284.2 L382.8,285.7 L383.8,287.2 L384.8,288.7 L385.8,290.2 L386.8,291.7 L387.8,293.2 L388.9,294.7 
+		L389.9,296.2 L390.9,297.7 L391.9,299.2 L392.9,300.7 L393.9,302.2 L394.9,303.7 L395.9,305.2 L396.9,306.7 
+		L397.9,308.2 L398.9,309.7 L399.9,311.2 L400.9,312.7 L401.9,314.2 L402.9,315.7 L403.9,317.2 L405.0,318.7 
+		L406.0,320.2 L407.0,321.7 L408.0,323.2 L409.0,324.7 L410.0,326.2 L411.0,327.7 L412.0,329.2 L413.0,330.7 
+		L414.0,332.2 L415.0,333.7 L416.0,335.2 L417.0,336.8 L418.0,338.3 L419.0,339.8 L420.0,341.3 L421.1,342.8 
+		L422.1,344.3 L423.1,345.8 L424.1,347.3 L425.1,348.8 L426.1,350.3 L427.1,351.8 L428.1,353.3 L429.1,354.8 
+		L430.1,356.3 L431.1,357.8 L432.1,359.3 L433.1,360.8 L434.1,362.3 L435.1,363.8 L436.1,365.3 L437.2,366.8 
+		L438.2,368.3 L439.2,369.8 L440.2,371.3 L441.2,372.8 L442.2,374.3 L443.2,375.8 L444.2,377.3 L445.2,378.8 
+		L446.2,380.3 L447.2,381.8 L448.2,383.3 L449.2,384.8 L450.2,386.3 L451.2,387.8 L452.2,389.3 L453.2,390.8 
+		L454.3,392.3 L455.3,393.9 L456.3,395.4 L457.3,396.9 L458.3,398.4 L459.3,399.9 L460.3,401.4 L461.3,402.9 
+		L462.3,404.4 L463.3,405.9 L464.3,407.4 L465.3,408.9 L466.3,410.4 L467.3,411.9 L468.3,413.4 L469.3,414.9 
+		L470.4,416.4 L471.4,417.9 L472.4,419.4 L473.4,420.9 L474.4,422.4 L475.4,422.4 '></path>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/triangle_1_2_4.dat b/v0.2-M1/chi/reference-manual/distribution_plots/triangle_1_2_4.dat
new file mode 100644
index 0000000..aff020e
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/triangle_1_2_4.dat
@@ -0,0 +1,314 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+1.000000	0.000000
+1.010000	0.006667
+1.020000	0.013333
+1.030000	0.020000
+1.040000	0.026667
+1.050000	0.033333
+1.060000	0.040000
+1.070000	0.046667
+1.080000	0.053333
+1.090000	0.060000
+1.100000	0.066667
+1.110000	0.073333
+1.120000	0.080000
+1.130000	0.086667
+1.140000	0.093333
+1.150000	0.100000
+1.160000	0.106667
+1.170000	0.113333
+1.180000	0.120000
+1.190000	0.126667
+1.200000	0.133333
+1.210000	0.140000
+1.220000	0.146667
+1.230000	0.153333
+1.240000	0.160000
+1.250000	0.166667
+1.260000	0.173333
+1.270000	0.180000
+1.280000	0.186667
+1.290000	0.193333
+1.300000	0.200000
+1.310000	0.206667
+1.320000	0.213333
+1.330000	0.220000
+1.340000	0.226667
+1.350000	0.233333
+1.360000	0.240000
+1.370000	0.246667
+1.380000	0.253333
+1.390000	0.260000
+1.400000	0.266667
+1.410000	0.273333
+1.420000	0.280000
+1.430000	0.286667
+1.440000	0.293333
+1.450000	0.300000
+1.460000	0.306667
+1.470000	0.313333
+1.480000	0.320000
+1.490000	0.326667
+1.500000	0.333333
+1.510000	0.340000
+1.520000	0.346667
+1.530000	0.353333
+1.540000	0.360000
+1.550000	0.366667
+1.560000	0.373333
+1.570000	0.380000
+1.580000	0.386667
+1.590000	0.393333
+1.600000	0.400000
+1.610000	0.406667
+1.620000	0.413333
+1.630000	0.420000
+1.640000	0.426667
+1.650000	0.433333
+1.660000	0.440000
+1.670000	0.446667
+1.680000	0.453333
+1.690000	0.460000
+1.700000	0.466667
+1.710000	0.473333
+1.720000	0.480000
+1.730000	0.486667
+1.740000	0.493333
+1.750000	0.500000
+1.760000	0.506667
+1.770000	0.513333
+1.780000	0.520000
+1.790000	0.526667
+1.800000	0.533333
+1.810000	0.540000
+1.820000	0.546667
+1.830000	0.553333
+1.840000	0.560000
+1.850000	0.566667
+1.860000	0.573333
+1.870000	0.580000
+1.880000	0.586667
+1.890000	0.593333
+1.900000	0.600000
+1.910000	0.606667
+1.920000	0.613333
+1.930000	0.620000
+1.940000	0.626667
+1.950000	0.633333
+1.960000	0.640000
+1.970000	0.646667
+1.980000	0.653333
+1.990000	0.660000
+2.000000	0.666667
+2.010000	0.663333
+2.020000	0.660000
+2.030000	0.656667
+2.040000	0.653333
+2.050000	0.650000
+2.060000	0.646667
+2.070000	0.643333
+2.080000	0.640000
+2.090000	0.636667
+2.100000	0.633333
+2.110000	0.630000
+2.120000	0.626667
+2.130000	0.623333
+2.140000	0.620000
+2.150000	0.616667
+2.160000	0.613333
+2.170000	0.610000
+2.180000	0.606667
+2.190000	0.603333
+2.200000	0.600000
+2.210000	0.596667
+2.220000	0.593333
+2.230000	0.590000
+2.240000	0.586667
+2.250000	0.583333
+2.260000	0.580000
+2.270000	0.576667
+2.280000	0.573333
+2.290000	0.570000
+2.300000	0.566667
+2.310000	0.563333
+2.320000	0.560000
+2.330000	0.556667
+2.340000	0.553333
+2.350000	0.550000
+2.360000	0.546667
+2.370000	0.543333
+2.380000	0.540000
+2.390000	0.536667
+2.400000	0.533333
+2.410000	0.530000
+2.420000	0.526667
+2.430000	0.523333
+2.440000	0.520000
+2.450000	0.516667
+2.460000	0.513333
+2.470000	0.510000
+2.480000	0.506667
+2.490000	0.503333
+2.500000	0.500000
+2.510000	0.496667
+2.520000	0.493333
+2.530000	0.490000
+2.540000	0.486667
+2.550000	0.483333
+2.560000	0.480000
+2.570000	0.476667
+2.580000	0.473333
+2.590000	0.470000
+2.600000	0.466667
+2.610000	0.463333
+2.620000	0.460000
+2.630000	0.456667
+2.640000	0.453333
+2.650000	0.450000
+2.660000	0.446667
+2.670000	0.443333
+2.680000	0.440000
+2.690000	0.436667
+2.700000	0.433333
+2.710000	0.430000
+2.720000	0.426667
+2.730000	0.423333
+2.740000	0.420000
+2.750000	0.416667
+2.760000	0.413333
+2.770000	0.410000
+2.780000	0.406667
+2.790000	0.403333
+2.800000	0.400000
+2.810000	0.396667
+2.820000	0.393333
+2.830000	0.390000
+2.840000	0.386667
+2.850000	0.383333
+2.860000	0.380000
+2.870000	0.376667
+2.880000	0.373333
+2.890000	0.370000
+2.900000	0.366667
+2.910000	0.363333
+2.920000	0.360000
+2.930000	0.356667
+2.940000	0.353333
+2.950000	0.350000
+2.960000	0.346667
+2.970000	0.343333
+2.980000	0.340000
+2.990000	0.336667
+3.000000	0.333333
+3.010000	0.330000
+3.020000	0.326667
+3.030000	0.323333
+3.040000	0.320000
+3.050000	0.316667
+3.060000	0.313333
+3.070000	0.310000
+3.080000	0.306667
+3.090000	0.303333
+3.100000	0.300000
+3.110000	0.296667
+3.120000	0.293333
+3.130000	0.290000
+3.140000	0.286667
+3.150000	0.283333
+3.160000	0.280000
+3.170000	0.276667
+3.180000	0.273333
+3.190000	0.270000
+3.200000	0.266667
+3.210000	0.263333
+3.220000	0.260000
+3.230000	0.256667
+3.240000	0.253333
+3.250000	0.250000
+3.260000	0.246667
+3.270000	0.243333
+3.280000	0.240000
+3.290000	0.236667
+3.300000	0.233333
+3.310000	0.230000
+3.320000	0.226667
+3.330000	0.223333
+3.340000	0.220000
+3.350000	0.216667
+3.360000	0.213333
+3.370000	0.210000
+3.380000	0.206667
+3.390000	0.203333
+3.400000	0.200000
+3.410000	0.196667
+3.420000	0.193333
+3.430000	0.190000
+3.440000	0.186667
+3.450000	0.183333
+3.460000	0.180000
+3.470000	0.176667
+3.480000	0.173333
+3.490000	0.170000
+3.500000	0.166667
+3.510000	0.163333
+3.520000	0.160000
+3.530000	0.156667
+3.540000	0.153333
+3.550000	0.150000
+3.560000	0.146667
+3.570000	0.143333
+3.580000	0.140000
+3.590000	0.136667
+3.600000	0.133333
+3.610000	0.130000
+3.620000	0.126667
+3.630000	0.123333
+3.640000	0.120000
+3.650000	0.116667
+3.660000	0.113333
+3.670000	0.110000
+3.680000	0.106667
+3.690000	0.103333
+3.700000	0.100000
+3.710000	0.096667
+3.720000	0.093333
+3.730000	0.090000
+3.740000	0.086667
+3.750000	0.083333
+3.760000	0.080000
+3.770000	0.076667
+3.780000	0.073333
+3.790000	0.070000
+3.800000	0.066667
+3.810000	0.063333
+3.820000	0.060000
+3.830000	0.056667
+3.840000	0.053333
+3.850000	0.050000
+3.860000	0.046667
+3.870000	0.043333
+3.880000	0.040000
+3.890000	0.036667
+3.900000	0.033333
+3.910000	0.030000
+3.920000	0.026667
+3.930000	0.023333
+3.940000	0.020000
+3.950000	0.016667
+3.960000	0.013333
+3.970000	0.010000
+3.980000	0.006667
+3.990000	0.003333
+4.000000	0.000000
+4.010000	0.000000
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/weibull.plt b/v0.2-M1/chi/reference-manual/distribution_plots/weibull.plt
new file mode 100644
index 0000000..4a32f34
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/weibull.plt
@@ -0,0 +1,31 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+set terminal svg
+#set grid back
+#set xrange [0:10]
+set yrange [0:2.5]
+set xlabel "x"
+set ylabel "weibull(real a, b)"
+#set samples 2000
+set output "weibull.svg"
+set nokey
+set label "weibull(0.5, 1.0)" at 0.1, 2.2
+set label "weibull(1.0, 1.0)" at 2.2, 0.2
+set label "weibull(1.5, 1.0)" at 1.4, 0.45
+set label "weibull(5.0, 1.0)" at 1.15, 1.4
+set style data lines
+plot "weibull_0.5_1.0.dat" using 1:2 linetype 1, \
+     "weibull_1.0_1.0.dat" using 1:2 linetype 2, \
+     "weibull_1.5_1.0.dat" using 1:2 linetype 3, \
+     "weibull_5.0_1.0.dat" using 1:2 linetype 4
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/weibull.svg b/v0.2-M1/chi/reference-manual/distribution_plots/weibull.svg
new file mode 100644
index 0000000..e24734c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/weibull.svg
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="utf-8"  standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<svg width="600" height="480" viewBox="0 0 600 480"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+
+<title>gnuplot</title>
+<desc>Produced by GNUPLOT 4.4 patchlevel 4 </desc>
+
+<defs>
+
+	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
+	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
+	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
+	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
+	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
+	<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
+	<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
+	<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
+	<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
+	<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
+	<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
+	<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
+</defs>
+<g style="fill:none; color:white; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L80.9,422.4 M575.0,422.4 L566.0,422.4 '></path>
+	<g transform="translate(63.6,426.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0</text>
+	</g>
+	<path  d='M71.9,341.3 L80.9,341.3 M575.0,341.3 L566.0,341.3 '></path>
+	<g transform="translate(63.6,345.8)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 0.5</text>
+	</g>
+	<path  d='M71.9,260.1 L80.9,260.1 M575.0,260.1 L566.0,260.1 '></path>
+	<g transform="translate(63.6,264.6)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1</text>
+	</g>
+	<path  d='M71.9,179.0 L80.9,179.0 M575.0,179.0 L566.0,179.0 '></path>
+	<g transform="translate(63.6,183.5)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 1.5</text>
+	</g>
+	<path  d='M71.9,97.8 L80.9,97.8 M575.0,97.8 L566.0,97.8 '></path>
+	<g transform="translate(63.6,102.3)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 2</text>
+	</g>
+	<path  d='M71.9,16.7 L80.9,16.7 M575.0,16.7 L566.0,16.7 '></path>
+	<g transform="translate(63.6,21.2)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:end">
+		<text> 2.5</text>
+	</g>
+	<path  d='M71.9,422.4 L71.9,413.4 M71.9,16.7 L71.9,25.7 '></path>
+	<g transform="translate(71.9,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0</text>
+	</g>
+	<path  d='M155.8,422.4 L155.8,413.4 M155.8,16.7 L155.8,25.7 '></path>
+	<g transform="translate(155.8,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 0.5</text>
+	</g>
+	<path  d='M239.6,422.4 L239.6,413.4 M239.6,16.7 L239.6,25.7 '></path>
+	<g transform="translate(239.6,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 1</text>
+	</g>
+	<path  d='M323.5,422.4 L323.5,413.4 M323.5,16.7 L323.5,25.7 '></path>
+	<g transform="translate(323.5,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 1.5</text>
+	</g>
+	<path  d='M407.3,422.4 L407.3,413.4 M407.3,16.7 L407.3,25.7 '></path>
+	<g transform="translate(407.3,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 2</text>
+	</g>
+	<path  d='M491.2,422.4 L491.2,413.4 M491.2,16.7 L491.2,25.7 '></path>
+	<g transform="translate(491.2,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 2.5</text>
+	</g>
+	<path  d='M575.0,422.4 L575.0,413.4 M575.0,16.7 L575.0,25.7 '></path>
+	<g transform="translate(575.0,444.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text> 3</text>
+	</g>
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+	<g transform="translate(17.6,219.6) rotate(270)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>weibull(real a, b)</text>
+	</g>
+	<g transform="translate(323.4,471.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:middle">
+		<text>x</text>
+	</g>
+	<g transform="translate(88.7,69.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>weibull(0.5, 1.0)</text>
+	</g>
+	<g transform="translate(440.8,394.4)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>weibull(1.0, 1.0)</text>
+	</g>
+	<g transform="translate(306.7,353.9)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>weibull(1.5, 1.0)</text>
+	</g>
+	<g transform="translate(264.8,199.7)" style="stroke:none; fill:black; font-family:Arial; font-size:12.00pt; text-anchor:start">
+		<text>weibull(5.0, 1.0)</text>
+	</g>
+</g>
+	<g id="Plot_1"><title>Plot_1</title>
+<g style="fill:none; color:red; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M76.7,16.7 L76.9,28.4 L78.6,90.2 L80.3,132.2 L82.0,163.1 L83.6,187.0 L85.3,206.2 L87.0,222.0 
+		L88.7,235.4 L90.3,246.8 L92.0,256.7 L93.7,265.5 L95.4,273.2 L97.1,280.2 L98.7,286.4 L100.4,292.1 
+		L102.1,297.3 L103.8,302.0 L105.4,306.4 L107.1,310.4 L108.8,314.2 L110.5,317.7 L112.1,320.9 L113.8,324.0 
+		L115.5,326.8 L117.2,329.5 L118.9,332.1 L120.5,334.5 L122.2,336.7 L123.9,338.9 L125.6,340.9 L127.2,342.9 
+		L128.9,344.7 L130.6,346.5 L132.3,348.2 L133.9,349.8 L135.6,351.3 L137.3,352.8 L139.0,354.2 L140.7,355.6 
+		L142.3,356.9 L144.0,358.2 L145.7,359.4 L147.4,360.6 L149.0,361.7 L150.7,362.8 L152.4,363.8 L154.1,364.8 
+		L155.8,365.8 L157.4,366.8 L159.1,367.7 L160.8,368.6 L162.5,369.4 L164.1,370.3 L165.8,371.1 L167.5,371.9 
+		L169.2,372.7 L170.8,373.4 L172.5,374.1 L174.2,374.8 L175.9,375.5 L177.6,376.2 L179.2,376.8 L180.9,377.5 
+		L182.6,378.1 L184.3,378.7 L185.9,379.3 L187.6,379.8 L189.3,380.4 L191.0,380.9 L192.6,381.5 L194.3,382.0 
+		L196.0,382.5 L197.7,383.0 L199.4,383.5 L201.0,383.9 L202.7,384.4 L204.4,384.9 L206.1,385.3 L207.7,385.7 
+		L209.4,386.2 L211.1,386.6 L212.8,387.0 L214.4,387.4 L216.1,387.8 L217.8,388.2 L219.5,388.5 L221.2,388.9 
+		L222.8,389.3 L224.5,389.6 L226.2,390.0 L227.9,390.3 L229.5,390.7 L231.2,391.0 L232.9,391.3 L234.6,391.6 
+		L236.2,391.9 L237.9,392.2 L239.6,392.6 L241.3,392.8 L243.0,393.1 L244.6,393.4 L246.3,393.7 L248.0,394.0 
+		L249.7,394.3 L251.3,394.5 L253.0,394.8 L254.7,395.0 L256.4,395.3 L258.0,395.5 L259.7,395.8 L261.4,396.0 
+		L263.1,396.3 L264.8,396.5 L266.4,396.7 L268.1,397.0 L269.8,397.2 L271.5,397.4 L273.1,397.6 L274.8,397.8 
+		L276.5,398.1 L278.2,398.3 L279.8,398.5 L281.5,398.7 L283.2,398.9 L284.9,399.1 L286.6,399.3 L288.2,399.5 
+		L289.9,399.6 L291.6,399.8 L293.3,400.0 L294.9,400.2 L296.6,400.4 L298.3,400.5 L300.0,400.7 L301.6,400.9 
+		L303.3,401.1 L305.0,401.2 L306.7,401.4 L308.4,401.6 L310.0,401.7 L311.7,401.9 L313.4,402.0 L315.1,402.2 
+		L316.7,402.3 L318.4,402.5 L320.1,402.6 L321.8,402.8 L323.5,402.9 L325.1,403.1 L326.8,403.2 L328.5,403.4 
+		L330.2,403.5 L331.8,403.6 L333.5,403.8 L335.2,403.9 L336.9,404.0 L338.5,404.2 L340.2,404.3 L341.9,404.4 
+		L343.6,404.5 L345.3,404.7 L346.9,404.8 L348.6,404.9 L350.3,405.0 L352.0,405.2 L353.6,405.3 L355.3,405.4 
+		L357.0,405.5 L358.7,405.6 L360.3,405.7 L362.0,405.8 L363.7,406.0 L365.4,406.1 L367.1,406.2 L368.7,406.3 
+		L370.4,406.4 L372.1,406.5 L373.8,406.6 L375.4,406.7 L377.1,406.8 L378.8,406.9 L380.5,407.0 L382.1,407.1 
+		L383.8,407.2 L385.5,407.3 L387.2,407.4 L388.9,407.5 L390.5,407.6 L392.2,407.7 L393.9,407.8 L395.6,407.8 
+		L397.2,407.9 L398.9,408.0 L400.6,408.1 L402.3,408.2 L403.9,408.3 L405.6,408.4 L407.3,408.5 L409.0,408.5 
+		L410.7,408.6 L412.3,408.7 L414.0,408.8 L415.7,408.9 L417.4,408.9 L419.0,409.0 L420.7,409.1 L422.4,409.2 
+		L424.1,409.3 L425.7,409.3 L427.4,409.4 L429.1,409.5 L430.8,409.6 L432.5,409.6 L434.1,409.7 L435.8,409.8 
+		L437.5,409.8 L439.2,409.9 L440.8,410.0 L442.5,410.1 L444.2,410.1 L445.9,410.2 L447.5,410.3 L449.2,410.3 
+		L450.9,410.4 L452.6,410.5 L454.3,410.5 L455.9,410.6 L457.6,410.7 L459.3,410.7 L461.0,410.8 L462.6,410.8 
+		L464.3,410.9 L466.0,411.0 L467.7,411.0 L469.3,411.1 L471.0,411.2 L472.7,411.2 L474.4,411.3 L476.1,411.3 
+		L477.7,411.4 L479.4,411.4 L481.1,411.5 L482.8,411.6 L484.4,411.6 L486.1,411.7 L487.8,411.7 L489.5,411.8 
+		L491.2,411.8 L492.8,411.9 L494.5,412.0 L496.2,412.0 L497.9,412.1 L499.5,412.1 L501.2,412.2 L502.9,412.2 
+		L504.6,412.3 L506.2,412.3 L507.9,412.4 L509.6,412.4 L511.3,412.5 L513.0,412.5 L514.6,412.6 L516.3,412.6 
+		L518.0,412.7 L519.7,412.7 L521.3,412.8 L523.0,412.8 L524.7,412.9 L526.4,412.9 L528.0,412.9 L529.7,413.0 
+		L531.4,413.0 L533.1,413.1 L534.8,413.1 L536.4,413.2 L538.1,413.2 L539.8,413.3 L541.5,413.3 L543.1,413.3 
+		L544.8,413.4 L546.5,413.4 L548.2,413.5 L549.8,413.5 L551.5,413.6 L553.2,413.6 L554.9,413.6 L556.6,413.7 
+		L558.2,413.7 L559.9,413.8 L561.6,413.8 L563.3,413.8 L564.9,413.9 L566.6,413.9 L568.3,414.0 L570.0,414.0 
+		L571.6,414.0 L573.3,414.1 L575.0,414.1 '></path>
+</g>
+	</g>
+	<g id="Plot_2"><title>Plot_2</title>
+<g style="fill:none; color:green; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,260.1 L73.6,261.7 L75.3,263.3 L76.9,264.9 L78.6,266.5 L80.3,268.0 L82.0,269.6 L83.6,271.1 
+		L85.3,272.6 L87.0,274.1 L88.7,275.6 L90.3,277.0 L92.0,278.5 L93.7,279.9 L95.4,281.3 L97.1,282.7 
+		L98.7,284.1 L100.4,285.5 L102.1,286.9 L103.8,288.2 L105.4,289.5 L107.1,290.9 L108.8,292.2 L110.5,293.5 
+		L112.1,294.7 L113.8,296.0 L115.5,297.3 L117.2,298.5 L118.9,299.8 L120.5,301.0 L122.2,302.2 L123.9,303.4 
+		L125.6,304.6 L127.2,305.7 L128.9,306.9 L130.6,308.0 L132.3,309.2 L133.9,310.3 L135.6,311.4 L137.3,312.5 
+		L139.0,313.6 L140.7,314.7 L142.3,315.8 L144.0,316.8 L145.7,317.9 L147.4,318.9 L149.0,320.0 L150.7,321.0 
+		L152.4,322.0 L154.1,323.0 L155.8,324.0 L157.4,325.0 L159.1,325.9 L160.8,326.9 L162.5,327.8 L164.1,328.8 
+		L165.8,329.7 L167.5,330.6 L169.2,331.5 L170.8,332.4 L172.5,333.3 L174.2,334.2 L175.9,335.1 L177.6,336.0 
+		L179.2,336.8 L180.9,337.7 L182.6,338.5 L184.3,339.4 L185.9,340.2 L187.6,341.0 L189.3,341.8 L191.0,342.6 
+		L192.6,343.4 L194.3,344.2 L196.0,345.0 L197.7,345.7 L199.4,346.5 L201.0,347.3 L202.7,348.0 L204.4,348.8 
+		L206.1,349.5 L207.7,350.2 L209.4,350.9 L211.1,351.6 L212.8,352.3 L214.4,353.0 L216.1,353.7 L217.8,354.4 
+		L219.5,355.1 L221.2,355.8 L222.8,356.4 L224.5,357.1 L226.2,357.7 L227.9,358.4 L229.5,359.0 L231.2,359.6 
+		L232.9,360.3 L234.6,360.9 L236.2,361.5 L237.9,362.1 L239.6,362.7 L241.3,363.3 L243.0,363.9 L244.6,364.5 
+		L246.3,365.0 L248.0,365.6 L249.7,366.2 L251.3,366.7 L253.0,367.3 L254.7,367.8 L256.4,368.4 L258.0,368.9 
+		L259.7,369.5 L261.4,370.0 L263.1,370.5 L264.8,371.0 L266.4,371.5 L268.1,372.0 L269.8,372.5 L271.5,373.0 
+		L273.1,373.5 L274.8,374.0 L276.5,374.5 L278.2,375.0 L279.8,375.4 L281.5,375.9 L283.2,376.4 L284.9,376.8 
+		L286.6,377.3 L288.2,377.7 L289.9,378.2 L291.6,378.6 L293.3,379.0 L294.9,379.5 L296.6,379.9 L298.3,380.3 
+		L300.0,380.7 L301.6,381.2 L303.3,381.6 L305.0,382.0 L306.7,382.4 L308.4,382.8 L310.0,383.2 L311.7,383.6 
+		L313.4,384.0 L315.1,384.3 L316.7,384.7 L318.4,385.1 L320.1,385.5 L321.8,385.8 L323.5,386.2 L325.1,386.6 
+		L326.8,386.9 L328.5,387.3 L330.2,387.6 L331.8,388.0 L333.5,388.3 L335.2,388.6 L336.9,389.0 L338.5,389.3 
+		L340.2,389.6 L341.9,390.0 L343.6,390.3 L345.3,390.6 L346.9,390.9 L348.6,391.2 L350.3,391.5 L352.0,391.9 
+		L353.6,392.2 L355.3,392.5 L357.0,392.8 L358.7,393.0 L360.3,393.3 L362.0,393.6 L363.7,393.9 L365.4,394.2 
+		L367.1,394.5 L368.7,394.8 L370.4,395.0 L372.1,395.3 L373.8,395.6 L375.4,395.8 L377.1,396.1 L378.8,396.4 
+		L380.5,396.6 L382.1,396.9 L383.8,397.1 L385.5,397.4 L387.2,397.6 L388.9,397.9 L390.5,398.1 L392.2,398.4 
+		L393.9,398.6 L395.6,398.8 L397.2,399.1 L398.9,399.3 L400.6,399.5 L402.3,399.8 L403.9,400.0 L405.6,400.2 
+		L407.3,400.4 L409.0,400.7 L410.7,400.9 L412.3,401.1 L414.0,401.3 L415.7,401.5 L417.4,401.7 L419.0,401.9 
+		L420.7,402.1 L422.4,402.3 L424.1,402.5 L425.7,402.7 L427.4,402.9 L429.1,403.1 L430.8,403.3 L432.5,403.5 
+		L434.1,403.7 L435.8,403.9 L437.5,404.1 L439.2,404.2 L440.8,404.4 L442.5,404.6 L444.2,404.8 L445.9,405.0 
+		L447.5,405.1 L449.2,405.3 L450.9,405.5 L452.6,405.6 L454.3,405.8 L455.9,406.0 L457.6,406.1 L459.3,406.3 
+		L461.0,406.5 L462.6,406.6 L464.3,406.8 L466.0,406.9 L467.7,407.1 L469.3,407.2 L471.0,407.4 L472.7,407.5 
+		L474.4,407.7 L476.1,407.8 L477.7,408.0 L479.4,408.1 L481.1,408.3 L482.8,408.4 L484.4,408.5 L486.1,408.7 
+		L487.8,408.8 L489.5,408.9 L491.2,409.1 L492.8,409.2 L494.5,409.3 L496.2,409.5 L497.9,409.6 L499.5,409.7 
+		L501.2,409.9 L502.9,410.0 L504.6,410.1 L506.2,410.2 L507.9,410.3 L509.6,410.5 L511.3,410.6 L513.0,410.7 
+		L514.6,410.8 L516.3,410.9 L518.0,411.0 L519.7,411.2 L521.3,411.3 L523.0,411.4 L524.7,411.5 L526.4,411.6 
+		L528.0,411.7 L529.7,411.8 L531.4,411.9 L533.1,412.0 L534.8,412.1 L536.4,412.2 L538.1,412.3 L539.8,412.4 
+		L541.5,412.5 L543.1,412.6 L544.8,412.7 L546.5,412.8 L548.2,412.9 L549.8,413.0 L551.5,413.1 L553.2,413.2 
+		L554.9,413.3 L556.6,413.4 L558.2,413.5 L559.9,413.6 L561.6,413.6 L563.3,413.7 L564.9,413.8 L566.6,413.9 
+		L568.3,414.0 L570.0,414.1 L571.6,414.2 L573.3,414.2 L575.0,414.3 '></path>
+</g>
+	</g>
+	<g id="Plot_3"><title>Plot_3</title>
+<g style="fill:none; color:blue; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L73.6,398.1 L75.3,388.1 L76.9,380.5 L78.6,374.1 L80.3,368.6 L82.0,363.6 L83.6,359.2 
+		L85.3,355.1 L87.0,351.3 L88.7,347.8 L90.3,344.6 L92.0,341.5 L93.7,338.7 L95.4,336.0 L97.1,333.4 
+		L98.7,331.1 L100.4,328.8 L102.1,326.7 L103.8,324.7 L105.4,322.9 L107.1,321.1 L108.8,319.4 L110.5,317.9 
+		L112.1,316.4 L113.8,315.0 L115.5,313.7 L117.2,312.5 L118.9,311.3 L120.5,310.3 L122.2,309.3 L123.9,308.4 
+		L125.6,307.5 L127.2,306.7 L128.9,306.0 L130.6,305.3 L132.3,304.7 L133.9,304.2 L135.6,303.7 L137.3,303.2 
+		L139.0,302.9 L140.7,302.5 L142.3,302.2 L144.0,302.0 L145.7,301.8 L147.4,301.7 L149.0,301.6 L150.7,301.5 
+		L152.4,301.5 L154.1,301.5 L155.8,301.5 L157.4,301.6 L159.1,301.8 L160.8,301.9 L162.5,302.1 L164.1,302.3 
+		L165.8,302.6 L167.5,302.9 L169.2,303.2 L170.8,303.6 L172.5,303.9 L174.2,304.3 L175.9,304.8 L177.6,305.2 
+		L179.2,305.7 L180.9,306.2 L182.6,306.7 L184.3,307.3 L185.9,307.8 L187.6,308.4 L189.3,309.0 L191.0,309.6 
+		L192.6,310.3 L194.3,310.9 L196.0,311.6 L197.7,312.3 L199.4,313.0 L201.0,313.7 L202.7,314.4 L204.4,315.2 
+		L206.1,315.9 L207.7,316.7 L209.4,317.5 L211.1,318.3 L212.8,319.1 L214.4,319.9 L216.1,320.7 L217.8,321.5 
+		L219.5,322.4 L221.2,323.2 L222.8,324.1 L224.5,324.9 L226.2,325.8 L227.9,326.7 L229.5,327.5 L231.2,328.4 
+		L232.9,329.3 L234.6,330.2 L236.2,331.1 L237.9,332.0 L239.6,332.9 L241.3,333.7 L243.0,334.6 L244.6,335.5 
+		L246.3,336.4 L248.0,337.3 L249.7,338.3 L251.3,339.2 L253.0,340.1 L254.7,341.0 L256.4,341.9 L258.0,342.8 
+		L259.7,343.7 L261.4,344.6 L263.1,345.5 L264.8,346.3 L266.4,347.2 L268.1,348.1 L269.8,349.0 L271.5,349.9 
+		L273.1,350.8 L274.8,351.7 L276.5,352.5 L278.2,353.4 L279.8,354.3 L281.5,355.1 L283.2,356.0 L284.9,356.8 
+		L286.6,357.7 L288.2,358.5 L289.9,359.4 L291.6,360.2 L293.3,361.0 L294.9,361.8 L296.6,362.7 L298.3,363.5 
+		L300.0,364.3 L301.6,365.1 L303.3,365.9 L305.0,366.7 L306.7,367.4 L308.4,368.2 L310.0,369.0 L311.7,369.8 
+		L313.4,370.5 L315.1,371.3 L316.7,372.0 L318.4,372.7 L320.1,373.5 L321.8,374.2 L323.5,374.9 L325.1,375.6 
+		L326.8,376.3 L328.5,377.0 L330.2,377.7 L331.8,378.4 L333.5,379.1 L335.2,379.7 L336.9,380.4 L338.5,381.1 
+		L340.2,381.7 L341.9,382.4 L343.6,383.0 L345.3,383.6 L346.9,384.2 L348.6,384.8 L350.3,385.5 L352.0,386.1 
+		L353.6,386.6 L355.3,387.2 L357.0,387.8 L358.7,388.4 L360.3,388.9 L362.0,389.5 L363.7,390.1 L365.4,390.6 
+		L367.1,391.1 L368.7,391.7 L370.4,392.2 L372.1,392.7 L373.8,393.2 L375.4,393.7 L377.1,394.2 L378.8,394.7 
+		L380.5,395.2 L382.1,395.7 L383.8,396.1 L385.5,396.6 L387.2,397.1 L388.9,397.5 L390.5,397.9 L392.2,398.4 
+		L393.9,398.8 L395.6,399.2 L397.2,399.7 L398.9,400.1 L400.6,400.5 L402.3,400.9 L403.9,401.3 L405.6,401.7 
+		L407.3,402.1 L409.0,402.4 L410.7,402.8 L412.3,403.2 L414.0,403.5 L415.7,403.9 L417.4,404.2 L419.0,404.6 
+		L420.7,404.9 L422.4,405.3 L424.1,405.6 L425.7,405.9 L427.4,406.2 L429.1,406.5 L430.8,406.8 L432.5,407.1 
+		L434.1,407.4 L435.8,407.7 L437.5,408.0 L439.2,408.3 L440.8,408.6 L442.5,408.9 L444.2,409.1 L445.9,409.4 
+		L447.5,409.7 L449.2,409.9 L450.9,410.2 L452.6,410.4 L454.3,410.6 L455.9,410.9 L457.6,411.1 L459.3,411.3 
+		L461.0,411.6 L462.6,411.8 L464.3,412.0 L466.0,412.2 L467.7,412.4 L469.3,412.6 L471.0,412.8 L472.7,413.0 
+		L474.4,413.2 L476.1,413.4 L477.7,413.6 L479.4,413.8 L481.1,414.0 L482.8,414.2 L484.4,414.3 L486.1,414.5 
+		L487.8,414.7 L489.5,414.8 L491.2,415.0 L492.8,415.2 L494.5,415.3 L496.2,415.5 L497.9,415.6 L499.5,415.8 
+		L501.2,415.9 L502.9,416.1 L504.6,416.2 L506.2,416.3 L507.9,416.5 L509.6,416.6 L511.3,416.7 L513.0,416.9 
+		L514.6,417.0 L516.3,417.1 L518.0,417.2 L519.7,417.3 L521.3,417.4 L523.0,417.6 L524.7,417.7 L526.4,417.8 
+		L528.0,417.9 L529.7,418.0 L531.4,418.1 L533.1,418.2 L534.8,418.3 L536.4,418.4 L538.1,418.5 L539.8,418.6 
+		L541.5,418.6 L543.1,418.7 L544.8,418.8 L546.5,418.9 L548.2,419.0 L549.8,419.1 L551.5,419.1 L553.2,419.2 
+		L554.9,419.3 L556.6,419.4 L558.2,419.4 L559.9,419.5 L561.6,419.6 L563.3,419.6 L564.9,419.7 L566.6,419.8 
+		L568.3,419.8 L570.0,419.9 L571.6,419.9 L573.3,420.0 L575.0,420.1 '></path>
+</g>
+	</g>
+	<g id="Plot_4"><title>Plot_4</title>
+<g style="fill:none; color:cyan; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,422.4 L73.6,422.4 L75.3,422.4 L76.9,422.4 L78.6,422.4 L80.3,422.4 L82.0,422.4 L83.6,422.4 
+		L85.3,422.4 L87.0,422.3 L88.7,422.3 L90.3,422.3 L92.0,422.2 L93.7,422.2 L95.4,422.1 L97.1,422.0 
+		L98.7,421.9 L100.4,421.7 L102.1,421.5 L103.8,421.3 L105.4,421.1 L107.1,420.8 L108.8,420.5 L110.5,420.1 
+		L112.1,419.7 L113.8,419.2 L115.5,418.7 L117.2,418.1 L118.9,417.4 L120.5,416.7 L122.2,415.8 L123.9,414.9 
+		L125.6,413.9 L127.2,412.8 L128.9,411.6 L130.6,410.3 L132.3,408.9 L133.9,407.3 L135.6,405.6 L137.3,403.8 
+		L139.0,401.8 L140.7,399.7 L142.3,397.5 L144.0,395.1 L145.7,392.5 L147.4,389.7 L149.0,386.8 L150.7,383.7 
+		L152.4,380.4 L154.1,376.9 L155.8,373.2 L157.4,369.4 L159.1,365.3 L160.8,361.0 L162.5,356.5 L164.1,351.8 
+		L165.8,346.9 L167.5,341.8 L169.2,336.4 L170.8,330.9 L172.5,325.1 L174.2,319.2 L175.9,313.0 L177.6,306.7 
+		L179.2,300.1 L180.9,293.4 L182.6,286.6 L184.3,279.5 L185.9,272.4 L187.6,265.1 L189.3,257.7 L191.0,250.2 
+		L192.6,242.7 L194.3,235.1 L196.0,227.5 L197.7,219.9 L199.4,212.3 L201.0,204.8 L202.7,197.4 L204.4,190.1 
+		L206.1,182.9 L207.7,175.9 L209.4,169.2 L211.1,162.7 L212.8,156.5 L214.4,150.6 L216.1,145.1 L217.8,140.0 
+		L219.5,135.3 L221.2,131.1 L222.8,127.4 L224.5,124.3 L226.2,121.7 L227.9,119.7 L229.5,118.3 L231.2,117.6 
+		L232.9,117.5 L234.6,118.0 L236.2,119.3 L237.9,121.3 L239.6,123.9 L241.3,127.2 L243.0,131.2 L244.6,135.9 
+		L246.3,141.2 L248.0,147.2 L249.7,153.7 L251.3,160.8 L253.0,168.4 L254.7,176.5 L256.4,185.1 L258.0,194.0 
+		L259.7,203.3 L261.4,212.8 L263.1,222.6 L264.8,232.5 L266.4,242.6 L268.1,252.6 L269.8,262.7 L271.5,272.8 
+		L273.1,282.7 L274.8,292.4 L276.5,301.9 L278.2,311.2 L279.8,320.1 L281.5,328.7 L283.2,337.0 L284.9,344.8 
+		L286.6,352.3 L288.2,359.3 L289.9,365.8 L291.6,372.0 L293.3,377.6 L294.9,382.8 L296.6,387.6 L298.3,392.0 
+		L300.0,395.9 L301.6,399.5 L303.3,402.7 L305.0,405.5 L306.7,408.0 L308.4,410.2 L310.0,412.1 L311.7,413.8 
+		L313.4,415.3 L315.1,416.5 L316.7,417.6 L318.4,418.4 L320.1,419.2 L321.8,419.8 L323.5,420.3 L325.1,420.8 
+		L326.8,421.1 L328.5,421.4 L330.2,421.6 L331.8,421.8 L333.5,421.9 L335.2,422.0 L336.9,422.1 L338.5,422.2 
+		L340.2,422.3 L341.9,422.3 L343.6,422.3 L345.3,422.3 L346.9,422.4 L348.6,422.4 L350.3,422.4 L352.0,422.4 
+		L353.6,422.4 L355.3,422.4 L357.0,422.4 L358.7,422.4 L360.3,422.4 L362.0,422.4 L363.7,422.4 L365.4,422.4 
+		L367.1,422.4 L368.7,422.4 L370.4,422.4 L372.1,422.4 L373.8,422.4 L375.4,422.4 L377.1,422.4 L378.8,422.4 
+		L380.5,422.4 L382.1,422.4 L383.8,422.4 L385.5,422.4 L387.2,422.4 L388.9,422.4 L390.5,422.4 L392.2,422.4 
+		L393.9,422.4 L395.6,422.4 L397.2,422.4 L398.9,422.4 L400.6,422.4 L402.3,422.4 L403.9,422.4 L405.6,422.4 
+		L407.3,422.4 L409.0,422.4 L410.7,422.4 L412.3,422.4 L414.0,422.4 L415.7,422.4 L417.4,422.4 L419.0,422.4 
+		L420.7,422.4 L422.4,422.4 L424.1,422.4 L425.7,422.4 L427.4,422.4 L429.1,422.4 L430.8,422.4 L432.5,422.4 
+		L434.1,422.4 L435.8,422.4 L437.5,422.4 L439.2,422.4 L440.8,422.4 L442.5,422.4 L444.2,422.4 L445.9,422.4 
+		L447.5,422.4 L449.2,422.4 L450.9,422.4 L452.6,422.4 L454.3,422.4 L455.9,422.4 L457.6,422.4 L459.3,422.4 
+		L461.0,422.4 L462.6,422.4 L464.3,422.4 L466.0,422.4 L467.7,422.4 L469.3,422.4 L471.0,422.4 L472.7,422.4 
+		L474.4,422.4 L476.1,422.4 L477.7,422.4 L479.4,422.4 L481.1,422.4 L482.8,422.4 L484.4,422.4 L486.1,422.4 
+		L487.8,422.4 L489.5,422.4 L491.2,422.4 L492.8,422.4 L494.5,422.4 L496.2,422.4 L497.9,422.4 L499.5,422.4 
+		L501.2,422.4 L502.9,422.4 L504.6,422.4 L506.2,422.4 L507.9,422.4 L509.6,422.4 L511.3,422.4 L513.0,422.4 
+		L514.6,422.4 L516.3,422.4 L518.0,422.4 L519.7,422.4 L521.3,422.4 L523.0,422.4 L524.7,422.4 L526.4,422.4 
+		L528.0,422.4 L529.7,422.4 L531.4,422.4 L533.1,422.4 L534.8,422.4 L536.4,422.4 L538.1,422.4 L539.8,422.4 
+		L541.5,422.4 L543.1,422.4 L544.8,422.4 L546.5,422.4 L548.2,422.4 L549.8,422.4 L551.5,422.4 L553.2,422.4 
+		L554.9,422.4 L556.6,422.4 L558.2,422.4 L559.9,422.4 L561.6,422.4 L563.3,422.4 L564.9,422.4 L566.6,422.4 
+		L568.3,422.4 L570.0,422.4 L571.6,422.4 L573.3,422.4 L575.0,422.4 '></path>
+</g>
+	</g>
+<g style="fill:none; color:black; stroke:currentColor; stroke-width:1.00; stroke-linecap:butt; stroke-linejoin:miter">
+	<path  d='M71.9,16.7 L71.9,422.4 L575.0,422.4 L575.0,16.7 L71.9,16.7 Z '></path>
+</g>
+</svg>
+
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/weibull_0.5_1.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/weibull_0.5_1.0.dat
new file mode 100644
index 0000000..b909d71
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/weibull_0.5_1.0.dat
@@ -0,0 +1,313 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	NaN
+0.010000	4.524187
+0.020000	3.069280
+0.030000	2.427657
+0.040000	2.046827
+0.050000	1.788026
+0.060000	1.597770
+0.070000	1.450499
+0.080000	1.332257
+0.090000	1.234697
+0.100000	1.152482
+0.110000	1.082018
+0.120000	1.020788
+0.130000	0.966966
+0.140000	0.919195
+0.150000	0.876441
+0.160000	0.837900
+0.170000	0.802937
+0.180000	0.771042
+0.190000	0.741803
+0.200000	0.714879
+0.210000	0.689988
+0.220000	0.666894
+0.230000	0.645395
+0.240000	0.625323
+0.250000	0.606531
+0.260000	0.588892
+0.270000	0.572298
+0.280000	0.556652
+0.290000	0.541871
+0.300000	0.527882
+0.310000	0.514617
+0.320000	0.502020
+0.330000	0.490038
+0.340000	0.478625
+0.350000	0.467739
+0.360000	0.457343
+0.370000	0.447402
+0.380000	0.437886
+0.390000	0.428767
+0.400000	0.420018
+0.410000	0.411618
+0.420000	0.403544
+0.430000	0.395776
+0.440000	0.388298
+0.450000	0.381092
+0.460000	0.374144
+0.470000	0.367438
+0.480000	0.360962
+0.490000	0.354704
+0.500000	0.348652
+0.510000	0.342797
+0.520000	0.337127
+0.530000	0.331635
+0.540000	0.326312
+0.550000	0.321150
+0.560000	0.316140
+0.570000	0.311277
+0.580000	0.306554
+0.590000	0.301965
+0.600000	0.297503
+0.610000	0.293164
+0.620000	0.288942
+0.630000	0.284832
+0.640000	0.280831
+0.650000	0.276932
+0.660000	0.273134
+0.670000	0.269431
+0.680000	0.265820
+0.690000	0.262297
+0.700000	0.258860
+0.710000	0.255504
+0.720000	0.252228
+0.730000	0.249027
+0.740000	0.245901
+0.750000	0.242845
+0.760000	0.239858
+0.770000	0.236937
+0.780000	0.234080
+0.790000	0.231285
+0.800000	0.228549
+0.810000	0.225872
+0.820000	0.223251
+0.830000	0.220683
+0.840000	0.218169
+0.850000	0.215705
+0.860000	0.213291
+0.870000	0.210925
+0.880000	0.208605
+0.890000	0.206330
+0.900000	0.204099
+0.910000	0.201910
+0.920000	0.199763
+0.930000	0.197656
+0.940000	0.195588
+0.950000	0.193558
+0.960000	0.191564
+0.970000	0.189607
+0.980000	0.187684
+0.990000	0.185795
+1.000000	0.183940
+1.010000	0.182116
+1.020000	0.180324
+1.030000	0.178563
+1.040000	0.176831
+1.050000	0.175128
+1.060000	0.173454
+1.070000	0.171807
+1.080000	0.170187
+1.090000	0.168593
+1.100000	0.167025
+1.110000	0.165482
+1.120000	0.163963
+1.130000	0.162469
+1.140000	0.160997
+1.150000	0.159548
+1.160000	0.158122
+1.170000	0.156717
+1.180000	0.155333
+1.190000	0.153970
+1.200000	0.152628
+1.210000	0.151305
+1.220000	0.150002
+1.230000	0.148717
+1.240000	0.147452
+1.250000	0.146204
+1.260000	0.144974
+1.270000	0.143762
+1.280000	0.142566
+1.290000	0.141388
+1.300000	0.140225
+1.310000	0.139079
+1.320000	0.137948
+1.330000	0.136833
+1.340000	0.135733
+1.350000	0.134648
+1.360000	0.133577
+1.370000	0.132520
+1.380000	0.131477
+1.390000	0.130448
+1.400000	0.129432
+1.410000	0.128429
+1.420000	0.127440
+1.430000	0.126462
+1.440000	0.125498
+1.450000	0.124545
+1.460000	0.123604
+1.470000	0.122675
+1.480000	0.121758
+1.490000	0.120852
+1.500000	0.119957
+1.510000	0.119073
+1.520000	0.118199
+1.530000	0.117336
+1.540000	0.116483
+1.550000	0.115641
+1.560000	0.114809
+1.570000	0.113986
+1.580000	0.113173
+1.590000	0.112369
+1.600000	0.111575
+1.610000	0.110790
+1.620000	0.110013
+1.630000	0.109246
+1.640000	0.108488
+1.650000	0.107737
+1.660000	0.106996
+1.670000	0.106262
+1.680000	0.105537
+1.690000	0.104820
+1.700000	0.104111
+1.710000	0.103409
+1.720000	0.102715
+1.730000	0.102029
+1.740000	0.101350
+1.750000	0.100678
+1.760000	0.100013
+1.770000	0.099356
+1.780000	0.098705
+1.790000	0.098061
+1.800000	0.097424
+1.810000	0.096794
+1.820000	0.096170
+1.830000	0.095552
+1.840000	0.094941
+1.850000	0.094337
+1.860000	0.093738
+1.870000	0.093145
+1.880000	0.092559
+1.890000	0.091978
+1.900000	0.091403
+1.910000	0.090834
+1.920000	0.090270
+1.930000	0.089712
+1.940000	0.089159
+1.950000	0.088612
+1.960000	0.088070
+1.970000	0.087534
+1.980000	0.087002
+1.990000	0.086476
+2.000000	0.085955
+2.010000	0.085438
+2.020000	0.084927
+2.030000	0.084420
+2.040000	0.083919
+2.050000	0.083422
+2.060000	0.082929
+2.070000	0.082441
+2.080000	0.081958
+2.090000	0.081479
+2.100000	0.081004
+2.110000	0.080534
+2.120000	0.080068
+2.130000	0.079606
+2.140000	0.079149
+2.150000	0.078696
+2.160000	0.078246
+2.170000	0.077801
+2.180000	0.077359
+2.190000	0.076922
+2.200000	0.076488
+2.210000	0.076059
+2.220000	0.075633
+2.230000	0.075210
+2.240000	0.074792
+2.250000	0.074377
+2.260000	0.073965
+2.270000	0.073557
+2.280000	0.073153
+2.290000	0.072752
+2.300000	0.072355
+2.310000	0.071960
+2.320000	0.071570
+2.330000	0.071182
+2.340000	0.070798
+2.350000	0.070417
+2.360000	0.070039
+2.370000	0.069664
+2.380000	0.069292
+2.390000	0.068924
+2.400000	0.068558
+2.410000	0.068195
+2.420000	0.067836
+2.430000	0.067479
+2.440000	0.067125
+2.450000	0.066774
+2.460000	0.066426
+2.470000	0.066081
+2.480000	0.065738
+2.490000	0.065398
+2.500000	0.065061
+2.510000	0.064726
+2.520000	0.064394
+2.530000	0.064065
+2.540000	0.063738
+2.550000	0.063414
+2.560000	0.063093
+2.570000	0.062774
+2.580000	0.062457
+2.590000	0.062143
+2.600000	0.061831
+2.610000	0.061521
+2.620000	0.061214
+2.630000	0.060909
+2.640000	0.060607
+2.650000	0.060307
+2.660000	0.060009
+2.670000	0.059713
+2.680000	0.059420
+2.690000	0.059129
+2.700000	0.058840
+2.710000	0.058553
+2.720000	0.058268
+2.730000	0.057985
+2.740000	0.057704
+2.750000	0.057426
+2.760000	0.057149
+2.770000	0.056875
+2.780000	0.056602
+2.790000	0.056332
+2.800000	0.056063
+2.810000	0.055796
+2.820000	0.055532
+2.830000	0.055269
+2.840000	0.055008
+2.850000	0.054749
+2.860000	0.054491
+2.870000	0.054236
+2.880000	0.053982
+2.890000	0.053730
+2.900000	0.053480
+2.910000	0.053232
+2.920000	0.052985
+2.930000	0.052740
+2.940000	0.052497
+2.950000	0.052256
+2.960000	0.052016
+2.970000	0.051778
+2.980000	0.051541
+2.990000	0.051306
+3.000000	0.051073
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/weibull_1.0_1.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/weibull_1.0_1.0.dat
new file mode 100644
index 0000000..3bf13dc
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/weibull_1.0_1.0.dat
@@ -0,0 +1,313 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	1.000000
+0.010000	0.990050
+0.020000	0.980199
+0.030000	0.970446
+0.040000	0.960789
+0.050000	0.951229
+0.060000	0.941765
+0.070000	0.932394
+0.080000	0.923116
+0.090000	0.913931
+0.100000	0.904837
+0.110000	0.895834
+0.120000	0.886920
+0.130000	0.878095
+0.140000	0.869358
+0.150000	0.860708
+0.160000	0.852144
+0.170000	0.843665
+0.180000	0.835270
+0.190000	0.826959
+0.200000	0.818731
+0.210000	0.810584
+0.220000	0.802519
+0.230000	0.794534
+0.240000	0.786628
+0.250000	0.778801
+0.260000	0.771052
+0.270000	0.763379
+0.280000	0.755784
+0.290000	0.748264
+0.300000	0.740818
+0.310000	0.733447
+0.320000	0.726149
+0.330000	0.718924
+0.340000	0.711770
+0.350000	0.704688
+0.360000	0.697676
+0.370000	0.690734
+0.380000	0.683861
+0.390000	0.677057
+0.400000	0.670320
+0.410000	0.663650
+0.420000	0.657047
+0.430000	0.650509
+0.440000	0.644036
+0.450000	0.637628
+0.460000	0.631284
+0.470000	0.625002
+0.480000	0.618783
+0.490000	0.612626
+0.500000	0.606531
+0.510000	0.600496
+0.520000	0.594521
+0.530000	0.588605
+0.540000	0.582748
+0.550000	0.576950
+0.560000	0.571209
+0.570000	0.565525
+0.580000	0.559898
+0.590000	0.554327
+0.600000	0.548812
+0.610000	0.543351
+0.620000	0.537944
+0.630000	0.532592
+0.640000	0.527292
+0.650000	0.522046
+0.660000	0.516851
+0.670000	0.511709
+0.680000	0.506617
+0.690000	0.501576
+0.700000	0.496585
+0.710000	0.491644
+0.720000	0.486752
+0.730000	0.481909
+0.740000	0.477114
+0.750000	0.472367
+0.760000	0.467666
+0.770000	0.463013
+0.780000	0.458406
+0.790000	0.453845
+0.800000	0.449329
+0.810000	0.444858
+0.820000	0.440432
+0.830000	0.436049
+0.840000	0.431711
+0.850000	0.427415
+0.860000	0.423162
+0.870000	0.418952
+0.880000	0.414783
+0.890000	0.410656
+0.900000	0.406570
+0.910000	0.402524
+0.920000	0.398519
+0.930000	0.394554
+0.940000	0.390628
+0.950000	0.386741
+0.960000	0.382893
+0.970000	0.379083
+0.980000	0.375311
+0.990000	0.371577
+1.000000	0.367879
+1.010000	0.364219
+1.020000	0.360595
+1.030000	0.357007
+1.040000	0.353455
+1.050000	0.349938
+1.060000	0.346456
+1.070000	0.343009
+1.080000	0.339596
+1.090000	0.336216
+1.100000	0.332871
+1.110000	0.329559
+1.120000	0.326280
+1.130000	0.323033
+1.140000	0.319819
+1.150000	0.316637
+1.160000	0.313486
+1.170000	0.310367
+1.180000	0.307279
+1.190000	0.304221
+1.200000	0.301194
+1.210000	0.298197
+1.220000	0.295230
+1.230000	0.292293
+1.240000	0.289384
+1.250000	0.286505
+1.260000	0.283654
+1.270000	0.280832
+1.280000	0.278037
+1.290000	0.275271
+1.300000	0.272532
+1.310000	0.269820
+1.320000	0.267135
+1.330000	0.264477
+1.340000	0.261846
+1.350000	0.259240
+1.360000	0.256661
+1.370000	0.254107
+1.380000	0.251579
+1.390000	0.249075
+1.400000	0.246597
+1.410000	0.244143
+1.420000	0.241714
+1.430000	0.239309
+1.440000	0.236928
+1.450000	0.234570
+1.460000	0.232236
+1.470000	0.229925
+1.480000	0.227638
+1.490000	0.225373
+1.500000	0.223130
+1.510000	0.220910
+1.520000	0.218712
+1.530000	0.216536
+1.540000	0.214381
+1.550000	0.212248
+1.560000	0.210136
+1.570000	0.208045
+1.580000	0.205975
+1.590000	0.203926
+1.600000	0.201897
+1.610000	0.199888
+1.620000	0.197899
+1.630000	0.195930
+1.640000	0.193980
+1.650000	0.192050
+1.660000	0.190139
+1.670000	0.188247
+1.680000	0.186374
+1.690000	0.184520
+1.700000	0.182684
+1.710000	0.180866
+1.720000	0.179066
+1.730000	0.177284
+1.740000	0.175520
+1.750000	0.173774
+1.760000	0.172045
+1.770000	0.170333
+1.780000	0.168638
+1.790000	0.166960
+1.800000	0.165299
+1.810000	0.163654
+1.820000	0.162026
+1.830000	0.160414
+1.840000	0.158817
+1.850000	0.157237
+1.860000	0.155673
+1.870000	0.154124
+1.880000	0.152590
+1.890000	0.151072
+1.900000	0.149569
+1.910000	0.148080
+1.920000	0.146607
+1.930000	0.145148
+1.940000	0.143704
+1.950000	0.142274
+1.960000	0.140858
+1.970000	0.139457
+1.980000	0.138069
+1.990000	0.136695
+2.000000	0.135335
+2.010000	0.133989
+2.020000	0.132655
+2.030000	0.131336
+2.040000	0.130029
+2.050000	0.128735
+2.060000	0.127454
+2.070000	0.126186
+2.080000	0.124930
+2.090000	0.123687
+2.100000	0.122456
+2.110000	0.121238
+2.120000	0.120032
+2.130000	0.118837
+2.140000	0.117655
+2.150000	0.116484
+2.160000	0.115325
+2.170000	0.114178
+2.180000	0.113042
+2.190000	0.111917
+2.200000	0.110803
+2.210000	0.109701
+2.220000	0.108609
+2.230000	0.107528
+2.240000	0.106459
+2.250000	0.105399
+2.260000	0.104350
+2.270000	0.103312
+2.280000	0.102284
+2.290000	0.101266
+2.300000	0.100259
+2.310000	0.099261
+2.320000	0.098274
+2.330000	0.097296
+2.340000	0.096328
+2.350000	0.095369
+2.360000	0.094420
+2.370000	0.093481
+2.380000	0.092551
+2.390000	0.091630
+2.400000	0.090718
+2.410000	0.089815
+2.420000	0.088922
+2.430000	0.088037
+2.440000	0.087161
+2.450000	0.086294
+2.460000	0.085435
+2.470000	0.084585
+2.480000	0.083743
+2.490000	0.082910
+2.500000	0.082085
+2.510000	0.081268
+2.520000	0.080460
+2.530000	0.079659
+2.540000	0.078866
+2.550000	0.078082
+2.560000	0.077305
+2.570000	0.076536
+2.580000	0.075774
+2.590000	0.075020
+2.600000	0.074274
+2.610000	0.073535
+2.620000	0.072803
+2.630000	0.072078
+2.640000	0.071361
+2.650000	0.070651
+2.660000	0.069948
+2.670000	0.069252
+2.680000	0.068563
+2.690000	0.067881
+2.700000	0.067206
+2.710000	0.066537
+2.720000	0.065875
+2.730000	0.065219
+2.740000	0.064570
+2.750000	0.063928
+2.760000	0.063292
+2.770000	0.062662
+2.780000	0.062039
+2.790000	0.061421
+2.800000	0.060810
+2.810000	0.060205
+2.820000	0.059606
+2.830000	0.059013
+2.840000	0.058426
+2.850000	0.057844
+2.860000	0.057269
+2.870000	0.056699
+2.880000	0.056135
+2.890000	0.055576
+2.900000	0.055023
+2.910000	0.054476
+2.920000	0.053934
+2.930000	0.053397
+2.940000	0.052866
+2.950000	0.052340
+2.960000	0.051819
+2.970000	0.051303
+2.980000	0.050793
+2.990000	0.050287
+3.000000	0.049787
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/weibull_1.5_1.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/weibull_1.5_1.0.dat
new file mode 100644
index 0000000..762a666
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/weibull_1.5_1.0.dat
@@ -0,0 +1,313 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.010000	0.149850
+0.020000	0.211533
+0.030000	0.258461
+0.040000	0.297610
+0.050000	0.331681
+0.060000	0.362063
+0.070000	0.389580
+0.080000	0.414772
+0.090000	0.438013
+0.100000	0.459576
+0.110000	0.479671
+0.120000	0.498458
+0.130000	0.516068
+0.140000	0.532605
+0.150000	0.548159
+0.160000	0.562803
+0.170000	0.576600
+0.180000	0.589605
+0.190000	0.601867
+0.200000	0.613425
+0.210000	0.624320
+0.220000	0.634583
+0.230000	0.644244
+0.240000	0.653333
+0.250000	0.661873
+0.260000	0.669887
+0.270000	0.677397
+0.280000	0.684423
+0.290000	0.690982
+0.300000	0.697092
+0.310000	0.702769
+0.320000	0.708028
+0.330000	0.712884
+0.340000	0.717350
+0.350000	0.721438
+0.360000	0.725162
+0.370000	0.728532
+0.380000	0.731561
+0.390000	0.734259
+0.400000	0.736635
+0.410000	0.738701
+0.420000	0.740465
+0.430000	0.741938
+0.440000	0.743127
+0.450000	0.744042
+0.460000	0.744691
+0.470000	0.745081
+0.480000	0.745222
+0.490000	0.745120
+0.500000	0.744783
+0.510000	0.744219
+0.520000	0.743434
+0.530000	0.742435
+0.540000	0.741229
+0.550000	0.739823
+0.560000	0.738223
+0.570000	0.736435
+0.580000	0.734465
+0.590000	0.732319
+0.600000	0.730004
+0.610000	0.727524
+0.620000	0.724886
+0.630000	0.722094
+0.640000	0.719155
+0.650000	0.716073
+0.660000	0.712854
+0.670000	0.709502
+0.680000	0.706022
+0.690000	0.702420
+0.700000	0.698700
+0.710000	0.694866
+0.720000	0.690923
+0.730000	0.686875
+0.740000	0.682727
+0.750000	0.678484
+0.760000	0.674148
+0.770000	0.669724
+0.780000	0.665216
+0.790000	0.660629
+0.800000	0.655965
+0.810000	0.651228
+0.820000	0.646423
+0.830000	0.641552
+0.840000	0.636619
+0.850000	0.631627
+0.860000	0.626581
+0.870000	0.621482
+0.880000	0.616335
+0.890000	0.611142
+0.900000	0.605906
+0.910000	0.600631
+0.920000	0.595319
+0.930000	0.589972
+0.940000	0.584595
+0.950000	0.579189
+0.960000	0.573757
+0.970000	0.568301
+0.980000	0.562825
+0.990000	0.557330
+1.000000	0.551819
+1.010000	0.546294
+1.020000	0.540758
+1.030000	0.535213
+1.040000	0.529660
+1.050000	0.524102
+1.060000	0.518540
+1.070000	0.512978
+1.080000	0.507416
+1.090000	0.501857
+1.100000	0.496303
+1.110000	0.490754
+1.120000	0.485213
+1.130000	0.479682
+1.140000	0.474161
+1.150000	0.468654
+1.160000	0.463160
+1.170000	0.457682
+1.180000	0.452220
+1.190000	0.446777
+1.200000	0.441354
+1.210000	0.435951
+1.220000	0.430571
+1.230000	0.425214
+1.240000	0.419881
+1.250000	0.414573
+1.260000	0.409292
+1.270000	0.404039
+1.280000	0.398814
+1.290000	0.393619
+1.300000	0.388454
+1.310000	0.383320
+1.320000	0.378218
+1.330000	0.373149
+1.340000	0.368114
+1.350000	0.363113
+1.360000	0.358147
+1.370000	0.353217
+1.380000	0.348323
+1.390000	0.343465
+1.400000	0.338646
+1.410000	0.333864
+1.420000	0.329120
+1.430000	0.324416
+1.440000	0.319751
+1.450000	0.315125
+1.460000	0.310540
+1.470000	0.305996
+1.480000	0.301492
+1.490000	0.297030
+1.500000	0.292609
+1.510000	0.288229
+1.520000	0.283892
+1.530000	0.279597
+1.540000	0.275344
+1.550000	0.271134
+1.560000	0.266967
+1.570000	0.262842
+1.580000	0.258761
+1.590000	0.254722
+1.600000	0.250727
+1.610000	0.246775
+1.620000	0.242866
+1.630000	0.239001
+1.640000	0.235178
+1.650000	0.231399
+1.660000	0.227664
+1.670000	0.223971
+1.680000	0.220322
+1.690000	0.216715
+1.700000	0.213152
+1.710000	0.209632
+1.720000	0.206154
+1.730000	0.202719
+1.740000	0.199327
+1.750000	0.195977
+1.760000	0.192669
+1.770000	0.189403
+1.780000	0.186179
+1.790000	0.182997
+1.800000	0.179857
+1.810000	0.176757
+1.820000	0.173699
+1.830000	0.170682
+1.840000	0.167705
+1.850000	0.164768
+1.860000	0.161872
+1.870000	0.159016
+1.880000	0.156199
+1.890000	0.153421
+1.900000	0.150683
+1.910000	0.147983
+1.920000	0.145322
+1.930000	0.142699
+1.940000	0.140114
+1.950000	0.137567
+1.960000	0.135056
+1.970000	0.132583
+1.980000	0.130147
+1.990000	0.127746
+2.000000	0.125382
+2.010000	0.123054
+2.020000	0.120761
+2.030000	0.118502
+2.040000	0.116279
+2.050000	0.114090
+2.060000	0.111935
+2.070000	0.109813
+2.080000	0.107725
+2.090000	0.105670
+2.100000	0.103648
+2.110000	0.101658
+2.120000	0.099700
+2.130000	0.097773
+2.140000	0.095878
+2.150000	0.094013
+2.160000	0.092179
+2.170000	0.090376
+2.180000	0.088602
+2.190000	0.086857
+2.200000	0.085142
+2.210000	0.083456
+2.220000	0.081798
+2.230000	0.080168
+2.240000	0.078566
+2.250000	0.076991
+2.260000	0.075443
+2.270000	0.073922
+2.280000	0.072427
+2.290000	0.070959
+2.300000	0.069516
+2.310000	0.068098
+2.320000	0.066705
+2.330000	0.065337
+2.340000	0.063994
+2.350000	0.062674
+2.360000	0.061378
+2.370000	0.060105
+2.380000	0.058856
+2.390000	0.057628
+2.400000	0.056424
+2.410000	0.055241
+2.420000	0.054080
+2.430000	0.052941
+2.440000	0.051822
+2.450000	0.050724
+2.460000	0.049647
+2.470000	0.048590
+2.480000	0.047553
+2.490000	0.046535
+2.500000	0.045537
+2.510000	0.044557
+2.520000	0.043596
+2.530000	0.042654
+2.540000	0.041730
+2.550000	0.040823
+2.560000	0.039934
+2.570000	0.039062
+2.580000	0.038207
+2.590000	0.037369
+2.600000	0.036547
+2.610000	0.035741
+2.620000	0.034952
+2.630000	0.034178
+2.640000	0.033419
+2.650000	0.032675
+2.660000	0.031946
+2.670000	0.031232
+2.680000	0.030532
+2.690000	0.029846
+2.700000	0.029174
+2.710000	0.028516
+2.720000	0.027871
+2.730000	0.027240
+2.740000	0.026621
+2.750000	0.026015
+2.760000	0.025421
+2.770000	0.024840
+2.780000	0.024270
+2.790000	0.023713
+2.800000	0.023167
+2.810000	0.022633
+2.820000	0.022109
+2.830000	0.021597
+2.840000	0.021096
+2.850000	0.020605
+2.860000	0.020124
+2.870000	0.019654
+2.880000	0.019194
+2.890000	0.018744
+2.900000	0.018303
+2.910000	0.017872
+2.920000	0.017450
+2.930000	0.017037
+2.940000	0.016633
+2.950000	0.016238
+2.960000	0.015851
+2.970000	0.015473
+2.980000	0.015103
+2.990000	0.014741
+3.000000	0.014388
diff --git a/v0.2-M1/chi/reference-manual/distribution_plots/weibull_5.0_1.0.dat b/v0.2-M1/chi/reference-manual/distribution_plots/weibull_5.0_1.0.dat
new file mode 100644
index 0000000..5aa874d
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/distribution_plots/weibull_5.0_1.0.dat
@@ -0,0 +1,313 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+0.000000	0.000000
+0.010000	0.000000
+0.020000	0.000001
+0.030000	0.000004
+0.040000	0.000013
+0.050000	0.000031
+0.060000	0.000065
+0.070000	0.000120
+0.080000	0.000205
+0.090000	0.000328
+0.100000	0.000500
+0.110000	0.000732
+0.120000	0.001037
+0.130000	0.001428
+0.140000	0.001921
+0.150000	0.002531
+0.160000	0.003276
+0.170000	0.004175
+0.180000	0.005248
+0.190000	0.006514
+0.200000	0.007997
+0.210000	0.009720
+0.220000	0.011707
+0.230000	0.013983
+0.240000	0.016576
+0.250000	0.019512
+0.260000	0.022822
+0.270000	0.026534
+0.280000	0.030680
+0.290000	0.035292
+0.300000	0.040402
+0.310000	0.046044
+0.320000	0.052253
+0.330000	0.059064
+0.340000	0.066514
+0.350000	0.074638
+0.360000	0.083475
+0.370000	0.093060
+0.380000	0.103434
+0.390000	0.114633
+0.400000	0.126696
+0.410000	0.139661
+0.420000	0.153565
+0.430000	0.168445
+0.440000	0.184340
+0.450000	0.201283
+0.460000	0.219309
+0.470000	0.238452
+0.480000	0.258743
+0.490000	0.280212
+0.500000	0.302885
+0.510000	0.326788
+0.520000	0.351942
+0.530000	0.378365
+0.540000	0.406073
+0.550000	0.435074
+0.560000	0.465376
+0.570000	0.496979
+0.580000	0.529879
+0.590000	0.564065
+0.600000	0.599521
+0.610000	0.636222
+0.620000	0.674139
+0.630000	0.713233
+0.640000	0.753456
+0.650000	0.794754
+0.660000	0.837062
+0.670000	0.880307
+0.680000	0.924405
+0.690000	0.969262
+0.700000	1.014776
+0.710000	1.060832
+0.720000	1.107306
+0.730000	1.154062
+0.740000	1.200955
+0.750000	1.247829
+0.760000	1.294517
+0.770000	1.340846
+0.780000	1.386628
+0.790000	1.431672
+0.800000	1.475776
+0.810000	1.518731
+0.820000	1.560325
+0.830000	1.600339
+0.840000	1.638551
+0.850000	1.674738
+0.860000	1.708677
+0.870000	1.740145
+0.880000	1.768926
+0.890000	1.794806
+0.900000	1.817580
+0.910000	1.837054
+0.920000	1.853044
+0.930000	1.865384
+0.940000	1.873920
+0.950000	1.878519
+0.960000	1.879070
+0.970000	1.875485
+0.980000	1.867697
+0.990000	1.855671
+1.000000	1.839397
+1.010000	1.818895
+1.020000	1.794215
+1.030000	1.765438
+1.040000	1.732677
+1.050000	1.696075
+1.060000	1.655806
+1.070000	1.612073
+1.080000	1.565107
+1.090000	1.515166
+1.100000	1.462531
+1.110000	1.407507
+1.120000	1.350414
+1.130000	1.291589
+1.140000	1.231381
+1.150000	1.170146
+1.160000	1.108243
+1.170000	1.046033
+1.180000	0.983869
+1.190000	0.922099
+1.200000	0.861056
+1.210000	0.801057
+1.220000	0.742400
+1.230000	0.685360
+1.240000	0.630185
+1.250000	0.577097
+1.260000	0.526285
+1.270000	0.477911
+1.280000	0.432101
+1.290000	0.388952
+1.300000	0.348529
+1.310000	0.310863
+1.320000	0.275960
+1.330000	0.243795
+1.340000	0.214320
+1.350000	0.187462
+1.360000	0.163130
+1.370000	0.141212
+1.380000	0.121587
+1.390000	0.104118
+1.400000	0.088663
+1.410000	0.075074
+1.420000	0.063199
+1.430000	0.052888
+1.440000	0.043993
+1.450000	0.036369
+1.460000	0.029878
+1.470000	0.024388
+1.480000	0.019777
+1.490000	0.015932
+1.500000	0.012747
+1.510000	0.010129
+1.520000	0.007991
+1.530000	0.006260
+1.540000	0.004868
+1.550000	0.003757
+1.560000	0.002878
+1.570000	0.002187
+1.580000	0.001649
+1.590000	0.001234
+1.600000	0.000915
+1.610000	0.000673
+1.620000	0.000491
+1.630000	0.000355
+1.640000	0.000255
+1.650000	0.000181
+1.660000	0.000127
+1.670000	0.000089
+1.680000	0.000061
+1.690000	0.000042
+1.700000	0.000028
+1.710000	0.000019
+1.720000	0.000013
+1.730000	0.000008
+1.740000	0.000005
+1.750000	0.000003
+1.760000	0.000002
+1.770000	0.000001
+1.780000	0.000001
+1.790000	0.000001
+1.800000	0.000000
+1.810000	0.000000
+1.820000	0.000000
+1.830000	0.000000
+1.840000	0.000000
+1.850000	0.000000
+1.860000	0.000000
+1.870000	0.000000
+1.880000	0.000000
+1.890000	0.000000
+1.900000	0.000000
+1.910000	0.000000
+1.920000	0.000000
+1.930000	0.000000
+1.940000	0.000000
+1.950000	0.000000
+1.960000	0.000000
+1.970000	0.000000
+1.980000	0.000000
+1.990000	0.000000
+2.000000	0.000000
+2.010000	0.000000
+2.020000	0.000000
+2.030000	0.000000
+2.040000	0.000000
+2.050000	0.000000
+2.060000	0.000000
+2.070000	0.000000
+2.080000	0.000000
+2.090000	0.000000
+2.100000	0.000000
+2.110000	0.000000
+2.120000	0.000000
+2.130000	0.000000
+2.140000	0.000000
+2.150000	0.000000
+2.160000	0.000000
+2.170000	0.000000
+2.180000	0.000000
+2.190000	0.000000
+2.200000	0.000000
+2.210000	0.000000
+2.220000	0.000000
+2.230000	0.000000
+2.240000	0.000000
+2.250000	0.000000
+2.260000	0.000000
+2.270000	0.000000
+2.280000	0.000000
+2.290000	0.000000
+2.300000	0.000000
+2.310000	0.000000
+2.320000	0.000000
+2.330000	0.000000
+2.340000	0.000000
+2.350000	0.000000
+2.360000	0.000000
+2.370000	0.000000
+2.380000	0.000000
+2.390000	0.000000
+2.400000	0.000000
+2.410000	0.000000
+2.420000	0.000000
+2.430000	0.000000
+2.440000	0.000000
+2.450000	0.000000
+2.460000	0.000000
+2.470000	0.000000
+2.480000	0.000000
+2.490000	0.000000
+2.500000	0.000000
+2.510000	0.000000
+2.520000	0.000000
+2.530000	0.000000
+2.540000	0.000000
+2.550000	0.000000
+2.560000	0.000000
+2.570000	0.000000
+2.580000	0.000000
+2.590000	0.000000
+2.600000	0.000000
+2.610000	0.000000
+2.620000	0.000000
+2.630000	0.000000
+2.640000	0.000000
+2.650000	0.000000
+2.660000	0.000000
+2.670000	0.000000
+2.680000	0.000000
+2.690000	0.000000
+2.700000	0.000000
+2.710000	0.000000
+2.720000	0.000000
+2.730000	0.000000
+2.740000	0.000000
+2.750000	0.000000
+2.760000	0.000000
+2.770000	0.000000
+2.780000	0.000000
+2.790000	0.000000
+2.800000	0.000000
+2.810000	0.000000
+2.820000	0.000000
+2.830000	0.000000
+2.840000	0.000000
+2.850000	0.000000
+2.860000	0.000000
+2.870000	0.000000
+2.880000	0.000000
+2.890000	0.000000
+2.900000	0.000000
+2.910000	0.000000
+2.920000	0.000000
+2.930000	0.000000
+2.940000	0.000000
+2.950000	0.000000
+2.960000	0.000000
+2.970000	0.000000
+2.980000	0.000000
+2.990000	0.000000
+3.000000	0.000000
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/Makefile b/v0.2-M1/chi/reference-manual/rail_diagrams/Makefile
new file mode 100644
index 0000000..d7a39c3
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/Makefile
@@ -0,0 +1,45 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+#
+# Makefile for creating the reference manual rail road images
+#
+LATEX=latex
+DVIPS=dvips
+RAIL=rail
+CROP=bbox_add.pl
+EPSPNG=eps2png
+
+NONSOURCE=picture.tex preamble.tex postamble.tex
+SOURCE=$(filter-out $(NONSOURCE),$(wildcard *.tex))
+DEST=$(SOURCE:.tex=.png)
+
+.phony: images clean
+
+images: $(DEST)
+
+# eps2png: -t=transparent, -f=force writing, -d=dpi
+%.png: %.tex
+	cat preamble.tex $< postamble.tex > picture.tex
+	$(LATEX) picture.tex
+	$(RAIL) picture
+	$(LATEX) picture.tex
+	$(DVIPS) -E -o picture.eps picture.dvi
+	$(CROP) picture.eps
+	$(EPSPNG) -d 120 -f -t picture.eps
+	mv picture.png $@
+
+clean:
+	for i in $(DEST) picture.aux picture.dvi picture.eps picture.log picture.tex;\
+	do if test -f $$i;\
+	   then rm $$i;\
+	   fi;\
+	done
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/addressable.png b/v0.2-M1/chi/reference-manual/rail_diagrams/addressable.png
new file mode 100644
index 0000000..5de6c65
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/addressable.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/addressable.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/addressable.tex
new file mode 100644
index 0000000..be3f67c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/addressable.tex
@@ -0,0 +1,19 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+Addressable : VARNAMETK
+              ( ()
+              | ( ( ( [1] DOTTK FIELDNAMETK )
+                  | ( [2] SQOPENTK Expression SQCLOSETK )
+                  ) + () )
+              ) ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/assignment_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/assignment_statement.png
new file mode 100644
index 0000000..294262c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/assignment_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/assignment_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/assignment_statement.tex
new file mode 100644
index 0000000..99b2502
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/assignment_statement.tex
@@ -0,0 +1,17 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+AssignmentStatement : ( Addressable + COMMATK )
+                      BECOMESTK
+                      ( Expression + COMMATK ) ;
+\end{rail}
+
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/body.png b/v0.2-M1/chi/reference-manual/rail_diagrams/body.png
new file mode 100644
index 0000000..fe8dfba
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/body.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/body.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/body.tex
new file mode 100644
index 0000000..1845a4c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/body.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+Body : ( () | VarDefinitions ) ( [1] ( Statement + SEMICOLTK ) )
+     ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/bool_expression.png b/v0.2-M1/chi/reference-manual/rail_diagrams/bool_expression.png
new file mode 100644
index 0000000..3aeba21
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/bool_expression.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/bool_expression.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/bool_expression.tex
new file mode 100644
index 0000000..fbc3945
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/bool_expression.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+BooleanLiteralValue : TRUEKW | FALSEKW
+                    ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/break_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/break_statement.png
new file mode 100644
index 0000000..02272c3
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/break_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/break_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/break_statement.tex
new file mode 100644
index 0000000..3e47108
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/break_statement.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+BreakStatement : BREAKKW ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/cast_expression.png b/v0.2-M1/chi/reference-manual/rail_diagrams/cast_expression.png
new file mode 100644
index 0000000..2070320
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/cast_expression.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/cast_expression.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/cast_expression.tex
new file mode 100644
index 0000000..03ef741
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/cast_expression.tex
@@ -0,0 +1,18 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+CastExpression : ( BOOLKW | INTKW | REALKW | STRINGKW
+                 | TIMERKW | MATRIXKW | SETKW
+                 )
+                 PAROPENTK Expression PARCLOSETK
+               ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/channel_type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/channel_type.png
new file mode 100644
index 0000000..5044216
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/channel_type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/channel_type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/channel_type.tex
new file mode 100644
index 0000000..438b058
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/channel_type.tex
@@ -0,0 +1,16 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ChannelType : CHANKW ( () | RECEIVETK | SENDTK | SENDRECEIVETK )
+              ( Type | VOIDKW )
+            ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/choice_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/choice_statement.png
new file mode 100644
index 0000000..61b691b
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/choice_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/choice_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/choice_statement.tex
new file mode 100644
index 0000000..4bbf001
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/choice_statement.tex
@@ -0,0 +1,21 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ChoiceStatement : IFKW BooleanExpression COLONTK ( Statement + SEMICOLTK ) \\
+                  ( ()
+                  | ( ELIFKW BooleanExpression COLONTK ( Statement + SEMICOLTK ) ) + ()
+                  ) \\
+                  ( ()
+                  | ( ELSEKW COLONTK ( Statement + SEMICOLTK ) )
+                  )
+                  ENDKW ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/close_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/close_statement.png
new file mode 100644
index 0000000..eb418b4
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/close_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/close_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/close_statement.tex
new file mode 100644
index 0000000..697f9f1
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/close_statement.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+CloseStatement : CLOSEKW PAROPENTK FileExpression PARCLOSETK ;
+\end{rail}
+
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/communication_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/communication_statement.png
new file mode 100644
index 0000000..1d6d20a
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/communication_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/communication_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/communication_statement.tex
new file mode 100644
index 0000000..57a97d9
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/communication_statement.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+CommunicationStatement : SendStatement | ReceiveStatement
+               | SelectStatement ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/compare_expression.png b/v0.2-M1/chi/reference-manual/rail_diagrams/compare_expression.png
new file mode 100644
index 0000000..3ab6511
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/compare_expression.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/compare_expression.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/compare_expression.tex
new file mode 100644
index 0000000..3dae0d8
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/compare_expression.tex
@@ -0,0 +1,25 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+BooleanExpression : Expression ( EQTK | NETK ) Expression
+                  | ( IntegerExpression | RealExpression )
+                    ( LTTK | LETK | GETK | GTTK )
+                    ( IntegerExpression | RealExpression )
+                  | StringExpression ( LTTK | LETK | GETK | GTTK )
+                    StringExpression
+                  | Expression INKW ( ListExpression | SetExpression
+                                    | DictionaryExpression )
+                  | ListExpression SUBKW ListExpression
+                  | SetExpression SUBKW SetExpression
+                  | DictionaryExpression SUBKW DictionaryExpression
+                  ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/constantdef.png b/v0.2-M1/chi/reference-manual/rail_diagrams/constantdef.png
new file mode 100644
index 0000000..f37f28c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/constantdef.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/constantdef.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/constantdef.tex
new file mode 100644
index 0000000..d1dd6be
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/constantdef.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+    ConstantDefinition: CONSTKW ( Type CONSTANTNAMETK BECOMESTK Expression ) + COMMATK ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/container_type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/container_type.png
new file mode 100644
index 0000000..a87a9ae
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/container_type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/container_type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/container_type.tex
new file mode 100644
index 0000000..45c37fe
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/container_type.tex
@@ -0,0 +1,17 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ContainerType : SetType
+              | ListType
+              | DictionaryType
+              ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/continue_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/continue_statement.png
new file mode 100644
index 0000000..d104515
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/continue_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/continue_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/continue_statement.tex
new file mode 100644
index 0000000..0c87781
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/continue_statement.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ContinueStatement : CONTINUEKW ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/delay_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/delay_statement.png
new file mode 100644
index 0000000..6ec0f2e
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/delay_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/delay_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/delay_statement.tex
new file mode 100644
index 0000000..f55e37d
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/delay_statement.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+DelayStatement : DELAYKW ( IntegerExpression | RealExpression ) ;
+\end{rail}
+
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/dictionary_type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/dictionary_type.png
new file mode 100644
index 0000000..f613671
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/dictionary_type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/dictionary_type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/dictionary_type.tex
new file mode 100644
index 0000000..957633a
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/dictionary_type.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+DictionaryType : DICTKW PAROPENTK Type COLONTK Type PARCLOSETK
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/distribution_type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/distribution_type.png
new file mode 100644
index 0000000..85168f8
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/distribution_type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/distribution_type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/distribution_type.tex
new file mode 100644
index 0000000..d12a478
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/distribution_type.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+DistributionType : DISTKW Type ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/elementary_type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/elementary_type.png
new file mode 100644
index 0000000..1520ed4
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/elementary_type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/elementary_type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/elementary_type.tex
new file mode 100644
index 0000000..022c38f
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/elementary_type.tex
@@ -0,0 +1,18 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ElementaryType : BOOLKW | INTKW | REALKW | STRINGKW | FILEKW | INSTKW |
+                 TIMERKW |
+                 MATRIXKW PAROPENTK ConstantExpression COMMATK ConstantExpression PARCLOSETK |
+                 VOIDKW
+               ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/enum_value.png b/v0.2-M1/chi/reference-manual/rail_diagrams/enum_value.png
new file mode 100644
index 0000000..69585ed
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/enum_value.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/enum_value.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/enum_value.tex
new file mode 100644
index 0000000..20dcce4
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/enum_value.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+EnumLiteralValue : ENUMVALUENAMETK ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/enumdef.png b/v0.2-M1/chi/reference-manual/rail_diagrams/enumdef.png
new file mode 100644
index 0000000..f08fefe
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/enumdef.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/enumdef.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/enumdef.tex
new file mode 100644
index 0000000..7febf1f
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/enumdef.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+EnumDefinition: ENUMKW ( ENUMTYPENAMETK BECOMESTK
+                CUROPENTK ( ENUMVALUENAMETK + COMMATK ) CURCLOSETK ) + COMMATK ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/exit_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/exit_statement.png
new file mode 100644
index 0000000..1f78332
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/exit_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/exit_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/exit_statement.tex
new file mode 100644
index 0000000..a0184ba
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/exit_statement.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ExitStatement : EXITKW ( () | ( Expression + COMMATK ) ) ;
+\end{rail}
+
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/finish_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/finish_statement.png
new file mode 100644
index 0000000..9ff77ce
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/finish_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/finish_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/finish_statement.tex
new file mode 100644
index 0000000..2907570
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/finish_statement.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+FinishStatement : FINISHKW ( PROCESSNAMETK + COMMATK ) ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/for_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/for_statement.png
new file mode 100644
index 0000000..99bc003
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/for_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/for_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/for_statement.tex
new file mode 100644
index 0000000..7c774b0
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/for_statement.tex
@@ -0,0 +1,16 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ForStatement : FORKW ( VARNAMETK + COMMATK ) INKW Expression
+               COLONTK ( Statement + SEMICOLTK ) ENDKW
+             ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/formalparms.png b/v0.2-M1/chi/reference-manual/rail_diagrams/formalparms.png
new file mode 100644
index 0000000..7d04389
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/formalparms.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/formalparms.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/formalparms.tex
new file mode 100644
index 0000000..90bdb98
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/formalparms.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+FormalParameters: ( Type ( VARNAMETK + COMMATK ) ) + SEMICOLTK ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/func_call_expression.png b/v0.2-M1/chi/reference-manual/rail_diagrams/func_call_expression.png
new file mode 100644
index 0000000..42c8254
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/func_call_expression.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/func_call_expression.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/func_call_expression.tex
new file mode 100644
index 0000000..c8cbd4e
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/func_call_expression.tex
@@ -0,0 +1,16 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+FunctionCallExpression : Expression PAROPENTK
+                         ( () | ( Expression + COMMATK ) ) PARCLOSETK
+                       ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/funcdef.png b/v0.2-M1/chi/reference-manual/rail_diagrams/funcdef.png
new file mode 100644
index 0000000..a6b4698
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/funcdef.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/funcdef.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/funcdef.tex
new file mode 100644
index 0000000..9ab0ca4
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/funcdef.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+FunctionDefinition: FUNCKW Type FUNCTIONNAMETK
+                    PAROPENTK ( () | FormalParameters ) PARCLOSETK COLONTK Body ENDKW
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/function_type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/function_type.png
new file mode 100644
index 0000000..0742715
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/function_type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/function_type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/function_type.tex
new file mode 100644
index 0000000..013b077
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/function_type.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+FunctionType : FUNCKW Type PAROPENTK ( () | ( Type + COMMATK ) ) PARCLOSETK ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/generic_expression.png b/v0.2-M1/chi/reference-manual/rail_diagrams/generic_expression.png
new file mode 100644
index 0000000..d25f50d
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/generic_expression.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/generic_expression.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/generic_expression.tex
new file mode 100644
index 0000000..9a6015d
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/generic_expression.tex
@@ -0,0 +1,21 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+Expression : ( [1] ( CONSTANTNAMETK
+                   | ENUMVALUENAMETK
+                   | VARNAMETK
+                   | FUNCTIONNAMETK
+                   | PROCESSNAMETK ) )
+           | ( [2] PAROPENTK Expression PARCLOSETK )
+           | ( [3] TypedExpression )
+           ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/iterative_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/iterative_statement.png
new file mode 100644
index 0000000..41515ea
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/iterative_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/iterative_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/iterative_statement.tex
new file mode 100644
index 0000000..1f65bbe
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/iterative_statement.tex
@@ -0,0 +1,16 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+Iterativestatement : WhileStatement
+               | ForStatement
+               | BreakStatement | ContinueStatement ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_real_number.png b/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_real_number.png
new file mode 100644
index 0000000..843c8df
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_real_number.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_real_number.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_real_number.tex
new file mode 100644
index 0000000..54bcd88
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_real_number.tex
@@ -0,0 +1,20 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+LexicalRealNumber : ( ZEROTK | ( ONENINETK ( () + ZERONINETK ) ) )
+                    ( DOTTK ( ZERONINETK + () )
+                    | ( ( () | ( DOTTK ( ZERONINETK + () ) ) )
+                        ( expTK | EXPTK ) ( () | PLUSTK | MINUSTK )
+                        ( ZEROTK | ( ONENINETK ( () + ZERONINETK ) ) )
+                        ) )
+                    ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_string_literal.png b/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_string_literal.png
new file mode 100644
index 0000000..437d65b
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_string_literal.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_string_literal.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_string_literal.tex
new file mode 100644
index 0000000..d9e5c09
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/lexical_string_literal.tex
@@ -0,0 +1,20 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+LexicalString : QUOTETK
+                ( ()
+                | ( ( SINGLE
+                    | ( BACKSLASHTK ( QUOTETK | BACKSLASHTK | TTK | NTK )  )
+                    ) + () )
+                )
+                QUOTETK ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/list_type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/list_type.png
new file mode 100644
index 0000000..c65d704
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/list_type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/list_type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/list_type.tex
new file mode 100644
index 0000000..cd4a83c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/list_type.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ListType : LISTKW ( () | ( PAROPENTK Expression PARCLOSETK ) ) Type
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_dictionary.png b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_dictionary.png
new file mode 100644
index 0000000..55c6d5c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_dictionary.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_dictionary.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_dictionary.tex
new file mode 100644
index 0000000..cc2d4d2
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_dictionary.tex
@@ -0,0 +1,16 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+DictionaryLiteralValue : LTTK Type COLONTK Type GTTK CUROPENTK CURCLOSETK
+                | CUROPENTK ( ( Expression COLONTK Expression ) + COMMATK ) CURCLOSETK
+                ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_integer_number.png b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_integer_number.png
new file mode 100644
index 0000000..391aef3
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_integer_number.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_integer_number.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_integer_number.tex
new file mode 100644
index 0000000..d29be4d
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_integer_number.tex
@@ -0,0 +1,16 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+LexicalIntegerNumber : ZEROTK
+                     | ONENINETK ( () + ZERONINETK )
+                     ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_list.png b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_list.png
new file mode 100644
index 0000000..ef5caa3
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_list.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_list.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_list.tex
new file mode 100644
index 0000000..e5a3cc6
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_list.tex
@@ -0,0 +1,16 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ListLiteralValue : LTTK Type GTTK SQOPENTK SQCLOSETK
+                 | SQOPENTK ( Expression + COMMATK ) SQCLOSETK
+                 ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_matrix.png b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_matrix.png
new file mode 100644
index 0000000..9a56468
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_matrix.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_matrix.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_matrix.tex
new file mode 100644
index 0000000..076ebee
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_matrix.tex
@@ -0,0 +1,18 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+MatrixExpression : SQOPENTK
+                   ( ( RealExpression + COMMATK )
+                     ( ( SEMICOLTK ( RealExpression + COMMATK ) ) + () ) )
+                   SQCLOSETK
+                 ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_set.png b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_set.png
new file mode 100644
index 0000000..e2374df
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_set.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_set.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_set.tex
new file mode 100644
index 0000000..0d1d8d5
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_set.tex
@@ -0,0 +1,16 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+SetLiteralValue : ( LTTK Type GTTK CUROPENTK CURCLOSETK )
+                | ( CUROPENTK ( Expression + COMMATK ) CURCLOSETK )
+                ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_tuple.png b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_tuple.png
new file mode 100644
index 0000000..b0c31fb
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_tuple.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/literal_tuple.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_tuple.tex
new file mode 100644
index 0000000..bca4a0f
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/literal_tuple.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+TupleExpression : PAROPENTK Expression COMMATK ( Expression + COMMATK )
+                  PARCLOSETK ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/modeldef.png b/v0.2-M1/chi/reference-manual/rail_diagrams/modeldef.png
new file mode 100644
index 0000000..c433251
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/modeldef.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/modeldef.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/modeldef.tex
new file mode 100644
index 0000000..2cd650d
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/modeldef.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ModelDefinition: MODELKW ( () | Type ) MODELNAMETK PAROPENTK
+                 ( () | FormalParameters ) PARCLOSETK COLONTK Body ENDKW
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/other_statements.png b/v0.2-M1/chi/reference-manual/rail_diagrams/other_statements.png
new file mode 100644
index 0000000..b4f5f6b
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/other_statements.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/other_statements.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/other_statements.tex
new file mode 100644
index 0000000..38af97d
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/other_statements.tex
@@ -0,0 +1,20 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+OtherStatements : DelayStatement
+                | WriteStatement
+                | CloseStatement
+                | ReturnStatement
+                | ExitStatement
+                | PassStatement
+                ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/pass_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/pass_statement.png
new file mode 100644
index 0000000..692a502
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/pass_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/pass_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/pass_statement.tex
new file mode 100644
index 0000000..894cc9f
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/pass_statement.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+PassStatement : PASSKW ;
+\end{rail}
+
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/postamble.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/postamble.tex
new file mode 100644
index 0000000..42f325a
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/postamble.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+}
+\end{TeXtoEPS}
+\end{document}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/preamble.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/preamble.tex
new file mode 100644
index 0000000..86a175c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/preamble.tex
@@ -0,0 +1,131 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage[a4paper]{geometry}
+\usepackage{times}
+\usepackage{pst-eps}
+
+\usepackage{rail}
+
+\railnontermfont{\rmfamily\itshape}
+\railterm{ALTKW}\railalias{ALTKW}{alt}
+\railterm{ANDKW}\railalias{ANDKW}{and}
+\railterm{ASTERISKTK}\railalias{ASTERISKTK}{\char"2A} % *
+\railterm{BECOMESTK}\railalias{BECOMESTK}{\char"3D} % =
+\railterm{BOOLKW}\railalias{BOOLKW}{bool}
+\railterm{BREAKKW}\railalias{BREAKKW}{break}
+\railterm{CARETTK}\railalias{CARETTK}{\char"5E} % ^
+\railterm{CHANKW}\railalias{CHANKW}{chan}
+\railterm{CHANNELKW}\railalias{CHANNELKW}{channel}
+\railterm{CLOSEKW}\railalias{CLOSEKW}{close}
+\railterm{COLONTK}\railalias{COLONTK}{\char"3A} % :
+\railterm{COMMATK}\railalias{COMMATK}{\char"2C} % ,
+\railterm{CONSTKW}\railalias{CONSTKW}{const}
+\railterm{CONTINUEKW}\railalias{CONTINUEKW}{continue}
+\railterm{CURCLOSETK}\railalias{CURCLOSETK}{\char"7D} % }
+\railterm{CUROPENTK}\railalias{CUROPENTK}{\char"7B} % {
+\railterm{DELAYKW}\railalias{DELAYKW}{delay}
+\railterm{DICTKW}\railalias{DICTKW}{dict}
+\railterm{DISTKW}\railalias{DISTKW}{dist}
+\railterm{DIVKW}\railalias{DIVKW}{div}
+\railterm{DOTTK}\railalias{DOTTK}{\char"2E} % .
+\railterm{ELIFKW}\railalias{ELIFKW}{elif}
+\railterm{ELSEKW}\railalias{ELSEKW}{else}
+\railterm{ENDKW}\railalias{ENDKW}{end}
+\railterm{ENUMKW}\railalias{ENUMKW}{enum}
+\railterm{EQTK}\railalias{EQTK}{\char"3D\char"3D} % ==
+\railterm{EXITKW}\railalias{EXITKW}{exit}
+\railterm{FALSEKW}\railalias{FALSEKW}{false}
+\railterm{FILEKW}\railalias{FILEKW}{file}
+\railterm{FINISHKW}\railalias{FINISHKW}{finish}
+\railterm{FORKW}\railalias{FORKW}{for}
+\railterm{FUNCKW}\railalias{FUNCKW}{func}
+\railterm{GETK}\railalias{GETK}{\char"3E\char"3D} % >=
+\railterm{GTTK}\railalias{GTTK}{\char"3E} % >
+\railterm{IDENTIFIERTK}\railalias{IDENTIFIERTK}{Identifier}
+\railterm{IFKW}\railalias{IFKW}{if}
+\railterm{INKW}\railalias{INKW}{in}
+\railterm{INSTKW}\railalias{INSTKW}{inst}
+\railterm{INTKW}\railalias{INTKW}{int}
+\railterm{LETK}\railalias{LETK}{\char"3C\char"3D} % <=
+\railterm{LISTKW}\railalias{LISTKW}{list}
+\railterm{LTTK}\railalias{LTTK}{\char"3C} % <
+\railterm{MATRIXKW}\railalias{MATRIXKW}{matrix}
+\railterm{MINUSTK}\railalias{MINUSTK}{\char"2D} % -
+\railterm{MODELKW}\railalias{MODELKW}{model}
+\railterm{MODKW}\railalias{MODKW}{mod}
+\railterm{NETK}\railalias{NETK}{\char"21\char"3D} % !=
+\railterm{NOTKW}\railalias{NOTKW}{not}
+\railterm{NUMBERTK}\railalias{NUMBERTK}{Number}
+\railterm{ORKW}\railalias{ORKW}{or}
+\railterm{PARCLOSETK}\railalias{PARCLOSETK}{\char"29} % )
+\railterm{PAROPENTK}\railalias{PAROPENTK}{\char"28} % (
+\railterm{PASSKW}\railalias{PASSKW}{pass}
+\railterm{PLUSTK}\railalias{PLUSTK}{\char"2B} % +
+\railterm{PROCKW}\railalias{PROCKW}{proc}
+\railterm{READKW}\railalias{READKW}{read}
+\railterm{REALKW}\railalias{REALKW}{real}
+\railterm{REALTK}\railalias{REALTK}{Real}
+\railterm{RECEIVETK}\railalias{RECEIVETK}{\char"3F} % ?
+\railterm{RETURNKW}\railalias{RETURNKW}{return}
+\railterm{RUNKW}\railalias{RUNKW}{run}
+\railterm{SAMPLEKW}\railalias{SAMPLEKW}{sample}
+\railterm{SELECTKW}\railalias{SELECTKW}{select}
+\railterm{SEMICOLTK}\railalias{SEMICOLTK}{\char"3B} % ;
+\railterm{SENDRECEIVETK}\railalias{SENDRECEIVETK}{\char"21\char"3F} % !?
+\railterm{SENDTK}\railalias{SENDTK}{\char"21} % !
+\railterm{SETKW}\railalias{SETKW}{set}
+\railterm{SLASHTK}\railalias{SLASHTK}{\char"2F}
+\railterm{SQCLOSETK}\railalias{SQCLOSETK}{\char"5D} % ]
+\railterm{SQOPENTK}\railalias{SQOPENTK}{\char"5B}   % [
+\railterm{STARTKW}\railalias{STARTKW}{start}
+\railterm{STRINGKW}\railalias{STRINGKW}{string}
+\railterm{STRINGTK}\railalias{STRINGTK}{String}
+\railterm{SUBKW}\railalias{SUBKW}{sub}
+\railterm{TIMEKW}\railalias{TIMEKW}{time}
+\railterm{TIMERKW}\railalias{TIMERKW}{timer}
+\railterm{TRUEKW}\railalias{TRUEKW}{true}
+\railterm{TUPLEKW}\railalias{TUPLEKW}{tuple}
+\railterm{TYPEKW}\railalias{TYPEKW}{type}
+\railterm{UNWINDKW}\railalias{UNWINDKW}{unwind}
+\railterm{VOIDKW}\railalias{VOIDKW}{void}
+\railterm{WHILEKW}\railalias{WHILEKW}{while}
+\railterm{WRITEKW}\railalias{WRITEKW}{write}
+\railterm{WRITELNKW}\railalias{WRITELNKW}{writeln}
+\railterm{XPERKW}\railalias{XPERKW}{xper}
+\railterm{ZEROTK}\railalias{ZEROTK}{0}
+\railterm{ZERONINETK}\railalias{ZERONINETK}{0\ldots 9}
+\railterm{expTK}\railalias{expTK}{e}
+\railterm{EXPTK}\railalias{EXPTK}{E}
+\railterm{ONENINETK}\railalias{ONENINETK}{1\ldots 9} % 1...9
+\railterm{QUOTETK}\railalias{QUOTETK}{\char"22} % "
+\railterm{BACKSLASHTK}\railalias{BACKSLASHTK}{$\backslash$} % \
+\railterm{STRESC}\railalias{STRESC}%
+    {`\char"22', `$\backslash$', `n', or `t'} % ["\nt]
+\railterm{SINGLE}\railalias{SINGLE}%
+    {not `\char"22', `$\backslash$', `TAB', or `NL'} % [^"\\\t\n]
+\railterm{NTK}\railalias{NTK}{n}
+\railterm{TTK}\railalias{TTK}{t}
+\railterm{CONSTANTNAMETK}\railalias{CONSTANTNAMETK}{ConstantName}
+\railterm{ENUMTYPENAMETK}\railalias{ENUMTYPENAMETK}{EnumtypeName}
+\railterm{ENUMVALUENAMETK}\railalias{ENUMVALUENAMETK}{EnumvalueName}
+\railterm{FIELDNAMETK}\railalias{FIELDNAMETK}{FieldName}
+\railterm{FUNCTIONNAMETK}\railalias{FUNCTIONNAMETK}{FunctionName}
+\railterm{MODELNAMETK}\railalias{MODELNAMETK}{ModelName}
+\railterm{XPERNAMETK}\railalias{XPERNAMETK}{ExperimentName}
+\railterm{PROCESSNAMETK}\railalias{PROCESSNAMETK}{ProcessName}
+\railterm{TYPENAMETK}\railalias{TYPENAMETK}{TypeName}
+\railterm{VARNAMETK}\railalias{VARNAMETK}{VariableName}
+
+\begin{document}
+\begin{TeXtoEPS}
+\vbox{%
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/procdef.png b/v0.2-M1/chi/reference-manual/rail_diagrams/procdef.png
new file mode 100644
index 0000000..d9974a3
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/procdef.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/procdef.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/procdef.tex
new file mode 100644
index 0000000..1fb36e9
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/procdef.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ProcessDefinition: PROCKW ( () | Type ) PROCESSNAMETK PAROPENTK
+                   ( () | FormalParameters ) PARCLOSETK COLONTK Body ENDKW
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/process_instance.png b/v0.2-M1/chi/reference-manual/rail_diagrams/process_instance.png
new file mode 100644
index 0000000..b5475a1
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/process_instance.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/process_instance.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/process_instance.tex
new file mode 100644
index 0000000..dc118b7
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/process_instance.tex
@@ -0,0 +1,19 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ProcessInstance : [1] ( () | ( PROCESSNAMETK BECOMESTK ) )
+                      PROCESSNAMETK PAROPENTK ( () | ( Expression + COMMATK ) ) PARCLOSETK
+                | [2] UNWINDKW ( ( ( VARNAMETK + COMMATK ) INKW Expression ) + COMMATK )
+                      COLONTK ( ProcessInstance + COMMATK ) ENDKW
+
+                ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/process_type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/process_type.png
new file mode 100644
index 0000000..5fb1d92
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/process_type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/process_type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/process_type.tex
new file mode 100644
index 0000000..fb37c1c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/process_type.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ProcessType : PROCKW PAROPENTK ( () | ( Type + COMMATK ) ) PARCLOSETK ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/program.png b/v0.2-M1/chi/reference-manual/rail_diagrams/program.png
new file mode 100644
index 0000000..dad2628
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/program.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/program.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/program.tex
new file mode 100644
index 0000000..4d52f55
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/program.tex
@@ -0,0 +1,21 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+Program : ( EnumDefinition
+          | TypeDefinition
+          | ConstantDefinition
+          | ProcessDefinition
+          | ModelDefinition
+          | FunctionDefinition
+          | ExperimentDefinition
+          ) + SEMICOLTK ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/real_number_values.png b/v0.2-M1/chi/reference-manual/rail_diagrams/real_number_values.png
new file mode 100644
index 0000000..1cc3f0c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/real_number_values.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/real_number_values.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/real_number_values.tex
new file mode 100644
index 0000000..beb4845
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/real_number_values.tex
@@ -0,0 +1,16 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+RealNumberValue : LexicalRealNumber
+                | TIMEKW
+                ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/receive_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/receive_statement.png
new file mode 100644
index 0000000..3bbfd42
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/receive_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/receive_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/receive_statement.tex
new file mode 100644
index 0000000..6defccd
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/receive_statement.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ReceiveStatement : ChannelExpression RECEIVETK ( () | Addressable ) ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/return_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/return_statement.png
new file mode 100644
index 0000000..1da088c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/return_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/return_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/return_statement.tex
new file mode 100644
index 0000000..10fdb57
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/return_statement.tex
@@ -0,0 +1,15 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ReturnStatement : RETURNKW ( Expression + COMMATK ) ;
+\end{rail}
+
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/run_start.png b/v0.2-M1/chi/reference-manual/rail_diagrams/run_start.png
new file mode 100644
index 0000000..7931527
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/run_start.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/run_start.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/run_start.tex
new file mode 100644
index 0000000..8e737fc
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/run_start.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+RunStartStatement : ( RUNKW | STARTKW ) ( ProcessInstance + COMMATK ) ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/select_alternative.png b/v0.2-M1/chi/reference-manual/rail_diagrams/select_alternative.png
new file mode 100644
index 0000000..91c8c7c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/select_alternative.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/select_alternative.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/select_alternative.tex
new file mode 100644
index 0000000..9d2d2a3
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/select_alternative.tex
@@ -0,0 +1,20 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+SelectAlternative :( [1] ( ( () | ( BooleanExpression COMMATK ) )
+                           ( SendStatement | ReceiveStatement )
+                         )
+                   | [2] BooleanExpression
+                   )
+                   ( () | ( [3] COLONTK ( Statement + SEMICOLTK ) ) )
+                  ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/select_condition.png b/v0.2-M1/chi/reference-manual/rail_diagrams/select_condition.png
new file mode 100644
index 0000000..9ad435e
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/select_condition.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/select_condition.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/select_condition.tex
new file mode 100644
index 0000000..1f9a728
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/select_condition.tex
@@ -0,0 +1,17 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+SelectCondition : [1] SelectAlternative
+                | [2] UNWINDKW ( ( ( VARNAMETK + COMMATK ) INKW Expression ) + COMMATK )
+                      COLONTK SelectAlternative ENDKW
+                ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/select_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/select_statement.png
new file mode 100644
index 0000000..c36288a
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/select_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/select_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/select_statement.tex
new file mode 100644
index 0000000..addacec
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/select_statement.tex
@@ -0,0 +1,17 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+SelectStatement : SELECTKW SelectCondition
+                  ( () | ( ALTKW SelectCondition + () ) )
+                  ENDKW
+                ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/send_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/send_statement.png
new file mode 100644
index 0000000..ceb89e2
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/send_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/send_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/send_statement.tex
new file mode 100644
index 0000000..23aa7c9
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/send_statement.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+SendStatement : ChannelExpression SENDTK ( () | Expression ) ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/set_type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/set_type.png
new file mode 100644
index 0000000..6ebf2ad
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/set_type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/set_type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/set_type.tex
new file mode 100644
index 0000000..8011089
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/set_type.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+SetType : SETKW Type ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/statement.png
new file mode 100644
index 0000000..53af1f1
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/statement.tex
new file mode 100644
index 0000000..708e529
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/statement.tex
@@ -0,0 +1,21 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+Statement : ( AssignmentStatement
+            | Iterativestatement
+            | ChoiceStatement
+            | SubProcessStatement
+            | CommunicationStatement
+            | OtherStatements
+            ) ;
+\end{rail}
+
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/subprocess_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/subprocess_statement.png
new file mode 100644
index 0000000..ab570f9
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/subprocess_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/subprocess_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/subprocess_statement.tex
new file mode 100644
index 0000000..73bcf71
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/subprocess_statement.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+SubProcessStatement : RunStartStatement | FinishStatement ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/terminate_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/terminate_statement.png
new file mode 100644
index 0000000..36a2965
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/terminate_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/tuple_type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/tuple_type.png
new file mode 100644
index 0000000..8a16e70
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/tuple_type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/tuple_type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/tuple_type.tex
new file mode 100644
index 0000000..6d860a2
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/tuple_type.tex
@@ -0,0 +1,17 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+TupleType : TUPLEKW PAROPENTK
+            ( ( Type ( FIELDNAMETK + COMMATK ) ) + SEMICOLTK )
+            PARCLOSETK
+          ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/type.png b/v0.2-M1/chi/reference-manual/rail_diagrams/type.png
new file mode 100644
index 0000000..af7ea98
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/type.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/type.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/type.tex
new file mode 100644
index 0000000..26d06bc
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/type.tex
@@ -0,0 +1,23 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+Type : ElementaryType
+     | ContainerType
+     | TupleType
+     | ChannelType
+     | DistributionType
+     | FunctionType
+     | ProcessType
+     | TYPENAMETK
+     | ENUMTYPENAMETK
+     ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/typed_expression.png b/v0.2-M1/chi/reference-manual/rail_diagrams/typed_expression.png
new file mode 100644
index 0000000..cdc7551
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/typed_expression.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/typed_expression.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/typed_expression.tex
new file mode 100644
index 0000000..160215d
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/typed_expression.tex
@@ -0,0 +1,31 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+TypedExpression : BooleanExpression
+                | IntegerExpression
+                | RealExpression
+                | StringExpression
+                | ListExpression
+                | SetExpression
+                | DictionaryExpression
+                | TupleExpression
+                | FileExpression
+                | ReadExpression
+                | TimerExpression
+                | ChannelExpression
+                | DistributionExpression
+                | ProcessExpression
+                | InstanceExpression
+                | CastExpression
+                | FunctionCallExpression
+                ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/typedef.png b/v0.2-M1/chi/reference-manual/rail_diagrams/typedef.png
new file mode 100644
index 0000000..5c23a7c
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/typedef.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/typedef.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/typedef.tex
new file mode 100644
index 0000000..e468c8d
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/typedef.tex
@@ -0,0 +1,14 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+TypeDefinition: TYPEKW ( TYPENAMETK BECOMESTK Type ) + COMMATK ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/vardef.png b/v0.2-M1/chi/reference-manual/rail_diagrams/vardef.png
new file mode 100644
index 0000000..8dfa729
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/vardef.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/vardef.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/vardef.tex
new file mode 100644
index 0000000..31e15db
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/vardef.tex
@@ -0,0 +1,19 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+VarDefinitions : ( Type
+                   ( VARNAMETK
+                     ( () | BECOMESTK Expression ) + COMMATK
+                   )
+                   SEMICOLTK
+                 ) + () ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/while_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/while_statement.png
new file mode 100644
index 0000000..f6fce56
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/while_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/while_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/while_statement.tex
new file mode 100644
index 0000000..248f645
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/while_statement.tex
@@ -0,0 +1,16 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+WhileStatement : WHILEKW BooleanExpression COLONTK
+                 ( Statement + SEMICOLTK ) ENDKW
+                 ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/write_statement.png b/v0.2-M1/chi/reference-manual/rail_diagrams/write_statement.png
new file mode 100644
index 0000000..08a52c4
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/write_statement.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/write_statement.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/write_statement.tex
new file mode 100644
index 0000000..b9edc49
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/write_statement.tex
@@ -0,0 +1,17 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+WriteStatement : ( WRITEKW | WRITELNKW )
+                 PAROPENTK ( () | ( [1] FileExpression COMMATK ) )
+                 ( [2] LexicalString ) ( COMMATK + Expression ) PARCLOSETK
+               ;
+\end{rail}
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/xperdef.png b/v0.2-M1/chi/reference-manual/rail_diagrams/xperdef.png
new file mode 100644
index 0000000..ef0f400
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/xperdef.png
Binary files differ
diff --git a/v0.2-M1/chi/reference-manual/rail_diagrams/xperdef.tex b/v0.2-M1/chi/reference-manual/rail_diagrams/xperdef.tex
new file mode 100644
index 0000000..9b547c2
--- /dev/null
+++ b/v0.2-M1/chi/reference-manual/rail_diagrams/xperdef.tex
@@ -0,0 +1,17 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\begin{rail}
+ExperimentDefinition: XPERKW XPERNAMETK
+                      PAROPENTK ( () | FormalParameters ) PARCLOSETK
+                      COLONTK Body ENDKW
+\end{rail}
+
diff --git a/v0.2-M1/chi/tool-manual/chi_compiler_dialog.png b/v0.2-M1/chi/tool-manual/chi_compiler_dialog.png
new file mode 100644
index 0000000..972c7c4
--- /dev/null
+++ b/v0.2-M1/chi/tool-manual/chi_compiler_dialog.png
Binary files differ
diff --git a/v0.2-M1/chi/tool-manual/chi_simulator_dialog.png b/v0.2-M1/chi/tool-manual/chi_simulator_dialog.png
new file mode 100644
index 0000000..d076d5f
--- /dev/null
+++ b/v0.2-M1/chi/tool-manual/chi_simulator_dialog.png
Binary files differ
diff --git a/v0.2-M1/chi/tool-manual/terminate_button.png b/v0.2-M1/chi/tool-manual/terminate_button.png
new file mode 100644
index 0000000..f07119b
--- /dev/null
+++ b/v0.2-M1/chi/tool-manual/terminate_button.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/gbse.svg b/v0.2-M1/chi/tutorial/gbse.svg
new file mode 100644
index 0000000..9edfa40
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/gbse.svg
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="800"
+   height="500"
+   id="svg2816"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="gbse.svg">
+  <defs
+     id="defs2818">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 250 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="800 : 250 : 1"
+       inkscape:persp3d-origin="400 : 166.66667 : 1"
+       id="perspective12" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#295e5c"
+     borderopacity="0.8627451"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="0"
+     inkscape:zoom="0.7710304"
+     inkscape:cx="-165.23345"
+     inkscape:cy="169.26507"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1418"
+     inkscape:window-height="904"
+     inkscape:window-x="212"
+     inkscape:window-y="163"
+     inkscape:window-maximized="0"
+     borderlayer="true" />
+  <metadata
+     id="metadata2821">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-22.615557,-542.76302)">
+    <rect
+       style="fill:#979a52;fill-opacity:0.57534246;stroke:#afafaf;stroke-width:0.40000001;stroke-linecap:square;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect2828"
+       width="146.28572"
+       height="302.85715"
+       x="22.815557"
+       y="731.66083" />
+    <rect
+       style="fill:#979a52;fill-opacity:0.57534246;stroke:#afafaf;stroke-width:0.40000001;stroke-linecap:square;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="buf0"
+       width="73.142265"
+       height="213.71423"
+       x="59.386955"
+       y="788.80371" />
+    <rect
+       style="fill:#979a52;fill-opacity:0.57534246;stroke:#afafaf;stroke-width:0.40000001;stroke-linecap:square;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect2828-9"
+       width="146.28572"
+       height="302.85715"
+       x="403.39786"
+       y="739.70587" />
+    <rect
+       style="fill:#979a52;fill-opacity:0.57534246;stroke:#afafaf;stroke-width:0.40000001;stroke-linecap:square;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="buf1"
+       width="73.142265"
+       height="213.71423"
+       x="439.96927"
+       y="796.84869" />
+    <g
+       id="server">
+      <path
+         transform="matrix(0.4,0,0,0.4,-147.56569,662.74193)"
+         d="m 354.28572,738.07648 c 0,110.45695 -95.93898,200 -214.28572,200 -118.346736,0 -214.285721,-89.54305 -214.285721,-200 0,-110.45695 95.938985,-200 214.285721,-200 118.34674,0 214.28572,89.54305 214.28572,200 z"
+         sodipodi:ry="200"
+         sodipodi:rx="214.28572"
+         sodipodi:cy="738.07648"
+         sodipodi:cx="140"
+         id="s"
+         style="fill:#979a52;fill-opacity:0.57534246;stroke:#afafaf;stroke-width:1;stroke-linecap:square;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         sodipodi:type="arc" />
+    </g>
+  </g>
+</svg>
diff --git a/v0.2-M1/chi/tutorial/pictures/Makefile b/v0.2-M1/chi/tutorial/pictures/Makefile
new file mode 100644
index 0000000..4b5f7e8
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/Makefile
@@ -0,0 +1,42 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+#
+# Makefile for creating the tutorial images
+#
+LATEX=latex
+DVIPS=dvips
+CROP=bbox_add.pl
+EPSPNG=eps2png
+
+NONSOURCE=picture.tex preamble.tex postamble.tex
+SOURCE=$(filter-out $(NONSOURCE),$(wildcard *.tex))
+DEST=$(SOURCE:.tex=.png)
+
+.phony: images clean
+
+images: $(DEST)
+
+# eps2png: -t=transparent, -f=force writing, -d=dpi
+%.png: %.tex
+	cat preamble.tex $< postamble.tex > picture.tex
+	$(LATEX) picture.tex
+	$(DVIPS) -E -o picture.eps picture.dvi
+	$(CROP) picture.eps
+	$(EPSPNG) -d 120 -f -t picture.eps
+	mv picture.png $@
+
+clean:
+	for i in $(DEST) picture.aux picture.dvi picture.eps picture.log picture.tex;\
+        do if test -f $$i;\
+           then rm $$i;\
+           fi;\
+        done
diff --git a/v0.2-M1/chi/tutorial/pictures/assembly_n_components.png b/v0.2-M1/chi/tutorial/pictures/assembly_n_components.png
new file mode 100644
index 0000000..e461048
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/assembly_n_components.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/assembly_n_components.tex b/v0.2-M1/chi/tutorial/pictures/assembly_n_components.tex
new file mode 100644
index 0000000..79ad177
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/assembly_n_components.tex
@@ -0,0 +1,31 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+            node(G0){}
+++ ( 0,-8) node(G1){}
+++ ( 0,-8) node(G2){}
+++ (12, 16) node[proc](B0){B}
+++ ( 0,-8) node[proc](B1){...}
+++ ( 0,-8) node[proc](B2){B}
+++ (14, 8) node[proc](S){S}
+++ (12,  0) node(E){};
+\path (G0) edge node{a[0]} (B0)
+      (G1) edge node{a[i]} (B1)
+      (G2) edge node{a[m]} (B2)
+      (B0) edge node{c[0]} (S)
+      (B1) edge node{c[i]} (S)
+      (B2) edge node[below]{c[m]} (S)
+      (S) edge node{b} (E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/assembly_two_components.png b/v0.2-M1/chi/tutorial/pictures/assembly_two_components.png
new file mode 100644
index 0000000..5149087
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/assembly_two_components.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/assembly_two_components.tex b/v0.2-M1/chi/tutorial/pictures/assembly_two_components.tex
new file mode 100644
index 0000000..4a0e077
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/assembly_two_components.tex
@@ -0,0 +1,27 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+            node(G0){}
+++ ( 0,-10) node(G1){}
+++ (12, 10) node[proc](B0){B}
+++ ( 0,-10) node[proc](B1){B}
+++ (14,  5) node[proc](S){S}
+++ (12,  0) node(E){};
+\path (G0) edge node{a[0]} (B0)
+      (G1) edge node{a[1]} (B1)
+      (B0) edge node[above]{c[0]} (S)
+      (B1) edge node[below]{c[1]} (S)
+      (S) edge node{b} (E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/buffered_producer_consumer.png b/v0.2-M1/chi/tutorial/pictures/buffered_producer_consumer.png
new file mode 100644
index 0000000..61f532f
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/buffered_producer_consumer.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/buffered_producer_consumer.tex b/v0.2-M1/chi/tutorial/pictures/buffered_producer_consumer.tex
new file mode 100644
index 0000000..d74c54e
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/buffered_producer_consumer.tex
@@ -0,0 +1,21 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+          node[proc](P){P}
+++ (12,0) node[proc](B){B}
+++ (12,0) node[proc](C){C};
+\path (P) edge node{a} (B);
+\path (B) edge node{b} (C);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/controlled_factory.png b/v0.2-M1/chi/tutorial/pictures/controlled_factory.png
new file mode 100644
index 0000000..b2673dd
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/controlled_factory.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/controlled_factory.tex b/v0.2-M1/chi/tutorial/pictures/controlled_factory.tex
new file mode 100644
index 0000000..a846c21
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/controlled_factory.tex
@@ -0,0 +1,24 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+            node[proc](G){G}
+++ ( 14, 0) node[proc](B){F}
+++ ( 14, 0) node[proc](E){E}
+++ (-14,12) node[proc](C){C};
+\path (G) edge node{gf} (B);
+\path (B) edge node{fe} (E);
+\path (C) edge node[above]{sg} (G);
+\path (C) edge node[above]{se} (E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/conveyor_3items.png b/v0.2-M1/chi/tutorial/pictures/conveyor_3items.png
new file mode 100644
index 0000000..3234d6d
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/conveyor_3items.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/conveyor_3items.tex b/v0.2-M1/chi/tutorial/pictures/conveyor_3items.tex
new file mode 100644
index 0000000..444c485
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/conveyor_3items.tex
@@ -0,0 +1,39 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+          node[circle,minimum size= 4ex,draw]    (G){}
+++ (60,0) node[circle,minimum size= 4ex,draw]    (H){};
+\draw (0,2) -- (60,2);
+\draw (0,-2) -- (60,-2);
+\draw (12.5,2) rectangle (17.5,7);
+\draw (27.5,2) rectangle (32.5,7);
+\draw (47.5,2) rectangle (52.5,7);
+\draw (50.0,5) node {0};
+\draw (30.0,5) node {1};
+\draw (15.0,5) node {2};
+\draw (15.0,2) -- (15.0,-12);
+\draw (30.0,2) -- (30.0,-8);
+\draw (50.0,2) -- (50.0,-4);
+\draw [help lines](60.0,0) -- (60.0,-2);
+\draw (60.0,-2) -- (60.0,-12);
+\draw [<->] (50.0,-4) -- (60.0,-4);
+\draw (55.0,-4) node [anchor = north] {10.0};
+\draw [<->] (30.0,-8) -- (60.0,-8);
+\draw (45.0,-8) node [anchor = north] {30.0};
+\draw [<->] (15.0,-12) -- (60.0,-12);
+\draw (35.0,-12) node [anchor = north] {45.0};
+\draw [->] (4,1) -- (10,1);
+\draw [->] (40,1) -- (46,1);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/conveyor_system.png b/v0.2-M1/chi/tutorial/pictures/conveyor_system.png
new file mode 100644
index 0000000..8e46bd2
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/conveyor_system.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/conveyor_system.tex b/v0.2-M1/chi/tutorial/pictures/conveyor_system.tex
new file mode 100644
index 0000000..147721b
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/conveyor_system.tex
@@ -0,0 +1,23 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+          node[proc](G){G}
+++ (12,0) node[proc](B){B}
+++ (12,0) node[proc](T){T}
+++ (12,0) node[proc](E){E};
+\path (G) edge node{gb} (B);
+\path (B) edge node{bt} (T);
+\path (T) edge node{te} (E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/generator_2buffers_2servers_exit.png b/v0.2-M1/chi/tutorial/pictures/generator_2buffers_2servers_exit.png
new file mode 100644
index 0000000..2a8a3e5
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/generator_2buffers_2servers_exit.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/generator_2buffers_2servers_exit.tex b/v0.2-M1/chi/tutorial/pictures/generator_2buffers_2servers_exit.tex
new file mode 100644
index 0000000..5886e0d
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/generator_2buffers_2servers_exit.tex
@@ -0,0 +1,27 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+          node[proc] (G){G}
+++ (12,0) node[proc] (B0){B}
+++ (12,0) node[proc] (S0){S}
+++ (12,0) node[proc] (B1){B}
+++ (12,0) node[proc] (S1){S}
+++ (12,0) node[proc] (E){E};
+\path (G) edge node{a}(B0)
+      (B0) edge node{b}(S0)
+      (S0) edge node{c}(B1)
+      (B1) edge node{d}(S1)
+      (S1) edge node{e}(E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/generator_2servers_exit.png b/v0.2-M1/chi/tutorial/pictures/generator_2servers_exit.png
new file mode 100644
index 0000000..a193014
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/generator_2servers_exit.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/generator_2servers_exit.tex b/v0.2-M1/chi/tutorial/pictures/generator_2servers_exit.tex
new file mode 100644
index 0000000..72e93b4
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/generator_2servers_exit.tex
@@ -0,0 +1,24 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+          node[proc](G){G}
+++ (12,  6) node[proc](S0){S0}
+++ ( 0,-12) node[proc](S1){S1}
+++ (12,  6) node[proc](E){E};
+\path (G) edge node{a} (S0)
+      (G) edge node{a} (S1)
+      (S0) edge node{b} (E)
+      (S1) edge node{b} (E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/generator_buffer_server_exit.png b/v0.2-M1/chi/tutorial/pictures/generator_buffer_server_exit.png
new file mode 100644
index 0000000..a5c544f
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/generator_buffer_server_exit.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/generator_buffer_server_exit.tex b/v0.2-M1/chi/tutorial/pictures/generator_buffer_server_exit.tex
new file mode 100644
index 0000000..035da78
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/generator_buffer_server_exit.tex
@@ -0,0 +1,23 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+          node[proc] (G){G}
+++ (12,0) node[proc] (B){B}
+++ (12,0) node[proc] (S){S}
+++ (12,0) node[proc] (E){E};
+\path (G) edge node{a}(B)
+      (B) edge node{b}(S)
+      (S) edge node{c}(E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/generator_server_exit.png b/v0.2-M1/chi/tutorial/pictures/generator_server_exit.png
new file mode 100644
index 0000000..1c58a91
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/generator_server_exit.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/generator_server_exit.tex b/v0.2-M1/chi/tutorial/pictures/generator_server_exit.tex
new file mode 100644
index 0000000..aa4ae65
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/generator_server_exit.tex
@@ -0,0 +1,21 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+          node[proc](G){G}
+++ (12,0) node[proc](S){S}
+++ (12,0) node[proc](E){E};
+\path (G) edge node{a} (S)
+      (S) edge node{b} (E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/list_with_indices.png b/v0.2-M1/chi/tutorial/pictures/list_with_indices.png
new file mode 100644
index 0000000..8d4a1ce
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/list_with_indices.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/list_with_indices.tex b/v0.2-M1/chi/tutorial/pictures/list_with_indices.tex
new file mode 100644
index 0000000..b4d3b85
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/list_with_indices.tex
@@ -0,0 +1,35 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[decoration=brace]
+\draw (0,0) rectangle (1,1);
+\draw (1,0) rectangle (2,1);
+\draw (2,0) rectangle (3,1);
+\draw (3,0) rectangle (4,1);
+\draw (4,0) rectangle (5,1);
+\draw (0.5,0.5) node {7};
+\draw (1.5,0.5) node {8};
+\draw (2.5,0.5) node {3};
+\draw (3.5,0.5) node {5};
+\draw (4.5,0.5) node {9};
+\draw [<-,help lines] (0.5,0) -- (0.5,-0.5);
+\draw (0.5,-0.8) node {xs[0]};
+%\draw[decorate] (5,0) -- (1,0);
+\draw [<-,help lines] (3.5,0) -- (3.5,-1);
+\draw (3.5,-1.3) node {xs[3]};
+\draw [->, help lines] (4.5,2) -- (4.5,1);
+\draw (4.5, 2.3) node {xs[-1]};
+%\draw [decorate] (0,1) -- (4,1);
+\draw [->, help lines] (3.5,1.5) -- (3.5,1.0);
+\draw (3.5, 1.8) node {xs[-2]};
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/list_with_slices.png b/v0.2-M1/chi/tutorial/pictures/list_with_slices.png
new file mode 100644
index 0000000..0abba0d
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/list_with_slices.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/list_with_slices.tex b/v0.2-M1/chi/tutorial/pictures/list_with_slices.tex
new file mode 100644
index 0000000..3da5dac
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/list_with_slices.tex
@@ -0,0 +1,35 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[decoration=brace]
+\draw (0,0) rectangle (1,1);
+\draw (1,0) rectangle (2,1);
+\draw (2,0) rectangle (3,1);
+\draw (3,0) rectangle (4,1);
+\draw (4,0) rectangle (5,1);
+\draw (0.5,0.5) node {7};
+\draw (1.5,0.5) node {8};
+\draw (2.5,0.5) node {3};
+\draw (3.5,0.5) node {5};
+\draw (4.5,0.5) node {9};
+\draw [<-,help lines] (0.5,0) -- (0.5,-1);
+\draw (0.5,-1.3) node {xs[0]};
+\draw[decorate] (5,0) -- (1,0);
+\draw [<-,help lines] (3,-0.2) -- (3,-1);
+\draw (3,-1.3) node {xs[1:]};
+\draw [->, help lines] (4.5,2) -- (4.5,1);
+\draw (4.5, 2.3) node {xs[-1]};
+\draw [decorate] (0,1) -- (4,1);
+\draw [->, help lines] (2,2) -- (2,1.2);
+\draw (2.0, 2.3) node {xs[:-1]};
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/one_place_buffer.png b/v0.2-M1/chi/tutorial/pictures/one_place_buffer.png
new file mode 100644
index 0000000..aa550d1
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/one_place_buffer.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/one_place_buffer.tex b/v0.2-M1/chi/tutorial/pictures/one_place_buffer.tex
new file mode 100644
index 0000000..2531c02
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/one_place_buffer.tex
@@ -0,0 +1,21 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+          node      (G){}
+++ (12,0) node[proc](B){B1}
+++ (12,0) node      (E){};
+\path (G) edge node{a}(B)
+      (B) edge node{b}(E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/postamble.tex b/v0.2-M1/chi/tutorial/pictures/postamble.tex
new file mode 100644
index 0000000..03eaff3
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/postamble.tex
@@ -0,0 +1,13 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\end{TeXtoEPS}
+\end{document}
diff --git a/v0.2-M1/chi/tutorial/pictures/preamble.tex b/v0.2-M1/chi/tutorial/pictures/preamble.tex
new file mode 100644
index 0000000..dc35ec7
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/preamble.tex
@@ -0,0 +1,26 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass[11pt,b5paper]{article}
+%\usepackage{makeidx}
+\usepackage{amsmath}
+\usepackage{amsfonts}
+%\usepackage{fancyvrb}
+\usepackage{pst-eps}
+\usepackage{tikz}
+\usetikzlibrary{arrows,backgrounds}
+\usetikzlibrary{decorations.pathreplacing}
+\tikzstyle{proc}=[circle,text centered,inner sep=0ex,thin,minimum size=6ex,node distance=14ex,draw]
+\tikzstyle{every edge}=[draw,->]
+\tikzstyle{every edge}+=[>=angle 45]
+
+\begin{document}
+\begin{TeXtoEPS}
diff --git a/v0.2-M1/chi/tutorial/pictures/producer_consumer.png b/v0.2-M1/chi/tutorial/pictures/producer_consumer.png
new file mode 100644
index 0000000..2272d5a
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/producer_consumer.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/producer_consumer.tex b/v0.2-M1/chi/tutorial/pictures/producer_consumer.tex
new file mode 100644
index 0000000..647dcc7
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/producer_consumer.tex
@@ -0,0 +1,19 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+          node[proc](P){P}
+++ (12,0) node[proc](C){C};
+\path (P) edge node{a} (C);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/sixchilds.fig b/v0.2-M1/chi/tutorial/pictures/sixchilds.fig
new file mode 100644
index 0000000..d6ecafa
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/sixchilds.fig
@@ -0,0 +1,92 @@
+#FIG 3.2

+################################################################################

+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation

+#

+# See the NOTICE file(s) distributed with this work for additional

+# information regarding copyright ownership.

+#

+# This program and the accompanying materials are made available under the terms

+# of the MIT License which is available at https://opensource.org/licenses/MIT

+#

+# SPDX-License-Identifier: MIT

+################################################################################

+Portrait

+Center

+Metric

+A4      

+100.00

+Single

+-2

+1200 2

+6 990 1395 1350 1755

+2 2 0 1 0 7 35 -1 20 0.000 0 0 -1 0 0 5

+	 1080 1485 1350 1485 1350 1755 1080 1755 1080 1485

+2 2 0 1 0 7 36 -1 20 0.000 0 0 -1 0 0 5

+	 1035 1440 1305 1440 1305 1710 1035 1710 1035 1440

+2 2 0 1 0 7 37 -1 20 0.000 0 0 -1 0 0 5

+	 990 1395 1260 1395 1260 1665 990 1665 990 1395

+4 1 0 30 -1 2 12 0.0000 4 135 90 1215 1665 8\001

+-6

+1 4 0 1 0 7 49 -1 20 0.000 1 0.0000 1170 1147 158 158 1012 1147 1328 1147

+1 4 0 1 0 7 49 -1 20 0.000 1 0.0000 1980 1147 158 158 1822 1147 2138 1147

+1 4 0 1 0 7 49 -1 20 0.000 1 0.0000 2790 1147 158 158 2632 1147 2948 1147

+1 4 0 1 0 7 49 -1 20 0.000 1 0.0000 3600 1147 158 158 3442 1147 3758 1147

+1 4 0 1 0 7 49 -1 20 0.000 1 0.0000 5220 1147 158 158 5062 1147 5378 1147

+1 4 0 1 0 7 49 -1 20 0.000 1 0.0000 4410 1147 158 158 4252 1147 4568 1147

+2 3 0 1 0 7 48 -1 20 0.000 0 0 -1 0 0 8

+	 1305 1125 1395 1080 1395 990 1665 990 1665 1170 1395 1170

+	 1395 1125 1305 1125

+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4

+	 1350 1350 1260 1170 1080 1170 990 1350

+2 3 0 1 0 7 48 -1 20 0.000 0 0 -1 0 0 8

+	 2115 1125 2205 1080 2205 990 2475 990 2475 1170 2205 1170

+	 2205 1125 2115 1125

+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4

+	 2160 1350 2070 1170 1890 1170 1800 1350

+2 1 1 1 0 7 50 -1 -1 1.000 0 0 -1 0 0 2

+	 1980 990 2025 855

+2 3 0 1 0 7 48 -1 20 0.000 0 0 -1 0 0 8

+	 2925 1125 3015 1080 3015 990 3285 990 3285 1170 3015 1170

+	 3015 1125 2925 1125

+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4

+	 2970 1350 2880 1170 2700 1170 2610 1350

+2 1 1 1 0 7 50 -1 -1 1.000 0 0 -1 0 0 2

+	 2790 990 2835 855

+2 3 0 1 0 7 48 -1 20 0.000 0 0 -1 0 0 8

+	 3735 1125 3825 1080 3825 990 4095 990 4095 1170 3825 1170

+	 3825 1125 3735 1125

+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4

+	 3780 1350 3690 1170 3510 1170 3420 1350

+2 1 1 1 0 7 50 -1 -1 1.000 0 0 -1 0 0 2

+	 3600 990 3645 855

+2 3 0 1 0 7 48 -1 20 0.000 0 0 -1 0 0 8

+	 4545 1125 4635 1080 4635 990 4905 990 4905 1170 4635 1170

+	 4635 1125 4545 1125

+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4

+	 4590 1350 4500 1170 4320 1170 4230 1350

+2 1 1 1 0 7 50 -1 -1 1.000 0 0 -1 0 0 2

+	 4410 990 4455 855

+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4

+	 5400 1350 5310 1170 5130 1170 5040 1350

+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2

+	 810 1350 5580 1350

+2 2 0 0 0 7 50 -1 20 0.000 0 0 -1 0 0 5

+	 1620 720 1845 720 1845 810 1620 810 1620 720

+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5

+	 5085 1440 5355 1440 5355 1710 5085 1710 5085 1440

+4 1 0 44 -1 -1 10 0.0000 4 105 75 1530 1125 8\001

+4 1 0 44 -1 -1 10 0.0000 4 120 150 2340 1125 10\001

+4 0 0 50 -1 -1 10 0.0000 4 105 165 2025 855 +2\001

+4 1 0 44 -1 -1 10 0.0000 4 105 150 3150 1125 30\001

+4 0 0 50 -1 -1 10 0.0000 4 105 150 2835 855 *3\001

+4 1 0 44 -1 -1 10 0.0000 4 120 150 3960 1125 60\001

+4 0 0 50 -1 -1 10 0.0000 4 105 150 3645 855 *2\001

+4 1 0 44 -1 -1 10 0.0000 4 120 150 4770 1125 66\001

+4 0 0 50 -1 -1 10 0.0000 4 120 165 4455 855 +6\001

+4 1 0 44 -1 1 12 0.0000 4 120 105 1170 1197 R\001

+4 1 0 44 -1 1 12 0.0000 4 120 210 1980 1197 C1\001

+4 1 0 44 -1 1 12 0.0000 4 120 210 2790 1197 C2\001

+4 1 0 44 -1 1 12 0.0000 4 120 150 5220 1196 W\001

+4 1 0 44 -1 1 12 0.0000 4 120 210 4410 1197 C4\001

+4 1 0 44 -1 1 12 0.0000 4 120 210 3600 1197 C3\001

+4 1 0 50 -1 -1 12 0.0000 4 120 180 5220 1620 66\001

diff --git a/v0.2-M1/chi/tutorial/pictures/sixchilds.png b/v0.2-M1/chi/tutorial/pictures/sixchilds.png
new file mode 100644
index 0000000..8fcc4e7
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/sixchilds.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/three_parallel_servers.png b/v0.2-M1/chi/tutorial/pictures/three_parallel_servers.png
new file mode 100644
index 0000000..2d60ed4
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/three_parallel_servers.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/three_parallel_servers.tex b/v0.2-M1/chi/tutorial/pictures/three_parallel_servers.tex
new file mode 100644
index 0000000..77e6ed9
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/three_parallel_servers.tex
@@ -0,0 +1,29 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+           node[proc](G){G}
+++ (12,0) node[proc](B){B}
+++ (12,10) node[proc](S0){S}
+++ ( 0,-10) node[proc](S1){S}
+++ ( 0,-10) node[proc](S2){S}
+++ (12,10) node[proc](E){E};
+\path (G) edge node{g} (B);
+\path (B) edge node{b} (S0);
+\path (B) edge node{b} (S1);
+\path (B) edge node{b} (S2);
+\path (S0) edge node{e} (E);
+\path (S1) edge node{e} (E);
+\path (S2) edge node{e} (E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/two_parallel_requesting_servers.png b/v0.2-M1/chi/tutorial/pictures/two_parallel_requesting_servers.png
new file mode 100644
index 0000000..c4ec1a5
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/two_parallel_requesting_servers.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/two_parallel_requesting_servers.tex b/v0.2-M1/chi/tutorial/pictures/two_parallel_requesting_servers.tex
new file mode 100644
index 0000000..7e39749
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/two_parallel_requesting_servers.tex
@@ -0,0 +1,28 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+            node[proc](G){G}
+++ (12,  0) node[proc](B){B}
+++ (12,  6) node[proc](S0){S}
+++ ( 0,-12) node[proc](S1){S}
+++ (12,  6) node[proc](E){E};
+\path (G) edge node{a}(B)
+      (B) edge node[below]{b[0]}(S0)
+      (B) edge node{b[1]}(S1)
+      (S0) edge[bend left=-45] node[above]{r}(B)
+      (S1) edge[bend left=45] node{r}(B)
+      (S0) edge node{c} (E)
+      (S1) edge node{c} (E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/two_parallel_servers.png b/v0.2-M1/chi/tutorial/pictures/two_parallel_servers.png
new file mode 100644
index 0000000..16a5039
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/two_parallel_servers.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/two_parallel_servers.tex b/v0.2-M1/chi/tutorial/pictures/two_parallel_servers.tex
new file mode 100644
index 0000000..6d82439
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/two_parallel_servers.tex
@@ -0,0 +1,26 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+            node[proc](G){G}
+++ (12,  0) node[proc](B){B}
+++ (12,  6) node[proc](S0){S}
+++ ( 0,-12) node[proc](S1){S}
+++ (12,  6) node[proc](E){E};
+\path (G) edge node{a}(B)
+      (B) edge node{b}(S0)
+      (B) edge node{b}(S1)
+      (S0) edge node{c} (E)
+      (S1) edge node{c} (E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/pictures/two_place_buffer.png b/v0.2-M1/chi/tutorial/pictures/two_place_buffer.png
new file mode 100644
index 0000000..12f950c
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/two_place_buffer.png
Binary files differ
diff --git a/v0.2-M1/chi/tutorial/pictures/two_place_buffer.tex b/v0.2-M1/chi/tutorial/pictures/two_place_buffer.tex
new file mode 100644
index 0000000..ceadef6
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/pictures/two_place_buffer.tex
@@ -0,0 +1,23 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+{\ttfamily
+\begin{tikzpicture}[x=1ex,y=1ex,thin,>=triangle 45,auto]
+\path
+          node      (G){}
+++ (12,0) node[proc](B0){B1}
+++ (12,0) node[proc](B1){B1}
+++ (12,0) node      (E){};
+\path (G) edge node{a}(B0)
+      (B0) edge node{c}(B1)
+      (B1) edge node{b}(E);
+\end{tikzpicture}
+}
diff --git a/v0.2-M1/chi/tutorial/sbb.png b/v0.2-M1/chi/tutorial/sbb.png
new file mode 100644
index 0000000..630161e
--- /dev/null
+++ b/v0.2-M1/chi/tutorial/sbb.png
Binary files differ
diff --git a/v0.2-M1/cif/build-imgs.bash b/v0.2-M1/cif/build-imgs.bash
new file mode 100755
index 0000000..e5026eb
--- /dev/null
+++ b/v0.2-M1/cif/build-imgs.bash
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+#################################################################################
+
+set -e -u
+
+cd $(dirname $(readlink -f $0))
+
+# .png.plt
+for f in `find . -name "*.png.plt"`; do
+    echo "Converting $f"
+    cd `dirname $f`
+    FILE=`basename $f`
+    gnuplot $FILE
+    cd - > /dev/null
+done
+
+# .png.svg
+for f in `find . -name "*.png.svg"`; do
+    echo "Converting $f"
+    FILE=${f//.png.svg/.png}
+    inkscape --export-area-drawing --export-png=$FILE $FILE.svg
+done
+
+# .png.tex
+for f in `find . -name "*.png.tex"`; do
+    echo "Converting $f"
+    cd `dirname $f`
+    FILE=`basename ${f//.png.tex/.png}`
+    pdflatex -quiet $FILE.tex
+    pdfcrop $FILE.pdf $FILE.cropped.pdf > /dev/null
+    convert -density 125 $FILE.cropped.pdf $FILE
+    rm -f $FILE.pdf $FILE.log $FILE.aux $FILE.cropped.pdf
+    cd - > /dev/null
+done
diff --git a/v0.2-M1/cif/eclipse-escet-incubation-cif-manual.pdf b/v0.2-M1/cif/eclipse-escet-incubation-cif-manual.pdf
new file mode 100644
index 0000000..3357404
--- /dev/null
+++ b/v0.2-M1/cif/eclipse-escet-incubation-cif-manual.pdf
Binary files differ
diff --git a/v0.2-M1/cif/eclipse-incubation.png b/v0.2-M1/cif/eclipse-incubation.png
new file mode 100644
index 0000000..5fccef5
--- /dev/null
+++ b/v0.2-M1/cif/eclipse-incubation.png
Binary files differ
diff --git a/v0.2-M1/cif/favicon.png b/v0.2-M1/cif/favicon.png
new file mode 100644
index 0000000..9cebcb4
--- /dev/null
+++ b/v0.2-M1/cif/favicon.png
Binary files differ
diff --git a/v0.2-M1/cif/index.html b/v0.2-M1/cif/index.html
new file mode 100644
index 0000000..f789218
--- /dev/null
+++ b/v0.2-M1/cif/index.html
@@ -0,0 +1,40114 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="UTF-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="generator" content="Asciidoctor 2.0.12">
+<meta name="author" content="Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation">
+<link rel="icon" type="image/png" href="favicon.png">
+<title>CIF documentation (Incubation)</title>
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
+<style>
+/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
+/* Uncomment @import statement to use as custom stylesheet */
+/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
+article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}
+audio,video{display:inline-block}
+audio:not([controls]){display:none;height:0}
+html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
+a{background:none}
+a:focus{outline:thin dotted}
+a:active,a:hover{outline:0}
+h1{font-size:2em;margin:.67em 0}
+abbr[title]{border-bottom:1px dotted}
+b,strong{font-weight:bold}
+dfn{font-style:italic}
+hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
+mark{background:#ff0;color:#000}
+code,kbd,pre,samp{font-family:monospace;font-size:1em}
+pre{white-space:pre-wrap}
+q{quotes:"\201C" "\201D" "\2018" "\2019"}
+small{font-size:80%}
+sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
+sup{top:-.5em}
+sub{bottom:-.25em}
+img{border:0}
+svg:not(:root){overflow:hidden}
+figure{margin:0}
+fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
+legend{border:0;padding:0}
+button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
+button,input{line-height:normal}
+button,select{text-transform:none}
+button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
+button[disabled],html input[disabled]{cursor:default}
+input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
+button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
+textarea{overflow:auto;vertical-align:top}
+table{border-collapse:collapse;border-spacing:0}
+*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
+html,body{font-size:100%}
+body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
+a:hover{cursor:pointer}
+img,object,embed{max-width:100%;height:auto}
+object,embed{height:100%}
+img{-ms-interpolation-mode:bicubic}
+.left{float:left!important}
+.right{float:right!important}
+.text-left{text-align:left!important}
+.text-right{text-align:right!important}
+.text-center{text-align:center!important}
+.text-justify{text-align:justify!important}
+.hide{display:none}
+img,object,svg{display:inline-block;vertical-align:middle}
+textarea{height:auto;min-height:50px}
+select{width:100%}
+.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
+div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
+a{color:#2156a5;text-decoration:underline;line-height:inherit}
+a:hover,a:focus{color:#1d4b8f}
+a img{border:0}
+p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
+p aside{font-size:.875em;line-height:1.35;font-style:italic}
+h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
+h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
+h1{font-size:2.125em}
+h2{font-size:1.6875em}
+h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
+h4,h5{font-size:1.125em}
+h6{font-size:1em}
+hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
+em,i{font-style:italic;line-height:inherit}
+strong,b{font-weight:bold;line-height:inherit}
+small{font-size:60%;line-height:inherit}
+code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
+ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
+ul,ol{margin-left:1.5em}
+ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
+ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
+ul.square{list-style-type:square}
+ul.circle{list-style-type:circle}
+ul.disc{list-style-type:disc}
+ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
+dl dt{margin-bottom:.3125em;font-weight:bold}
+dl dd{margin-bottom:1.25em}
+abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
+abbr{text-transform:none}
+blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
+blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
+blockquote cite::before{content:"\2014 \0020"}
+blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
+blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
+@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
+h1{font-size:2.75em}
+h2{font-size:2.3125em}
+h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
+h4{font-size:1.4375em}}
+table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede;word-wrap:normal}
+table thead,table tfoot{background:#f7f8f7}
+table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
+table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
+table tr.even,table tr.alt{background:#f8f8f7}
+table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
+h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
+h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
+.center{margin-left:auto;margin-right:auto}
+.stretch{width:100%}
+.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
+.clearfix::after,.float-group::after{clear:both}
+:not(pre).nobreak{word-wrap:normal}
+:not(pre).nowrap{white-space:nowrap}
+:not(pre).pre-wrap{white-space:pre-wrap}
+:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
+pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
+pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
+pre>code{display:block}
+pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
+em em{font-style:normal}
+strong strong{font-weight:400}
+.keyseq{color:rgba(51,51,51,.8)}
+kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
+.keyseq kbd:first-child{margin-left:0}
+.keyseq kbd:last-child{margin-right:0}
+.menuseq,.menuref{color:#000}
+.menuseq b:not(.caret),.menuref{font-weight:inherit}
+.menuseq{word-spacing:-.02em}
+.menuseq b.caret{font-size:1.25em;line-height:.8}
+.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
+b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
+b.button::before{content:"[";padding:0 3px 0 2px}
+b.button::after{content:"]";padding:0 2px 0 3px}
+p a>code:hover{color:rgba(0,0,0,.9)}
+#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
+#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
+#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
+#content{margin-top:1.25em}
+#content::before{content:none}
+#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
+#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
+#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
+#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
+#header .details span:first-child{margin-left:-.125em}
+#header .details span.email a{color:rgba(0,0,0,.85)}
+#header .details br{display:none}
+#header .details br+span::before{content:"\00a0\2013\00a0"}
+#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
+#header .details br+span#revremark::before{content:"\00a0|\00a0"}
+#header #revnumber{text-transform:capitalize}
+#header #revnumber::after{content:"\00a0"}
+#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
+#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
+#toc>ul{margin-left:.125em}
+#toc ul.sectlevel0>li>a{font-style:italic}
+#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
+#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
+#toc li{line-height:1.3334;margin-top:.3334em}
+#toc a{text-decoration:none}
+#toc a:active{text-decoration:underline}
+#toctitle{color:#7a2518;font-size:1.2em}
+@media screen and (min-width:768px){#toctitle{font-size:1.375em}
+body.toc2{padding-left:15em;padding-right:0}
+#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
+#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
+#toc.toc2>ul{font-size:.9em;margin-bottom:0}
+#toc.toc2 ul ul{margin-left:0;padding-left:1em}
+#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
+body.toc2.toc-right{padding-left:0;padding-right:15em}
+body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
+@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
+#toc.toc2{width:20em}
+#toc.toc2 #toctitle{font-size:1.375em}
+#toc.toc2>ul{font-size:.95em}
+#toc.toc2 ul ul{padding-left:1.25em}
+body.toc2.toc-right{padding-left:0;padding-right:20em}}
+#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
+#content #toc>:first-child{margin-top:0}
+#content #toc>:last-child{margin-bottom:0}
+#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
+#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
+#content{margin-bottom:.625em}
+.sect1{padding-bottom:.625em}
+@media screen and (min-width:768px){#content{margin-bottom:1.25em}
+.sect1{padding-bottom:1.25em}}
+.sect1:last-child{padding-bottom:0}
+.sect1+.sect1{border-top:1px solid #e7e7e9}
+#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
+#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
+#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
+#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
+#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
+details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
+details>summary:first-of-type{cursor:pointer;display:list-item;outline:none;margin-bottom:.75em}
+.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
+table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
+.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
+table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit}
+.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
+.admonitionblock>table td.icon{text-align:center;width:80px}
+.admonitionblock>table td.icon img{max-width:none}
+.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
+.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
+.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
+.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
+.exampleblock>.content>:first-child{margin-top:0}
+.exampleblock>.content>:last-child{margin-bottom:0}
+.sidebarblock{border-style:solid;border-width:1px;border-color:#dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;-webkit-border-radius:4px;border-radius:4px}
+.sidebarblock>:first-child{margin-top:0}
+.sidebarblock>:last-child{margin-bottom:0}
+.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
+.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
+.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
+@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
+@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
+.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
+.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
+.listingblock>.content{position:relative}
+.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
+.listingblock:hover code[data-lang]::before{display:block}
+.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
+.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
+.listingblock pre.highlightjs{padding:0}
+.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
+.listingblock pre.prettyprint{border-width:0}
+.prettyprint{background:#f7f7f8}
+pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
+pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
+pre.prettyprint li code[data-lang]::before{opacity:1}
+pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
+table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
+table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
+table.linenotable td.code{padding-left:.75em}
+table.linenotable td.linenos{border-right:1px solid currentColor;opacity:.35;padding-right:.5em}
+pre.pygments .lineno{border-right:1px solid currentColor;opacity:.35;display:inline-block;margin-right:.75em}
+pre.pygments .lineno::before{content:"";margin-right:-.125em}
+.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
+.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
+.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
+.quoteblock blockquote{margin:0;padding:0;border:0}
+.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
+.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
+.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
+.verseblock{margin:0 1em 1.25em}
+.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
+.verseblock pre strong{font-weight:400}
+.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
+.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
+.quoteblock .attribution br,.verseblock .attribution br{display:none}
+.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
+.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
+.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
+.quoteblock.abstract{margin:0 1em 1.25em;display:block}
+.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
+.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
+.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
+.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
+.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}
+p.tableblock:last-child{margin-bottom:0}
+td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
+td.tableblock>.content>:last-child{margin-bottom:-1.25em}
+table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
+table.grid-all>*>tr>*{border-width:1px}
+table.grid-cols>*>tr>*{border-width:0 1px}
+table.grid-rows>*>tr>*{border-width:1px 0}
+table.frame-all{border-width:1px}
+table.frame-ends{border-width:1px 0}
+table.frame-sides{border-width:0 1px}
+table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
+table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
+table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
+table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
+table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7}
+th.halign-left,td.halign-left{text-align:left}
+th.halign-right,td.halign-right{text-align:right}
+th.halign-center,td.halign-center{text-align:center}
+th.valign-top,td.valign-top{vertical-align:top}
+th.valign-bottom,td.valign-bottom{vertical-align:bottom}
+th.valign-middle,td.valign-middle{vertical-align:middle}
+table thead th,table tfoot th{font-weight:bold}
+tbody tr th{background:#f7f8f7}
+tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
+p.tableblock>code:only-child{background:none;padding:0}
+p.tableblock{font-size:1em}
+ol{margin-left:1.75em}
+ul li ol{margin-left:1.5em}
+dl dd{margin-left:1.125em}
+dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
+ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
+ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
+ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
+ul.unstyled,ol.unstyled{margin-left:0}
+ul.checklist{margin-left:.625em}
+ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
+ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
+ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
+ul.inline>li{margin-left:1.25em}
+.unstyled dl dt{font-weight:400;font-style:normal}
+ol.arabic{list-style-type:decimal}
+ol.decimal{list-style-type:decimal-leading-zero}
+ol.loweralpha{list-style-type:lower-alpha}
+ol.upperalpha{list-style-type:upper-alpha}
+ol.lowerroman{list-style-type:lower-roman}
+ol.upperroman{list-style-type:upper-roman}
+ol.lowergreek{list-style-type:lower-greek}
+.hdlist>table,.colist>table{border:0;background:none}
+.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
+td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
+td.hdlist1{font-weight:bold;padding-bottom:1.25em}
+td.hdlist2{word-wrap:anywhere}
+.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
+.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
+.colist td:not([class]):first-child img{max-width:none}
+.colist td:not([class]):last-child{padding:.25em 0}
+.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
+.imageblock.left{margin:.25em .625em 1.25em 0}
+.imageblock.right{margin:.25em 0 1.25em .625em}
+.imageblock>.title{margin-bottom:0}
+.imageblock.thumb,.imageblock.th{border-width:6px}
+.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
+.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
+.image.left{margin-right:.625em}
+.image.right{margin-left:.625em}
+a.image{text-decoration:none;display:inline-block}
+a.image object{pointer-events:none}
+sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
+sup.footnote a,sup.footnoteref a{text-decoration:none}
+sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
+#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
+#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
+#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
+#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
+#footnotes .footnote:last-of-type{margin-bottom:0}
+#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
+.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
+.gist .file-data>table td.line-data{width:99%}
+div.unbreakable{page-break-inside:avoid}
+.big{font-size:larger}
+.small{font-size:smaller}
+.underline{text-decoration:underline}
+.overline{text-decoration:overline}
+.line-through{text-decoration:line-through}
+.aqua{color:#00bfbf}
+.aqua-background{background:#00fafa}
+.black{color:#000}
+.black-background{background:#000}
+.blue{color:#0000bf}
+.blue-background{background:#0000fa}
+.fuchsia{color:#bf00bf}
+.fuchsia-background{background:#fa00fa}
+.gray{color:#606060}
+.gray-background{background:#7d7d7d}
+.green{color:#006000}
+.green-background{background:#007d00}
+.lime{color:#00bf00}
+.lime-background{background:#00fa00}
+.maroon{color:#600000}
+.maroon-background{background:#7d0000}
+.navy{color:#000060}
+.navy-background{background:#00007d}
+.olive{color:#606000}
+.olive-background{background:#7d7d00}
+.purple{color:#600060}
+.purple-background{background:#7d007d}
+.red{color:#bf0000}
+.red-background{background:#fa0000}
+.silver{color:#909090}
+.silver-background{background:#bcbcbc}
+.teal{color:#006060}
+.teal-background{background:#007d7d}
+.white{color:#bfbfbf}
+.white-background{background:#fafafa}
+.yellow{color:#bfbf00}
+.yellow-background{background:#fafa00}
+span.icon>.fa{cursor:default}
+a span.icon>.fa{cursor:inherit}
+.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
+.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
+.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
+.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
+.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
+.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
+.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
+.conum[data-value] *{color:#fff!important}
+.conum[data-value]+b{display:none}
+.conum[data-value]::after{content:attr(data-value)}
+pre .conum[data-value]{position:relative;top:-.125em}
+b.conum *{color:inherit!important}
+.conum:not([data-value]):empty{display:none}
+dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
+h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
+p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
+p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
+p{margin-bottom:1.25rem}
+.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
+.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
+.print-only{display:none!important}
+@page{margin:1.25cm .75cm}
+@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
+html{font-size:80%}
+a{color:inherit!important;text-decoration:underline!important}
+a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
+a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
+abbr[title]::after{content:" (" attr(title) ")"}
+pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
+thead{display:table-header-group}
+svg{max-width:100%}
+p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
+h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
+#header,#content,#footnotes,#footer{max-width:none}
+#toc,.sidebarblock,.exampleblock>.content{background:none!important}
+#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
+body.book #header{text-align:center}
+body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
+body.book #header .details{border:0!important;display:block;padding:0!important}
+body.book #header .details span:first-child{margin-left:0!important}
+body.book #header .details br{display:block}
+body.book #header .details br+span::before{content:none!important}
+body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
+body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
+.listingblock code[data-lang]::before{display:block}
+#footer{padding:0 .9375em}
+.hide-on-print{display:none!important}
+.print-only{display:block!important}
+.hide-for-print{display:none!important}
+.show-for-print{display:inherit!important}}
+@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem}
+.sect1{padding:0!important}
+.sect1+.sect1{border:0}
+#footer{background:none}
+#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
+@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
+</style>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<style>
+.menu, .submenu, .menuitem, .menuref {
+    background-color: Menu;
+}
+
+.button {
+    border: 1px solid ButtonFace;
+    /*
+    Styling too similar to a real button is considered bad practice, see https://github.com/asciidoctor/asciidoctor/issues/1881#issuecomment-250702085
+    border: 2px outset ButtonFace;
+    background-color: ButtonFace;
+    */
+    padding-left: 0.5ex;
+    padding-right: 0.5ex;
+    font-weight: normal;
+    font-family: "Segoe UI","Open Sans","DejaVu Sans",sans-serif;
+    white-space: nowrap;
+}
+.button:before {
+    content: none !important;
+}
+.button:after {
+    content: none !important;
+}
+
+#footer-text, #footer-text a {
+    color: rgba(255,255,255,.8)
+}
+</style>
+</head>
+<body class="book toc2 toc-left">
+<div id="header">
+<h1>CIF documentation (Incubation)</h1>
+<div class="details">
+<span id="author" class="author">Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation</span><br>
+<span id="revnumber">version 0.2.0.20210521-133237</span>
+</div>
+<div id="toc" class="toc2">
+<div id="toctitle">Table of Contents</div>
+<ul class="sectlevel1">
+<li><a href="#introduction-chapter-index">Introduction</a></li>
+<li><a href="#tut-chapter-index">Language tutorial</a>
+<ul class="sectlevel2">
+<li><a href="#tut-introduction">Introduction</a></li>
+<li><a href="#tut-lessons">Lessons</a></li>
+<li><a href="#tut-basics">Basics</a>
+<ul class="sectlevel3">
+<li><a href="#tut-basics-chapter-automata">Automata</a></li>
+<li><a href="#tut-basics-chapter-synchronizing-events">Synchronizing events</a></li>
+<li><a href="#tut-basics-chapter-non-determinism">Non-determinism</a></li>
+<li><a href="#tut-basics-chapter-alphabet">Alphabet</a></li>
+<li><a href="#tut-basics-chapter-event-placement">Event declaration placement</a></li>
+<li><a href="#tut-basics-chapter-shorter-notations">Shorter notations</a></li>
+</ul>
+</li>
+<li><a href="#tut-data">Data</a>
+<ul class="sectlevel3">
+<li><a href="#tut-data-chapter-discrete-variables">Discrete variables</a></li>
+<li><a href="#tut-data-chapter-discvar-change">Discrete variable value changes</a></li>
+<li><a href="#tut-data-chapter-loc-var-duality1">Location/variable duality (1/2)</a></li>
+<li><a href="#tut-data-chapter-loc-var-duality2">Location/variable duality (2/2)</a></li>
+<li><a href="#tut-data-chapter-read-write">Global read, local write</a></li>
+<li><a href="#tut-data-chapter-monitoring">Monitoring</a></li>
+<li><a href="#tut-data-chapter-asgn-old-vs-new">Old and new values in assignments</a></li>
+<li><a href="#tut-data-chapter-tau-event">The <code>tau</code> event</a></li>
+<li><a href="#tut-data-chapter-discvar-init">Initial values of discrete variables</a></li>
+<li><a href="#tut-data-chapter-init-preds">Initialization predicates</a></li>
+<li><a href="#tut-data-chapter-locs-as-var">Using locations as variables</a></li>
+<li><a href="#tut-data-chapter-stat-invariants">State (exclusion) invariants</a></li>
+<li><a href="#tut-data-chapter-stat-evt-excl-invariants">State/event exclusion invariants</a></li>
+</ul>
+</li>
+<li><a href="#tut-types-and-values">Types and values</a>
+<ul class="sectlevel3">
+<li><a href="#tut-values-chapter-types-values-exprs">Types, values, and expressions</a></li>
+<li><a href="#tut-values-chapter-overview">Values overview</a></li>
+<li><a href="#tut-values-chapter-integers">Integers</a></li>
+<li><a href="#tut-values-chapter-integer-ranges">Integer ranges</a></li>
+<li><a href="#tut-values-chapter-reals">Reals</a></li>
+<li><a href="#tut-values-chapter-booleans">Booleans</a></li>
+<li><a href="#tut-values-chapter-strings">Strings</a></li>
+<li><a href="#tut-values-chapter-enumerations">Enumerations</a></li>
+<li><a href="#tut-values-chapter-tuples">Tuples</a></li>
+<li><a href="#tut-values-chapter-lists">Lists</a></li>
+<li><a href="#tut-values-chapter-bounded-lists-and-arrays">Bounded lists and arrays</a></li>
+<li><a href="#tut-values-chapter-sets">Sets</a></li>
+<li><a href="#tut-values-chapter-dictionaries">Dictionaries</a></li>
+<li><a href="#tut-values-chapter-combining-values">Combining values</a></li>
+</ul>
+</li>
+<li><a href="#tut-scalable-solutions-and-reuse-12">Scalable solutions and reuse (1/2)</a>
+<ul class="sectlevel3">
+<li><a href="#tut-reuse1-chapter-constants">Constants</a></li>
+<li><a href="#tut-reuse1-chapter-algebraic-variables">Algebraic variables</a></li>
+<li><a href="#tut-reuse1-chapter-algvar-equations">Algebraic variables and equations</a></li>
+<li><a href="#tut-reuse1-chapter-type-declarations">Type declarations</a></li>
+</ul>
+</li>
+<li><a href="#tut-time">Time</a>
+<ul class="sectlevel3">
+<li><a href="#tut-time-chapter-intro">Timing</a></li>
+<li><a href="#tut-time-chapter-continuous-variables">Continuous variables</a></li>
+<li><a href="#tut-time-chapter-contvar-equations">Continuous variables and equations</a></li>
+<li><a href="#tut-time-chapter-equations">Equations</a></li>
+<li><a href="#tut-time-chapter-var-overview">Variables overview</a></li>
+<li><a href="#tut-time-chapter-urgency">Urgency</a></li>
+<li><a href="#tut-time-chapter-deadlock-livelock">Deadlock and livelock</a></li>
+</ul>
+</li>
+<li><a href="#tut-channel-communication">Channel communication</a>
+<ul class="sectlevel3">
+<li><a href="#tut-channels-chapter-intro">Channels</a></li>
+<li><a href="#tut-channels-chapter-void">Dataless channels</a></li>
+<li><a href="#tut-channels-chapter-chan-sync-combi">Combining channel communication with event synchronization</a></li>
+</ul>
+</li>
+<li><a href="#tut-functions">Functions</a>
+<ul class="sectlevel3">
+<li><a href="#tut-functions-chapter-intro">Functions</a></li>
+<li><a href="#tut-functions-chapter-internal-functions">Internal user-defined functions</a></li>
+<li><a href="#tut-functions-chapter-statements">Function statements</a></li>
+<li><a href="#tut-functions-chapter-functions-as-values">Functions as values</a></li>
+</ul>
+</li>
+<li><a href="#tut-scalable-solutions-and-reuse-22">Scalable solutions and reuse (2/2)</a>
+<ul class="sectlevel3">
+<li><a href="#tut-reuse2-chapter-aut-def-inst">Automaton definition/instantiation</a></li>
+<li><a href="#tut-reuse2-chapter-aut-def-params">Parametrized automaton definitions</a></li>
+<li><a href="#tut-reuse2-chapter-aut-def-param-kinds">Automaton definition parameters</a></li>
+<li><a href="#tut-reuse2-chapter-groups">Groups</a></li>
+<li><a href="#tut-reuse2-chapter-group-defs">Group definitions</a></li>
+<li><a href="#tut-reuse2-chapter-imports">Imports</a></li>
+<li><a href="#tut-reuse2-chapter-imports-libraries">Imports and libraries</a></li>
+<li><a href="#tut-reuse2-chapter-imports-groups">Imports and groups</a></li>
+<li><a href="#tut-reuse2-chapter-namespaces">Namespaces</a></li>
+<li><a href="#tut-reuse2-chapter-input-variables">Input variables</a></li>
+</ul>
+</li>
+<li><a href="#tut-stochastics">Stochastics</a>
+<ul class="sectlevel3">
+<li><a href="#tut-stochastics-chapter-intro">Stochastics</a></li>
+<li><a href="#tut-stochastics-chapter-discrete-continuous-constant">Discrete, continuous, and constant distributions</a></li>
+<li><a href="#tut-stochastics-chapter-pseudo-randomness">Pseudo-randomness</a></li>
+</ul>
+</li>
+<li><a href="#tut-language-extensions">Language extensions</a>
+<ul class="sectlevel3">
+<li><a href="#tut-extensions-chapter-synthesis">Supervisory controller synthesis</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#lang-ref-chapter-index">Language reference</a>
+<ul class="sectlevel2">
+<li><a href="#lang-ref-syntax-lexical">Lexical syntax</a>
+<ul class="sectlevel3">
+<li><a href="#lang-ref-keywords">Keywords</a></li>
+<li><a href="#lang-ref-terminals">Terminals</a></li>
+<li><a href="#lang-ref-whitespace">Whitespace</a></li>
+<li><a href="#lang-ref-comments">Comments</a></li>
+</ul>
+</li>
+<li><a href="#lang-ref-syntax-grammar">Grammar</a></li>
+</ul>
+</li>
+<li><a href="#tools-chapter-index">Tools</a>
+<ul class="sectlevel2">
+<li><a href="#tools-specification-tools">Specification tools</a>
+<ul class="sectlevel3">
+<li><a href="#tools-chapter-text-editor">CIF text editor</a></li>
+<li><a href="#tools-chapter-cif2yed">CIF to yEd transformer</a></li>
+</ul>
+</li>
+<li><a href="#tools-supervisory-controller-synthesis-tools">Supervisory controller synthesis tools</a>
+<ul class="sectlevel3">
+<li><a href="#tools-chapter-datasynth">Data-based supervisory controller synthesis</a></li>
+<li><a href="#tools-eventbased-chapter-index">Event-based synthesis toolset</a></li>
+<li><a href="#tools-chapter-cif2supremica">CIF to Supremica transformer</a></li>
+</ul>
+</li>
+<li><a href="#tools-simulation-validation-and-visualization-tools">Simulation, validation, and visualization tools</a>
+<ul class="sectlevel3">
+<li><a href="#tools-cifsim-chapter-index">CIF simulator</a></li>
+<li><a href="#tools-simulation-basics">Simulation basics</a></li>
+<li><a href="#tools-simulation-inputoutput">Simulation input/Output</a></li>
+<li><a href="#tools-simulation-advanced-topics">Simulation advanced topics</a></li>
+<li><a href="#tools-simulation-miscellaneous-topics">Simulation miscellaneous topics</a></li>
+<li><a href="#tools-simulation-developer-topics">Simulation developer topics</a></li>
+</ul>
+</li>
+<li><a href="#tools-verification-tools">Verification tools</a>
+<ul class="sectlevel3">
+<li><a href="#tools-chapter-cif2mcrl2">CIF to mCRL2 transformer</a></li>
+<li><a href="#tools-chapter-cif2uppaal">CIF to UPPAAL transformer</a></li>
+</ul>
+</li>
+<li><a href="#tools-real-time-testing-code-generation-and-implementation-tools">Real-time testing, code generation, and implementation tools</a>
+<ul class="sectlevel3">
+<li><a href="#tools-codegen-chapter-index">CIF code generator</a></li>
+<li><a href="#tools-cif2plc-chapter-index">CIF PLC code generator</a></li>
+</ul>
+</li>
+<li><a href="#tools-miscellaneous-tools">Miscellaneous tools</a>
+<ul class="sectlevel3">
+<li><a href="#tools-cif2cif-chapter-index">CIF to CIF transformer</a></li>
+<li><a href="#tools-chapter-mergecif">CIF merger</a></li>
+<li><a href="#tools-chapter-event-disabler">CIF event disabler</a></li>
+<li><a href="#tools-chapter-cif-explorer">CIF explorer</a></li>
+</ul>
+</li>
+<li><a href="#tools-scripting">Scripting</a>
+<ul class="sectlevel3">
+<li><a href="#tools-scripting-chapter-intro">Introduction to scripting</a></li>
+<li><a href="#tools-scripting-chapter-tools">Overview of scriptable tools</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#examples-chapter-index">CIF examples</a></li>
+<li><a href="#release-notes-chapter-index">CIF release notes</a>
+<ul class="sectlevel2">
+<li><a href="#version-0-2">Version 0.2</a></li>
+<li><a href="#version-0-1">Version 0.1</a></li>
+</ul>
+</li>
+<li><a href="#dev-chapter-index">Developers</a>
+<ul class="sectlevel2">
+<li><a href="#dev-lang-modify">CIF language modification</a></li>
+</ul>
+</li>
+<li><a href="#legal-chapter-index">Legal</a></li>
+</ul>
+</div>
+</div>
+<div id="content">
+<div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>CIF is a declarative modeling language for the specification of discrete
+event, timed, and hybrid systems as a collection of synchronizing automata.
+The CIF tooling supports the entire development process of controllers,
+including among others specification, supervisory controller synthesis,
+simulation-based validation and visualization, verification, real-time
+testing, and code generation.</p>
+</div>
+<div class="paragraph">
+<p>CIF is one of the tools of the Eclipse ESCET&#8482; project. Visit the
+<a href="https://eclipse.org/escet">project website</a> for downloads,
+installation instructions, source code, general tool usage information,
+information on how to contribute, and more.</p>
+</div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>The Eclipse ESCET project, including the CIF language and toolset,
+is currently in the
+<a href="https://wiki.eclipse.org/Development_Resources/Process_Guidelines/What_is_Incubation">Incubation Phase</a>.</p>
+</div>
+<div class="paragraph">
+<p><span class="image"><img src="./eclipse-incubation.png" alt="eclipse incubation" width="300"></span></p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="admonitionblock tip">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-tip" title="Tip"></i>
+</td>
+<td class="content">
+You can <a href="eclipse-escet-incubation-cif-manual.pdf">download this manual</a>
+as a PDF as well.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The documentation consists of:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#introduction-chapter-index">CIF introduction</a></p>
+</li>
+<li>
+<p><a href="#tut-chapter-index">CIF language tutorial</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-chapter-index">CIF language reference manual</a></p>
+</li>
+<li>
+<p><a href="#tools-chapter-index">CIF tool manual</a></p>
+</li>
+<li>
+<p><a href="#examples-chapter-index">CIF examples</a></p>
+</li>
+<li>
+<p><a href="#release-notes-chapter-index">CIF release notes</a></p>
+</li>
+<li>
+<p><a href="#dev-chapter-index">CIF developers manual</a></p>
+</li>
+<li>
+<p><a href="#legal-chapter-index">Legal information</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>A screenshot of the CIF tooling IDE:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./screenshot_ide.png" alt="screenshot ide">
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="introduction-chapter-index">Introduction</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The CIF language is a powerful declarative automata-based modeling language
+for the specification of discrete event, timed (linear dynamics), hybrid
+(piecewise continuous dynamics) systems. It can be seen as a rich state
+machine language with the following main features:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Modular specification with synchronized events and communication between
+automata.</p>
+</li>
+<li>
+<p>Many data types are available (booleans, integers, reals, tuples, lists,
+arrays, sets, and dictionaries), combined with a powerful expression language
+for compact variables updates.</p>
+</li>
+<li>
+<p>Text-based specification of the automata, with many features to simplify
+modeling large non-trivial industrial systems.</p>
+</li>
+<li>
+<p>Primitives for supervisory controller synthesis are integrated in the
+language.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The CIF tooling supports the entire development process of controllers,
+including among others specification, supervisory controller synthesis,
+simulation-based validation and visualization, verification, real-time
+testing, and code generation. Highlights of the CIF tooling include:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Text-based editor that allows to easily specify and edit models.</p>
+</li>
+<li>
+<p>Feature-rich powerful data-based synthesis tool. A transformation to the
+supervisory controller synthesis tool Supremica is also available.</p>
+</li>
+<li>
+<p>A simulator that supports both interactive and automated validation of
+specifications. Powerful visualization features allow for interactive
+visualization-based validation.</p>
+</li>
+<li>
+<p>Conversion to formal verification tools such as mCRL2 and UPPAAL.</p>
+</li>
+<li>
+<p>Implementation language code generation (PLC languages, Java, C, and
+Simulink) for real-time testing and implementation of the designed controller.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="tut-chapter-index">Language tutorial</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This tutorial introduces the CIF language. It explains the general idea
+behind the concepts of the language, and shows how to use them, all by means of
+examples. The tutorial is focused on giving a short introduction to CIF, and
+does not cover all details. It is recommended reading for all CIF users.</p>
+</div>
+<div class="sect2">
+<h3 id="tut-introduction">Introduction</h3>
+<div class="paragraph">
+<p>CIF stands for <strong>C</strong>ompositional <strong>I</strong>nterchange <strong>F</strong>ormat for hybrid
+systems. CIF is primarily used to create models of physical systems and their
+controllers, describing their behavior. However, CIF is a general-purpose
+modeling language, and can be used to model practically anything, ranging from
+physical real-world systems to abstract mathematical entities.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="paragraph">
+<p>CIF supports discrete event models, that are mostly concerned with what
+happens, and in which order. CIF also supports timed systems, where timing
+plays and explicit role, and hybrid systems, which combine the discrete events
+with timing. This makes CIF suitable for modeling of all kinds of systems.</p>
+</div>
+<div class="paragraph">
+<p>The CIF tooling puts a particular focus on supporting the entire development
+process of controllers. However, just as the CIF language, the CIF tooling can
+be applied much more generally. The tooling allows among others specification,
+supervisory controller synthesis, simulation-based validation and
+visualization, verification, real-time testing, and code generation.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-lessons">Lessons</h3>
+<div class="paragraph">
+<p>Several lessons are available, grouped into the following categories:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-tut-basics">Basics</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-data">Data</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-values">Types and values</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-reuse1">Scalable solutions and reuse (1/2)</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-time">Time</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-channels">Channel communication</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-functions">Functions</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-reuse2">Scalable solutions and reuse (2/2)</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-stochastics">Stochastics</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-extensions">Language extensions</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The lessons introduce new concepts, one by one, and are meant to be read in
+the given order.</p>
+</div>
+<div id="lang-tut-basics" class="paragraph">
+<p><strong>Basics</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-basics-chapter-automata">Automata</a></dt>
+<dd>
+<p>Explains automata, locations, events, edges, transitions, and more.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-basics-chapter-synchronizing-events">Synchronizing events</a></dt>
+<dd>
+<p>Explains event synchronization, enabledness, traces, and state spaces.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-basics-chapter-non-determinism">Non-determinism</a></dt>
+<dd>
+<p>Explains multiple causes of non-determinism.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-basics-chapter-alphabet">Alphabet</a></dt>
+<dd>
+<p>Explains alphabets for both individual automata and entire specifications.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-basics-chapter-event-placement">Event declaration placement</a></dt>
+<dd>
+<p>Explains the placement of event declarations.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-basics-chapter-shorter-notations">Shorter notations</a></dt>
+<dd>
+<p>Explains several shorter notations, including self loops, declaring
+multiple events with a single declaration, multiple events on an edge, and
+nameless locations.</p>
+</dd>
+</dl>
+</div>
+<div id="lang-tut-data" class="paragraph">
+<p><strong>Data</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-data-chapter-discrete-variables">Discrete variables</a></dt>
+<dd>
+<p>Explains discrete variables, guards, and updates.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-discvar-change">Discrete variable value changes</a></dt>
+<dd>
+<p>Explains how and when discrete variables can change value.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-loc-var-duality1">Location/variable duality (1/2)</a></dt>
+<dd>
+<p>Explains the duality between locations and variables using a model of a
+counter.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-loc-var-duality2">Location/variable duality (2/2)</a></dt>
+<dd>
+<p>Explains the duality between locations and variables using a model of a
+lamp.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-read-write">Global read, local write</a></dt>
+<dd>
+<p>Explains the concepts of global read and local write.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-monitoring">Monitoring</a></dt>
+<dd>
+<p>Explains monitoring, self loops, and monitor automata.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-asgn-old-vs-new">Old and new values in assignments</a></dt>
+<dd>
+<p>Explains old and new values of variables in assignments, multiple
+assignments, and the order of assignments.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-tau-event">The <code>tau</code> event</a></dt>
+<dd>
+<p>Explains the <code>tau</code> event.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-discvar-init">Initial values of discrete variables</a></dt>
+<dd>
+<p>Explains initialization of discrete variables, including the use of default
+values and multiple potential initial values.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-init-preds">Initialization predicates</a></dt>
+<dd>
+<p>Explains initialization in general, and initialization predicates in
+particular.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-locs-as-var">Using locations as variables</a></dt>
+<dd>
+<p>Explains the use of locations as variables.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-stat-invariants">State (exclusion) invariants</a></dt>
+<dd>
+<p>Explains state (exclusion) invariants.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-data-chapter-stat-evt-excl-invariants">State/event exclusion invariants</a></dt>
+<dd>
+<p>Explains state/event exclusion invariants.</p>
+</dd>
+</dl>
+</div>
+<div id="lang-tut-values" class="paragraph">
+<p><strong>Types and values</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-values-chapter-types-values-exprs">Types, values, and expressions</a></dt>
+<dd>
+<p>Explains the concepts of types, values, and expressions, as an introduction
+for the other lessons in this category.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-overview">Values overview</a></dt>
+<dd>
+<p>Provides an overview of the available values, and divides them into
+categories.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-integers">Integers</a></dt>
+<dd>
+<p>Explains integer types, values, and commonly used expressions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-integer-ranges">Integer ranges</a></dt>
+<dd>
+<p>Explains integer ranges.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-reals">Reals</a></dt>
+<dd>
+<p>Explains real types, values, and commonly used expressions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-booleans">Booleans</a></dt>
+<dd>
+<p>Explains boolean types, values, and commonly used expressions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-strings">Strings</a></dt>
+<dd>
+<p>Explains string types, values, and commonly used expressions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-enumerations">Enumerations</a></dt>
+<dd>
+<p>Explains enumeration types, values, and commonly used expressions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-tuples">Tuples</a></dt>
+<dd>
+<p>Explains tuple types, values, and commonly used expressions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-lists">Lists</a></dt>
+<dd>
+<p>Explains list types, values, and commonly used expressions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-bounded-lists-and-arrays">Bounded lists and arrays</a></dt>
+<dd>
+<p>Explains bounded lists, arrays, and their relations with regular lists.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-sets">Sets</a></dt>
+<dd>
+<p>Explains set types, values, and commonly used expressions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-dictionaries">Dictionaries</a></dt>
+<dd>
+<p>Explains dictionary types, values, and commonly used expressions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-combining-values">Combining values</a></dt>
+<dd>
+<p>Explains how to combine values of different types.</p>
+</dd>
+</dl>
+</div>
+<div id="lang-tut-reuse1" class="paragraph">
+<p><strong>Scalable solutions and reuse (1/2)</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-reuse1-chapter-constants">Constants</a></dt>
+<dd>
+<p>Explains the use of constants.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse1-chapter-algebraic-variables">Algebraic variables</a></dt>
+<dd>
+<p>Explains the use of algebraic variables.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse1-chapter-algvar-equations">Algebraic variables and equations</a></dt>
+<dd>
+<p>Explains the use of equations to specify values of algebraic variables.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse1-chapter-type-declarations">Type declarations</a></dt>
+<dd>
+<p>Explains the use of type declarations.</p>
+</dd>
+</dl>
+</div>
+<div id="lang-tut-time" class="paragraph">
+<p><strong>Time</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-time-chapter-intro">Timing</a></dt>
+<dd>
+<p>Introduces the concept of timing.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-time-chapter-continuous-variables">Continuous variables</a></dt>
+<dd>
+<p>Explains the use of continuous variables.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-time-chapter-contvar-equations">Continuous variables and equations</a></dt>
+<dd>
+<p>Explains the use of equations to specify values of continuous variables.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-time-chapter-equations">Equations</a></dt>
+<dd>
+<p>Show the use of equations for both continuous and algebraic variables, by
+means of an example of a
+<a href="http://en.wikipedia.org/wiki/Nonlinear_system&gt;">non-linear system</a>.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-time-chapter-var-overview">Variables overview</a></dt>
+<dd>
+<p>Provides an overview of the different kinds of variables in CIF, and their
+main differences.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-time-chapter-urgency">Urgency</a></dt>
+<dd>
+<p>Explains the concept of urgency, as well as the different forms of urgency.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-time-chapter-deadlock-livelock">Deadlock and livelock</a></dt>
+<dd>
+<p>Explains the concepts of deadlock and livelock.</p>
+</dd>
+</dl>
+</div>
+<div id="lang-tut-channels" class="paragraph">
+<p><strong>Channel communication</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-channels-chapter-intro">Channels</a></dt>
+<dd>
+<p>Explains point-to-point channels and data communication.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-channels-chapter-void">Dataless channels</a></dt>
+<dd>
+<p>Explains <code>void</code> channels that do not communicate any data.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-channels-chapter-chan-sync-combi">Combining channel communication with event synchronization</a></dt>
+<dd>
+<p>Explains how channel communication can be combined with event
+synchronization, further restricting the communication.</p>
+</dd>
+</dl>
+</div>
+<div id="lang-tut-functions" class="paragraph">
+<p><strong>Functions</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-functions-chapter-intro">Functions</a></dt>
+<dd>
+<p>Introduces functions, and explains the different kind of functions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-functions-chapter-internal-functions">Internal user-defined functions</a></dt>
+<dd>
+<p>Explains internal user-defined functions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-functions-chapter-statements">Function statements</a></dt>
+<dd>
+<p>Explains the different statements that can be used in internal user-defined
+functions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-functions-chapter-functions-as-values">Functions as values</a></dt>
+<dd>
+<p>Explains using functions as values, allowing functions to be passed around.</p>
+</dd>
+</dl>
+</div>
+<div id="lang-tut-reuse2" class="paragraph">
+<p><strong>Scalable solutions and reuse (2/2)</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-reuse2-chapter-aut-def-inst">Automaton definition/instantiation</a></dt>
+<dd>
+<p>Explains using automaton definition and instantiation for reuse.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse2-chapter-aut-def-params">Parametrized automaton definitions</a></dt>
+<dd>
+<p>Explains parametrized automaton definitions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse2-chapter-aut-def-param-kinds">Automaton definition parameters</a></dt>
+<dd>
+<p>Explains the different kinds of parameters of automaton definitions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse2-chapter-groups">Groups</a></dt>
+<dd>
+<p>Explains hierarchical structuring using groups.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse2-chapter-group-defs">Group definitions</a></dt>
+<dd>
+<p>Explains groups definitions and parametrized group definitions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse2-chapter-imports">Imports</a></dt>
+<dd>
+<p>Explains splitting CIF specifications over multiple files using imports.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse2-chapter-imports-libraries">Imports and libraries</a></dt>
+<dd>
+<p>Explains how to create libraries that can be used by multiple CIF
+specifications using imports, as well as how to use imports to include
+CIF specifications from other directories.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse2-chapter-imports-groups">Imports and groups</a></dt>
+<dd>
+<p>Explains how imports and groups interact.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse2-chapter-namespaces">Namespaces</a></dt>
+<dd>
+<p>Explains namespaces, and how they can be used together with imports.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-reuse2-chapter-input-variables">Input variables</a></dt>
+<dd>
+<p>Explains input variables, how they can be used for coupling with other
+models and systems, and their relation to imports.</p>
+</dd>
+</dl>
+</div>
+<div id="lang-tut-stochastics" class="paragraph">
+<p><strong>Stochastics</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-stochastics-chapter-intro">Stochastics</a></dt>
+<dd>
+<p>Introduction to stochastic distributions, which allow for sampling, making
+it possible to produce random values.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-stochastics-chapter-discrete-continuous-constant">Discrete, continuous, and constant distributions</a></dt>
+<dd>
+<p>Explains the different categories of stochastic distributions: discrete,
+continuous, and constant distributions.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-stochastics-chapter-pseudo-randomness">Pseudo-randomness</a></dt>
+<dd>
+<p>Explains how computers implement stochastics using pseudo-random number
+generators, and how this affects the use of stochastics in CIF.</p>
+</dd>
+</dl>
+</div>
+<div id="lang-tut-extensions" class="paragraph">
+<p><strong>Language extensions</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-extensions-chapter-synthesis">Supervisory controller synthesis</a></dt>
+<dd>
+<p>Explains how to extend a model to make it suitable for supervisory
+controller synthesis.</p>
+</dd>
+<dt class="hdlist1"><a href="#tools-cifsim-output-print-chapter-index">Print output</a></dt>
+<dd>
+<p>Explains how to extend a model to include printing of textual output.</p>
+<div class="paragraph">
+<p>This documentation is currently not part of the language tutorial,
+but of the simulator tool documentation.</p>
+</div>
+</dd>
+<dt class="hdlist1"><a href="#tools-cifsim-output-svgviz-chapter-index">SVG visualization</a></dt>
+<dd>
+<p>Explains how to extend a model to couple it to an image for visualization.</p>
+<div class="paragraph">
+<p>This documentation is currently not part of the language tutorial,
+but of the simulator tool documentation.</p>
+</div>
+</dd>
+<dt class="hdlist1"><a href="#tools-cifsim-input-svg-chapter-index">SVG interaction</a></dt>
+<dd>
+<p>Explains how to extend a model to couple it to an image for interaction via
+a visualization.</p>
+<div class="paragraph">
+<p>This documentation is currently not part of the language tutorial,
+but of the simulator tool documentation.</p>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-basics">Basics</h3>
+<div class="sect3">
+<h4 id="tut-basics-chapter-automata">Automata</h4>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+<div class="paragraph">
+<p>CIF models consist of <em>components</em>. Each of the components represents the
+behavior of a part of the system. Components can be modeled as <em>automata</em>,
+which form the basis of CIF. The following CIF <em>specification</em>, or CIF <em>model</em>,
+shows a simple automaton:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton lamp:
+  event turn_on, turn_off;
+
+  location on:
+    initial;
+    edge turn_off goto off;
+
+  location off:
+    edge turn_on goto on;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The automaton is named <code>lamp</code>, and not surprisingly represents the (discrete)
+behavior of a lamp.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div id="lang-tut-basics-automata-events" class="paragraph">
+<p>Automaton <code>lamp</code> declares two <em>events</em>, named <code>turn_on</code> and <code>turn_off</code>.
+Events model things that can happen in a system. They represent changes. For
+instance, the <code>turn_on</code> event indicates that the lamp is being turned on. It
+represents the change from the lamp being off to the lamp being on. The event
+declaration in the <code>lamp</code> automaton declares two events. The event
+declaration only indicates that these events exist, it does not yet indicate
+when they can happen, and what the result of them happening is.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div id="lang-tut-basics-automata-location" class="paragraph">
+<p>All automata have one or more <em>locations</em>, which represent the mutually
+exclusive <em>states</em> of the automaton. The <code>lamp</code> automaton has two
+<em>locations</em>, named <code>on</code> and <code>off</code>. Automata have an <em>active</em> or <em>current</em>
+location. That is, for every automaton one of its location is the active
+location, and the automaton is said to be <em>in</em> that location. For instance,
+the <code>lamp</code> automaton is either in its <code>on</code> location, or in its <code>off</code>
+location.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="lang-tut-basics-automata-loc-init" class="paragraph">
+<p>Initially, the lamp is on, as indicated by the <code>initial</code> keyword in the
+<code>on</code> location. That is, the <code>on</code> location is the initial location of the
+<code>lamp</code> automaton. The initial location is the active location of the
+automaton, at the start of the system.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="lang-tut-basics-edge" class="paragraph">
+<p>In each location, an automaton can have different behavior, specified using
+<em>edges</em>. An edge indicates how an automaton can change its state, by going from
+one location to another. Edges can be associated with events, that indicate
+what happened, and thus what caused the state change.</p>
+</div>
+<div class="paragraph">
+<p>The <code>lamp</code> automaton has an edge with the <code>turn_off</code> event, in its <code>on</code>
+location, going to the <code>off</code> location. Whenever the lamp is on, the <code>lamp</code>
+automaton is in its <code>on</code> location. Whenever the lamp is turned off, the
+<code>turn_off</code> event happens. The edge with that event indicates what the
+result of that event is, for the <code>on</code> location. In this case the result is
+that the lamp will then be off, which is why the edge goes to the <code>off</code>
+location.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div id="lang-tut-basics-trans" class="paragraph">
+<p>The <code>lamp</code> automaton can go from one location to another, as described by its
+edges. This is referred to as 'performing a transition', 'taking a transition',
+or 'taking an edge'. The <code>lamp</code> automaton can keep performing <em>transitions</em>.
+The lamp can be turned on, off, on again, off again, etc. This can go on
+forever.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-basics-chapter-synchronizing-events">Synchronizing events</h4>
+<div class="paragraph">
+<p>
+The power of events is that they synchronize. To illustrate this, consider
+the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton producer:
+  event produce, provide;
+
+  location producing:
+    initial;
+    edge produce goto idle;
+
+  location idle:
+    edge provide goto producing;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The automaton represents a producer that produces products, to be consumed
+by a consumer. The <code>producer</code> automaton starts in its <code>producing</code> location,
+in which it produces a product. Once the product has been produced, indicated
+by the <code>produce</code> event, the automaton will be in its <code>idle</code> location, where
+it waits until it can <code>provide</code> the produced product to the consumer. Once it
+has provided the product to the consumer, it will once again be <code>producing</code>
+another product. Consider also the following continuation of the above
+specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton consumer:
+  event consume;
+
+  location idle:
+    initial;
+    edge producer.provide goto consuming;
+
+  location consuming:
+    edge consume goto idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This second automaton represents a consumer that consumes products. The
+<code>consumer</code> is initially <code>idle</code>, waiting for a product from the producer.
+Once the producer has provided a product, the consumer will be <code>consuming</code>.
+Once it has consumed the product, as indicated by the occurrence of the
+<code>consume</code> event, it will become <code>idle</code> again.</p>
+</div>
+<div class="paragraph">
+<p>The specification has three events, the <code>produce</code> and <code>provide</code> events
+declared in the <code>producer</code> automaton, and the <code>consume</code> event declared in
+the <code>consumer</code> automaton. The <code>consumer</code> automaton, in its <code>idle</code>
+location, has an edge that refers to the <code>provide</code> event declared in the
+<code>producer</code> automaton. As such, that edge and the edge in the <code>idle</code>
+location of the <code>producer</code> automaton, refer to the same event.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tut-synchronization">Synchronization</h5>
+<div class="paragraph">
+<p>Events that are used in multiple automata, must <em>synchronize</em>. That is, if
+one of those automata performs a transition for that event, the other automata
+must also participate by performing a transition for that same event. If one
+of the automata that uses the event can not perform a transition in its current
+location, none of the automata can perform a transition for that event.</p>
+</div>
+<div class="paragraph">
+<p>Now, lets take a closer look at the behavior of the producer/consumer example.
+Initially, the <code>producer</code> automaton is in its <code>producing</code> location, and the
+<code>consumer</code> automaton is in its <code>idle</code> location. Since the <code>producer</code> is
+the only automaton that uses the <code>produce</code> event, and there is an (outgoing)
+edge in its current location for that <code>produce</code> event, the <code>producer</code> can
+go to its <code>idle</code> location by means of that event.</p>
+</div>
+<div class="paragraph">
+<p>Both the <code>producer</code> and <code>consumer</code> use the <code>provide</code> event. The
+<code>producer</code> has no edge with that event in its <code>producing</code> location, while
+the <code>consumer</code> does have an edge for that event in its <code>idle</code> location.
+Since events must synchronize, and the <code>producer</code> can not participate, the
+event can not occur at this time. This is what we expect, as the <code>producer</code>
+has not yet produced a product, and can thus not yet <code>provide</code> it to the
+consumer. The <code>consumer</code> will have to remain <code>idle</code> until the <code>producer</code>
+has produced a product and is ready to <code>provide</code> it to the <code>consumer</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+The <code>producer</code> blocks the <code>provide</code> event in this case, and is said to
+<em>disable</em> the event. The event is not blocked by the <code>consumer</code>, and is thus
+said to be <em>enabled</em> in the <code>consumer</code> automaton. In the entire
+specification, the event is <em>disabled</em> as well, as it is disabled by at least
+one of the automata of the specification, and all automata must enable the
+event for it to become enabled in the specification.</p>
+</div>
+<div class="paragraph">
+<p>The only behavior that is possible, is for the <code>producer</code> to <code>produce</code> a
+product, and go to its <code>idle</code> location. The <code>consumer</code> does not participate
+and remains in its <code>idle</code> location. Both automata are then in their <code>idle</code>
+location, and both have an edge that enables the <code>provide</code> event. As such,
+the <code>provide</code> event is enabled in the specification. As this is the only
+possible behavior, a transition for the <code>provide</code> event is performed. This
+results in the <code>producer</code> going back to its <code>producing</code> location, while at
+the same time the <code>consumer</code> goes to its <code>consuming</code> location.</p>
+</div>
+<div class="paragraph">
+<p>In its <code>producing</code> location, the <code>producer</code> can <code>produce</code> a product.
+Furthermore, in its <code>consuming</code> location, the <code>consumer</code> can <code>consume</code> a
+product. Two transitions are possible, and CIF does not define which one will
+be performed. That is, either one can be performed. No assumptions should be
+made either way. In other words, both transitions represent valid behavior, as
+described by this specification. Since only one transition can be taken at a
+time, there are two possibilities. Either the <code>producer</code> starts to
+<code>produce</code> the product first, and the <code>consumer</code> starts to <code>consume</code> after
+that, or the other way around.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-traces-and-state-spaces">Traces and state spaces</h5>
+<div class="paragraph">
+<p>Once both transitions have been taken, we are essentially in the same situation
+as we were after the <code>producer</code> produced a product the first time, as both
+automata will be in their <code>idle</code> locations again. The behavior of the
+specification then continues to repeat forever. However, for each repetition
+different choices in the order of production and consumption can be made.</p>
+</div>
+<div class="paragraph">
+<p>
+During a single <em>execution</em> or <em>simulation</em>, choices are made each time that
+multiple transitions are possible. The sequence of transitions that are taken
+is called a <em>trace</em>. Examples of traces for the producer/consumer example are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>produce</code> →
+<code>provide</code> →
+<code>produce</code> →
+<code>consume</code> →
+<code>provide</code> →
+<code>produce</code> →
+<code>consume</code> →
+&#8230;&#8203;</p>
+</li>
+<li>
+<p><code>produce</code> →
+<code>provide</code> →
+<code>produce</code> →
+<code>consume</code> →
+<code>provide</code> →
+<code>consume</code> →
+<code>produce</code> →
+&#8230;&#8203;</p>
+</li>
+<li>
+<p><code>produce</code> →
+<code>provide</code> →
+<code>consume</code> →
+<code>produce</code> →
+<code>provide</code> →
+<code>produce</code> →
+<code>consume</code> →
+&#8230;&#8203;</p>
+</li>
+<li>
+<p><code>produce</code> →
+<code>provide</code> →
+<code>consume</code> →
+<code>produce</code> →
+<code>provide</code> →
+<code>consume</code> →
+<code>produce</code> →
+&#8230;&#8203;</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The traces end with <code>...</code> to indicate that they are partial traces, that go
+beyond the part of the trace that is shown. These four traces however, cover
+all the possibilities for the first seven transitions.</p>
+</div>
+<div class="paragraph">
+<p>
+All possible traces together form the <em>state space</em>, which represents all the
+possible behavior of a system. For the producer/consumer example, the state
+space is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/basics/producer_consumer_state_space_finite.png" alt="producer consumer state space finite">
+</div>
+</div>
+<div class="paragraph">
+<p>Here the circles represent the states of the specification, which are a
+combination of the states of the two automata. The labels of the circles
+indicate the state, as a combination of the first letters of the locations of
+the automata. The initial state is labeled <code>p/i</code>, as initially automaton
+<code>producer</code> is in its <code>producing</code> (p) location, and the <code>consumer</code> is in
+its <code>idle</code> (i) location. The arrows indicate the transitions, and are labeled
+with events. The state space clearly shows the choices, as multiple outgoing
+arrows for a single state. It also makes it clear that as we move to the right,
+and make choices, we can make different choices for different products.
+Since the behavior keeps repeating itself, the state space ends with <code>...</code>
+to indicate that only a part of the state space is shown.</p>
+</div>
+<div class="paragraph">
+<p>However, we can also show the entire behavior of the specification. Essential
+here is that the state space shown above has duplicate states. That is, several
+states have the same label, and allow for the same future behavior. By reusing
+states, a finite representation of the state space can be made, which shows the
+entire possible infinite behavior of the producer/consumer specification:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/basics/producer_consumer_state_space_infinite.png" alt="producer consumer state space infinite">
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-concluding-remarks">Concluding remarks</h5>
+<div class="paragraph">
+<p>By using multiple automata, the producer and consumer were modeled
+independently, allowing for separation of concerns. This is an important
+concept, especially when modeling larger systems. In general, the large system
+is decomposed into parts, usually corresponding to physical entities. Each of
+the parts of the system can then be modeled in isolation, with little regard
+for the other parts.</p>
+</div>
+<div class="paragraph">
+<p>By using synchronizing events, the different automata that model different
+parts of a system, can interact. This allows for modeling of the connection
+between the different parts of the system, ensuring that together they
+represent the behavior of the entire system.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-basics-chapter-non-determinism">Non-determinism</h4>
+<div class="paragraph">
+<p>
+Depending on the context in which it is used, non-determinism can mean
+different things. One definition is having multiple possible traces through the
+state space of a system. Another definition is having multiple possible
+transitions for a certain event, for a certain state. Different communities
+also use different definitions, and some communities only use one of the
+definitions, and use a different name to refer to the other concept.</p>
+</div>
+<div class="sect4">
+<h5 id="tut-non-determinism-between-events">Non-determinism between events</h5>
+<div class="paragraph">
+<p>One cause of non-determinism is that multiple events are enabled, leading to
+multiple possible transitions. In other words, there are multiple possible
+traces through the state space. During the lesson on
+<a href="#tut-basics-chapter-synchronizing-events">synchronizing events</a>, we already
+encountered this form of non-determinism, as transitions for the <code>produce</code> and
+<code>consume</code> events could be performed in arbitrary order.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-non-determinism-for-single-event">Non-determinism for single event</h5>
+<div class="paragraph">
+<p>Another cause of non-determinism is the presence of multiple outgoing edges of
+a single location for the same event. This can lead to multiple possible
+transitions for a that event, for a single state. For instance, consider the
+following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton coin:
+  event toss, land, pick_up;
+
+  location hand:
+    initial;
+    edge toss goto air;
+
+  location air:
+    edge land goto ground;
+
+  location ground:
+    edge pick_up goto hand;
+end
+
+automaton outcome:
+  location unknown:
+    initial;
+    edge coin.land goto heads; // First way to land.
+    edge coin.land goto tails; // Second way to land.
+
+  location heads:
+    edge pick_up goto unknown;
+
+  location tails:
+    edge pick_up goto unknown;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>coin</code> automaton represents a single coin. Initially, it is in the
+<code>hand</code> of a person. That person can <code>toss</code> the coin up into the <code>air</code>,
+eventually causing it to fall and <code>land</code> on the <code>ground</code>. It can be picked
+up (event <code>pick_up</code>), causing it to once again be in the <code>hand</code> of a
+person.</p>
+</div>
+<div class="paragraph">
+<p>The <code>outcome</code> automaton registers the outcome of the
+<a href="http://en.wikipedia.org/wiki/Coin_toss">coin toss</a>. Initially,
+the outcome is <code>unknown</code>. Whenever the coin is tossed, it lands (event
+<code>land</code> from automaton <code>coin</code>) on the ground with either the <code>heads</code> or
+<code>tails</code> side up. The <code>unknown</code> location of the <code>outcome</code> automaton has
+two edges for the same event. This leads to two possible transitions, one to
+the <code>heads</code> location, and one to the <code>tails</code> location. This is a
+non-deterministic choice, as the model does not specify which transition is
+chosen, or even which choice is more likely.</p>
+</div>
+<div class="paragraph">
+<p>In both the <code>heads</code> and <code>tails</code> locations, the coin can be picked up again,
+making the outcome <code>unknown</code>. The coin can be tossed again and again,
+repeating the behavior forever. The following figure shows the state space of
+this specification:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/basics/coin_toss_state_space.png" alt="coin toss state space">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the first letters of the current locations of the
+two automata.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-basics-chapter-alphabet">Alphabet</h4>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="paragraph">
+<p>The lesson on <a href="#tut-basics-chapter-synchronizing-events">synchronizing events</a>
+described how events that are used in multiple automata exhibit synchronizing
+behavior. That is, if the event is used in multiple automata, they must all
+enable that event in order for a transition to be possible. If one of them can
+not perform the event, the event is disabled, and none of the automata can
+perform a transition for that event.</p>
+</div>
+<div class="paragraph">
+<p>Whether an automaton participates in the synchronization for a certain event,
+is determined by its <em>alphabet</em>. The alphabet of an automaton is the collection
+of events over which it synchronizes.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="tut-default-and-implicit-alphabets">Default and implicit alphabets</h5>
+<div class="paragraph">
+<p>By default, the alphabet of an automaton implicitly contains all the events
+that occur on the edges of the automaton. For instance, consider the following
+CIF specification (the producer/consumer example from the lesson on
+<a href="#tut-basics-chapter-synchronizing-events">synchronizing events</a>):</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton producer:
+  event produce, provide;
+
+  location producing:
+    initial;
+    edge produce goto idle;
+
+  location idle:
+    edge provide goto producing;
+end
+
+automaton consumer:
+  event consume;
+
+  location idle:
+    initial;
+    edge producer.provide goto consuming;
+
+  location consuming:
+    edge consume goto idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The alphabet of the <code>producer</code> automaton contains the events <code>produce</code> and
+<code>provide</code>, as both occur on edges of that automaton. The alphabet of the
+<code>consumer</code> automaton contains the events <code>producer.produce</code> and
+<code>consume</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-basics-alphabet-explicit">Explicit alphabet</h5>
+<div class="paragraph">
+<p>It is possible to explicitly specify the alphabet of an automaton, as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event provide;
+
+automaton producer:
+  event produce;
+
+  alphabet produce, provide; // Alphabet explicitly specified.
+
+  location producing:
+    initial;
+    edge produce goto idle;
+
+  location idle:
+    edge provide goto producing;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>alphabet</code> keyword is followed by the events that comprise the alphabet
+of the automaton, separated by commas. In this case, the alphabet contains
+the <code>produce</code> and <code>provide</code> events. Since this explicitly specified
+alphabet is exactly the same as the default alphabet, it could just as easily
+be omitted.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-non-default-alphabet">Non-default alphabet</h5>
+<div class="paragraph">
+<p>The alphabet is allowed to be empty, which can be explicitly specified as
+follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alphabet; // Empty alphabet. Automaton doesn't synchronize over any events.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+However, the alphabet of an automaton must at least contain the events that
+occur on the edges of an automaton. That is, it must at least contain the
+default alphabet.</p>
+</div>
+<div class="paragraph">
+<p>
+It may however also contain additional events. Since there are no edges for
+those additional events, the automaton can never enable those events, and
+thus always disables them. If a single automaton disables an event, and since
+it must always participate if it has that event in its alphabet, this means
+that the event becomes globally disabled in the entire specification. Having
+such additional events in the alphabet leads to a warning, to inform about the
+potential undesired effects of globally disabling events in this manner.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-implicit-vs-explicit">Implicit vs explicit</h5>
+<div class="paragraph">
+<p>It should be clear that for most automata, the implicit default alphabet
+suffices. There are however reasons for explicitly specifying the default
+alphabet. For large automata, it can improve the readability, as the explicit
+alphabet makes it easy to determine the alphabet of the automaton, without
+having to look at all the edges.</p>
+</div>
+<div class="paragraph">
+<p>The need to explicitly specifying a non-default alphabet rarely occurs.
+However, several <a href="#tools-chapter-index">tools</a> generate CIF specifications with
+explicit alphabets.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-basics-chapter-event-placement">Event declaration placement</h4>
+<div class="paragraph">
+<p>
+Consider the following CIF specification (the producer/consumer example from
+the lesson on <a href="#tut-basics-chapter-synchronizing-events">synchronizing events</a>):</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton producer:
+  event produce, provide;
+
+  location producing:
+    initial;
+    edge produce goto idle;
+
+  location idle:
+    edge provide goto producing;
+end
+
+automaton consumer:
+  event consume;
+
+  location idle:
+    initial;
+    edge producer.provide goto consuming;
+
+  location consuming:
+    edge consume goto idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The specification could also be specified as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton producer:
+  event produce, provide, consume; // Declaration of event 'consume' moved.
+
+  location producing:
+    initial;
+    edge produce goto idle;
+
+  location idle:
+    edge provide goto producing;
+end
+
+automaton consumer:
+  location idle:
+    initial;
+    edge producer.provide goto consuming;
+
+  location consuming:
+    edge producer.consume goto idle; // Event 'consume' from 'producer'.
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>consume</code> event is now declared in the <code>producer</code> automaton rather than
+the <code>consumer</code> automaton, but the locations and edges have not changed. This
+modified specification exhibits the same behavior as the original.</p>
+</div>
+<div class="paragraph">
+<p>It should be clear that while events can be declared in various places, it is
+best to declare them where they belong. That is, the <code>consume</code> event is only
+used by the <code>consumer</code> automaton, and is thus best declared in that
+automaton. Similarly, the <code>produce</code> event is only used by the <code>producer</code>
+automaton.</p>
+</div>
+<div class="paragraph">
+<p>The <code>provide</code> event however is used by both automata. In such cases the event
+is usually declared where it is initiated. In the example above, the producer
+provides the product to the consumer, and not the other way around. Therefore,
+the <code>provide</code> event is declared in the <code>producer</code> automaton, rather than in
+the <code>consumer</code> automaton.</p>
+</div>
+<div class="paragraph">
+<p>However, the modeler is free to choose the best place to declare the event. If
+no choice can be made between the automata, the event can also be declared
+outside the automata, as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event provide; // Event 'provide' now declared outside the automata.
+
+automaton producer:
+  event produce;
+
+  location producing:
+    initial;
+    edge produce goto idle;
+
+  location idle:
+    edge provide goto producing;
+end
+
+automaton consumer:
+  event consume;
+
+  location idle:
+    initial;
+    edge provide goto consuming; // Can directly refer to 'provide' event.
+
+  location consuming:
+    edge consume goto idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification also has the same behavior. Only the placement of the event
+declarations has changed.</p>
+</div>
+<div class="paragraph">
+<p>The place where an event is declared is of no influence to the
+implicit (default) <a href="#tut-basics-chapter-alphabet">alphabets</a> of the
+automata. The implicit alphabet of an automaton is determined solely based on
+the events that occur on the edges of that automaton.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-basics-chapter-shorter-notations">Shorter notations</h4>
+<div class="paragraph">
+<p>This lessons explains several short notations, that can be used for easier
+modeling, can reduce the size of the specification, and make specifications
+easier to read. The following topics are discussed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-tut-basics-shorter-notations-self-loop">Self loop</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-basics-shorter-notations-evt-decl-mult">Declaring multiple events with a single declaration</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-basics-shorter-notations-edge-mult-evt">Multiple events on an edge</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-basics-shorter-notations-loc-nameless">Nameless location</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-basics-shorter-notations-self-loop">Self loop</h5>
+<div class="paragraph">
+<p>A self loop is an edge that goes to the location from which it originated.
+Consider the following example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  event e;
+
+  location x:
+    edge e goto x;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The edge in location <code>x</code> of automaton <code>a</code> goes to location <code>x</code>. The
+effect of the <code>e</code> event is that automaton <code>a</code> remains in its <code>x</code>
+location. A self loop can be used to allow a certain event, essentially
+ignoring it for that location.</p>
+</div>
+<div class="paragraph">
+<p>The following short notation can be used for self loops:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  event e;
+
+  location x:
+    edge e; // Goto omitted for self loop.
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>goto</code> part of the edge can be omitted for self loop. This can help make
+the model easier to read, as the resulting location does not have to be checked
+against the source location of the edge, to see whether they match.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-basics-shorter-notations-evt-decl-mult">Declaring multiple events with a single declaration</h5>
+<div class="paragraph">
+<p>Several of the previous lessons already showed that multiple events can be
+declared using a single event declaration:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event a, b, c; // Single declaration declares multiple events.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This is equivalent to using multiple event declarations that each declare a
+single event:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event a; // Multiple declarations each declare a single event.
+event b;
+event c;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Using a single declaration to declare multiple events can help reduce the
+length of a specification.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-basics-shorter-notations-edge-mult-evt">Multiple events on an edge</h5>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  event e, f;
+
+  location loc:
+    edge e goto loc; // Two edges that only differ in the event.
+    edge f goto loc;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This can also be written more compactly, as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  event e, f;
+
+  location loc:
+    edge e, f goto loc; // Edge with two events.
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>An edge with two or more events means exactly the same as having individual
+edges for the different events. That is, a choice is made between them. It does
+<em>not</em> specify that event <code>f</code> can only happen after event <code>e</code> has already
+happened. Both automata thus have the exact same behavior.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-basics-shorter-notations-loc-nameless">Nameless location</h5>
+<div class="paragraph">
+<p>Several of the examples above show automata with a single location. For such
+automata, the name of the location is optional:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  event e;
+
+  location:
+    edge e;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Since the location has no name, there is no way to refer to it in a <code>goto</code>,
+and thus only self loop edges can be used. Leaving out the name prevents having
+to come up with a dummy name, which can clutter the specification.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-data">Data</h3>
+<div class="sect3">
+<h4 id="tut-data-chapter-discrete-variables">Discrete variables</h4>
+<div class="paragraph">
+<p>This lesson introduces discrete variables. Consider the following
+specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton counter:
+  event increment, decrement;
+
+  disc int count = 3;
+
+  location:
+    edge decrement when count &gt; 0 do count := count - 1;
+    edge increment when count &lt; 5 do count := count + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+The <code>counter</code> automaton can be used to count certain things. The
+<code>increment</code> and <code>decrement</code> events are used to change the count. The count
+itself is stored in a variable named <code>count</code>. CIF has several different types
+of variables. Here, we use a discrete variable, as indicated by the <code>disc</code>
+keyword. The variable has an <code>int</code> data type, meaning it can have integer
+numbers as its value. It is initialized to value <code>3</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+The automaton has two edges, one for the <code>increment</code> event, and one for the
+<code>decrement</code> event. The edge for the <code>decrement</code> event has a <em>guard</em> that
+indicates under which circumstances the event can take place. The condition is
+indicated using the <code>when</code> keyword. In this case, the guard ensures that the
+count can only be decremented if it is currently positive. The guard of the
+edge for the <code>increment</code> event indicates that the count can only be
+incremented as long as it is less than five. In general, a guard must hold in
+the source location of the edge, for the edge to be enabled, and a transition
+to be possible. If the guard is not specified, it defaults to <code>true</code>, which
+always holds and does not restrict the edge in any way.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+Both edges also have <em>updates</em>, indicated using the <code>do</code> keyword. Updates can
+be used to specify the effect of the transition on variables. In this case, the
+updates <em>assign</em> a new value to the <code>count</code> variable that is one less or one
+more than the current value. That is the value of the <code>count</code> variable is
+decremented or incremented by one.</p>
+</div>
+<div class="paragraph">
+<p>This specification represents a counter that can be repeatedly incremented and
+decremented by one, and ensures that the value of variable <code>count</code> is always
+at least zero and at most five.</p>
+</div>
+<div class="paragraph">
+<p>The state space of the <code>counter</code> automaton is as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/counter_state_space.png" alt="counter state space">
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-discvar-change">Discrete variable value changes</h4>
+<div class="paragraph">
+<p>
+Discrete variables can only change value by explicitly assigning them a new
+value in the <code>do</code> part of an edge. If an edge does not assign a value to a
+discrete variable, that variable keeps its current value. Consider the
+following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton lamp:
+  event turn_on, turn_off;
+
+  disc int count = 0;
+
+  location off:
+    initial;
+    edge turn_on  do count := count + 1 goto on;
+
+  location on:
+    edge turn_off                       goto off;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This is the same <code>lamp</code> automaton as used in the lesson on
+<a href="#tut-basics-chapter-automata">automata</a>, but with a <code>count</code> variable added. This
+variable is used to count the number of times that the lamp has been turned on.
+The edge for the <code>turn_on</code> event increments the value of the variable by one,
+each time the lamp is turned on.</p>
+</div>
+<div class="paragraph">
+<p>The edge for the <code>turn_off</code> event does not assign a value to a variable, so
+variable <code>count</code> keeps its value when the lamp is turned off.</p>
+</div>
+<div class="paragraph">
+<p>The state space of this specification is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/discvar_change_state_space.png" alt="discvar change state space">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the name of the current location of automaton
+<code>lamp</code> and the current value of variable <code>count</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-loc-var-duality1">Location/variable duality (1/2)</h4>
+<div class="paragraph">
+<p>
+
+The lesson that
+<a href="#tut-data-chapter-discrete-variables">introduces discrete variables</a>, uses
+an example of a counter. The actual count was modeled using a variable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton counter:
+  event increment, decrement;
+
+  disc int count = 3;
+
+  location:
+    edge decrement when count &gt; 0 do count := count - 1;
+    edge increment when count &lt; 5 do count := count + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It is also possible to use multiple locations instead of a variable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton counter:
+  event increment, decrement;
+
+  location zero:
+    edge increment goto one;
+
+  location one:
+    edge decrement goto zero;
+    edge increment goto two;
+
+  location two:
+    edge decrement goto one;
+    edge increment goto three;
+
+  location three:
+    initial;
+
+    edge decrement goto two;
+    edge increment goto four;
+
+  location four:
+    edge decrement goto three;
+    edge increment goto five;
+
+  location five:
+    edge decrement goto four;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This alternate model has the same behavior, in that it models a counter that
+can be incremented an decremented in steps of one, and the value is kept at
+least zero, and at most five. The variant with the variable however, is shorter
+and more intuitive. It is also easier to change to the <code>count &lt; 5</code> guard to
+<code>count &lt; 100</code> than it is to add dozens of additional locations and edges. In
+this case, using a variable is preferable to using multiple locations.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-loc-var-duality2">Location/variable duality (2/2)</h4>
+<div class="paragraph">
+<p>
+
+The lesson that <a href="#tut-basics-chapter-automata">introduces automata</a>, used an
+example of a lamp:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton lamp:
+  event turn_on, turn_off;
+
+  location on:
+    initial;
+    edge turn_off goto off;
+
+  location off:
+    edge turn_on goto on;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The automaton uses two locations to keep track of the current state of the
+lamp. Instead of two locations, it is also possible to use a variable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton lamp:
+  event turn_on, turn_off;
+
+  disc bool on = true;
+
+  location:
+    initial;
+    edge turn_on  when not on do on := true;
+    edge turn_off when     on do on := false;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This alternate automaton uses a single variable named <code>on</code>. The
+<a href="#tut-values-chapter-types-values-exprs">data type</a> of the variable is
+<code>bool</code>, which means that the variable can only have one of two possible
+values: <code>true</code> or <code>false</code>. If variable <code>on</code> has value <code>true</code>, the lamp
+is on, and if it has value <code>false</code> it is off. Initially, the lamp is on, as
+the initial value of the variable is <code>true</code>. The automaton has only one
+location, with two edges. The first edge indicates that the lamp can be turned
+on (event <code>turn_on</code>), only when it is not currently on (guard <code>not on</code>),
+and then afterwards is on (variable <code>on</code> becomes <code>true</code>). Similarly, the
+second edge indicates that the lamp can be turned off, only when it is
+currently on, and then afterwards is on.</p>
+</div>
+<div class="paragraph">
+<p>Both models represent a lamp that is initially on, and can be turned off,
+on, off again, on again, etc, repeating the behavior forever. Which approach
+is best depends on your preference, and on the rest of the model. It is however
+also possible to use both locations and a variable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton lamp:
+  event turn_on, turn_off;
+
+  disc bool on2 = true;
+
+  location on:
+    initial;
+    edge turn_off do on2 := false goto off;
+
+  location off:
+    edge turn_on  do on2 := true  goto on;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This automaton has the same behavior as the previous two automata. Variable
+<code>on</code> is renamed to <code>on2</code>, as a variable can not have the same name as a
+location of that same automaton.</p>
+</div>
+<div class="paragraph">
+<p>While it is possible to model a lamp like this, this automaton duplicates the
+information about whether the lamp is on or off. This makes the automaton
+larger and more complex than it needs to be. In general, it is usually better
+to choose either a variable, or multiple locations, to express something, and
+not both. In several future lessons, we&#8217;ll see that combining multiple
+locations with variables is useful, but not to express the same thing.
+Furthermore, an other future lesson explains how to
+<a href="#tut-data-chapter-locs-as-var">use a location as a variable</a>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-read-write">Global read, local write</h4>
+<div class="paragraph">
+<p>
+
+Discrete variables can only be declared in automata, and may only be assigned
+(given a value, written) by that automaton. They may however be read globally.
+Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton customer:
+  location:
+    initial;
+    edge queue1.enter when queue1.count &lt;= queue2.count;
+    edge queue2.enter when queue2.count &lt;= queue1.count;
+end
+
+automaton queue1:
+  event enter, leave;
+
+  disc int count = 0;
+
+  location:
+    initial;
+    edge enter when count &lt; 2 do count := count + 1;
+    edge leave when count &gt; 0 do count := count - 1;
+end
+
+automaton queue2:
+  event enter, leave;
+
+  disc int count = 0;
+
+  location:
+    initial;
+    edge enter when count &lt; 2 do count := count + 1;
+    edge leave when count &gt; 0 do count := count - 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification models a supermarket, and features a customer and two
+queues. Customers arrive and enter either of the queues. Eventually customers
+leave the queue.</p>
+</div>
+<div class="paragraph">
+<p>Both queues (automata <code>queue1</code> and <code>queue2</code>) are identical, except for
+their names. They maintain the <code>count</code>, which represents the number of
+customers in the queue. A queues is full if it contains two customers.
+Customers can thus only <code>enter</code> a queue if less than two customers are
+present. Similarly, it is only possible for a customer to leave a queue if
+there is a customer in the queue.</p>
+</div>
+<div class="paragraph">
+<p>Customers decide to which queue they go, based on the number of customers
+already present in those queues. A customer only enters the first queue if that
+queue has less than or the same number of customers as the second queue.
+Similarly, a customer only enters the second queue if that queue has less than
+or the same number of customers as the first queue. If the queues have the same
+number of customers, the customer can choose either queue.</p>
+</div>
+<div class="paragraph">
+<p>
+The <code>enter</code> event declared in the first queue (<code>queue1</code>) is used by both
+the <code>customer</code> automaton and the <code>queue1</code> automaton. The event is thus only
+possible (enabled) if both automata can participate. Both automata restrict the
+occurrence of the event using a guard. The event is thus only possible if both
+guards hold. That is, a custom never enters the first queue if it is full, but
+it also never enters that queue if it has more customers than the second queue.</p>
+</div>
+<div class="paragraph">
+<p>The state space of this specification is as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/supermarket_state_space.png" alt="supermarket state space">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the counts of the first and second queues.</p>
+</div>
+<div class="paragraph">
+<p>The <code>customer</code> automaton uses the values of the variables of the queue
+automata, and thus reads variables of other automata. This is allowed, due to
+the <em>global read</em> concept of CIF. This concept allows for short guards, that
+directly and intuitively represent the condition under which an event may take
+place.</p>
+</div>
+<div class="paragraph">
+<p>The global read concept should only be used when it is intuitive. In the
+supermarket example, the customer can physically see how many customers are
+in the queues. It is therefore intuitive to directly refer to the <code>count</code>
+variables of the queue automata. If however the customer would not be able to
+physically observer the queues, then the customer would not be able to directly
+base its decision of which queue to join, on that information. In that latter
+case, it may not be a good idea to model the guard in such way.</p>
+</div>
+<div class="paragraph">
+<p>The <em>local write</em> concept means that discrete variables can only be written by
+the automata in which they are declared. It is not allowed for the <code>customer</code>
+and <code>queue2</code> automata to write (change the value of) the <code>count</code> variable
+of the <code>queue1</code> automaton. Only the <code>queue1</code> automaton may write that
+variable. The local write concept prevents that multiple automata write to the
+same variable, as part of a synchronizing event, potentially causing
+conflicting values to be assigned to that variable. This leads to several
+benefits, most notably simpler semantics.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-monitoring">Monitoring</h4>
+<div class="paragraph">
+<p>
+
+This lesson explains the concept of <em>monitoring</em>. It is explained using the
+following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton producer:
+  event produce, provide_a, provide_b;
+
+  location producing:
+    initial;
+    edge produce goto idle;
+
+  location idle:
+    edge provide_a goto producing;
+    edge provide_b goto producing;
+end
+
+automaton detect_changeover:
+  disc int count = 0;
+
+  location start:
+    initial;
+    edge producer.provide_a goto a;
+    edge producer.provide_b goto b;
+
+  location a:
+    edge producer.provide_b do count := count + 1 goto b;
+
+  location b:
+    edge producer.provide_a do count := count + 1 goto a;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>producer</code> automaton represents a producer that can repeatedly
+<code>produce</code> a product, and provide it to either consumer 'a' (event
+<code>provide_a</code>) or consumer 'b' (event <code>provide_b</code>). The consumers are not
+modeled.</p>
+</div>
+<div class="paragraph">
+<p>The <code>detect_changeover</code> automaton detects consumer changes. That is, it
+detects and counts how often the producer switching from providing consumer 'a'
+with products to providing consumer 'b' with products, and vice versa.
+Initially, the automaton waits for the first product to be provided. It goes
+to either location <code>a</code> or location <code>b</code>, depending on which consumer is
+provided that first product. Whenever a product is then provided to the other
+consumer, the <code>count</code> is incremented by one to account for the changeover
+taking place. This also switches the location to the location for the other
+consumer, where once again the automaton waits for a changeover.</p>
+</div>
+<div class="sect4">
+<h5 id="tut-the-monitoring-problem">The monitoring problem</h5>
+<div class="paragraph">
+<p>There is a problem with the <code>detect_changeover</code> automaton. In its <code>a</code>
+location, it disables the <code>provide_a</code> event, as there is no edge for that
+event, and the automaton has that event in its (implicit)
+<a href="#tut-basics-chapter-alphabet">alphabet</a>. This means that after a product is
+provided to consumer 'a', no more products can be provided to that same
+consumer, until the producer provides a product to the consumer 'b', and the
+automaton switches to the corresponding <code>b</code> location. However, the idea is
+that the producer can provide products to either consumer, at all times, as
+that is the way it is intended. The <code>detect_changeover</code> automaton currently
+prevents behavior that is present in the <code>producer</code>, while it is only meant
+to <em>observe</em> or <em>monitor</em> products being provided. The state space of the
+specification is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/monitoring_problem_state_space.png" alt="monitoring problem state space">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the first letters of the names of the current
+locations of the automata. Note how the <code>i/a</code> and <code>i/b</code> locations only have
+outgoing transitions for either the <code>provide_a</code> transition or the
+<code>provide_b</code> transition.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-monitoring-with-self-loops">Monitoring with self loops</h5>
+<div class="paragraph">
+<p>A simple solution is to allow the disabled events:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton detect_changeover:
+  disc int count = 0;
+
+  location start:
+    initial;
+    edge producer.provide_a goto a;
+    edge producer.provide_b goto b;
+
+  location a:
+    edge producer.provide_a; // Added self loop.
+    edge producer.provide_b do count := count + 1 goto b;
+
+  location b:
+    edge producer.provide_a do count := count + 1 goto a;
+    edge producer.provide_b; // Added self loop.
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+The <code>provide_a</code> event has been added to an edge in the <code>a</code> location. The
+edge is a <a href="#lang-tut-basics-shorter-notations-self-loop">self loop</a>,
+meaning the current location of automaton <code>detect_changeover</code> does not change
+as a result of taking the edge. This means that essentially the event is
+ignored by the <code>detect_changeover</code> automaton, as the edge also has no
+updates. The state space of the modified specification is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/monitoring_fixed_state_space.png" alt="monitoring fixed state space">
+</div>
+</div>
+<div class="paragraph">
+<p>Now, whenever the <code>provide_a</code> event is possible, the <code>provide_b</code> event is
+also possible, and vice versa, just as in the <code>producer</code> automaton. The
+<code>detect_changeover</code> automaton no longer restricts the occurrence of the
+events; it only monitors them.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-monitoring-with-monitor-automata">Monitoring with monitor automata</h5>
+<div class="paragraph">
+<p>An alternative to adding self loops, is to use a <em>monitor</em> automaton. A monitor
+automaton is an automaton that monitors or observes one or more events. The
+events that it monitors, are never blocked (disabled) by that automaton. For
+our producer/changeover example, we can turn the <code>detect_changeover</code>
+automaton into a monitor automaton for the <code>provide_a</code> and <code>provide_b</code>
+events:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton detect_changeover:
+  monitor producer.provide_a, producer.provide_b; // Monitor instead of the self loops.
+
+  disc int count = 0;
+
+  location start:
+    initial;
+    edge producer.provide_a goto a;
+    edge producer.provide_b goto b;
+
+  location a:
+    edge producer.provide_b do count := count + 1 goto b;
+
+  location b:
+    edge producer.provide_a do count := count + 1 goto a;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>By default, automata don&#8217;t monitor any events. Using a <code>monitor</code> declaration
+with one or more events, turns the automaton into a monitor automaton for those
+events. For the producer/changeover example, the behavior with the monitor
+automaton is exactly identical to the behavior of the specification with the
+self loops.</p>
+</div>
+<div class="paragraph">
+<p>By omitting the events from the <code>monitor</code> declaration, an automaton monitors
+all events of its alphabet:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">monitor; // Monitor all events in the alphabet of the automaton.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For the producer/changeover, which has only the <code>provide_a</code> and <code>provide_b</code>
+events in its alphabet, this would result in the same behavior as for the
+automaton that monitors the two events explicitly.</p>
+</div>
+<div class="paragraph">
+<p>Using a monitor automaton instead of self loops has several advantages. A
+monitor declaration has to be provided only once, while self loops often have
+to be added to several locations. Furthermore, if the automaton is changed, it
+may be necessary to add or remove self loops, while the monitor declaration can
+most often be kept as is.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-asgn-old-vs-new">Old and new values in assignments</h4>
+<div class="paragraph">
+<p>This lesson explains old and new values of variables in assignments, multiple
+assignments, and the order of assignments.</p>
+</div>
+<div class="sect4">
+<h5 id="tut-old-and-new-values">Old and new values</h5>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton counter:
+  event increment;
+
+  disc int count = 0;
+
+  location:
+    initial;
+    edge increment do count := count + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>counter</code> automaton represents a counter that starts counting at zero,
+and can be incremented in steps of one.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+In assignments, the part to the left of the <code>:=</code> is called the <em>left hand
+side</em> of the assignment, or the <em>addressable</em>. The addressable is the variable
+that is assigned, and gets the new value. In the example above, variable
+<code>count</code> is assigned a new value.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+The part to the right of the <code>:=</code> is called the <em>right hand side</em> of the
+assignment, or the (new) <em>value</em>. In the example above, the new value is
+computed by taking the <em>current</em> or <em>old</em> value of variable <code>count</code> and
+incrementing it by one.</p>
+</div>
+<div class="paragraph">
+<p>In general, for variables used to compute the new value, always the old value
+of those variables are used. The new values for variables after a transition,
+are always computed from the old values of variables from before that
+transition.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-data-asgn-old-vs-new-multiple">Multiple assignments</h5>
+<div class="paragraph">
+<p>It is allowed to update multiple variables on a single edge, leading to
+multiple variables getting a new value as part of a single transition. For
+instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton swapper:
+  event swap;
+  disc int x = 0, y = 0;
+
+  location:
+    initial;
+    edge swap do x := y, y := x + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>swapper</code> automaton declares two variables, <code>x</code> and <code>y</code>. It keeps
+swapping the values of both variables, each time increasing the value of <code>y</code>
+by one.</p>
+</div>
+<div class="paragraph">
+<p>Initially, both variables have value zero. During the first <code>swap</code>, variable
+<code>x</code> gets the value of variable <code>y</code>. Since the old values of the variables
+are used to compute the new values, variable <code>x</code> remains zero. Variable <code>y</code>
+gets the old value of variable <code>x</code>, which is also zero, incremented by one.
+The result of the first swap is that <code>x</code> remains zero and <code>y</code> becomes one.</p>
+</div>
+<div class="paragraph">
+<p>During the second swap, <code>x</code> gets the value of variable <code>y</code>, which is then
+one. Variable <code>y</code> gets the value of variable <code>x</code>, which was still zero
+before the second swap, incremented by one. Both variables are thus one after
+the second swap.</p>
+</div>
+<div class="paragraph">
+<p>During the third swap, <code>x</code> gets the value of variable <code>y</code> from after the
+second swap, and thus remains one. Variable <code>y</code> becomes two.</p>
+</div>
+<div class="paragraph">
+<p>The state space of this somewhat artificial example is as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/swapper_state_space.png" alt="swapper state space">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the values of variables <code>x</code> and <code>y</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-assignment-order">Assignment order</h5>
+<div class="paragraph">
+<p>It is important to note that since the new values of the variables are computed
+from the old values of the variables, assignments are completely independent of
+each other. In the example above, variable <code>x</code> is assigned a new value in the
+first assignment, and variable <code>x</code> is also used to compute the new value of
+variable <code>y</code>. However, the old value of variable <code>x</code> is used to compute the
+new value of variable <code>y</code>. Therefore, the assignment to <code>x</code>, which
+indicates how <code>x</code> should be given a new value, has no effect on the new value
+off <code>y</code>, as the old value of <code>x</code> is used for that, regardless of whether
+<code>x</code> is assigned a new value.</p>
+</div>
+<div class="paragraph">
+<p>Since assignments are independent of each other, the order of the assignments
+of the edge does not matter. Consider the following alternative edge:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">edge swap do y := x + 1, x := y;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The assignments to <code>x</code> and <code>y</code> have been reordered. The behavior of the
+specification does not change as a result of this reordering.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-data-asgn-old-vs-new-multi">Multi-assignments</h5>
+<div class="paragraph">
+<p>CIF supports both multiple assignments as well as multi-assignments. To see
+the difference, consider the following examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">edge ... do x := y, y := x + 1;     // Multiple (two) assignments.
+edge ... do (x, y) := (y, x + 1);   // Single multi-assignment.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first edge has multiple assignments, namely one assignment to variable
+<code>x</code> and one assignment to variable <code>y</code>. The second edge has one assignment,
+that gives new values to variables <code>x</code> and <code>y</code>. Both are identical, in that
+they have the same affect: variable <code>x</code> is given the old value of variable
+<code>y</code> and variable <code>y</code> is given the old value of variable <code>x</code> incremented
+by one. Generally, using multiple assignments is preferred over using
+multi-assignments, as the former is easier to read. However, in certain cases,
+such as for <a href="#lang-tut-values-tuples-unpacking">tuple unpacking</a>, only the
+latter variant can be used.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-event-synchronization-and-assignment-order">Event synchronization and assignment order</h5>
+<div class="paragraph">
+<p>Consider a system with two conveyors. Products enter on the first conveyor,
+and move towards the second conveyor. Once they leave the first conveyor, they
+move onto the second one. Once they exit from the second conveyor, they leave
+the system. The positions of the left sides of the boxes are in range zero to
+seven, as indicated in the following figure:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/conveyor.png" alt="conveyor">
+</div>
+</div>
+<div class="paragraph">
+<p>This system can be modeled using the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event move;
+
+automaton conveyor1:
+  monitor move;
+  event exit1;
+  disc int pos = 0;
+
+  location:
+    initial;
+    edge move  when pos &lt; 4 do pos := pos + 1;
+    edge exit1 when pos = 4 do pos := 0;
+end
+
+automaton conveyor2:
+  monitor move;
+  event exit2;
+  disc int pos = -1;
+
+  location:
+    initial;
+    edge conveyor1.exit1 when pos = -1             do pos := conveyor1.pos;
+    edge move            when pos &gt;= 0 and pos &lt; 7 do pos := pos + 1;
+    edge exit2           when pos = 7              do pos := -1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each conveyor is modeled using an automaton. Both conveyors use a <code>pos</code>
+variable to represent the position of the left side of the box. The first
+conveyor gets a new box as soon as one leaves. The second one has to wait for
+a box from the first, and can thus be without a box. This is represented by
+value <code>-1</code> for the <code>pos</code> variable from automaton <code>conveyor2</code>. The <code>-1</code>
+value is not a actual position, but a special value indicating that no box is
+present on the conveyor.</p>
+</div>
+<div class="paragraph">
+<p>Boxes on the first conveyor can move towards the second conveyor (event
+<code>move</code>), until they reach position 4. They then leave the first conveyor
+(event <code>exit1</code>), and a new box immediately enters the first conveyor
+(variable <code>pos</code> is reset to zero).</p>
+</div>
+<div class="paragraph">
+<p>Boxes enter the second conveyor when they leave the first conveyor (event
+<code>exit1</code> from <code>conveyor1</code>). The position of the box is then transferred from
+the first conveyor to the second. The box keeps moving (event <code>move</code>) on
+the second conveyor until it reaches position 7. At position 7 it leaves
+(event <code>exit2</code>) the second conveyor, and the system.</p>
+</div>
+<div class="paragraph">
+<p>Both automata synchronize over the <code>move</code> event, meaning that the boxes on
+both conveyors move at the same time. Both automata
+<a href="#tut-data-chapter-monitoring">monitor</a> that event to ensure it is never
+blocked if only the other conveyor can actually move.</p>
+</div>
+<div class="paragraph">
+<p>Both automata synchronize over the <code>exit1</code> event. The first conveyor resets
+is own position (variable <code>pos</code>) to zero. The second conveyor sets its own
+position (variable <code>pos</code>) to the position of the first conveyor. Since old
+values of variables are used to compute the new values, the new value of
+variable <code>pos</code> in <code>conveyor2</code> is given the old value of variable <code>pos</code>
+from <code>conveyor1</code>. This is not influenced by the assignment to variable
+<code>pos</code> of <code>conveyor1</code> to zero, as assignments are independent, and the order
+of assignments does not matter, just as for multiple assignments on a single
+edge.</p>
+</div>
+<div class="paragraph">
+<p>The state space of this specification is as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/conveyor_state_space.png" alt="conveyor state space">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the values of the <code>pos</code> variables of the automata
+for the first and second conveyors.</p>
+</div>
+<div class="paragraph">
+<p>The important part of the state space is the transition from state <code>4/-1</code>,
+where the box of the first conveyor is at the end and the second conveyor has
+no box, to state <code>0/4</code>, where the first conveyor has received a new box at
+position zero, and the second conveyor has taken over the box (and the
+administration of its position) from the first conveyor.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-tau-event">The <code>tau</code> event</h4>
+<div class="paragraph">
+<p>
+
+
+
+Events allow for synchronization, allowing for interaction between automata
+based on events. If however an automaton has an edge that performs some
+internal processing, the event may not always be relevant. Consider for
+instance the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton machine1:
+  event process, provide;
+  disc int id = 0;
+
+  location processing:
+    initial;
+    edge process do id := id + 1 goto providing;
+
+  location providing:
+    edge provide goto processing;
+end
+
+automaton machine2:
+  location:
+    initial;
+    edge machine1.provide;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The specification models two machines. Products enter the first machine,
+which processes them (event <code>process</code>) and assigns them an <code>id</code>. The
+machine them provides (event <code>provide</code>) them to the second machine. The
+second machine currently just accepts the products provided by the first
+machine, but would in reality likely perform its own processing as well.
+The state space of the specification is as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/tau_event_state_space1.png" alt="tau event state space1">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the names of the current locations of automaton
+<code>machine1</code>. Since automaton <code>machine2</code> has only a single location, its
+current location does not change, and it is therefore not included in the state
+names.</p>
+</div>
+<div class="paragraph">
+<p>The <code>provide</code> event synchronizes over both automata, while the <code>process</code>
+event is local to the first machine. The <code>process</code> event is not essential,
+and could be left out:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton machine1:
+  event provide;                         // No more 'process' event.
+  disc int id = 0;
+
+  location processing:
+    initial;
+    edge do id := id + 1 goto providing; // No more event on the edge.
+
+  location providing:
+    edge provide goto processing;
+end
+
+automaton machine2:
+  location:
+    initial;
+    edge machine1.provide;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>By omitting the event from an edge, the <code>tau</code> is used for that edge. The
+<code>tau</code> event is an event that is implicitly always present without declaring
+it. The state space of this modified specification is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/tau_event_state_space2.png" alt="tau event state space2">
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+The <code>tau</code> event does not synchronize. You can think of this as each automaton
+having its own local <code>tau</code> event, and since then they are different events,
+they do not synchronize. If multiple automata can perform a transition for an
+edge with the <code>tau</code> event, this leads to potential transitions for each of
+those edges. Since they are all labeled with the <code>tau</code> event, it is
+impossible to distinguish them solely based on their label. This is a form of
+<a href="#tut-basics-chapter-non-determinism">non-determinism</a>.</p>
+</div>
+<div class="paragraph">
+<p>Using the <code>tau</code> events saves having to declare a local event, and also saves
+having to put that event on the edge. It thus leads to smaller specifications.
+However, as explained above, if <code>tau</code> is used on multiple edges of multiple
+automata, the different <code>tau</code> transitions can no longer be distinguished from
+each other in the state space. The use of the <code>tau</code> event is thus always a
+trade-off.</p>
+</div>
+<div class="paragraph">
+<p>
+It is also possible to explicitly use the <code>tau</code> event:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">edge tau goto ...;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>tau</code> event can thus be used instead of 'regular' events, and may even
+be combined with 'regular' events on the same edge:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">edge provide, tau goto ...;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+Omitting the events from an edge defaults to a single <code>tau</code> event, as shown
+in one of the examples above.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-discvar-init">Initial values of discrete variables</h4>
+<div class="paragraph">
+<p>
+
+
+Discrete variables can be given an initial value with their declaration:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc int x = 1;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+The initial value may be omitted, leading to the default value of its data type
+being used:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc int x;
+disc bool y;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The default value of <a href="#tut-values-chapter-integers">integer typed</a> variables
+is <code>0</code>. The default value of <a href="#tut-values-chapter-booleans">boolean typed</a>
+variables is <code>false</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="lang-tut-data-discvar-init-multiple" class="paragraph">
+<p>It is possible to indicate that a variable has more than one potential initial
+value:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc int x in {1, 2, 4};</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This declares a variable <code>x</code> that has three potential initial values.
+Variables can only have one value at a time, so an initial value has to be
+chosen from the <a href="#tut-values-chapter-sets">set</a> of potential initial values.
+In other words, initially the value of variable <code>x</code> is either <code>1</code>, <code>2</code>,
+or <code>4</code>. For information on how to store multiple values in a single variable,
+see the lessons on types and values, in particular those on
+<a href="#tut-values-chapter-tuples">tuples</a>, <a href="#tut-values-chapter-lists">lists</a>,
+and <a href="#tut-values-chapter-sets">sets</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="lang-tut-data-discvar-init-any" class="paragraph">
+<p>It is also possible to indicate that a variable can have any arbitrary initial
+value:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc int x in any;
+disc bool y in any;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>x</code> can initially have any value. The only constraint is that the
+initial value must be an integer value, as it must conform to the integer type
+(<code>int</code>) of the variable. Examples of initial values include <code>-1027</code>,
+<code>0</code>, <code>1</code>, and <code>12345</code>. Variable <code>y</code> can initially have any value, as
+long as that value is a boolean value, due to the variable having a boolean
+type (<code>bool</code>). There are only two boolean values, <code>true</code> and <code>false</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+Discrete variables with multiple potential initial values and arbitrary initial
+values essentially <em>parametrize</em> the specification. The exact initial value is
+to be chosen or <em>configured</em> later on. This allows a single specification to be
+used for various different combinations of initial values.</p>
+</div>
+<div class="paragraph">
+<p>So far all examples used literal values to initialize the variables. However,
+it is also allowed to use expressions to compute initial values, for instance
+based on the initial values of other variables:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc int x = 1;     // Initial value: 1
+disc int y = x * 2; // Initial value: 2
+disc int z = x + y; // Initial value: 3</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+Variable <code>x</code> is explicitly initialized with value <code>1</code>. Variable <code>y</code> is
+initialized to the initial value of <code>x</code>, multiplied by two. Variable <code>z</code>
+is initialized to the sum of the initial values of <code>x</code> and <code>y</code>. Using this
+kind of initialization is useful if the initial values must be kept consistent.
+Changing the initial value of <code>x</code> automatically also changes the initial
+values of <code>y</code> and <code>z</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+The order of the declaration of the variables does not matter. We could just
+as easily declare them as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc int y = x * 2; // Uses variable x, which is declared later.
+disc int x = 1;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+Variable <code>y</code> is still initialized using the initial value of variable <code>x</code>,
+which is now declared after variable <code>y</code>. It is not allowed to construct
+loops, where the initial values of variables depend on each other:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc int x = y; // Invalid initial value due to cyclic dependency.
+disc int y = z;
+disc int z = x;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>x</code> uses the value of variable <code>y</code>, which uses the value of
+variable <code>z</code>, which in turn uses the value of variable <code>x</code> again. This is
+not allowed in CIF, as it creates a cyclic dependency. However, since no
+restrictions are introduced on the initial values of variables <code>x</code>, <code>y</code>,
+and <code>z</code>, except that they must be equal to each other, we can declare them
+as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc int x in any; // Explicit 'any' breaks the cyclic dependency.
+disc int y = z;
+disc int z = x;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, variable <code>x</code> is explicitly initialized to an arbitrary value. The other
+variables are initialized to be equal to whatever arbitrary value is chosen as
+initial value for variable <code>x</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-init-preds">Initialization predicates</h4>
+<div class="paragraph">
+<p>
+<em>Initialization predicates</em> can be used to specify the allowed initial
+locations of automata, as well as to restrict the allowed initial values of
+variables.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-data-init-preds-aut">Initial locations of automata</h5>
+<div class="paragraph">
+<p>Initialization predicates can be used to specify the allowed initial locations
+of automata:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  location loc1:
+    initial;
+
+  location loc2:
+    initial true;
+
+  location loc3;
+
+  location loc4:
+    initial false;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Automaton <code>a</code> has four locations. Location <code>loc1</code> has the <code>initial</code>
+keyword, and is thus allowed to be the initial location. Location <code>loc2</code>
+also uses the <code>initial</code> keyword, but additionally specifies a predicate that
+indicates under which conditions the location may be the initial location.
+Since it is <code>true</code>, which always holds, it does not impose any additional
+restrictions, and can thus always be the initial location. In fact, this is
+identical to location <code>loc1</code>, which did not specify a predicate, in which
+case it default to <code>true</code> as well.</p>
+</div>
+<div class="paragraph">
+<p>Location <code>loc3</code> does not specify anything about initialization, and thus
+can never be the initial location. Location <code>loc4</code> can only be the initial
+location if <code>false</code> holds. Since <code>false</code> never holds, location <code>loc4</code>
+can never be the initial location. In fact, this is identical to location
+<code>loc3</code>, which did not specify any initialization at all, in which case it
+default to <code>false</code> as well.</p>
+</div>
+<div class="paragraph">
+<p>Locations <code>loc1</code> and <code>loc2</code> are the potential initial locations,
+while locations <code>loc3</code> and <code>loc4</code> can not be chosen as initial locations of
+automaton <code>a</code>. Since an automaton can only have one current location, an
+initial location has to be chosen from the potential initial locations. In
+other words, the initial location of automaton <code>a</code> is either location
+<code>loc1</code> or location <code>loc2</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-consistency-between-initial-locations-and-initial-values">Consistency between initial locations and initial values</h5>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton odd_even:
+  event inc, dec;
+  disc int n = 5;
+
+  location odd:
+    initial;
+    edge inc do n := n + 1 goto even;
+    edge dec do n := n - 1 goto even;
+
+  location even:
+    edge inc do n := n + 1 goto odd;
+    edge dec do n := n - 1 goto odd;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Automaton <code>odd_even</code> keeps track of a value (<code>n</code>) that can constantly be
+incremented (event <code>inc</code>) and decremented (event <code>dec</code>) by one. It has two
+locations, that keep track of the <code>odd</code>/<code>even</code> status of value <code>n</code>.
+Currently, the initial value is <code>5</code>, which is odd. Therefore, the <code>initial</code>
+keyword is specified in the <code>odd</code> location. However, if we change the initial
+value of variable <code>n</code> to <code>6</code>, we have to change the initial location
+as well, to ensure consistent initialization. To automatically keep the initial
+location consistent with the initial value of variable <code>n</code>, we can change
+the specification to the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton odd_even:
+  event inc, dec;
+  disc int n = 5;
+
+  location odd:
+    initial n mod 2 = 1; // Initial location if 'n' is odd.
+    edge inc do n := n + 1 goto even;
+    edge dec do n := n - 1 goto even;
+
+  location even:
+    initial n mod 2 = 0; // Initial location if 'n' is even.
+    edge inc do n := n + 1 goto odd;
+    edge dec do n := n - 1 goto odd;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this specification, location <code>odd</code> can only be the initial location if
+the value is odd (the value
+<a href="http://en.wikipedia.org/wiki/Modular_arithmetic">modulo</a>
+two is congruent to
+one), and location <code>even</code> can only be the initial location if the value is
+even. Changing the initial value of variable <code>n</code> then also changes the
+potential initial locations. Since the value is always odd or even, and can&#8217;t
+be both odd and even, automaton <code>odd_even</code> always has exactly one potential
+initial location.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-restricting-initialization">Restricting initialization</h5>
+<div class="paragraph">
+<p>Initialization predicates can also be used to restrict the initial values of
+variables. Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  disc int x in any;
+
+  initial x mod 2 = 1;
+
+  location ...
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this partial automaton, variable <code>x</code> can be initialized to any integer
+value, as indicated by its <code>int</code> type and the <code>any</code> keyword. However, the
+initialization predicate states that initially, the value of <code>x</code> module two
+must be congruent to one. That is, the value of variable <code>x</code> must initially
+be odd.</p>
+</div>
+<div class="paragraph">
+<p>It is allowed to specify initialization predicates inside automata, but it is
+also allowed to place them outside of them:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  disc int x in any;
+
+  location ...
+end
+
+automaton b:
+  disc int x in any;
+
+  location ...
+end
+
+initial a.x = 2 * b.x;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, two automata each declare a variable that can have arbitrary initial
+values. The initialization predicate specifies that the initial value of
+variable <code>x</code> from automaton <code>b</code> must be twice the initial value of
+variable <code>x</code> from automaton <code>a</code>.</p>
+</div>
+<div class="paragraph">
+<p>It is generally recommended to place an initialization predicate inside an
+automaton if the condition only applies to declarations from that automaton,
+and to place it outside of the automata if the condition applies to
+declarations of multiple automata.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-locs-as-var">Using locations as variables</h4>
+<div class="paragraph">
+<p>
+Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton machine1:
+  event start1, done1, reset1;
+  disc bool claimed = false;
+
+  location idle:
+    initial;
+    edge start1 when not machine2.claimed do claimed := true goto processing;
+
+  location processing:
+    edge done1 do claimed := false goto cool_down;
+
+  location cool_down:
+    edge reset1 goto idle;
+end
+
+automaton machine2:
+  event start2, done2, reset2;
+  disc bool claimed = false;
+
+  location idle:
+    initial;
+    edge start1 when not machine1.claimed do claimed := true goto processing;
+
+  location processing:
+    edge done1 do claimed := false goto cool_down;
+
+  location cool_down:
+    edge reset1 goto idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification models two machines, which produce products. The machines
+share a common resource, which may only be used by at most one of them, at any
+time (see
+<a href="http://en.wikipedia.org/wiki/Mutual_exclusion">mutual exclusion</a>).
+Initially, the machines are <code>idle</code>. Then, they warm themselves up. Once they
+start processing, they set their boolean variable <code>claimed</code> to <code>true</code> to
+indicate that they claimed the shared resource. After processing, the machines
+release the resource, by setting <code>claimed</code> to <code>false</code>. They finish their
+processing cycle by cooling down, before starting the cycle for the next
+product. To ensure that a machine can not claim the resource if the other
+machine has already claimed it, the edges going to the <code>processing</code> locations
+have a guard that states that it is only allowed to claim the resource and
+start processing, if the other machine has not already claimed the resource.
+The state space of this specification is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/data/mutex_state_space.png" alt="mutex state space">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the first letters of the names of the current
+locations of the automata.</p>
+</div>
+<div class="paragraph">
+<p>The specification can alternatively be modeled as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton machine1:
+  event start1, done1, reset1;
+
+  location idle:
+    initial;
+    edge start1 when not machine2.processing goto processing;
+
+  location processing:
+    edge done1 cool_down;
+
+  location cool_down:
+    edge reset1 goto idle;
+end
+
+automaton machine2:
+  event start2, done2, reset2;
+
+  location idle:
+    initial;
+    edge start1 when not machine1.processing goto processing;
+
+  location processing:
+    edge done1 cool_down;
+
+  location cool_down:
+    edge reset1 goto idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>claimed</code> variables and corresponding updates have been removed, and the
+guards no longer use those variables. Instead, the edge for the <code>start1</code>
+event now refers to the <code>processing</code> location of automaton <code>machine2</code>. The
+guard states that the first machine can perform the <code>start1</code> event, only if
+the second machine is not currently in its <code>processing</code> location. In other
+words, the guard states that the first machine can start processing as long as
+the second machine is not currently busy processing (and thus using the shared
+resource).</p>
+</div>
+<div class="paragraph">
+<p>The <code>processing</code> location of automaton <code>machine2</code> is used as a boolean
+variable. Using the location as a variable saves having to declare another
+variable (<code>claimed</code>) that essentially holds the same information, and needs
+to be explicitly updated (on two separate edges) to the correct value.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-stat-invariants">State (exclusion) invariants</h4>
+<div class="paragraph">
+<p>
+
+
+The lesson on <a href="#tut-data-chapter-discrete-variables">discrete variables</a> used
+the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton counter:
+  event increment, decrement;
+
+  disc int count = 3;
+
+  location:
+    initial;
+    edge decrement when count &gt; 0 do count := count - 1;
+    edge increment when count &lt; 5 do count := count + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The counter can repeatedly be incremented and decremented by one, as long as
+the count remains at least one and at most five. To keep the count in the
+allowed range of values, guards were used to limit the occurrence of the
+<code>increment</code> and <code>decrement</code> events.</p>
+</div>
+<div class="paragraph">
+<p>Instead of using guards, it is also possible to use state (exclusion)
+invariants, also called state invariants, or just invariants:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton counter:
+  event increment, decrement;
+
+  disc int count = 3;
+
+  invariant count &gt;= 0;                   // Added invariants
+  invariant count &lt;= 5;
+
+  location:
+    initial;
+    edge decrement do count := count - 1; // No more guards
+    edge increment do count := count + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The guards on the edges have been replaced by the two invariants. The first
+invariant specifies that the value of variable <code>count</code> must always be at
+least zero. The second invariant specifies that the value must also be at most
+five.</p>
+</div>
+<div class="paragraph">
+<p>Invariants specify conditions that must always hold. Invariants must hold in
+the initial state, and all states reached via transitions. If a transition
+results in a state where an invariant doesn&#8217;t hold, the transition is not
+allowed and can&#8217;t be taken.</p>
+</div>
+<div class="paragraph">
+<p>For the counter example, initially the <code>count</code> is <code>3</code>. The edge for the
+<code>increment</code> event can be taken, leading to a state where the <code>count</code> is
+<code>4</code>. Taking another transition for the <code>increment</code> event leads to a state
+where the <code>count</code> is <code>5</code>. If we then were to take another transition for
+the <code>increment</code> event, the <code>count</code> would then become <code>6</code>. However, that
+violates the invariant. Therefore, in the state where the <code>count</code> is <code>5</code>,
+no transition for the <code>increment</code> event is possible. In other words, the
+invariant disables the transition for the <code>increment</code> event for that state.</p>
+</div>
+<div class="paragraph">
+<p>The two invariants can be specified in various ways:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Multiple invariants, each with a single predicate.
+invariant count &gt;= 0;
+invariant count &lt;= 5;
+
+// Single invariant, with multiple predicates.
+invariant count &gt;= 0, count &lt;= 5;
+
+// Single invariant, with single predicate.
+invariant count &gt;= 0 and count &lt;= 5;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each of these variants leads to the exact same behavior, and which variant to
+use depends mostly on the modeler&#8217;s own preference.</p>
+</div>
+<div class="paragraph">
+<p>The benefit of guards over invariants is that they more explicitly state the
+condition under which an edge can lead to a transition. If a guard doesn&#8217;t
+hold, the edge can&#8217;t be part of a transition. It is thus immediately clear when
+the edge can lead to a transition. For invariants, the update has to be
+calculated first, after which the invariants can be evaluated for the state
+resulting from the transition. If one of the invariants doesn&#8217;t hold, the
+transition is not allowed. In the case of the invariants, it is not as
+immediately clear from the edge alone, when that specific edge can or can not
+lead to a transition.</p>
+</div>
+<div class="paragraph">
+<p>The benefit of invariants over guards is that they apply to all edges. If
+several edges in an automaton have updates to the same variable, then the
+invariants need to be specified only once, and apply to all transitions, for
+all edges. Using guards, all the edges that modify the variable would need
+their own guards, and if the updates are different, the different edges usually
+require different guards. Furthermore, if new edges with updates to the same
+variables are added, the invariant is already present, but guards have to be
+added, which can easily be forgotten. In those cases, invariants can thus help
+keep the specification consistent.</p>
+</div>
+<div class="paragraph">
+<p>Another benefit of invariants is that they explicitly state the conditions that
+must hold in relation to the variables, while guards specify the condition
+under which the update is allowed. Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Using invariants.
+automaton a:
+  disc int x;
+
+  invariant 0 &lt;= x, x &lt;= 100;
+
+  location:
+    initial;
+    edge do x := 2 * x + 3;
+end
+
+// Using guards.
+automaton a:
+  disc int x;
+
+  location:
+    initial;
+    edge when x &lt;= 48 do x := 2 * x + 3;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The goal is to keep the value of in the range [0..100]. The invariant is simple
+and direct. The guard however, has to state the condition under which the
+update does not violate the goal. That is, the upper bound has to be decreased
+by three, and the result has to be divided by two, to get the highest value
+(48) for which the update is still within the valid range of values. That is,
+for value 48 the update results in value 99 (2 * 48 + 3 = 99), and for value
+49 the update results in value 101 (2 * 48 + 3 = 99). The more complex the
+update, the harder it is to figure out the guard to use to keep satisfy the
+goal.</p>
+</div>
+<div class="paragraph">
+<p>You can of course also use <code>2 * x + 3 &lt;= 100</code> as guard, instead of
+<code>x &lt;= 48</code>. However, this duplicates part of the update in the guard.</p>
+</div>
+<div class="paragraph">
+<p>So far, all invariants have been specified in automata. They may however also
+be specified outside of the automata, similar to
+<a href="#tut-data-chapter-init-preds">initialization predicates</a>. It is generally
+recommended to place an invariant inside an automaton if the condition only
+applies to declarations from that automaton, and to place it outside of the
+automata if the condition applies to declarations of multiple automata.</p>
+</div>
+<div class="paragraph">
+<p>
+Furthermore, invariants can be placed in a location. Such an invariant only has
+to hold while the location in which it is specified is the current location of
+its automaton.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-data-chapter-stat-evt-excl-invariants">State/event exclusion invariants</h4>
+<div class="paragraph">
+<p>
+
+
+
+Consider an elevator, consisting of three parts: a motor to make the elevator
+move up and down, a door that can be opened and closed to let passengers enter
+and exit, and an emergency button that can be used to stop the elevator in
+case of an emergency. The following CIF specification models the three parts:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton motor:
+  event turn_on, turn_off;
+
+  location off:
+    initial;
+    edge turn_on goto on;
+
+  location on:
+    edge turn_off goto off;
+end
+
+automaton door:
+  event open, close;
+
+  location closed:
+    initial;
+    edge open goto opened;
+
+  location opened:
+    edge close goto closed;
+end
+
+automaton emergency_button:
+  event push, release;
+
+  location released:
+    initial;
+    edge push goto pushed;
+
+  location pushed:
+    edge release goto released;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each part is modeled by an automaton. Since the automata don&#8217;t share any
+events, they operate independently. What is missing, is a controller that
+links the different automata, and controls them in a safe manner. Such a
+controller restricts the behavior of the individual automata, allowing only
+the combined behavior that is deemed desired. There are several ways to
+restrict events, including introducing synchronization between the different
+automata, and adding guards. The downside of these approaches it that they
+require modification of the automata. What if we wanted to specify the
+controller separately from the behavior of the physical system? We could
+introduce an additional automaton, that synchronizes with the existing
+automata. For instance, we could add the following to the CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton controller:
+  location:
+    initial;
+    edge motor.turn_on when door.closed and emergency_button.released;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This controller introduces restrictions for the <code>turn_on</code> event of the
+<code>motor</code>. In this particular case, the controller ensures that the motor may
+only be turned on when both the door is closed and the emergency button is
+released. By restricting the event, the controller prohibits the event from
+taking place in certain states, ensuring that only the desired behavior
+remains.</p>
+</div>
+<div class="paragraph">
+<p>It is nice that we can separate the description of the physical behavior of the
+elevator from the controller that controls it. This separation of concerns may
+make it easier to reason about the behavior, it may make it easier to adapt
+the controller when the physical system doesn&#8217;t change, and it may make it
+easier to reuse the model of the physical system for other purposes.</p>
+</div>
+<div class="paragraph">
+<p>However, modeling an automaton with a single location that must then also be
+<code>initial</code> requires quite some syntax. State/event exclusion invariants can
+serve the same purpose, but are often easier to use, shorter to write, and
+more intuitive to read. Instead of the <code>controller</code> automaton, we can also
+use the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">invariant motor.turn_on needs door.closed and emergency_button.released;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each state/event exclusion invariant restricts an event, preventing it from
+happening in certain states. That is, the event is excluded from taking place
+in certain states. In this case, the <code>turn_on</code> event of the <code>motor</code>
+automaton needs the <code>door</code> to be in its <code>closed</code> location and the
+<code>emergency_button</code> to be in its <code>released</code> location, for the event to be
+allowed/enabled. For the states in which that condition doesn&#8217;t hold, the event
+is disabled.</p>
+</div>
+<div class="paragraph">
+<p>The invariant consists of two conditions. It can also be written as two
+separate state/event exclusion invariants, one for each condition:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Single state/event exclusion invariant.
+invariant motor.turn_on needs door.closed and emergency_button.released;
+
+// Multiple state/event exclusion invariants.
+invariant motor.turn_on needs door.closed;
+invariant motor.turn_on needs emergency_button.released;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The second and third invariants lead to the same behavior as the first combined
+invariant. The second invariant ensures that the event can only take place when
+the door is closed, while the third invariant ensures that the event can only
+take place when the emergency button is released. The second and third
+invariants each indicate a necessary condition that must hold for the event to
+be allowed/enabled. Together, they require that both conditions hold, for the
+event to be allowed/enabled. If one of the conditions doesn&#8217;t hold, the event
+will be disabled.</p>
+</div>
+<div class="paragraph">
+<p>The <code>door</code> is either <code>opened</code> or <code>closed</code>. So far, we&#8217;ve required that
+the door is closed to allow the motor to be turned on. We can also specify it
+the other way around: to disallow the motor to be turned on, while the door is
+opened:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// State/event exclusion invariant to specify when event is allowed/enabled.
+invariant motor.turn_on needs door.closed;
+
+// State/event exclusion invariant to specify when event is disallowed/disabled.
+invariant door.opened disables motor.turn_on;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Both invariants have the exact same effect. The first invariant only allows the
+motor to be turned on while the door is closed, which means that it disallows
+the motor to be turned on in all other situations, namely when the door is
+opened. And that is exactly what is specified by the second invariant: when the
+door is opened, turning the motor on is disallowed/disabled. In general,
+state/event exclusion invariants can always be specified as a positive form
+(allowed/enabled) and a negative form (disallowed/disabled). It is up to the
+modeler to choose, based on considerations such as personal preference and
+readability. Consider the following four alternative forms:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Single state/event exclusion invariant for enabling the event.
+invariant motor.turn_on needs door.closed and emergency_button.released;</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Multiple state/event exclusion invariants for enabling the event.
+invariant motor.turn_on needs door.closed;
+invariant motor.turn_on needs emergency_button.released;</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Single state/event exclusion invariant for disabling the event.
+invariant door.opened or emergency_button.pushed disables motor.turn_on;</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Multiple state/event exclusion invariants for disabling the event.
+invariant door.opened             disables motor.turn_on;
+invariant emergency_button.pushed disables motor.turn_on;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each of the four forms has the exact same effect, but is written in a different
+way.</p>
+</div>
+<div class="paragraph">
+<p>We already saw earlier that for state/event exclusion invariants that
+introduce necessary conditions for an event to be enabled (the <code>needs</code>
+variant), the conditions can be combined using an <code>and</code> operator to form a
+combined condition, for a single invariant.</p>
+</div>
+<div class="paragraph">
+<p>Here, we also see how in a similar way, state/event exclusion invariants that
+introduce sufficient conditions for an event to be disabled (the <code>disabled</code>
+variant) can be combined. Each of them individually has a condition, that if
+satisfied disables the event, regardless of the other invariants. So, if one of
+them disables the event, the event is disabled. To combine such invariants into
+a single invariant, the conditions need to be combined using an <code>or</code>
+operator, as shown above.</p>
+</div>
+<div class="paragraph">
+<p>It may occur that multiple events need to be disabled for the same conditions.
+Instead of writing multiple invariants with the same conditions, one for each
+event, they can also be combined:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Two separate invariants with same condition, for different events.
+invariant motor.turn_on needs emergency_button.released;
+invariant door.close    needs emergency_button.released;
+
+// Combined invariant, for multiple events.
+invariant {motor.turn_on, door.close} needs emergency_button.released;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first two invariants have the same condition, but restrict different
+events. The third invariant has the same condition, but restricts both events.
+In general, for all state/event invariants, multiple events may be given, if
+they share the same condition. The events must then be separated by spaces and
+be enclosed in curly brackets (<code>{...}</code>).</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-types-and-values">Types and values</h3>
+<div class="sect3">
+<h4 id="tut-values-chapter-types-values-exprs">Types, values, and expressions</h4>
+<div class="paragraph">
+<p>This lesson explains the difference between types, values, and expressions.
+These concepts have already been used in previous lessons, but this lesson
+names them explicitly, and also explains the relations between them.
+Furthermore, this lesson serves as an introduction for the coming lessons,
+which rely heavily on these concepts. Consider the following declarations of
+<a href="#tut-data-chapter-discrete-variables">discrete variables</a>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc int x = 1;
+disc int y = 2 * x;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+The first declaration declares a discrete variable named <code>x</code>, and the second
+declaration declares a discrete variable named <code>y</code>. Both variables have an
+<code>int</code> <em>data type</em>. A data type is usually just called a <em>type</em>, if there is
+no confusion with other kinds of types. The type of a variable indicates the
+potential or allowed values of the variable. Variable <code>x</code> is initialized to
+<em>value</em> <code>1</code>. Variable <code>y</code> is initialized to twice the value of <code>x</code>,
+meaning it is initialized to value <code>2</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+Both <code>1</code> and <code>2 * x</code> are <em>expressions</em>. Expressions are combinations of
+among others literal values (e.g. <code>1</code>), variables (e.g. <code>x</code>), and
+operations (e.g. <code>*</code>) on them. Expressions can be <em>computed</em>, resulting in a
+value. This is called <em>evaluation</em> of the expression.</p>
+</div>
+<div class="paragraph">
+<p>Expression <code>2 * x</code> can be evaluated. Evaluating the expression results in
+value <code>2</code> if the value of <code>x</code> is <code>1</code>, and in value <code>4</code> if the value of
+<code>x</code> is <code>2</code>. Expressions can thus be evaluated to different values,
+depending on the values of the variables that occur in them.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+</p>
+</div>
+<div id="lang-tut-values-types-values-exprs-literal" class="paragraph">
+<p>Expression <code>1</code> consists of only a single value, called a <em>literal</em> value
+expression. Evaluation always results in that single value. Expression
+<code>1 + 3</code> evaluates to value <code>4</code>. Even though it does not consist of only
+just a literal, the value is the same for each evaluation. The expression
+represents a <em>constant</em> value.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-overview">Values overview</h4>
+<div class="paragraph">
+<p>The values of CIF (and their types) can be categorized into different
+categories: elementary values, container values, and miscellaneous values.
+Elementary values represent single values, such as a single number. Container
+values represent multiple values. The different container values combine or
+store the values in different ways. The elementary and container values are
+described in the remainder of this part of the tutorial. The miscellaneous
+values are special, and are explained later in the tutorial. The remainder of
+this lesson gives an overview of the values available per category, along with
+short descriptions of each of the different kinds of values.</p>
+</div>
+<div class="paragraph">
+<p><strong>Elementary values</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-values-chapter-booleans">Booleans</a></dt>
+<dd>
+<p>Represents truth values of for instance guards and other conditions. The
+only two possible values are <code>true</code> and <code>false</code>.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-integers">Integers</a></dt>
+<dd>
+<p>Represent integer numbers, such as <code>-123</code> and <code>5</code>.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-enumerations">Enumerations</a></dt>
+<dd>
+<p>Represent enumerated values, which are collections of names each
+representing a different value. For instance, a enumeration named
+<code>color</code> could have values <code>red</code>, <code>green</code>, and <code>blue</code>.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-reals">Reals</a></dt>
+<dd>
+<p>Represent real numbers, such as <code>1.56</code> and <code>-2.7e6</code> (scientific
+notation for 2.7 million).</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-strings">Strings</a></dt>
+<dd>
+<p>Represent textual values, such as <code>"hello world"</code> and <code>"some text"</code>.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><strong>Container values</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-values-chapter-tuples">Tuples</a></dt>
+<dd>
+<p>Tuples have two or more ordered values, each of which can have a different
+type. For instance: <code>(1, true, 5.0)</code>.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-lists">Lists</a></dt>
+<dd>
+<p>Lists have zero or more ordered values, each of which has the same type,
+and possibly with duplicates. For instance: <code>[1, 5, 2, 1]</code>.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-sets">Sets</a></dt>
+<dd>
+<p>Sets have zero or more unordered values, each of which has the same type,
+and without any duplicates. For instance: <code>{1, 5, 2}</code>.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-values-chapter-dictionaries">Dictionaries</a></dt>
+<dd>
+<p>Dictionaries have keys and associated values. The keys are unique and each
+map to a value. For instance: <code>{1: true, 2: false, 3: false}</code>.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><strong>Miscellaneous values</strong></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="#tut-functions-chapter-functions-as-values">Functions</a></dt>
+<dd>
+<p>Functions take values and use them to compute other values, possibly using
+complex and lengthy calculations.</p>
+</dd>
+<dt class="hdlist1"><a href="#tut-stochastics-chapter-intro">Distributions</a></dt>
+<dd>
+<p>Stochastic distributions allow for sampling, making it possible to produce
+random values.</p>
+</dd>
+</dl>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-integers">Integers</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+Integers are whole numbers, numbers without a fractional part. Examples include
+<code>-123</code> and <code>5</code>. The default value of integers (<code>int</code> type) is <code>0</code>.
+Several standard arithmetic operators and functions are available to work with
+integers, including the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">+9          // 9
+--9         // 9
+
+9 + 4       // 13
+9 - 4       // 5
+9 * 4       // 36
+9 / 4       // 2.25 (result is a real number, not an integer number)
+
+9 div 4     // 2    (9 / 4 = 2.25, so 4 fits at most two whole times in 9)
+9 mod 4     // 1    (the remainder of 9 div 4)
+
+pow(2, 4)   // 16   (2 to the power of 4, or 2 * 2 * 2 * 2)
+abs(-9)     // 9    (absolute value)
+min(9, 4)   // 4    (minimum value)
+max(9, 4)   // 9    (maximum value)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Integer values can be compared to other integer values:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">x &lt; y       // less than
+x &lt;= y      // less than or equal to
+x = y       // equal to
+x != y      // not equal to
+x &gt;= y      // larger than or equal to
+x &gt; y       // larger than</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-integer-ranges">Integer ranges</h4>
+<div class="paragraph">
+<p>
+
+CIF can only represent <a href="#tut-values-chapter-integers">integer numbers</a>
+(type <code>int</code>) in the range -2,147,483,648 (= -2<sup>31</sup>) to
+2,147,483,647 (= 2<sup>31</sup> - 1). Using values outside that range
+results in the CIF model being invalid, and leads to runtime errors:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">ERROR: Integer overflow: 9999999 * 9999999.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It is possible in CIF to explicitly specify that only a sub range of the
+integer values are allowed:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc int[3..7] x;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+This variable <code>x</code> can only have integer values that are at least <code>3</code> and
+at most <code>7</code>. Assigning any other value to <code>x</code> is not allowed. The default
+value is not <code>0</code> but <code>3</code>, as that is the value closest to <code>0</code> that is in
+the allowed range of values.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-reals">Reals</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+Reals or real numbers are numbers with a fractional part. Examples include
+<code>1.56</code> and <code>-2.7e6</code> (scientific notation for 2.7 million). Real numbers
+must either have a fraction or use the scientific notation, to distinguish them
+from integer numbers. The default value of reals (<code>real</code> type) is <code>0.0</code>.
+Several standard arithmetic operators and functions are available to work with
+reals, including the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">+1.23           // 1.23
+--1.2           // 1.2
+
+1.5 + 0.5       // 2.0
+1.5 - 0.5       // 1.0
+1.5 * 0.5       // 0.75
+1.5 / 0.5       // 3.0
+
+pow(3.5, 2.0)   // 7.0      (3.5 to to the power of 2, or 3.5 * 3.5)
+abs(-1.5)       // 1.5      (absolute value)
+min(1.5, 0.5)   // 0.5      (minimum value)
+max(1.5, 0.5)   // 1.5      (maximum value)
+
+sqrt(16.0)      // 4.0      (square root)
+cbrt(16.0)      // 2.0      (cube root)
+
+sin(1.0)        // 0.841... (sine)
+cos(1.0)        // 0.540... (cosine)
+tan(1.0)        // 1.557... (tangent)
+
+log(100.0)      // 2.0      (logarithm to base 10)
+ln(100.0)       // 4.605... (natural logarithm)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Real values can be compared to other real values, as well as to integer values:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">x &lt; y       // less than
+x &lt;= y      // less than or equal to
+x = y       // equal to
+x != y      // not equal to
+x &gt;= y      // larger than or equal to
+x &gt; y       // larger than</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Integer numbers can often be written where real numbers are expected. Real
+values and integer values can also often be combined using arithmetic operators
+and functions. Furthermore, it is possible to convert between them, e.g as
+follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">sqrt(16)    // 4.0 (16 interpreted as 16.0)
+1 + 0.5     // 1.5 (addition of an integer number and a real number)
+max(0.5, 1) // 1.0 (maximum of an integer number and a real number)
+
+&lt;real&gt;1     // 1.0 (cast from integer to real, explicit conversion)
+round(1.6)  // 2   (round real to closest integer, half up)
+ceil(0.7)   // 1   (round real up to integer)
+floor(0.7)  // 0   (round real down to integer)</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-booleans">Booleans</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+Booleans represents truth values of for instance guards and other conditions
+and properties. The only two possible values are <code>true</code> (condition or
+property holds) and <code>false</code> (condition or property does not hold). The
+default value of booleans (<code>bool</code> type) is <code>false</code>. Several standard
+<a href="http://en.wikipedia.org/wiki/Logical_operator">logical operators</a>
+are available to work with booleans, including the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">not x       // inverse
+
+x and y     // conjunction (both x and y must hold)
+x or y      // disjunction (either x, y, or both must hold)
+x =&gt; y      // implication (if x holds, y must hold)
+
+x = y       // equal to
+x != y      // not equal to</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The condition <code>x &lt; 3</code> evaluates to <code>true</code> if <code>x</code> is less than <code>3</code> and
+to <code>false</code> if <code>x</code> is <code>3</code> or larger than <code>3</code>. The result is thus a
+boolean value.</p>
+</div>
+<div class="paragraph">
+<p>Conditions can be combined. <code>x &gt;= 3 and x &lt;= 9</code> means that the value of <code>x</code>
+must be both at least <code>3</code> and at most <code>9</code>. <code>x &gt;= 3 or x &lt;= 9</code> means that
+the value of <code>x</code> must be at least <code>3</code>, at most <code>9</code>, or both. Since the
+condition is always satisfied (it always evaluates to <code>true</code>), condition
+<code>true</code> can be used instead of <code>x &gt;= 3 or x &lt;= 9</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-strings">Strings</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+Strings represent textual values, as a sequence of characters. String values
+are always written between double quotes. An example is <code>"hello world"</code>. The
+default value of strings (<code>string</code> type) is the empty string <code>""</code>.</p>
+</div>
+<div class="paragraph">
+<p>Strings can be composed using the <code>+</code> operator. The expression
+<code>"hello" + " " + "world"</code> evaluates to <code>"hello world"</code>. For advanced text
+formatting, see
+<a href="#tools-cifsim-output-print-chapter-tut-fmt">the text formatting tutorial</a>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-enumerations">Enumerations</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+
+Enumerations represent collections of related entities, such as types of
+products, types of available resources, available machine types, different
+countries, different colors, different genders, and so on. It is possible to
+use numbers to represent the different entities, for instance <code>0</code> for red,
+<code>1</code> for orange, and <code>2</code> for green, to represent the different colors of
+a traffic light. However, these numbers are rather arbitrary. Furthermore, they
+don&#8217;t actually represent numbers, but rather they represent one of the entities
+(red, orange, green). Enumerations allow giving each entity a name, and to use
+those names instead of numbers. This usually makes the model easier to read and
+understand. For instance, consider the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum TrafficColor = RED, ORANGE, GREEN;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div id="lang-tut-values-enums-lit" class="paragraph">
+<p>The <code>enum</code> keyword is used to declare an enumeration. The <code>TrafficColor</code>
+enumeration has three possible values or <em>literals</em>. The literals are named
+<code>RED</code>, <code>ORANGE</code>, and <code>GREEN</code>. An enumeration can be used as data type,
+and the enumeration literals can be used as values:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc TrafficColor light = RED;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>TrafficColor</code> enumeration is used as type of the <code>light</code> variable.
+The <code>light</code> variable is given value <code>RED</code> as its initial value. The default
+value of an enumeration type is its first literal (<code>RED</code> in this case).
+However, it is usually preferred to explicitly initialize variables with
+enumeration types, for readability.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">edge change_color when light = RED do light := GREEN;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This edge has a guard that compares the value of the <code>light</code> variable to
+enumeration literal <code>RED</code>. Only if the <code>light</code> is currently <code>RED</code>, may
+this edge be taken. The edge further assigns enumeration literal <code>GREEN</code> as
+the new value of variable <code>light</code>. The edge as a whole models that if the
+<code>light</code> is currently <code>RED</code>, it may change color (event <code>change_color</code>)
+and become <code>GREEN</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-tuples">Tuples</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+Tuples are used for keeping several (related) kinds of data together in one
+variable, e.g. the identification number and weight of a box. A tuple consists
+of a number of fields, where the types of these fields may be different. The
+number of fields is fixed. For instance, consider the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc tuple(int nr; real weight) box;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>box</code> has a tuple type, consisting of two fields, an integer
+typed field with name <code>nr</code> and real typed field with name <code>weight</code>. The
+<code>box</code> variable has essentially two values, an integer typed value, and
+a real typed value.</p>
+</div>
+<div class="paragraph">
+<p>If multiple consecutive fields have the same type, the type need not be
+repeated for each of them. In the following example, variables <code>x1</code> and
+<code>x2</code> have the same type:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc tuple(int a; int b; real c; int d) x1;
+disc tuple(int a, b;     real c; int d) x2;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+
+Literal values exist for tuple types:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc tuple(int nr; real weight) box = (5, 2.7);
+
+edge ... do box := (6, 3.4);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>box</code> variable is initialized to a tuple value consisting of integer
+value <code>5</code> (identification number) and real value <code>2.7</code> (weight). The entire
+value of the variable is reassigned in the assignment. That is, both fields are
+given new values.</p>
+</div>
+<div class="paragraph">
+<p>
+It is also possible to refer to a specific field of a tuple, using
+<em>projection</em>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc tuple(int nr; real weight) box = (5, 2.7);
+disc int i;
+disc real r;
+
+edge ... do i := box[nr];            // Projection to field 'nr'.
+edge ... do r := box[weight];        // Projection to field 'weight'.
+edge ... do box[nr] := i;            // Assignment to field 'nr'.
+edge ... do box[nr] := box[nr] + 1;  // Increment of field 'nr'.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first edge uses projection to obtain the value of the integer <code>nr</code>
+field, and assign it to integer variable <code>i</code> (<code>i</code> becomes <code>5</code>). The
+second edge performs a similar operation for the <code>weight</code> field (<code>r</code>
+becomes <code>2.7</code>). The third edge assigns the value of integer variable <code>i</code>
+to the integer field <code>nr</code> of the <code>box</code> variable. This changes only the
+value of the <code>nr</code> field. The value of the <code>weight</code> field of the <code>box</code>
+variable is not affected by this assignment. The third edge increments the
+value of the <code>nr</code> field of the <code>box</code> variable by one, leaving the
+<code>weight</code> of the <code>box</code> as is. Besides projection using field names, it is
+also possible to do projection using 0-based indices:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc tuple(int nr; real weight) box = (5, 2.7);
+disc int i;
+disc real r;
+
+edge ... do i := box[0];  // Projection to field 'nr'.
+edge ... do r := box[1];  // Projection to field 'weight'.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+Index <code>0</code> refers to the first field, in this case field <code>nr</code>. Index <code>1</code>
+refers to the second field, etc. Projection using indices is also called
+<em>indexing</em>. For tuples, it is usually preferred to use field names, rather than
+indices, for readability.</p>
+</div>
+<div class="paragraph">
+<p>
+It is possible to create a tuple from separate values, each stored in a
+variable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc tuple(int nr; real weight) box;
+disc int i;
+disc real r;
+
+edge ... do box := (i, r); // Packing a tuple.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The right hand side of the assignment is a tuple literal value, as used before.
+The field values however, are obtained by evaluation of variables, rather than
+using literal integer and real values. This kind of assignment, where there is
+tuple variable at the left hand side, and values for each of the fields of that
+tuple at the right hand side, is called <em>packing</em> a tuple.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="lang-tut-values-tuples-unpacking" class="paragraph">
+<p>It is possible to obtain the values of the fields of a tuple into separate
+variables:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc tuple(int nr; real weight) box = (5, 2.7);
+disc int i;
+disc real r;
+
+edge ... do i := box[nr], r := box[weight];
+edge ... do (i, r) := box; // Unpacking a tuple.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first edge uses projection on the variable <code>box</code> to obtain the values of
+the individual fields, and assigns those extracted values to two separate
+variables. The second edge does the same thing as the first edge, and is
+preferred in this case, because of its simple and short notation. This kind of
+use, where at the left hand side of the assignment you see variables for each
+of the fields of the tuple, and on the right hand side you see only one
+variable that has a tuple type, is called <em>unpacking</em> a tuple.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-lists">Lists</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+
+A list is an ordered collection of values (called <em>elements</em>) of a same type.
+Lists can be used to model anything where duplicate values may occur or where
+order of the values is significant. Examples are customers waiting in a shop,
+process steps in a recipe, or products stored in a warehouse. Consider the
+following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc list int x = [7, 8, 3];</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div id="lang-tut-values-list-literal" class="paragraph">
+<p>Variable <code>x</code> has a list of integers as its value. In this case, its initial
+value is a literal list with three integer elements. Lists are ordered
+collections of elements. <code>[7, 8, 3]</code> is thus a different list as
+<code>[8, 7, 3]</code>. Lists are empty by default, and they may have duplicate
+elements:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc list int x1;                       // Implicitly empty list.
+disc list int x2 = [];                  // Explicitly empty list.
+disc list int x3 = [1, 2, 1, 2, 2];     // Duplicate elements in a list.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+Since lists are ordered, there is a first element and a last element (unless
+the list is empty). An element can be obtained by <em>projection</em>, usually called
+<em>indexing</em> for lists:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc list int x = [7, 8, 3];
+disc int i;
+
+edge ... do i := x[0];   // 'i' becomes '7'
+edge ... do i := x[1];   // 'i' becomes '8'
+edge ... do i := x[2];   // 'i' becomes '3'
+edge ... do i := x[3];   // error (there is no fourth element in the list)
+edge ... do x[0] := 5;   // the first element of 'x' is replaced by '5'</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first three edges obtain specific elements of the list, and assign them to
+variable <code>i</code>. The first element is obtained using <em>index</em> or <em>offset</em> <code>0</code>,
+the second element using index <code>1</code>, etc. The index of the last element is the
+length of the list (the number of elements in the list), minus one. Indexing
+does not change the value of variable <code>x</code>. The fourth edge is  invalid, as
+the fourth element (index <code>3</code>) of variable <code>x</code> is used, which does not
+exist. The fifth edge replaces only the first element (index <code>0</code>) of list
+<code>x</code>, while keeping the remaining elements as they are. It is also allowed to
+use negative indices:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc list int x = [7, 8, 3];
+disc int i;
+
+edge ... do i := x[-1];  // 'i' becomes '3'
+edge ... do i := x[-2];  // 'i' becomes '8'
+edge ... do i := x[-3];  // 'i' becomes '7'
+edge ... do i := x[-4];  // error (there is no element before element '7')</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Negative indices start from the back of the list, rather than from the front.
+Index <code>-1</code> thus always refers to the last element, <code>-2</code> to the second to
+last element, etc. As with the non-negative indices, using a negative index
+that is out of range of available elements, results in an error. To obtain a
+non-negative index from a negative index, add the negative index to the length
+of the list: <code>3 + -1 = 2</code>, <code>3 + -2 = 1</code>, and <code>3 + -3 = 0</code>. The following
+figure visualizes a list, with non-negative indexing (at the top) and negative
+indexing (at the bottom):</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/values/list_indices.png" alt="list indices">
+</div>
+</div>
+<div class="paragraph">
+<p>
+Besides obtaining a single element from a list, it is also possible to obtain
+a sub-range of the elements of a list, called a <em>slice</em>. Slicing also does not
+change the contents of the list. It results in a copy of a contiguous
+sub-sequence of the list. The result of a slice operation is again a list, even
+if the slice contains just one element, or no elements at all. Slicing requires
+two indices: the index of the first element of the sub-range (inclusive), and
+the index of the last element of the sub-range (exclusive). Both indices may be
+omitted. If the start index is omitted, it defaults to zero. If the end index
+is omitted it defaults to the length of the list. If the begin index is equal
+to or larger than the end index, the slice is empty. Similar to indexing,
+negative indices may be used, which are relative to the end of the list rather
+than the start of the list. Indices that are out of bounds
+<a href="http://en.wikipedia.org/wiki/Saturation_arithmetic">saturate</a> to those
+bounds. Some examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc list int x = [7, 8, 3, 5, 9];
+
+x[2:4]  //       [3, 5]    Slice that includes third and fourth elements.
+x[2:7]  //       [3, 5, 9] Slice that excludes the first two elements.
+x[1:]   //    [8, 3, 5, 9] Slice that excludes the first element.
+x[:-1]  // [7, 8, 3, 5]    Slice that excludes the last element.
+x[:]    // [7, 8, 3, 5, 9] Slice includes all elements (is equal to 'x').</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first slice takes the third (index <code>2</code>) and fourth (index <code>3</code>)
+elements. The begin index (<code>2</code>) is thus included, the end index (<code>4</code>) is
+not. The second slice starts at the same index, but extends to the sixth
+element (index <code>7</code>). Since there are only five elements, the index is
+saturated (or clamped) to the end of the list. The results is that all but the
+first two elements are included. The third slice excludes the first element
+(index <code>0</code>), by starting at index <code>1</code>. It omits the end index, meaning that
+the entire remainder of the list is kept, and only the first element is not
+included. The fourth slice begins at the beginning of the list, as the begin
+index is omitted. It continues until the last element of list, which it
+excludes. It thus excludes a single element from the end of the list. The fifth
+slice includes all elements, as both the begin and end index are omitted. The
+slice is thus identical to the list in <code>x</code>. The following figure graphically
+represents the slices:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/values/list_slicing.png" alt="list slicing">
+</div>
+</div>
+<div class="paragraph">
+<p>
+Lists can be combined into new lists. They are essentially 'glued' together.
+This is called <em>concatenation</em>. This can also be used to add a single element
+to the front or back of the list. For instance:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">[7, 8, 3] + [5, 9]   // [7, 8, 3, 5, 9]
+[5] + [7, 8, 3]      // [5, 7, 8, 3]
+[7, 8, 3] + [5]      // [7, 8, 3, 5]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Several other standard operators and functions are available to work with
+lists, including the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">[1, 8, 3] = [1, 3, 8]           // false (equality test)
+6 in [1, 8, 3]                  // false (element test)
+1 in [1, 8, 3]                  // true
+
+empty([1, 2])                   // false (empty test)
+size([1, 5, 3, 3])              // 4 (count elements)
+
+del([7, 8, 9, 10], 2)           // [7, 8, 10] (removed value at index '2')
+pop([1, 5, 3])                  // (1, [5, 3]) (first element and remainder)</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-bounded-lists-and-arrays">Bounded lists and arrays</h4>
+<div class="paragraph">
+<p>
+
+CIF can only represent <a href="#tut-values-chapter-lists">lists</a> (type <code>list</code>)
+with at most 2,147,483,647 (= 2<sup>31</sup> - 1) elements. Using lists
+with more elements results in the CIF model being invalid, and leads to runtime
+errors. For instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  disc list int x;
+
+  location:
+    initial;
+    edge do x := x + [1];
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each time the edge is taken, another element is added to list <code>x</code>. As soon
+as an attempt is made to add the 2,147,483,648<sup>th</sup> element, a
+runtime error occurs.</p>
+</div>
+<div class="paragraph">
+<p>It is possible to explicitly restrict the number of elements that may be
+contained in a list:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc list[3..7] int y;      // List with at least 3 and at most 7 elements.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+Variable <code>y</code> can only have lists as its value that have at least <code>3</code> and at
+most <code>7</code> elements. Assigning a list with any other number of elements is not
+allowed. Lists with size restrictions are called <em>bounded lists</em>. They can also
+be called <em>size restricted lists</em> or <em>ranged lists</em>. The default value for
+<code>y</code> is <code>[0, 0, 0]</code>. That is, the default value has the least amount of
+elements that is allowed by the bounded list, and the default value (<code>0</code>) of
+the element type (<code>int</code>).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="lang-tut-values-array" class="paragraph">
+<p>Lists with a fixed length are called <em>arrays</em>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc list[5..5] int a;      // List with at least 5 and at most 5 elements.
+disc list[5]    int b;      // Shorter but equivalent array notation.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>By giving a bounded list the same lower and upper bound, the bounded list has a
+fixed number of elements, and can be called an <em>array</em>. Arrays also have a
+shorter and more convenient notation, where the number of elements is only
+given once. Both notations for arrays are equivalent.</p>
+</div>
+<div class="paragraph">
+<p>Both bounded lists and arrays support the same operations as regular lists, and
+can be modified (assigned) the same way as regular lists, as long as their size
+restrictions are not violated.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-sets">Sets</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+A set is an unordered collection of values (called <em>elements</em>) of a same type.
+Each element value either exists in a set, or it does not exist in a set. Each
+element value is unique, as duplicate elements are silently discarded. Consider
+the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc set int x1 = {3, 7, 8};
+disc set int x2 = {8, 3, 7};        // Order irrelevant (same as 'x1').
+disc set int x3 = {8, 3, 7, 3};     // Duplicates ignored (same as 'x2').
+disc set int x4 = {};               // Empty set.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+Variable <code>x1</code> has a set of integers as its value. In this case, its initial
+value is a literal set with three integer elements. As sets are unordered
+collections of elements, <code>{3, 7, 8}</code> is the same set as <code>{8, 3, 7}</code>, and
+thus variables <code>x1</code> and <code>x2</code> have the same initial values. Since elements
+in a set are unique, set <code>{8, 3, 7}</code> is equal to the set <code>{8, 3, 7, 3}</code>,
+and thus variables <code>x2</code> and <code>x3</code> have the same initial values. For
+readability, elements in a set are normally written in increasing order, for
+example <code>{3, 7, 8}</code>. Variable <code>x4</code> has an empty set as initial value, which
+is also the default initial value for sets.</p>
+</div>
+<div class="paragraph">
+<p>
+The <em>union</em> of two sets results in a set that contains the combined elements of
+both sets. You can think of the resulting set containing the elements that are
+in the one set <code>or</code> in the other set (or in both of them). Since sets never
+contain duplicates, common elements are present only once in the resulting set:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">{1, 2, 3} or {2, 3, 4}          // {1, 2, 3, 4}
+{1, 2, 3} or {2, 3, 4}          // {1, 2, 4, 3}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Since sets are unordered, both answers are possible, and represent the same
+set. Since the order is irrelevant, there are 24 different ways to represent
+that same set. In the remainder of this lesson, we&#8217;ll use increasing order, for
+readability.</p>
+</div>
+<div class="paragraph">
+<p>
+The <em>intersection</em> of two sets results in a set that contains the elements that
+are present in both sets. You can think of the resulting set containing the
+elements that are in the one set <code>and</code> in the other set. In other words, the
+result contains the elements common to both sets:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">{1, 2, 3} and {2, 3, 4}         // {2, 3}
+{1, 2} and {3, 4}               // {} (no elements in common)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+The <em>difference</em> of two sets results in a set that contains the elements of the
+first set that are not present in the second set. You can think of the
+resulting set containing the elements of the first set, with the elements of
+the second set subtracted or removed from it:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">{1, 2, 3} - {2, 3, 4}           // {1}
+{1, 2, 3} - {4, 5}              // {1, 2, 3}
+{1, 2, 3} - {1, 2, 3, 4}        // {}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Several other standard operators and functions are available to work with
+sets, including the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">{1, 8, 3} = {1, 3, 8}       // true (equality, ignores order of elements)
+
+6 in {1, 8, 3}              // false (element test)
+1 in {1, 8, 3}              // true
+
+{1, 3} sub {1, 3}           // true (subset check)
+{1, 3} sub {1, 3, 5}        // true
+{1, 3} sub {1, 4}           // false
+{1, 3} sub {1, 4, 5}        // false
+
+empty({1, 2})               // false (empty test)
+size({1, 5, 3, 3})          // 3 (count elements, duplicates ignored)</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-dictionaries">Dictionaries</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+
+A dictionary is an unordered collection of <em>keys</em> and associated <em>values</em>. A
+key with its associated value is called a key/value <em>pair</em>. Consider the
+following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc dict(string:int) age = {"eve": 32, "john": 34, "adam": 25};</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+Variable <code>age</code> has as value a dictionary consisting of pairs of strings
+(the keys) and integers (the values). In this example, each string represents
+a person&#8217;s name, and each integer represents the age of that person. Variable
+<code>age</code> is initialized with a literal dictionary, containing three key/value
+pairs. You can think of the dictionary as storing the information that <code>eve</code>
+is <code>32</code> years old, or that the age of <code>eve</code> is <code>32</code>.</p>
+</div>
+<div class="paragraph">
+<p>As with sets, dictionaries are unordered. The order of the key/value pairs is
+irrelevant, <code>{"eve": 32, "adam": 25}</code> is the same dictionary as
+<code>{"adam": 25, "eve": 32}</code>. For readability, key/value pairs of dictionary
+literals are normally written in increasing order of their keys.
+<code>{"adam": 25, "eve": 32}</code> is thus preferred over <code>{"eve": 32, "adam": 25}</code>,
+as <code>adam</code> goes before <code>eve</code> in a phone book.</p>
+</div>
+<div class="paragraph">
+<p>Dictionary literals are often written using multiple lines, to get two
+'columns' for the keys and values, which can improve readability:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc dict(string:int) age = {"eve":  32,
+                             "john": 34,
+                             "adam": 25};</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The default value for dictionary types, is an empty dictionary. The following
+two variables thus have the same initial value:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc dict(string:int) x1 = {};  // Explicitly initialized as empty.
+disc dict(string:int) x2;       // Implicitly initialized as empty.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Every key of a dictionary is unique, but they may be associated with the same
+value. For the above example with ages, the names (keys) are used to uniquely
+identify people, but multiple people may have the same age (values). It is not
+allowed to have the same key twice, in a dictionary literal, regardless of
+whether they map to the same value or to different values:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc dict(int:int) x1 = {1: 2, 1: 2};  // Invalid due to duplicate key '1'.
+disc dict(int:int) x2 = {1: 2, 1: 3};  // Invalid due to duplicate key '1'.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The values of a dictionary can be obtained by <em>projection</em> on that dictionary,
+using the keys:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc dict(string:int) age = {"adam": 25, "eve": 32, "john": 34};
+disc int i;
+
+edge ... do i := age["adam"];   // 'i' becomes '25'
+edge ... do i := age["eve"];    // 'i' becomes '32'
+edge ... do i := age["carl"];   // error (there is no "carl" key)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Projection using a key that exists in the dictionary, results in the associated
+value. Projection using a key that does not exist in the dictionary, leads to
+a runtime error.</p>
+</div>
+<div class="paragraph">
+<p>It is possible to modify single elements of a dictionary, as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc dict(string:int) age = {"adam": 25, "eve": 32, "john": 34};
+
+edge ... do age["eve"] := 33;  // Changes eve's age.
+edge ... do age["bob"] := 47;  // Adds a new key/value pair.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The age of <code>eve</code> is changed from <code>32</code> to <code>33</code>. The age is thus replaced
+by a new age. The age of <code>bob</code> is set to <code>47</code>. Since there was no key/value
+pair for that person in the dictionary, a new key/value pair is added. After
+the updates of both edges, the value of variable <code>age</code> is
+<code>{"adam": 25, "bob": 47, "eve": 33, "john": 34}</code>.</p>
+</div>
+<div class="paragraph">
+<p>Several other standard operators and functions are available to work with
+dictionaries, including the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">{"a": 1, "b": 2} = {"b": 2, "a": 1}     // true (equality check)
+{"a": 1, "b": 2} = {"a": 1, "b": 3}     // false
+
+"a" in {"a": 1, "b": 2}                 // true (key existence check)
+"c" in {"a": 1, "b": 2}                 // false
+
+{"a": 1, "b": 2} + {"b": 3, "c": 4}     // {"a": 1, "b": 3, "c": 4} (add/overwrite pairs)
+
+{"a": 1, "b": 2} - {"b": 3, "c": 4}     // {"a": 1} (removal based on keys)
+{"a": 1, "b": 2} - {"b", "c"}           // {"a": 1}
+{"a": 1, "b": 2} - ["b", "c"]           // {"a": 1}
+
+empty({"a": 1, "b": 2})                 // false (empty check)
+size({"a": 1, "b": 2})                  // 2 (count pairs)</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-values-chapter-combining-values">Combining values</h4>
+<div class="paragraph">
+<p>Values of different types can usually be arbitrarily combined. For instance,
+consider the following example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">disc dict(int;tuple(real pos, weight)) boxes = {1: (0.0, 2.5),
+                                                2: (3.0, 1.7),
+                                                3: (4.0, 3.9};</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>boxes</code> stores data about multiple boxes, in a dictionary with
+unique identification numbers (<code>1</code>, <code>2</code>, and <code>3</code>) used as keys. For each
+box, the position (<code>pos</code>) and <code>weight</code> are stored as a tuple. Initially,
+there are three boxes. The first box has identification number <code>1</code>,
+position <code>0.0</code>, and weight <code>2.5</code>. The second box has identification number
+<code>2</code>, position <code>3.0</code>, and weight <code>1.7</code>. Also consider the following
+example, where the data of that variable is manipulated:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">edge ... do boxes[1][weight] := 3.5;
+edge ... do boxes[2][pos] := boxes[2][pos] + 1;
+edge ... do boxes[4] := (1.0, 0.8);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first edge changes the <code>weight</code> of the box <code>1</code> (the box with
+identification number <code>1</code>), from <code>2.5</code> to <code>3.5</code>. The second edge
+increases the position (<code>pos</code>) of box <code>2</code> from <code>3.0</code> to <code>4.0</code>. The
+third edge adds data for a new box with identification number <code>4</code>.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-scalable-solutions-and-reuse-12">Scalable solutions and reuse (1/2)</h3>
+<div class="sect3">
+<h4 id="tut-reuse1-chapter-constants">Constants</h4>
+<div class="paragraph">
+<p>
+Through the use of <em>constants</em>, fixed values can be given a name. Using
+constants, it is easy to change certain fixed values. If the constant is
+used consistently throughout the model, the value needs to be changed only in
+one place. Constants can thus make it easier to keep the model consistent.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const int STEP = 2;
+const int TARGET = 100;
+
+automaton movement:
+  disc int position = 0;
+  event move;
+
+  location:
+    initial;
+    edge move when position &lt; TARGET do position := position + STEP;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this example, the <code>movement</code> automaton keeps track of the <code>position</code> of
+an object. The object starts at position <code>0</code>. It can <code>move</code> until it
+reaches its target position. The target position is <code>100</code>. Rather than using
+<code>position &lt; 100</code> as guard, the value <code>100</code> is stored in a constant named
+<code>TARGET</code>. The constant can then be used instead the value <code>100</code>. Similarly,
+the step size of the object is stored in a constant named <code>STEP</code>.</p>
+</div>
+<div class="paragraph">
+<p>Constants have a name, which by contention is usually written using upper case
+letters. Using a constant instead of a fixed value makes it more clear what
+that value represents. For instance, by using <code>position &lt; TARGET</code> rather than
+<code>position &lt; 100</code>, the intention of the guard condition is more clear. Using a
+constant can thus enhance readability.</p>
+</div>
+<div class="paragraph">
+<p>Another benefit of constants, is that they can be used multiple times in the
+same model:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const int STEP = 2;
+const int TARGET = 100;
+
+automaton movement:
+  disc int position = 0;
+  event forward, backward;
+
+  location:
+    initial;
+    edge forward  when position &lt; TARGET do position := position + STEP;
+    edge backward when position &gt; 0      do position := position - STEP;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this modified example it is possible for the object to perform <code>forward</code>
+as well as <code>backward</code> movements. The step size is the same for both
+movements, making it possible to use the <code>STEP</code> constant in the updates of
+both edges. Since a constant is used, the speed of both movements can be
+changed by changing the value of the constant. Without using a constant, the
+speed would have to be changed separately for each edge.</p>
+</div>
+<div class="paragraph">
+<p>Constants are not limited to integer values. Consider the following example,
+where a more complex value is used:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum ProductType = A, B, C;
+const dict(ProductType:real) DURATION = {A: 3.5, B: 5.7, C: 0.8};</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This example declares a <code>ProductType</code> enumeration, with three different
+product types: <code>A</code>, <code>B</code>, and <code>C</code>. The <code>DURATION</code> constant indicates
+for each product type, how long it takes to produce a product of that type.
+Products of type <code>A</code> can be produced in 3.5 hours, products of type <code>B</code>
+in 5.7 hours, etc. To get the production duration of products of type <code>C</code>,
+<a href="#tut-values-chapter-types-values-exprs">expression</a> <code>DURATION[C]</code> can be
+used. For more information, see the lessons on
+<a href="#tut-values-chapter-enumerations">enumerations</a> and
+<a href="#tut-values-chapter-dictionaries">dictionaries</a>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse1-chapter-algebraic-variables">Algebraic variables</h4>
+<div class="paragraph">
+<p>
+
+Consider a conveyor belt with a product on it:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/reuse1/conveyor.png" alt="conveyor">
+</div>
+</div>
+<div class="paragraph">
+<p>The product starts at the left side, at position <code>0</code>. There is a sensor that
+can detect the product between positions <code>13</code> and <code>14</code>. The product exits
+the conveyor at position <code>18</code>. The following CIF specification models the
+conveyor, product, and sensor:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton conveyor:
+  disc real position = 0.0;
+  event move;
+
+  const real width = 6;
+  alg bool sensor = position + width &gt;= 13 and position &lt;= 14;
+
+  location:
+    initial;
+    edge move when position &lt; 18 do position := position + 0.1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>conveyor</code> automaton models the conveyor, with a product on it. The
+product is modeled by means of the <code>position</code> of the left side of the
+product, relative to the left side of the conveyor. As the conveyor starts to
+<code>move</code>, the product moves as well, and its position on the conveyor is
+updated. The product moves in steps of <code>0.1</code>.</p>
+</div>
+<div class="paragraph">
+<p>The <code>width</code> of the product is <code>6</code>. The sensor is on whenever
+the product, which spans from <code>position</code> to <code>position + width</code>, is within
+the sensor range, which spans from <code>13</code> to <code>14</code>. An <em>algebraic variable</em>
+named <code>sensor</code> is used here, to represent the value of the sensor.</p>
+</div>
+<div class="paragraph">
+<p>An algebraic variable is a variable whose value is determined by its
+definition. For the <code>sensor</code> variable, its value is determined from a
+calculation involving variable <code>position</code> and constant <code>width</code>. Unlike
+discrete variables, algebraic variables can not be assigned a new value. The
+value of algebraic variable <code>sensor</code> changes automatically as the value of
+discrete variable <code>position</code> changes. The value of algebraic variable
+<code>sensor</code> is <code>true</code> whenever the product is over the sensor, and it is
+<code>false</code> otherwise.</p>
+</div>
+<div class="paragraph">
+<p>If we had modeled the value of the sensor as a discrete variable, we would have
+had to update the variable for every edge where the value of variable
+<code>position</code> is updated. In this example, that is only one edge. However, if
+the variable would have been updated on multiple edges, the sensor value would
+also have to be updated for all those edges. Furthermore, when adding
+another edge that updates the <code>position</code> variable, the edge needs to be
+adapted to also update the <code>sensor</code> discrete variable, which can easily be
+forgotten. Using an algebraic variable, the value computation needs to be
+specified only once, and no changes to its value are needed, as the value
+always remains consistent with its definition.</p>
+</div>
+<div class="paragraph">
+<p>Algebraic variables can be used to give an
+<a href="#tut-values-chapter-types-values-exprs">expression</a> (computations) a name,
+similar to how <a href="#tut-reuse1-chapter-constants">constants</a> can be used to
+give fixed values a name. The benefits of using an algebraic variable are
+similar to the benefits of using constants. Both can be used to improve
+readability, and to make it easier to consistently change the model.</p>
+</div>
+<div class="paragraph">
+<p>Algebraic variables can also be used as an abstraction. Consider the following
+extension of the specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton light:
+  event turn_on, turn_off;
+
+  location off:
+    initial;
+    edge turn_on  when     conveyor.sensor goto on;
+
+  location on:
+    edge turn_off when not conveyor.sensor goto off;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The idea is to have a light turn on when a product is detected by the sensor,
+and have it turn off when the sensor no longer detects the product. The
+algebraic variable <code>sensor</code> is used in the guard conditions of the <code>light</code>
+automaton, to determine when the light should be turned on or off.</p>
+</div>
+<div class="paragraph">
+<p>In the example, the <code>light</code> automaton only uses the <code>sensor</code> variable from
+automaton <code>conveyor</code>. It does not matter how the value of that variable is
+defined. Currently, it is defined in terms of variable <code>position</code> and
+constant <code>width</code>. However, if the <code>conveyor</code> automaton were modeled
+differently, the expression that defines the value of the algebraic variable
+could be changed, without the need to change the use of the variable in
+automaton <code>light</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse1-chapter-algvar-equations">Algebraic variables and equations</h4>
+<div class="paragraph">
+<p>
+
+Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton car:
+  event start, stop, breakdown, start_repair, repaired;
+
+  alg bool can_drive = idle or moving;
+
+  location idle:
+    initial;
+    edge start goto moving;
+
+  location moving:
+    edge stop goto idle;
+    edge breakdown goto broken;
+
+  location broken:
+    edge start_repair goto repairing;
+
+  location repairing:
+    edge repaired goto idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>car</code> is initially <code>idle</code>. Once you <code>start</code> driving, the car is
+<code>moving</code>. Once you <code>stop</code> driving, the car is <code>idle</code> again. While
+<code>moving</code> it is possible for a <code>breakdown</code> to occur, meaning the car is
+<code>broken</code>. Once a mechanic starts the repair (<code>start_repair</code>), the mechanic
+is <code>repairing</code> the car. Once it is <code>repaired</code>, the car is <code>idle</code>, and you
+can <code>start</code> driving it again, etc.</p>
+</div>
+<div class="paragraph">
+<p>Algebraic variable <code>can_drive</code> indicates whether you can currently drive the
+car. As the value calculation indicates, the car can be driven whenever it is
+<code>idle</code> or <code>moving</code>. That is, it can&#8217;t be driven if the car is <code>broken</code>
+or a mechanic is <code>repairing</code> it.</p>
+</div>
+<div class="paragraph">
+<p>In the example above, the value of the algebraic variable is defined with the
+declaration, as was already explained in the lesson that introduced
+<a href="#tut-reuse1-chapter-algebraic-variables">algebraic variables</a>. However, it
+also possible to specify the value separately, using an equation:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton car:
+  event start, stop, breakdown, start_repair, repaired;
+
+  alg bool can_drive;
+
+  equation can_drive = idle or moving;
+
+  // Locations omitted for brevity.
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This allows for separation of variable declarations and equations. Both
+variants have the same algebraic variable with the same value. An equation of
+an algebraic variable must be placed in the same component as where the
+algebraic variable is declared. In the example above, the equation for
+algebraic variable <code>can_drive</code> must be placed in automaton <code>car</code>, as that
+is where the algebraic variable is declared.</p>
+</div>
+<div class="paragraph">
+<p>For algebraic variables declared in automata, it is also possible to specify
+the value using an equation per location of the automaton:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton car:
+  event start, stop, breakdown, start_repair, repaired;
+
+  alg bool can_drive;
+
+  location idle:
+    initial;
+    equation can_drive = true;
+
+    edge start goto moving;
+
+  location moving:
+    equation can_drive = true;
+
+    edge stop goto idle;
+    edge breakdown goto broken;
+
+  location broken:
+    equation can_drive = false;
+
+    edge start_repair goto repairing;
+
+  location repairing:
+    equation can_drive = false;
+
+    edge repaired goto idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Every algebraic variable must have a unique value in every situation. Algebraic
+variables must thus have a value with their declaration, a single equation in
+the same component, or an equation in every location of the automaton. For
+every algebraic variable, one of the three variants must be chosen. It is
+allowed to choose a different variant for different algebraic variables, but it
+is not allowed to use multiple variants for the same algebraic variable.</p>
+</div>
+<div class="paragraph">
+<p>Which variant fits best for a specific algebraic variable, depends on the
+situation. One of the benefits of using an equation per location, is
+that the equations are checked for completeness. If you add a new location, you
+must add an equation to that location as well, as otherwise the model is
+invalid (incomplete). This means you can&#8217;t forget to specify the value of the
+algebraic variable for that new location. If you use a value with the
+declaration or a single equation in the component, you might forget to update
+the value for the changes you made to the automaton.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse1-chapter-type-declarations">Type declarations</h4>
+<div class="paragraph">
+<p>
+
+Consider this slightly modified version of an example from the lesson on
+<a href="#tut-reuse1-chapter-constants">constants</a>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum ProductType = A, B, C;
+
+const dict(ProductType:real) M1_DURATION = {A: 3.5, B: 5.7, C: 0.8};
+const dict(ProductType:real) M2_DURATION = {A: 1.8, B: 4.2, C: 3.9};</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This example declares a <code>ProductType</code> enumeration, with three different
+product types: <code>A</code>, <code>B</code>, and <code>C</code>. The <code>M1_DURATION</code> constant indicates
+for each product type, how long it takes to produce a product of that type,
+on machine 1. Products of type <code>A</code> can be produced in 3.5 hours, products of
+type <code>B</code> in 5.7 hours, etc. Constant <code>M2_DURATION</code> is similar, but for
+machine 2.</p>
+</div>
+<div class="paragraph">
+<p>The type of both constants is the same. To avoid having to repeat complex types
+in multiple places, a <em>type declaration</em> can be used:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum ProductType = A, B, C;
+type Durations = dict(ProductType:real)
+
+const Durations M1_DURATION = {A: 3.5, B: 5.7, C: 0.8};
+const Durations M2_DURATION = {A: 1.8, B: 4.2, C: 3.9};</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A type declaration with name <code>Durations</code> is introduced, and <code>Durations</code> can
+then be used wherever a type is expected, instead of
+<code>dict(ProductType:real)</code>. In the example above, <code>Durations</code> is used as
+type of the two constants. The original specification and the one with the
+type declaration have the same constants, with effectively the same type. That
+is, in both specification the value of constant <code>M1_DURATION</code> is a
+<a href="#tut-values-chapter-dictionaries">dictionary</a> with three key/value pairs.</p>
+</div>
+<div class="paragraph">
+<p>Type declarations can be used to give a type a name, similar to how
+<a href="#tut-reuse1-chapter-constants">constants</a> can be used to give fixed values
+a name, and <a href="#tut-reuse1-chapter-algebraic-variables">algebraic variables</a>
+can be used to give computations a name. The benefits are also similar, as type
+declarations can be used to make specifications more concise, to increase
+readability, and to make it easier to consistently change types throughout the
+specification.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-time">Time</h3>
+<div class="sect3">
+<h4 id="tut-time-chapter-intro">Timing</h4>
+<div class="paragraph">
+<p>
+
+So far, the tutorial has only used discrete event models as examples, which are
+all untimed. This lesson introduces the concept of timing.</p>
+</div>
+<div class="paragraph">
+<p>In CIF, time starts at zero (<code>0.0</code>). Time can progress continuously. That is,
+after one unit of time has passed, the model time is <code>1.0</code>. After an
+additional one and a half time units have passed, the model time is <code>2.5</code>,
+etc. By default, one time unit corresponds to one second. However, you can
+decide to use another unit, and tools such as the simulator can be configured
+to speed up or slow down the simulation accordingly.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="sect4">
+<h5 id="tut-variable-time">Variable <code>time</code></h5>
+<div class="paragraph">
+<p>A variable named <code>time</code> is always available in every specification. The
+variable holds the current absolute model time as its value, and can be used
+throughout the model. Initially, time and thus the value of variable <code>time</code>
+start at zero (<code>0.0</code>). As time progresses, the value of variable <code>time</code> is
+automatically updated to ensure it properly represents the current time of the
+system.</p>
+</div>
+<div class="paragraph">
+<p>In this lesson, absolute time will be used. In most models, it is easier to use
+relative time. This can be achieved with
+<a href="#tut-time-chapter-continuous-variables">continuous variables</a>, discussed in
+the next lesson.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-timed-guards">Timed guards</h5>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event push, release;
+
+automaton user:
+  location start1:
+    initial;
+    edge push    when time &gt;= 1.5 goto stop1;
+
+  location stop1:
+    edge release when time &gt;= 2.3 goto start2;
+
+  location start2:
+    edge push    when time &gt;= 2.4 goto stop2;
+
+  location stop2:
+    edge release when time &gt;= 7.6 goto done;
+
+  location done;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>push</code> and <code>release</code> events represent pushing and releasing of a button
+respectively. The actual behavior of the button itself is omitted. The
+specification does model the behavior of a <code>user</code>. Initially, the <code>user</code>
+is in location <code>start1</code>, and no time has passed. The edge with the <code>push</code>
+event is not yet enabled, as the guard is not satisfied. As soon as one and a
+half time units have passed, the guard condition becomes satisfied, and the
+<code>push</code> event becomes enabled. This edge models that the user starts to push
+the button after <code>1.5</code> time units. The user then waits for another <code>0.8</code>
+(<code>2.3</code> - <code>1.5</code>) time units, before releasing the button (stop pushing it).
+After waiting another <code>0.1</code> (<code>2.4</code> - <code>2.3</code>) time unit, the user pushes
+the button again. Finally, after waiting <code>5.2</code> (<code>7.6</code> - <code>2.4</code>) time
+units, the user releases the button one last time. In the <code>done</code> location,
+the <code>push</code> and <code>release</code> events are never enabled (no edges for those
+events), and thus the user never pushes or releases the button again. No other
+events are enabled, so time keeps progressing forever, without any events
+happening.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-time-transitions">Time transitions</h5>
+<div class="paragraph">
+<p>The state space of the above specification is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/time/user_state_space.png" alt="user state space">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the names of the current locations of automaton
+<code>user</code> and the current values of variable <code>time</code>. The transitions labeled
+with event names are <em>event transitions</em>. The other transitions are
+<em>time transitions</em>, which are labeled with the duration of the time
+transitions, i.e. the number of time units that passes. At the end of the
+state space, a time transition of infinite duration is shown, to indicate that
+time can progress forever.</p>
+</div>
+<div class="paragraph">
+<p>The current locations of automata can not change as time passes as the result
+of taking a time transition. The only way for the current locations to change,
+is as the result of taking an edge as part of an event transition.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-urgency">Urgency</h5>
+<div class="paragraph">
+<p>By default, all events in CIF are <em>urgent</em>. Events being urgent means that
+edges are taken as soon as possible. In other words, event transitions take
+priority over time transitions. Time can only progress if no event transitions
+are possible. For further details on urgency, see the future
+<a href="#tut-time-chapter-urgency">urgency</a> lesson.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-numeric-time">Numeric time</h5>
+<div class="paragraph">
+<p>In the above example, guard <code>time &gt;= 1.5</code> is used. You might wonder why the
+guard is not <code>time = 1.5</code>, as the intention is that user pushes the button
+after exactly <code>1.5</code> time units, and not after <code>1.6</code> or <code>1.7</code> time units.
+The main reason is that the <a href="#tools-cifsim-chapter-index">simulator</a> uses finite
+precision in its numeric calculations to find the moment in time that the edge
+becomes enabled. The answer also has finite precision. It is often not exactly
+at <code>1.5</code> time units, but is slightly after it, say at time
+<code>1.50000000000001</code>. If you use <code>time = 1.5</code> as guard instead of
+<code>time &gt;= 1.5</code>, the simulator will most likely
+<a href="#tools-cifsim-solver-chapter-root-problems">miss the change</a> in enabledness of
+the edge, and will never enable the event.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-time-chapter-continuous-variables">Continuous variables</h4>
+<div class="paragraph">
+<p>
+
+In the lesson that introduced <a href="#tut-time-chapter-intro">timing</a>, variable
+<code>time</code> was used. Variable <code>time</code> uses absolute model time, i.e.
+the total amount of time that has passed since the start of the simulation.
+It is usually easier to use relative model time, i.e. a certain amount of time
+passes after a certain event. This is where <em>continuous variables</em> are ideal.
+A continuous variable is a variable that changes value automatically, as time
+progresses. Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton machine:
+  event start, finished;
+  cont t = 0 der 1;
+
+  location idle:
+    initial;
+    edge start do t := 0 goto producing;
+
+  location producing:
+    edge finished when t &gt;= 3 goto idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification models a <code>machine</code> that is initially <code>idle</code>. The machine
+can <code>start</code> to produce a product. After a while, it is done <code>producing</code>.
+Due to having <code>finished</code> the product, it becomes <code>idle</code> again, until it is
+starts to product the next product.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div id="lang-tut-time-continuous-variables-deriv" class="paragraph">
+<p>Continuous variable <code>t</code> is declared to initially have value <code>0</code>. Its
+<em>derivative</em> is <code>1</code>, meaning that every unit of time that passes, the value
+of <code>t</code> increases by <code>1</code>. Every time the <code>start</code> event happens, the value
+of continuous variable <code>t</code> is reset to <code>0</code> using an assignment. As a result
+of this reset, <code>t</code> will be <code>0</code> when the automaton enters the <code>producing</code>
+location. The edge for the <code>finished</code> event indicates that the event can only
+happen when <code>t &gt;= 3</code> holds. This condition will hold after three time units.
+This means that automaton <code>machine</code> remains in the <code>producing</code> location for
+three time units, before going to the <code>idle</code> location.  It will thus always
+take three units after entering the  <code>producing</code> location, before the guard
+becomes enabled, and the <code>finished</code> event can take place. The state space is
+as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/time/machine_state_space.png" alt="machine state space">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the first letters of the names of the current
+locations of automaton <code>machine</code> and the current values of variables <code>time</code>
+and <code>t</code>.</p>
+</div>
+<div class="paragraph">
+<p>Continuous variables always have <a href="#tut-values-chapter-reals">real</a> values.
+Similar to discrete variables, if their initial value is not specified, it is
+<code>0.0</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">cont t der 1; // Initial value is 0.0.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The derivative of a continuous variable can be used as a variable as well. The
+derivative of continuous variable <code>t</code> is <code>t'</code>. A derivative is read only;
+it can not be assigned. Similar to algebraic variables, it is always equal to
+its definition. In the case of variable <code>t</code>, its derivative is always <code>1</code>.
+The values of variables <code>time</code>, <code>t</code>, and <code>t'</code> as time progresses are:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/time/machine_plot.png" alt="machine plot">
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-time-chapter-contvar-equations">Continuous variables and equations</h4>
+<div class="paragraph">
+<p>
+
+
+
+Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton person:
+  event turn;
+  cont t = 0 der 1;
+
+  location:
+    initial;
+    edge turn when t &gt; 10 do t := 0.0;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification models a <code>person</code> walking back and forth. Every time that
+the person has walked <code>10</code> time units, (s)he will <code>turn</code> around, walking
+in the other direction.</p>
+</div>
+<div class="paragraph">
+<p>In the example above, the derivative of the continuous variable is defined with
+the declaration, as was already explained in the lesson that introduced
+<a href="#tut-time-chapter-continuous-variables">continuous variables</a>. However, it
+also possible to specify the derivative separately, using an equation:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton person:
+  event turn;
+  cont t = 0;         // Declaration specifies only the initial value.
+
+  equation t' = 1;    // Derivative specified using separate equation.
+
+  location:
+    initial;
+    edge turn when t &gt; 10 do t := 0.0;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This allows for separation of variable declarations and equations. Both
+variants have the same continuous variable with the same derivative. An
+equation of a derivative of a continuous variable must be placed in the same
+component as where the continuous variable is declared. In the example above,
+the equation for <code>t'</code> must be placed in automaton <code>person</code>, as that is
+where <code>t</code> is declared.</p>
+</div>
+<div class="paragraph">
+<p>We could extend this specification to keep track of the direction that the
+person is moving:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton person:
+  event turn;
+  cont t = 0 der 1;
+
+  location away:
+    initial;
+    edge turn when t &gt; 10 do t := 0.0 goto back;
+
+  location back:
+    edge turn when t &gt; 10 do t := 0.0 goto away;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For continuous variables declared in automata, it is also possible to specify
+the derivative using an equation per location of the automaton. This allows us
+to keep track of the exact position of the person:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton person:
+  event turn;
+  cont pos = 0;
+
+  location away:
+    initial;
+    equation pos' = 1;
+    edge turn when pos &gt; 10 goto back;
+
+  location back:
+    equation pos' = -2;
+    edge turn when pos &lt; 0 goto away;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, the continuous variable <code>t</code> has been renamed to <code>pos</code>, to make it
+more clear that it indicates the position of the person. As long as the
+person is moving <code>away</code>, the derivative of <code>pos</code> is <code>1</code>, and the
+person moves away, one place every time unit. When the person reaches
+position <code>10</code>, the position is not reset to zero. Instead, only the location
+is changed to the <code>back</code> location. In that location, the derivative of
+<code>pos</code> is <code>-2</code>. This means that every time unit, the position decreases
+by <code>2</code>. That is, the person back to the original position, but at twice the
+speed. The values of variables <code>time</code>, <code>pos</code>, and <code>pos'</code> as time
+progresses are:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/time/person_plot.png" alt="person plot">
+</div>
+</div>
+<div class="paragraph">
+<p>As with <a href="#tut-reuse1-chapter-algvar-equations">algebraic variables</a>, every
+continuous variable must have a unique derivative in every situation.
+Continuous variables must thus have a derivative with their declaration, a
+single equation in the same component, or an equation in every location of the
+automaton. For every continuous variable, one of the three variants must be
+chosen. It is allowed to choose a different variant for different continuous
+variables, but it is not allowed to use multiple variants for the same
+continuous variable.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-time-chapter-equations">Equations</h4>
+<div class="paragraph">
+<p>
+Consider the following
+<a href="http://en.wikipedia.org/wiki/Nonlinear_system">non-linear system</a>:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/time/tank.png" alt="tank">
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>V</code> models the water volume of a tank. The water volume of the tank
+changes based on the incoming flow of water <code>Qi</code> and outgoing flow of water
+<code>Qo</code>. The tank can be modeled using the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">cont V = 5 der Qi - Qo;
+alg real Qi = 1;
+alg real Qo = sqrt(V);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Initially, the tank is filled with <code>5</code> liters of water. The incoming flow is
+constant at <code>1</code> liter per second. The outgoing flow increases as the water
+volume of the tank increases.</p>
+</div>
+<div class="paragraph">
+<p>By separating the declarations of the three variables from their equations, the
+specification becomes more readable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">cont V = 5;
+alg real Qi;
+alg real Qo;
+
+equation V' = Qi - Qo;
+equation Qi = 1;
+equation Qo = sqrt(V);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The values of the variables as time passes are shown in the following figure:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/time/tank_plot.png" alt="tank plot">
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-time-chapter-var-overview">Variables overview</h4>
+<div class="paragraph">
+<p>
+
+CIF features different kinds of variables, that have different functionality.
+Each is better suited for a particular purpose. The following table gives an
+overview:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Kind of variable</th>
+<th class="tableblock halign-center valign-top">Can be assigned</th>
+<th class="tableblock halign-center valign-top">Can change as time progresses</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tut-data-chapter-discrete-variables">Discrete variable</a></p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock"><strong>yes</strong></p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tut-reuse1-chapter-algebraic-variables">Algebraic variable</a></p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock"><strong>yes</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tut-time-chapter-continuous-variables">Continuous variable</a></p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock"><strong>yes</strong></p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock"><strong>yes</strong></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#lang-tut-time-continuous-variables-deriv">Derivative of a continuous variable</a></p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-center valign-top"><p class="tableblock"><strong>yes</strong></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Discrete variables can only change value when given an explicit new value by
+means of an assignment. They don&#8217;t change automatically as time progresses.</p>
+</div>
+<div class="paragraph">
+<p>Algebraic variables can&#8217;t be assigned. Instead, their values depend on their
+declarations or equation(s). If the computations that result in their values
+depend on a variable that can change value as time progresses, then so can
+the values of the algebraic variables. Algebraic variables are used as named
+shorthand notations for computations, for readability, reuse, consistency, and
+abstraction.</p>
+</div>
+<div class="paragraph">
+<p>Continuous variables automatically change value as time progresses, as
+specified by their derivatives. They can also be assigned new values, from
+which they then automatically change again, based on the current values of
+their derivatives.</p>
+</div>
+<div class="paragraph">
+<p>The derivatives of the continuous variables can be seen as variables
+themselves. Their values depend on their declaration or equation(s). If the
+computations that result in their values depend on a variable that can change
+value as time progresses, then so can the values of the derivatives.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-time-chapter-urgency">Urgency</h4>
+<div class="paragraph">
+<p>
+In CIF, urgency indicates whether or not time may progress. CIF has three forms
+of urgency: event urgency, location urgency, and edge urgency. Edge urgency
+should be avoided, and is not explained here.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="tut-event-urgency">Event urgency</h5>
+<div class="paragraph">
+<p>By default, all events in CIF are <em>urgent</em>. Events being urgent means that
+edges are taken as soon as possible. In other words, event transitions take
+priority over time transitions. Time can only progress if no event transitions
+are possible. It is not possible to make events non-urgent in a CIF model, but
+specific tools may allow making events non-urgent.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-time-urgloc">Location urgency</h5>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton use_case:
+  location first:
+    initial;
+    edge tau goto second;
+
+  location second:
+    edge tau goto done;
+
+  location done;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This automaton represents a use case, which goes from one location to the next.
+The state space is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/time/usecase_nonurg_state_space.png" alt="usecase nonurg state space">
+</div>
+</div>
+<div class="paragraph">
+<p>The states are labeled with the names of the current locations of automaton
+<code>use_case</code> and the current values of variable time. At the end of the use
+case, no events are possible, and thus time can progress infinitely. To force
+that in location <code>done</code> no time can progress, the location can be made
+urgent:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton use_case:
+  location first:
+    initial;
+    edge tau goto second;
+
+  location second:
+    edge tau goto done;
+
+  location done:
+    urgent; // Location is now urgent.
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The resulting state space is:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/time/usecase_urgloc_state_space.png" alt="usecase urgloc state space">
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-time-chapter-deadlock-livelock">Deadlock and livelock</h4>
+<div class="paragraph">
+<p>This lesson explains the concepts of deadlock and livelock.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-time-deadlock">Deadlock</h5>
+<div class="paragraph">
+<p>If no event transitions are possible, and also no time transitions are possible
+(time may not progress), then no transitions are possible. This is called
+<em>deadlock</em>. No behavior is possible, or will ever become possible. As an
+example, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton use_case:
+  location wait3:
+    initial;
+    urgent;
+    edge tau when time &gt; 3 goto done;
+
+  location done;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Location <code>wait3</code> is the initial location. Initially, <code>time</code> is zero. Time
+can not progress, as the location is <a href="#lang-tut-time-urgloc">urgent</a>.
+Since the guard of the edge also does not hold, event <code>tau</code> is also not
+possible. No transitions are possible, and the specification is in deadlock.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-time-livelock">Livelock</h5>
+<div class="paragraph">
+<p>As long as an event is possible, no time may pass. If by mistake always an
+event is possible, this prevents all passage of time. Consider the following
+CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton car:
+  event increase, decrease, arrived;
+  disc real speed = 0;
+  cont pos der speed;
+
+  location underway:
+    initial;
+    edge increase when speed &lt; 100 do speed := speed + 1;
+    edge decrease when speed &gt; 0   do speed := speed - 1;
+    edge arrived  when pos = 850 goto done;
+
+  location done;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification models a <code>car</code> that can <code>increase</code> and <code>decrease</code> its
+speed, so that it is at least <code>0</code> and at most <code>100</code>. It keeps track of its
+position (continuous variable <code>pos</code>) that increases more quickly as the speed
+increases. When position <code>850</code> is reached, the car has <code>arrived</code> and is
+<code>done</code>.</p>
+</div>
+<div class="paragraph">
+<p>The car will be increasing and decreasing it speed, using the <code>increase</code> and
+<code>decrease</code> events. As always at least one of them is enabled at any moment,
+time can never progress, and <code>pos</code> remains zero. This effect is called
+<em>livelock</em>. While behavior is still possible, the model does not truly progress
+with useful behavior. The model gets 'stuck' repeating one or a few events.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-channel-communication">Channel communication</h3>
+<div class="sect3">
+<h4 id="tut-channels-chapter-intro">Channels</h4>
+<div class="paragraph">
+<p>
+
+Consider the following figure of a producer and two consumers, where rectangles
+represent entities and the arrows represent the data that is communicated:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/channels/producer_consumer.png" alt="producer consumer">
+</div>
+</div>
+<div class="paragraph">
+<p>The producer creates products, identified by a unique identification
+number. Each product produced by the producer, is provided either to
+the first or to the second consumer. Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event provide1, provide2;
+
+automaton producer:
+  disc int nr = 0;
+
+  location:
+    initial;
+    edge provide1, provide2 do nr := nr + 1;
+end
+
+automaton consumer1:
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide1 do nr := producer.nr;
+end
+
+automaton consumer2:
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide2 do nr := producer.nr;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>producer</code> keeps track of the identification number (variable <code>nr</code>) of
+the current product, and provides products to either the first consumer
+(event <code>provide1</code>) or the second consumer (<code>provide2</code>). Both consumers
+have an identification number of their current product as well (variable
+<code>nr</code> in the consumer automata). Initially, the consumers don&#8217;t have a
+product, as indicated by value <code>-1</code>. When a consumer gets a new product, it
+looks up the identification number of the product at the producer, and stores
+it locally. The producer then moves on to the next product, by increasing its
+current identification number.</p>
+</div>
+<div class="paragraph">
+<p>We can identify two problems in this model.</p>
+</div>
+<div class="paragraph">
+<p>The first problem is that we need two events in order for the producer to
+provide products to <em>either</em> the one consumer <em>or</em> the other consumer. If we
+used only one event, both consumers would need to use that event, have the
+event in their <a href="#tut-basics-chapter-alphabet">alphabet</a>, and would thus have
+to simultaneously participate in the
+<a href="#tut-basics-chapter-synchronizing-events">synchronization</a>. A consequence of
+having an event per consumer, is that the <code>producer</code> automaton has both
+events on its edge. Adding a third consumer entails having to add another
+event, as well as having to modify the edge of the <code>producer</code> automaton. This
+is not a nice scalable solution.</p>
+</div>
+<div class="paragraph">
+<p>The second problem is that the consumer refers directly to the <code>nr</code> variable
+of the <code>producer</code> automaton. This introduces a very tight coupling between
+the producer and the consumers. It exposes the <code>nr</code> variable of the
+<code>producer</code> to the consumers, making it more difficult to change the producer
+without changing the consumers.</p>
+</div>
+<div class="paragraph">
+<p>
+
+Both these problems can be solved by using <em>channels</em>. Channels are a special
+form of events, that can be used to communicate or transmit data from a
+<em>sender</em> to a <em>receiver</em>. In our example, data that is communicated are the
+identification numbers of the products, the producer is the sender, and the
+consumers are the receivers.</p>
+</div>
+<div class="paragraph">
+<p>Channels require one or more potential senders, and one or more potential
+receivers. Automata cannot be both sender and receiver for a single channel.
+They may however be a sender for one channel, and a receiver for another
+channel. For every transition, exactly one of the senders and exactly one of
+the receivers participate. The sender sends a value, and the receiver
+receives that value. This type of communication is often called channel
+communication or <em>point-to-point</em> communication, as the data is communicated
+from one point (the sender) to another point (the receiver).</p>
+</div>
+<div class="paragraph">
+<p>Multiple automata that synchronize over the same event perform a transition
+together. Similarly, a sender and receiver that together perform a
+channel communication, perform a transition together. In both cases,
+all automata involved take their respective edges <em>synchronously</em>
+(simultaneously).</p>
+</div>
+<div class="paragraph">
+<p>Channels are ideally suited for modeling product flows, or more generally the
+movement of physical entities through a system. Physical objects usually don&#8217;t
+duplicate themselves or spontaneously stop to exist. This fits nicely with
+channels, where data is communicated or passed along from exactly one sender
+to one receiver. In our example, product produced by the producer are
+physically provided to one of the consumers.</p>
+</div>
+<div class="paragraph">
+<p>The following CIF specification models the above example using channels:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event int provide;
+
+automaton producer:
+  disc int nr = 0;
+
+  location:
+    initial;
+    edge provide!nr do nr := nr + 1;
+end
+
+automaton consumer1:
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide? do nr := ?;
+end
+
+automaton consumer2:
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide? do nr := ?;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+The <code>provide1</code> and <code>provide2</code> events have been replaced by a single
+channel named <code>provide</code>. Channels are declared similar to events, but have a
+<a href="#tut-values-chapter-types-values-exprs">data type</a> that indicates the type
+of <a href="#tut-values-chapter-types-values-exprs">values</a> that are communicated
+over the channel. In this case <a href="#tut-values-chapter-integers">integers</a> are
+communicated.</p>
+</div>
+<div class="paragraph">
+<p>
+
+The <code>producer</code> now uses the channel on its edge, instead of the two events.
+The exclamation mark (<code>!</code>) after the channel name means that the producer
+is sending over the channel. After the exclamation mark, the value that the
+producer sends is given. In this case, the producer sends the identification
+number of its current product.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+The edges of the consumers have been modified as well. The channel is used
+with a question mark (<code>?</code>) after the channel name, indicating that the
+consumers receive over the channel. The received value, which is available as
+the <code>?</code> variable in the update, is directly assigned to the <code>nr</code> variable
+of the consumer.</p>
+</div>
+<div class="paragraph">
+<p>By using channels, we no longer need multiple events, and the producer does not
+need to be modified if another consumer is added. This makes the model scalable
+to varying amount of consumers. Furthermore, the consumers now use the <code>?</code>
+variable to obtain the received value, and no longer need direct access to the
+variables of the producer. This makes it easier to modify the producer
+without having to also modify the consumers.</p>
+</div>
+<div class="paragraph">
+<p>To conclude this lesson, we&#8217;ll extend the example with a second producer:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event int provide;
+
+automaton producer1:
+  disc int nr = 0;
+
+  location:
+    initial;
+    edge provide!nr do nr := nr + 1;
+end
+
+automaton producer2:
+  disc int nr = 0;
+
+  location:
+    initial;
+    edge provide!nr do nr := nr + 1;
+end
+
+automaton consumer1:
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide? do nr := ?;
+end
+
+automaton consumer2:
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide? do nr := ?;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>producer</code> automaton has been renamed to <code>producer1</code>, and a
+<code>producer2</code> has been added. Both producers independently produce products
+and provide them to the consumers. Both consumers can receive products from
+either producer. At all times, four transitions are possible:
+<code>producer1</code> communicates with <code>consumer1</code>, <code>producer1</code> communicates with
+<code>consumer2</code>, <code>producer2</code> communicates with <code>consumer1</code>, or <code>producer2</code>
+communicates with <code>consumer2</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-channels-chapter-void">Dataless channels</h4>
+<div class="paragraph">
+<p>
+
+
+
+Besides channels that communicate data, it is also possible to use dataless
+channels. A channel that does not communicate any data, is declared with the
+<code>void</code> type. Dataless channels are also called <code>void</code> channels. When using
+dataless channels, the sender does not provide a value to send over the
+channel. Also, the receiver cannot use the received value (variable <code>?</code>)
+since no data is communicated.</p>
+</div>
+<div class="paragraph">
+<p>Dataless channels are used in the same situations as 'normal' channels,
+for instance when physical product flow is modeled. If products don&#8217;t
+have an identification number, and can not be distinguished based on color or
+some other property, all products are essentially equal. It is then sufficient
+to communicate that a product is being 'transferred'. No further data is
+needed. While it is possible to communicate dummy values, dataless channels
+provide a better solution in such cases.</p>
+</div>
+<div class="paragraph">
+<p>Consider again the producer/consumer example from the
+<a href="#tut-channels-chapter-intro">previous lesson</a>, with one producer and two
+consumers, but without identification numbers for the products:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event void provide;
+
+automaton producer:
+  location:
+    initial;
+    edge provide!;
+end
+
+automaton consumer1:
+  location:
+    initial;
+    edge provide?;
+end
+
+automaton consumer2:
+  location:
+    initial;
+    edge provide?;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>producer</code> still produces products and provides them to either the first
+or the second consumer.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-channels-chapter-chan-sync-combi">Combining channel communication with event synchronization</h4>
+<div class="paragraph">
+<p>
+Consider again the producer/consumer example with two producers and two
+consumers, from a <a href="#tut-channels-chapter-intro">previous lesson</a>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event int provide;
+
+automaton producer1:
+  disc int nr = 0;
+
+  location:
+    initial;
+    edge provide!nr do nr := nr + 1;
+end
+
+automaton producer2:
+  disc int nr = 0;
+
+  location:
+    initial;
+    edge provide!nr do nr := nr + 1;
+end
+
+automaton consumer1:
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide? do nr := ?;
+end
+
+automaton consumer2:
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide? do nr := ?;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Now assume we want to restrict communication to allow at most five products in
+total to be provided to the consumers. We could adapt both producers, as
+follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton producer1:
+  disc int nr = 0;
+
+  location:
+    initial;
+    edge provide!nr when nr + producer2.nr &lt; 5 do nr := nr + 1;
+end
+
+automaton producer2:
+  disc int nr = 0;
+
+  location:
+    initial;
+    edge provide!nr when producer1.nr + nr &lt; 5  do nr := nr + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each producer gets an additional guard condition whether it may provide a
+product to one of the consumers. If the total number of products provided by
+both providers does not exceed five, they may still provide a product. Having
+to adapt both producers is less than ideal.</p>
+</div>
+<div class="paragraph">
+<p>As an alternative solution, we can add an additional automaton, instead of
+adapting the producers:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton controller:
+  disc int cnt = 0;
+
+  location:
+    initial;
+    edge provide when cnt &lt; 5 do cnt := cnt + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This <code>controller</code> automaton (together with the original producer automata)
+keeps track of the number of products provided to consumers, by counting them
+in variable <code>cnt</code>. It only allows the <code>provide</code> event when less than five
+products have been provided. If five or more products have been provided, it
+disables the <code>provide</code> event.</p>
+</div>
+<div class="paragraph">
+<p>In the <code>controller</code> automaton, the <code>provide</code> channel is used as an event
+rather than a channel. When one of the producers and one of the consumers
+together perform a channel communication, the <code>controller</code> automaton that has
+the <code>provide</code> event in its <a href="#tut-basics-chapter-alphabet">alphabet</a>, must
+synchronize with it. This allows the <code>controller</code> to impose additional
+restrictions on the channel communication, allowing or forbidding it in
+certain cases. The <code>controller</code> is added as a separate process, which
+improves scalability.</p>
+</div>
+<div class="paragraph">
+<p>In general, every automaton may either send over a channel, receive over a
+channel, or synchronize with a channel. An automaton may not take on more than
+one of these roles, for a single event. It may however send over one channel,
+receive over another channel, and synchronize with yet another one.</p>
+</div>
+<div class="paragraph">
+<p>Every event transition for a channel requires exactly one automaton that
+participates as sender, and exactly one automaton that participates as
+receiver. Furthermore, all automata that have the channel in their alphabet,
+must additionally participate as well, by synchronizing together with the
+sender and receiver. Automata that send or receive over a channel, do not have
+that channel in their alphabet. Only automata that synchronize with an event
+or channel have that event or channel in their alphabet.</p>
+</div>
+<div class="paragraph">
+<p>Automata that synchronize over a channel can be used to further <em>restrict</em> the
+allowed channel communications, as shown in the above example. It is however
+also possible for the additional synchronizing automata to
+<a href="#tut-data-chapter-monitoring">monitor</a> (observe) the channel communication.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-functions">Functions</h3>
+<div class="sect3">
+<h4 id="tut-functions-chapter-intro">Functions</h4>
+<div class="paragraph">
+<p>
+
+Functions can be used to compute values from other values. CIF has many
+built-in functions, called <em>standard library functions</em>. An example is the
+<code>size</code> function, which takes a <a href="#tut-values-chapter-lists">list</a> and
+returns the number of elements of the list. Another example is the <code>abs</code>
+function, which takes an <a href="#tut-values-chapter-integers">integer</a> or
+<a href="#tut-values-chapter-reals">real</a> number and computes the absolute value of
+that number.</p>
+</div>
+<div class="paragraph">
+<p>
+While many built-in functions are available, they may not always suffice.
+User-defined functions can be added to CIF models, to allow custom computations
+needed by the model. By putting the calculation in a user-defined function, the
+calculation can be used in several places, allowing for reuse. Furthermore,
+functions allow for more complex computations than would otherwise be possible.</p>
+</div>
+<div class="paragraph">
+<p>
+CIF features two kinds of user-defined functions: internal ones and external
+ones. Internal user-defined functions are fully defined within the CIF model.
+External user-defined functions declare only a header which indicates the
+existence of the function, while the actual implementation is obtained from an
+external source. The lessons of this category only explain internal
+user-defined functions. The language reference documentation gives more
+information on external user-defined functions.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-functions-chapter-internal-functions">Internal user-defined functions</h4>
+<div class="paragraph">
+<p>
+The most commonly used <a href="#tut-functions-chapter-intro">kind</a> of user-defined
+functions are the internal user-defined functions. Consider the following CIF
+specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">func real mean(list real vs):
+  int length = size(vs);
+  int index = 0;
+  real sum = 0;
+
+  while index &lt; length:
+    sum := sum + vs[index];
+    index := index + 1;
+  end
+  return sum / length;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+This specification defines a function (keyword <code>func</code>) named <code>mean</code>. After
+the name of the function, between the parentheses, the <em>parameters</em> are listed.
+The parameters are the input values, which the function can use to compute its
+result. In this example, the function takes a
+<a href="#tut-values-chapter-lists">list</a> of <a href="#tut-values-chapter-reals">real</a>
+values as its only parameter. Parameter name <code>vs</code> can be used in the body of
+the function to refer to this input value. Just after the <code>func</code> keyword, the
+<a href="#tut-values-chapter-types-values-exprs">type</a> of the <em>result</em> of the
+computation is specified. In this case, the function results in a
+<a href="#tut-values-chapter-reals">real</a> typed value. The <code>mean</code> function takes a
+list of integer values and produces a single real value as result.</p>
+</div>
+<div class="paragraph">
+<p>
+
+In the <em>body</em> of the function, local variables can be declared. The <code>mean</code>
+function declares three variables: <code>length</code>, <code>index</code>, and <code>sum</code>. Local
+variables of functions are very similar to
+<a href="#tut-data-chapter-discrete-variables">discrete variables</a>. The main
+difference is that they are
+declared without the <code>disc</code> keyword. In the example, <code>length</code> is set to the
+number of elements in list <code>vs</code>. Variables <code>index</code> and <code>sum</code> are both
+initialized to <code>0</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+After the local variables (if any), the statements of the body are given. The
+statements implement the algorithm, the actual computation of the function.
+Statements are executed one after another, in the order they are given. In the
+<code>mean</code> function, the <code>while</code> statement is executed before the <code>return</code>
+statement. The <code>mean</code> function first calculates the sum of the input values,
+and then <em>returns</em> the mean value. The details of the statements are discussed
+in the <a href="#tut-functions-chapter-statements">next lesson</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+A function can be called (or applied) on concrete input values, to obtain the
+computation result for those specific input values. For instance, consider the
+following extension to the above CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg real m = mean([1.5, 3.2, 7.9, 15.8]);
+
+automaton a:
+  disc real x;
+
+  location:
+    initial;
+    edge do x := 2 * mean([0.4, 1.5, 6.8]);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Algebraic variable <code>m</code> is given the value that results from calling function
+<code>mean</code> on a single <em>argument</em>, a list with four values. Each argument of a
+function call must match with the corresponding parameter of the function being
+called. In this case, the list of four real values matches with the <code>vs</code>
+parameter of the <code>mean</code> function, which has type <code>list real</code>. Variable
+<code>m</code> becomes <code>7.1</code>, as the mean of those four values is <code>7.1</code>
+(<code>(1.5 + 3.2 + 7.9 + 15.8) / 4</code>).</p>
+</div>
+<div class="paragraph">
+<p>The edge in automaton <code>a</code> assigns a value to variable <code>x</code>. The mean of a
+list of three values is calculated, and multiplied by two, to obtain the new
+value of <code>x</code>. The mean of <code>0.4</code>, <code>1.5</code>, and <code>6.8</code> is
+<code>(0.4 + 1.5 + 6.8) / 3</code>, which is <code>2.9</code>. Variable <code>x</code> gets <code>5.8</code>
+(<code>2.9 * 2</code>) as its new value.</p>
+</div>
+<div class="paragraph">
+<p>Function <code>mean</code> is called in two places in the example, showing reuse of
+calculations.</p>
+</div>
+<div class="paragraph">
+<p>
+Functions in CIF are mathematical functions. That is, the result of a function
+is the same for the same input values, and functions have no side effects.
+Functions can not directly access variables outside their body. For example,
+they cannot access discrete, continuous, and algebraic variables. They can also
+not use variable <code>time</code>. To use the values of those variables in a function,
+they have to to be passed in through parameters.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-functions-chapter-statements">Function statements</h4>
+<div class="paragraph">
+<p>
+This lesson explains the different statements that can be used in internal
+user-defined functions:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-tut-functions-statements-assignment">Assignment statement</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-functions-statements-if">If statement</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-functions-statements-return">Return statement</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-functions-statements-while">While statement</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-functions-statements-break">Break statement</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-functions-statements-continue">Continue statement</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-functions-statements-assignment">Assignment statement</h5>
+<div class="paragraph">
+<p>Assignments in functions are very similar to assignments to
+<a href="#tut-data-chapter-discrete-variables">discrete variables</a>. For instance:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">x := x + 1;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Besides local variables, it also allowed to assign new values to the
+parameters. Changes to parameters only have effect inside the function itself.</p>
+</div>
+<div class="paragraph">
+<p>For <a href="#lang-tut-data-asgn-old-vs-new-multi">multi-assignments</a>, the
+outer parentheses are not needed:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Multi-assignment on an edge.
+edge do (x, y) := (1, 2);
+
+// Multi-assignment in a function.
+x, y := 1, 2;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-functions-statements-if">If statement</h5>
+<div class="paragraph">
+<p>It is possible to perform different calculations under different circumstances.
+Consider the following function:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">func int signum(real x):
+  if x &gt; 0:
+    return 1;
+  elif x &lt; 0:
+    return -1;
+  else
+    return 0;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This <code>signum</code> function takes a real number <code>x</code> and returns its
+<a href="http://en.wikipedia.org/wiki/Signum_function">sign</a>.
+The <code>if</code> statement
+is used to detect the different situations, and to return the correct result
+in each of those situations.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-functions-statements-return">Return statement</h5>
+<div class="paragraph">
+<p>The execution of a function ends when a <code>return</code> statement is encountered.
+The value following the <code>return</code> statement is the result of the entire
+function. Consider again the <code>return</code> statement from the <code>mean</code> function
+from the <a href="#tut-functions-chapter-internal-functions">previous lesson</a>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">return sum / length;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this case, the <code>sum</code> of the input values is divided by the number of input
+elements (variable <code>length</code>) to obtain the mean of the input values. The mean
+of the input values is the result of the function.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-functions-statements-while">While statement</h5>
+<div class="paragraph">
+<p>The <code>while</code> statements allows for repeated execution of the statements in its
+body, as long as the condition of the <code>while</code> loop holds. Consider again the
+<code>mean</code> function from the
+<a href="#tut-functions-chapter-internal-functions">previous lesson</a>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">func real mean(list real vs):
+  int length = size(vs);
+  int index = 0;
+  real sum = 0;
+
+  while index &lt; length:
+    sum := sum + vs[index];
+    index := index + 1;
+  end
+  return sum / length;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>mean</code> function processes each of its input values, using a <code>while</code>
+loop. As long as the condition (<code>index &lt; length</code>) holds, the body of the
+<code>while</code> is executed over an over. The body consists of two assignments. The
+first assignment obtains an input value (<code>vs[index]</code>) and adds it to the
+<code>sum</code>. The second statement increases the index, to proceed with the next
+input value. After the two assignments have been executed, the condition of the
+<code>while</code> is evaluated again. If the condition still holds, the two assignments
+are executed again, etc. When the condition no longer holds, the <code>while</code>
+statement is done, and execution proceeds with the next statement, the
+<code>return</code> statement.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-functions-statements-break">Break statement</h5>
+<div class="paragraph">
+<p>A <code>break</code> statement 'jumps out' of a <code>while</code> statement, continuing with the
+first statement after the <code>while</code>. Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Get the first 'n' values from 'xs' that are not 'bad'.
+func list int first_n(list int xs; int n; int bad):
+  int index = 0;
+  int x;
+  list int result = [];
+
+  while index &lt; size(xs):
+    x := xs[index];
+    if x != bad:
+      result := result + [x];
+    end
+    if size(result) = n:
+      break;
+    end
+    index := index + 1;
+  end
+  return result;
+end
+
+// The value of 'y' is [1, 5, 3].
+alg list int y = first_n([1, 2, 5, 3, 4, 1, 3], 3, 2);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>first_n</code> function takes a list of integer numbers <code>xs</code>, and returns a
+list <code>result</code> with the first <code>n</code> numbers from <code>xs</code> that are not <code>bad</code>.
+A <code>while</code> loop is used to process each of the numbers in list <code>xs</code>. The
+current number is stored in variable <code>x</code>. If the current number is not the
+same as <code>bad</code>, it is added to the <code>result</code>. If the <code>result</code> then contains
+<code>n</code> values, the <code>break</code> statement is used to break out of the <code>while</code>
+loop and continue execution at the first statement after the <code>while</code> loop,
+which is the <code>return</code> statement. If less than <code>n</code> values are in the result,
+<code>index</code> is incremented to ensure the next number of the list is processed in
+the next iteration of the <code>while</code> loop. The <code>return</code> statement at the end
+of the function is used to return the <code>result</code> list, which contains at most
+<code>n</code> values.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-functions-statements-continue">Continue statement</h5>
+<div class="paragraph">
+<p>A <code>continue</code> statement 'jumps over' the remaining statements in the body
+of a <code>while</code> statement, and continues with the next iteration of that
+<code>while</code> statement. Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Get the values from 'xs' that are greater than 5.
+func list int filter_gt5(list int xs):
+  int index = 0;
+  int x;
+  list int result = [];
+
+  while index &lt; size(xs):
+    x := xs[index];
+    index := index + 1;
+    if x &lt;= 5:
+      continue;
+    end
+    result := result + [x];
+  end
+  return result;
+end
+
+// The value of 'y' is [8, 7, 6].
+alg list int y = filter_gt5([1, 8, 5, 7, 4, 6, 3]);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>filter_gt5</code> function takes a list of integer numbers, and returns a
+filtered list that only contains those integer number that are greater than 5.
+A <code>while</code> loop is used to process each of the numbers in list <code>xs</code>. The
+current number is stored in variable <code>x</code>, and <code>index</code> is incremented to
+ensure the next number of the list is processed in the next iteration of the
+<code>while</code> loop. If the current number is not greater than 5, the remaining
+statements in the body of the <code>while</code> are skipped, meaning <code>x</code> is not
+added to the <code>result</code>. The <code>while</code> loop then continues with the next
+iteration, for the next number in <code>xs</code>. If the current number (<code>x</code>) is
+greater than 5, execution continues after the <code>if</code> statement, and the number
+is added to the <code>result</code>. After all numbers in the list have been processed,
+the filtered <code>result</code> list is returned to the caller of the function.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-functions-chapter-functions-as-values">Functions as values</h4>
+<div class="paragraph">
+<p>Functions can be used as <a href="#tut-values-chapter-types-values-exprs">values</a>.
+By treating them as data, they can be stored in variables, and passed to other
+functions. This lesson shows one example of how that can be useful.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following list of numbers:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg list real nrs = [0.5, 1.3, 0.1, 2.7, 1.4];</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Now assume we wanted to sort these numbers both in increasing and in decreasing
+order, using a single sorting function:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg list real inc = sort(nrs, cmp_inc); // [0.1, 0.5, 1.3, 1.4, 2.7]
+alg list real dec = sort(nrs, cmp_dec); // [2.7, 1.4, 1.3, 0.5, 0.1]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>inc</code> contains the same numbers as <code>nrs</code>, but sorted in increasing
+order, while <code>dec</code> contains them in decreasing order. We use the same
+<code>sort</code> function in both cases, but with different comparison functions:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">func bool cmp_inc(real a, b):
+  return a &lt;= b;
+end
+
+func bool cmp_dec(real a, b):
+  return a &gt;= b;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Function <code>cmp_inc</code> takes two real numbers and returns <code>true</code> only if the
+first number is smaller than the second one (<code>a</code> and <code>b</code> are in increasing
+order). Function <code>cmp_dec</code> has the same parameters, but returns <code>true</code> only
+if the first number is larger than the second one (<code>a</code> and <code>b</code> are in
+decreasing order). The <code>sort</code> function is defined as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">func list real sort(list real xs; func bool (real, real) cmp):
+  int i = 1, j;
+  real x;
+
+  while i &lt; size(xs):
+    j := i;
+    while j &gt; 0 and not cmp(xs[j-1], xs[j]):
+      // swap x[j-1] and x[j]
+      x := xs[j-1];
+      xs[j-1] := xs[j];
+      xs[j] := x;
+      j := j - 1;
+    end
+    i := i + 1;
+  end
+  return xs;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>sort</code> function has two parameters. The first parameter is <code>xs</code>, which
+contains the values to sort. The second parameter is <code>cmp</code>, the compare
+function to use to determine whether two numbers are correctly ordered. The
+<code>cmp</code> parameter has type <code>func bool (real, real)</code>, which means that a
+function that has two real parameters and a boolean return value is required.
+The <code>cmp_inc</code> and <code>cmp_dec</code> functions satisfy these requirements, and can
+be used as second argument when the function is called to determine the values
+of algebraic variables <code>inc</code> and <code>dec</code>.</p>
+</div>
+<div class="paragraph">
+<p>The <code>sort</code> function implements a standard
+<a href="http://en.wikipedia.org/wiki/Insertion_sort">insertion sort</a>
+algorithm. The
+<code>cmp</code> parameter is used in the <code>sort</code> function to compare two consecutive
+values in <code>xs</code>, and swap them if they are not correctly ordered.</p>
+</div>
+<div class="paragraph">
+<p>The <code>cmp</code> parameter of the <code>sort</code> function has a function type, allowing
+compare functions to be passed to the <code>sort</code> function, as data. This allows
+the <code>sort</code> function to sort lists of numbers in different orders, depending
+on the compare function that is provided.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-scalable-solutions-and-reuse-22">Scalable solutions and reuse (2/2)</h3>
+<div class="sect3">
+<h4 id="tut-reuse2-chapter-aut-def-inst">Automaton definition/instantiation</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+Parts of a system that are nearly identical, are often modeled as nearly
+identical automata. Having to specify them multiple times can be burdensome.
+It can also hinder scalability, as changes to one of them usually need to be
+applied to the others as well. Consider again the producer/consumer
+example from the <a href="#tut-channels-chapter-intro">lesson that introduced channels</a>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event int provide;
+
+automaton producer:
+  disc int nr = 0;
+
+  location:
+    initial;
+    edge provide!nr do nr := nr + 1;
+end
+
+automaton consumer1:
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide? do nr := ?;
+end
+
+automaton consumer2:
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide? do nr := ?;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The producer provides products either to the first consumer or to the second
+consumer. The consumers are modeled using identical automata. Only the names of
+the <code>consumer1</code> and <code>consumer2</code> automata differ. Ideally, we would have a
+sort of consumer template, and use that template twice, once for each of the
+actual consumers. This can be achieved in CIF using an <em>automaton definition</em>
+(the template) and two <em>automaton instantiations</em> (the uses of the template):</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event int provide;
+
+automaton producer:
+  disc int nr = 0;
+
+  location:
+    initial;
+    edge provide!nr do nr := nr + 1;
+end
+
+automaton def Consumer():
+  disc int nr = -1;
+
+  location:
+    initial;
+    edge provide? do nr := ?;
+end
+
+consumer1: Consumer();
+consumer2: Consumer();</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>Consumer</code> automaton definition is identical to the original consumers,
+except that it is an automaton definition rather than an automaton. An
+automaton definition can be identified by the <code>def</code> keyword between the
+<code>automaton</code> keyword and the name of the automaton definition, as well as by
+the parentheses after its name. As a convention, names of automaton definitions
+start with an upper case letter (<code>Consumer</code> rather than <code>consumer</code>).</p>
+</div>
+<div class="paragraph">
+<p>An automaton definition by itself is not an automaton. The instantiations of
+the automaton definition (<code>consumer1</code> and <code>consumer2</code>) however, <em>are</em>
+automata. Before the colon (<code>:</code>), the name of the instantiation is given.
+This name is also the name of the actual automaton. After the colon, the name
+of the automaton definition that is instantiated is given.</p>
+</div>
+<div class="paragraph">
+<p>Using an automaton definition, the above example models the behavior of a
+consumer only once. Adding a third consumer is as easy as adding another
+automaton instantiation, which takes only one line of code
+(<code>consumer3: Consumer();</code>). Changing the behavior of all consumers only
+requires changes to the common automaton definition. Automaton
+definition/instantiation allows for scalability and reuse, and also improves
+maintainability.</p>
+</div>
+<div class="paragraph">
+<p>Automaton definition/instantiation can be eliminated, by replacing all
+automaton instantiations by the automaton definitions that they instantiate,
+and changing the automaton definition header (<code>automaton def Consumer():</code>) by
+an automaton header (<code>automaton consumer1:</code>). If we do that for the example
+above, we obtain the original specification from the beginning of this lesson.
+The two specifications are functionally equivalent. Automaton instantiation
+<code>consumer1</code> is also often referred to as automaton <code>consumer1</code>, when there
+is no confusion.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse2-chapter-aut-def-params">Parametrized automaton definitions</h4>
+<div class="paragraph">
+<p>
+
+
+In the <a href="#tut-reuse2-chapter-aut-def-inst">previous lesson</a>, automaton
+definition/instantiation was used to obtain two identical automata, while only
+having to specify their behavior once. What we have seen so far, is enough for
+exactly identical automata, but not for nearly identical automata. Consider the
+following two nearly identical consumers:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton consumer1:
+  disc list int buffer = [];
+
+  location:
+    initial;
+    edge provide? when size(buffer) &lt; 2 do buffer := buffer + [?];
+end
+
+automaton consumer2:
+  disc list int buffer = [];
+
+  location:
+    initial;
+    edge provide? when size(buffer) &lt; 3 do buffer := buffer + [?];
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The consumers can accept products that the producer provides (channel
+<code>provide</code>). They store the identification numbers of those products in a
+<code>buffer</code>. The two consumers are identical except for the number of products
+that they can accept: the first consumer can accept two products, the second
+producer can accept three products. We can still use automaton definition and
+instantiation to model the consumer only once, but we need to parametrize the
+automaton definition:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton def Consumer(alg int capacity):
+  disc list int buffer = [];
+
+  location:
+    initial;
+    edge provide? when size(buffer) &lt; capacity do buffer := buffer + [?];
+end
+
+consumer1: Consumer(2);
+consumer2: Consumer(3);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>Consumer</code> automaton definition now has a parameter named <code>capacity</code>
+that indicates how many identification numbers can be stored in its <code>buffer</code>.
+The automaton instantiations <code>consumer1</code> and <code>consumer2</code> provide an
+argument (<code>2</code> and <code>3</code> respectively) to match the parameter of <code>Consumer</code>.
+That is, the instantiations indicate their <code>capacity</code>. Using parameters, the
+<code>Consumer</code> automaton definition models the behavior of both automata
+<code>consumer1</code> and <code>consumer2</code>, even though they have different capacities.</p>
+</div>
+<div class="paragraph">
+<p>The details of the different kind of parameters of automaton definitions are
+explained in the <a href="#tut-reuse2-chapter-aut-def-param-kinds">next lesson</a>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse2-chapter-aut-def-param-kinds">Automaton definition parameters</h4>
+<div class="paragraph">
+<p>
+
+In the <a href="#tut-reuse2-chapter-aut-def-params">previous lesson</a>, an automaton
+definition with parameter was used. The parameter was an algebraic parameter,
+which is only one of the different kinds of automaton definition parameters.
+This lesson explains each of them:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-tut-reuse2-aut-def-param-kinds-alg">Algebraic parameters</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-reuse2-aut-def-param-kinds-event">Event parameters</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-reuse2-aut-def-param-kinds-loc">Location parameters</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-reuse2-aut-def-param-kinds-aut">Automaton parameters</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>This lesson also explains how to use
+<a href="#lang-tut-reuse2-aut-def-param-kinds-multiple">multiple parameters</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-reuse2-aut-def-param-kinds-alg">Algebraic parameters</h5>
+<div class="paragraph">
+<p>An algebraic parameter is similar to an
+<a href="#tut-reuse1-chapter-algebraic-variables">algebraic variable</a>. Arbitrary
+values or expressions of matching type can be provided as arguments in
+automaton instantiations. For instance, consider the following partial CIF
+specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event int accept, provide;
+
+automaton def Buffer(alg int capacity):
+  disc list int buf = [];
+
+  location:
+    initial;
+    edge accept?        when size(buf) &lt; capacity do buf := buf + [?];
+    edge provide!buf[0] when size(buf) &gt; 0        do buf := buf[1:];
+end
+
+buffer1: Buffer(5);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Automaton definition <code>Buffer</code> has an algebraic parameter that indicates the
+<code>capacity</code> of the buffer. The buffer can <code>accept</code> something when it has not
+yet reached its capacity. It can <code>provide</code> something when the buffer is not
+empty. Automaton instantiation <code>buffer1</code> has value <code>5</code> as its parameter.
+Value <code>5</code> is an integer number, which matches the integer type (<code>int</code>) of
+the <code>capacity</code> parameter.</p>
+</div>
+<div class="paragraph">
+<p>Algebraic parameters can be used inside an automaton definition, wherever a
+value is expected, e.g. in guards, updates, initial values of discrete
+variables, and invariants. The expression that is provided by the instantiation
+is essentially filled in wherever the parameter is used. The above is
+equivalent to:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event int accept, provide;
+
+automaton buffer1:
+  disc list int buf = [];
+
+  location:
+    initial;
+    edge accept?        when size(buf) &lt; 5 do buf := buf + [?];
+    edge provide!buf[0] when size(buf) &gt; 0 do buf := buf[1:];
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-reuse2-aut-def-param-kinds-event">Event parameters</h5>
+<div class="paragraph">
+<p>Event parameters allow different instantiations to synchronize with different
+events or to communicate over different
+<a href="#tut-channels-chapter-intro">channels</a>. For instance, consider the
+following partial CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event int generate, pass_along, exit;
+
+automaton def Buffer(event int accept, provide):
+  disc int buffer;
+
+  location accepting:
+    initial;
+    edge accept? do buffer := ? goto providing;
+
+  location providing:
+    edge provide!buffer goto accepting;
+end
+
+buffer1: Buffer(generate, pass_along);
+buffer2: Buffer(pass_along, exit);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Automaton definition <code>Buffer</code> is parametrized with two channels, one to
+<code>accept</code> a product into the one place buffer, and one to <code>provide</code> it to
+some other part of the system. The first buffer (<code>buffer1</code>) accepts products
+via the <code>generate</code> channel, and provides products via the <code>pass_along</code>
+channel. The second buffer (<code>buffer2</code>) accepts products via the
+<code>pass_along</code> channel, and provides products via the <code>exit</code> channel. The
+first buffer uses the <code>pass_along</code> channel as its <code>provide</code> channel
+parameter, and the second buffer uses that same <code>pass_along</code> channel as its
+<code>accept</code> channel parameter. The first buffer thus provides its items to the
+second buffer.</p>
+</div>
+<div class="paragraph">
+<p>Event and channel parameters can be used inside an automaton definition,
+wherever an event or channel is expected, e.g. on edges and in
+<a href="#tut-basics-chapter-alphabet">alphabets</a> if
+<a href="#lang-tut-basics-alphabet-explicit">explicitly specified</a>. The event or
+channel that is provided by the instantiation is essentially filled in wherever
+the parameter is used. The above is equivalent to:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event int generate, pass_along, exit;
+
+automaton buffer1:
+  disc int buffer;
+
+  location accepting:
+    initial;
+    edge generate? do buffer := ? goto providing;
+
+  location providing:
+    edge pass_along!buffer goto accepting;
+end
+
+automaton buffer2:
+  disc int buffer;
+
+  location accepting:
+    initial;
+    edge pass_along? do buffer := ? goto providing;
+
+  location providing:
+    edge exit!buffer goto accepting;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+</p>
+</div>
+<div class="sect5">
+<h6 id="lang-tut-reuse2-aut-def-param-kinds-event-restrictions">Channel parameter usage restrictions</h6>
+<div class="paragraph">
+<p>If an event parameter is actually a channel (it has a data type), it may also
+be called a <em>channel parameter</em>. By default, a channel parameter can be used to
+send, receive, or synchronize. However, it is also possible to restrict the
+allowed usages. By putting certain event usage restriction flags after the name
+of the channel parameter, only those usages are allowed. The available flags
+are <code>!</code> to allow sending, <code>?</code> to allow receiving, and <code>~</code> to allow
+synchronizing. Duplicate flags are not allowed, the <code>!</code> should be before the
+<code>?</code> flag, and the <code>!</code> and <code>?</code> flags should be before the <code>~</code> flag.</p>
+</div>
+<div class="paragraph">
+<p>By restricting the usages, you can immediately see how a channel parameter is
+used within the automaton definition, as only the usages indicates by the
+parameter are allowed. It serves as sort of documentation of the intention of
+the channel parameter. This is much simpler than finding the actual usages of
+the parameter in the automaton. However, note that the parameter indicates the
+allowed usages, and doesn&#8217;t guarantee that the event/parameter is actually used
+at all.</p>
+</div>
+<div class="paragraph">
+<p>Another benefit of restricting the usages, is that it makes it possible to spot
+mistakes. You might for instance use a channel parameter on an edge (e.g.
+<code>edge e</code>), but forget to include the send part (e.g. <code>edge e!1</code>). If the
+parameter only allows sending, the accidental synchronization (<code>edge e</code>) is
+reported as an invalid use. Without the usage checking, you might not encounter
+the problem until for instance simulation, where it is much more difficult to
+find the cause.</p>
+</div>
+<div class="paragraph">
+<p>For the example above, we have the following <em>header</em> of the <code>Buffer</code>
+definition:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton def Buffer(event int accept, provide):</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>We can change this as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton def Buffer(event int accept?, provide!):</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This makes it clearer that the <code>accept</code> channel is used to receive a
+product into the buffer, and the <code>provide</code> channel is used send a product
+from the buffer.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-reuse2-aut-def-param-kinds-loc">Location parameters</h5>
+<div class="paragraph">
+<p>An earlier lesson explained how a
+<a href="#tut-data-chapter-locs-as-var">location can be used as a variable</a>. Using
+location parameters, automaton definitions can be supplied with different
+locations. For instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton def Machine(location other_processing):
+  location heat_up:
+    initial;
+    edge when not other_processing goto processing;
+
+  location processing:
+    edge tau goto cool_down;
+
+  location cool_down:
+    edge tau goto heat_up;
+end
+
+machine1: Machine(machine2.processing);
+machine2: Machine(machine1.processing);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Automaton definition <code>Machine</code> represents a machine that can heat up, process
+something, cool down, and repeat that forever. The system consists of two of
+those machines. The machines can not start processing if the other machine is
+already processing. That is, the machines perform
+<a href="http://en.wikipedia.org/wiki/Mutual_exclusion">mutually exclusive</a>
+processing. If the first machine is in its <code>processing</code> location, the other
+can&#8217;t also be processing (in its own <code>processing</code> location). To prevent a
+machine from starting to process if the other machine is already processing,
+each machine needs to know whether the other is already processing. Therefore,
+automaton definition <code>Machine</code> is parametrized with a location parameter
+<code>other_processing</code>, that indicates whether the other machine is currently
+processing (in its <code>processing</code> location). This parameter is used as a guard
+that determines whether a transition from location <code>heat_up</code> to location
+<code>processing</code> is allowed. Automaton instantiation <code>machine1</code> provides the
+first machine with the <code>processing</code> location of the second machine, by
+using <code>machine2.processing</code> as its instantiation argument.</p>
+</div>
+<div class="paragraph">
+<p>Location parameters can be used inside an automaton definition, wherever a
+<a href="#tut-values-chapter-booleans">boolean</a> value is expected, e.g. in guards.
+The location that is provided by the instantiation is essentially filled in
+wherever the parameter is used. The above is equivalent to:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton machine1:
+  location heat_up:
+    initial;
+    edge when not machine2.processing goto processing;
+
+  location processing:
+    edge tau goto cool_down;
+
+  location cool_down:
+    edge tau goto heat_up;
+end
+
+automaton machine2:
+  location heat_up:
+    initial;
+    edge when not machine1.processing goto processing;
+
+  location processing:
+    edge tau goto cool_down;
+
+  location cool_down:
+    edge tau goto heat_up;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-reuse2-aut-def-param-kinds-aut">Automaton parameters</h5>
+<div class="paragraph">
+<p>When multiple declarations (variables, locations, etc) from one automaton are
+to be supplied as parameters to another automaton, it is also possible to
+supply the entire automaton as a parameter, but only if the provided automaton
+is an instantiation of an automaton definition. Consider for instance the
+following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton def Sensor():
+  event go_on, go_off;
+
+  location off:
+    initial;
+    edge go_on goto on;
+
+  location on:
+    edge go_off goto off;
+end
+
+sensor1: Sensor();
+sensor2: Sensor();
+
+automaton def Actuator(Sensor sensor):
+  event turn_on, turn_off;
+
+  location off:
+    initial;
+    edge turn_on  when sensor.on  goto on;
+
+  location on:
+    edge turn_off when sensor.off goto off;
+end
+
+actuator1: Actuator(sensor1);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Automaton definition <code>Sensor</code> models a sensor that can go on an off. Both
+<code>sensor1</code> and <code>sensor2</code> are actual sensors. Automaton definition
+<code>Actuator</code> models an actuator that can be turned on if a sensor is on, and be
+turned off if that same sensor is off. The <code>actuator1</code> automaton is provided
+<code>sensor1</code> as sensor. If <code>sensor1</code> goes on, <code>actuator1</code> is turned on, and
+if <code>sensor1</code> goes off, <code>actuator1</code> is turned off. <code>sensor2</code> going on or
+off has no effect on <code>actuator1</code>.</p>
+</div>
+<div class="paragraph">
+<p>Automaton parameters can be used inside an automaton definition, to refer to
+declarations inside the automaton supplied for the automaton parameter. The
+automaton that is provided by the instantiation is essentially filled in
+wherever the parameter is used. The above is equivalent to:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton sensor1:
+  event go_on, go_off;
+
+  location off:
+    initial;
+    edge go_on goto on:
+
+  location on:
+    edge go_off goto off:
+end
+
+automaton sensor2:
+  event go_on, go_off;
+
+  location off:
+    initial;
+    edge go_on goto on:
+
+  location on:
+    edge go_off goto off:
+end
+
+automaton actuator1:
+  event turn_on, turn_off;
+
+  location off:
+    initial;
+    edge turn_on  when sensor1.on  goto on;
+
+  location on:
+    edge turn_off when sensor1.off goto off;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-reuse2-aut-def-param-kinds-multiple">Multiple parameters</h5>
+<div class="paragraph">
+<p>It is possible to use multiple parameters of the same kind, as well as
+different kinds of parameters:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton def X(event a, b; alg real c; event d):
+  ...
+end
+
+event z;
+
+x: X(z, z, 3 * 5, z);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Automaton definition <code>X</code> has four parameters: <code>a</code>, <code>b</code>, <code>c</code>, and <code>d</code>.
+Since <code>a</code> and <code>b</code> are both event parameters, a comma (<code>,</code>) is used to
+make sure the <code>event</code> keyword does not need to be repeated for parameter
+<code>b</code>. Algebraic parameter <code>d</code> is of a different kind, and is therefore
+separated using a semicolon (<code>;</code>).</p>
+</div>
+<div class="paragraph">
+<p>Automaton instantiation <code>x</code> instantiates <code>X</code> with the event <code>z</code> (for the
+first, second, and fourth parameters), and value 15.0 (<code>3 * 5</code>, for the third
+parameter).</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse2-chapter-groups">Groups</h4>
+<div class="paragraph">
+<p>
+
+For large CIF specifications with many automata, it can be beneficial to add
+more structure to the specification. For this purpose, CIF has <em>groups</em>. Groups
+are named collections of automata and other declarations. For instance,
+consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group factory:
+  group hall1:
+    automaton machine1:
+      ...
+    end
+
+    automaton machine2:
+      ...
+    end
+  end
+
+  group hall2:
+    automaton machine1:
+      ...
+    end
+
+    automaton machine2:
+      ...
+    end
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specifications features four automata that model the behavior of machines.
+The details of the actual automata are omitted, as they are irrelevant for this
+lesson. All four machines are in the same factory, but they are divided into
+two halls. This physical subdivision is expressed in the CIF specification
+using groups named <code>factory</code>, <code>hall1</code>, and <code>hall2</code>. While in this case
+the subdivision into a hierarchical specification structure is based on the
+physical subdivision of the actual system, the modeler is free to base the
+specification structure on other criteria.</p>
+</div>
+<div class="paragraph">
+<p>Consider also the following partial CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group configuration:
+  const int  MAX_PRODUCTS        = 1500;
+  const real MAX_PRODUCTION_TIME = 3.7;
+  const real ARRIVAL_RATE        = 28.6;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>configuration</code> group is used to group together several configuration
+values, modeled by constants. By grouping these constants together, it is more
+clear that they together are the configuration settings of the system, and that
+they belong together.</p>
+</div>
+<div class="paragraph">
+<p>Finally, consider the following CIF specification, based on the
+<a href="http://en.wikipedia.org/wiki/Nonlinear_system">non-linear system</a>
+from the lesson on <a href="#tut-time-chapter-equations">equations</a>.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group tank:
+  cont V = 5;
+  alg real Qi;
+  alg real Qo;
+
+  equation V' = Qi - Qo;
+  equation Qi = 1;
+  equation Qo = sqrt(V);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>By grouping the declarations and their equations together, it is becomes clear
+that together they model a <code>tank</code>. This is especially useful if other parts
+of the specification model something different.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse2-chapter-group-defs">Group definitions</h4>
+<div class="paragraph">
+<p>
+
+
+Similar to how <a href="#tut-reuse2-chapter-aut-def-inst">automaton definitions</a> can
+be used for reuse of automata, group definitions can be used for reuse of
+groups:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton def Machine():
+  location:
+    initial;
+  ...
+end
+
+group def Hall():
+  machine1: Machine();
+  machine2: Machine();
+end
+
+group def Factory():
+  hall1: Hall();
+  hall2: Hall();
+end
+
+factory1: Factory();</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Automaton definition <code>Machine</code> models a machine, but most of the details are
+omitted here, as they are not relevant for this lesson. Group definition
+<code>Hall</code> models that each hall has two machines. Similarly, group definition
+<code>Factory</code> models that each factory has two halls.</p>
+</div>
+<div class="paragraph">
+<p>
+
+Automata and groups are both <em>components</em> in CIF. Automaton definitions and
+group definitions can together be called <em>component definitions</em>. If we
+eliminate all component definitions and their instantiations, by replacing
+instantiations by their definitions, we get the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group factory1:
+  group hall1:
+    automaton machine1:
+      location:
+        initial;
+      ...
+    end
+
+    automaton machine2:
+      location:
+        initial;
+      ...
+    end
+  end
+
+  group hall2:
+    automaton machine1:
+      location:
+        initial;
+      ...
+    end
+
+    automaton machine2:
+      location:
+        initial;
+      ...
+    end
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Group definitions may be <a href="#tut-reuse2-chapter-aut-def-params">parametrized</a>
+using the same <a href="#tut-reuse2-chapter-aut-def-param-kinds">kinds of parameters</a>
+as automaton definitions.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse2-chapter-imports">Imports</h4>
+<div class="paragraph">
+<p>
+For large systems, having to model the entire system in a single CIF file can
+lead to long CIF specifications. Being able to split that single CIF file into
+multiple CIF files can help. Consider the following two CIF specifications in
+CIF files <code>producer.cif</code> and <code>consumer.cif</code> respectively:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// producer.cif
+
+event provide;
+
+automaton producer:
+  location:
+    initial;
+    edge provide;
+end</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// consumer.cif
+
+import "producer.cif";
+
+automaton consumer:
+  location:
+    initial;
+    edge provide;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The two CIF specifications together form a simplified producer/consumer system.
+The <code>producer.cif</code> file declares the <code>provide</code> event and the <code>producer</code>
+automaton. The <code>producer</code> can <code>provide</code> a product.</p>
+</div>
+<div class="paragraph">
+<p>The <code>consumer.cif</code> file declares the <code>consumer</code> automaton, that can accept
+products provided by a producer. The <code>provide</code> event is not declared in that
+CIF specification. However, the <code>producer.cif</code> file is imported, which does
+declare that event. By importing another CIF specification, all declarations
+from that imported CIF specification (<code>producer.cif</code> in the example) become
+available in the importing CIF specification, i.e. in the specification that
+does the import (<code>consumer.cif</code> in the example).</p>
+</div>
+<div class="paragraph">
+<p>The result of the import in <code>consumer.cif</code> is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event provide;
+
+automaton producer:
+  location:
+    initial;
+    edge provide;
+end
+
+automaton consumer:
+  location:
+    initial;
+    edge provide;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>You can think of an import as being replaced by the content of the imported
+file. The <code>producer.cif</code> file contains only its own content, while the
+<code>consumer.cif</code> file contains the contents of both files, due to the use of
+the import.</p>
+</div>
+<div class="paragraph">
+<p>If one CIF specification is merged into another CIF specification, the names of
+the declarations in both CIF specifications must be different. It is not
+allowed to have declarations with the same name in multiple CIF specifications.
+For instance, in the example above, if the <code>provide</code> event were declared in
+both CIF specifications, the imports would be invalid. Exceptions to this rule
+are discussed in one of the next lessons, which explains the relation between
+<a href="#tut-reuse2-chapter-imports-groups">imports and groups</a>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse2-chapter-imports-libraries">Imports and libraries</h4>
+<div class="paragraph">
+<p>
+Using <a href="#tut-reuse2-chapter-imports">imports</a>, it is possible to make
+libraries that can be used by multiple CIF specifications. For instance,
+consider the following CIF specification in file <code>math.cif</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// math.cif
+
+func int inc(int x):
+  return x + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This CIF specification declares a single function <code>inc</code> that takes an integer
+number and returns that number incremented by one. Now also consider the
+following CIF specification in file <code>counter.cif</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// counter.cif
+
+import "math.cif";
+
+automaton counter:
+  disc int count = 0;
+
+  location:
+    initial;
+    edge tau do count := inc(count);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>By importing the <code>math.cif</code> file, the <code>counter</code> automaton can use the
+<code>inc</code> function. Other CIF files could similarly import the <code>math.cif</code> file,
+essentially turning <code>math.cif</code> into a library.</p>
+</div>
+<div class="paragraph">
+<p>It is possible to make a function library, consisting of commonly used
+functions, a constant library, with commonly used constants, or an automaton
+definition library, with automaton definitions. As libraries are just CIF
+files, they can contain anything as long as they are valid CIF files.
+Essentially, every CIF file that is imported in more than one other CIF file
+can be considered a library.</p>
+</div>
+<div class="paragraph">
+<p>
+The import as used above, only works if both CIF files are in the same
+directory. Library files however, are often placed in a different directory.
+Consider the same two CIF files, but organized into directories (or folders)
+as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/reuse2/library_dir_tree.png" alt="library dir tree">
+</div>
+</div>
+<div class="paragraph">
+<p>Directory <code>system</code> contains a sub-directories named <code>libraries</code>, which
+contains the <code>math.cif</code> library. The <code>system</code> directory also contains the
+<code>counter.cif</code> file. The import in the <code>counter.cif</code> file needs to be
+adapted to refer to the <code>math.cif</code> file in the <code>libraries</code> directory:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// counter.cif
+
+import "libraries/math.cif";
+
+automaton counter:
+  disc int count = 0;
+
+  location:
+    initial;
+    edge tau do count := inc(count);
+end</code></pre>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse2-chapter-imports-groups">Imports and groups</h4>
+<div class="paragraph">
+<p>
+Large systems can be hierarchically modeled using
+<a href="#tut-reuse2-chapter-groups">groups</a>. When using imports, two specifications
+may not have declarations with the same name. Groups however, are the exception
+to this rule. Consider a factory with two machines, each consisting of two
+parts. We can model this using five files, one for each of the parts of the
+machines, and one for the factory as a whole. The following CIF specifications
+show the contents of the five CIF files, where the comment at the first line
+indicates which file it is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// p1.cif
+
+group machine1:
+  automaton part1:
+    location idle:
+      initial;
+      edge tau goto running;
+
+    location running:
+      edge tau goto idle;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// p2.cif
+
+group machine1:
+  automaton part2:
+    location idle:
+      initial;
+      edge tau goto running;
+
+    location running:
+      edge tau goto idle;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// p3.cif
+
+group machine2:
+  automaton part1:
+    location idle:
+      initial;
+      edge tau goto running;
+
+    location running:
+      edge tau goto idle;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// p4.cif
+
+group machine2:
+  automaton part2:
+    location idle:
+      initial;
+      edge tau goto running;
+
+    location running:
+      edge tau goto idle;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// factory.cif
+
+import "p1.cif";
+import "p2.cif";
+import "p3.cif";
+import "p4.cif";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The four CIF specifications for the machine parts differ only in their group
+and automaton names. Their implementations are kept identical for simplicity.
+The <code>factory.cif</code> file imports all four part specifications, which together
+form the full factory. The effect of the imports in <code>factory.cif</code> is the
+following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group machine1:
+  automaton part1:
+    location idle:
+      initial;
+      edge tau goto running;
+
+    location running:
+      edge tau goto idle;
+  end
+
+  automaton part2:
+    location idle:
+      initial;
+      edge tau goto running;
+
+    location running:
+      edge tau goto idle;
+  end
+end
+
+group machine2:
+  automaton part1:
+    location idle:
+      initial;
+      edge tau goto running;
+
+    location running:
+      edge tau goto idle;
+  end
+
+  automaton part2:
+    location idle:
+      initial;
+      edge tau goto running;
+
+    location running:
+      edge tau goto idle;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For groups with the same name, the contents of the groups is merged together.
+That is, automaton <code>part1</code> in the <code>machine1</code> group from one CIF file, and
+the automaton <code>part2</code> in that same <code>machine1</code> group from another CIF file,
+end up in a single <code>machine1</code> group after eliminating the imports.</p>
+</div>
+<div class="paragraph">
+<p>In general, contents of groups with the same name are merged into a single
+group. This works also for groups in groups, groups in groups in groups, etc.
+If two CIF files that are imported both contain a group <code>a</code> and in both CIF
+files those groups contain a group <code>b</code>, then the contents of both <code>a</code>
+groups are merged, and also the contents of both <code>b</code> groups are merged. It is
+not allowed for different CIF files to have declarations with the same name in
+the same group. It is allowed to have declarations with the same name in
+different groups. The file itself (the top level) can be considered a group as
+well.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse2-chapter-namespaces">Namespaces</h4>
+<div class="paragraph">
+<p>
+
+When using <a href="#tut-reuse2-chapter-imports-groups">imports and groups</a> to model
+large hierarchical systems, it is a common pattern to have groups around the
+entire specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group factory:
+  group machine1:
+    group part1:
+      automaton sensor1:
+        ...
+      end
+
+      automaton actuator1:
+        ...
+      end
+    end
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The groups around the entire specification lead to additional
+<a href="http://en.wikipedia.org/wiki/Indentation_%28typesetting%29">indentation</a>.
+As this is a common pattern, the CIF language provides <em>namespaces</em> to reduce the
+impact of large numbers of top level groups:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">namespace factory.machine1.part1;
+
+automaton sensor1:
+  ...
+end
+
+automaton actuator1:
+  ...
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>factory.machine1.part1</code> namespace has exactly the same effect as the
+original three groups. Both specifications can thus be considered identical.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-reuse2-chapter-input-variables">Input variables</h4>
+<div class="paragraph">
+<p>
+
+<em>Input variables</em> can be used to model that some data exists, without
+specifying the value or how or when the value changes. Input variables are used
+in cases where the CIF model is to be connected something else that provides
+the values.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tut-hardware-example">Hardware example</h5>
+<div class="paragraph">
+<p>The CIF model may for instance be a controller that is to be connected to a
+piece of physical hardware. The input variables then model sensors, for which
+the behavior is not modeled in the CIF model. As an example, consider the
+following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">input bool sensor;
+
+automaton controller:
+  cont t der 1;
+  alg bool actuator = on;
+
+  location off:
+    initial;
+    edge when sensor do t := 0 goto waiting;
+
+  location waiting:
+    edge when not sensor goto off;
+    edge when t &gt; 1.5 goto on;
+
+  location on:
+    edge when not sensor goto off;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Input variable <code>sensor</code> models a digital sensor. When the sensor is on, the
+variable has value <code>true</code> and when the sensor is off, the variable has value
+<code>false</code>. When the sensor is on and when it is off is not known, and thus not
+modeled in the CIF specification.</p>
+</div>
+<div class="paragraph">
+<p>The <code>controller</code> waits (in location <code>off</code>) for the sensor to go on, and
+then resets continuous variable <code>t</code> to start measuring <code>1.5</code> time units
+(in location <code>waiting</code>). If that much time has passed, it goes to location
+<code>on</code>. If the sensor goes off then, or while it is waiting, it goes back to
+location <code>off</code>. Thus, the <code>controller</code> is only <code>on</code> if the sensor goes
+on, <code>1.5</code> time units have passed, and the sensor remains on.</p>
+</div>
+<div class="paragraph">
+<p>The <code>actuator</code> algebraic variable models that an actuator is only on if the
+<code>controller</code> is in its on location. The <code>actuator</code> is then on if the sensor
+is one, and <code>1.5</code> time units have passed. The actuator is always turned off
+when the sensor is off.</p>
+</div>
+<div class="paragraph">
+<p>Without a physical hardware system, the CIF specification is incomplete, as the
+value of the sensor is not known. The input variable acts as a placeholder for
+the actual sensor. If the CIF specification were to be coupled to a physical
+hardware system with a sensor and an actuator, the CIF model would then control
+the actuator based on the sensor values.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-co-simulation-example">Co-simulation example</h5>
+<div class="paragraph">
+<p>A CIF specification could model a part of a system, while another part of that
+same system is modeled in another system or language, such as
+<a href="http://www.mathworks.nl/products/simulink/">Simulink</a>. Consider for instance
+a tank filled with water. Water flows out of the tank constantly. By opening a
+value, water also flows in to the tank. Consider the following CIF
+specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">input real level;
+
+automaton valve:
+  disc bool open = true;
+
+  location:
+    initial;
+    edge when     open and level &gt;= 10 do open := false;
+    edge when not open and level &lt;=  2 do open := true;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The water <code>level</code> is modeled as an input variable, meaning it is obtained
+from the Simulink model. The CIF specification models the valve, and the
+controller that opens and closes the value, based on the water level. It keeps
+the level between <code>2</code> and <code>10</code>.</p>
+</div>
+<div class="paragraph">
+<p>The CIF model obtains the water level from Simulink by means of input variable
+<code>level</code>. It also provides the <code>open</code> variable of the <code>valve</code> automaton to
+Simulink. This variable can be used in Simulink to model how the water level
+changes over time.</p>
+</div>
+<div class="paragraph">
+<p>Without the Simulink model, the CIF specification is incomplete, as the water
+level is not known. The input variable acts as a placeholder for the actual
+water level. If the CIF specification were to be coupled to a Simulink model
+that models the water level, the CIF specification would control the valve
+based on the water level.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-cif-models-example">CIF models example</h5>
+<div class="paragraph">
+<p>Input variables can also be used to couple CIF models. Consider again the above
+water level controller example. It models the valve and controls the valve, but
+does not model the water level. The following CIF specification could be used
+to model the water level:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">cont level der if valve.open: 1 else -1 end;
+
+group valve:
+  input bool open;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Continuous variable <code>level</code> models the water level. The water level increases
+(derivative <code>1</code>) if the valve is open, and decreases (derivative <code>-1</code>)
+otherwise. The <code>open</code> variable from the <code>valve</code> is used, but this variable
+is an input variable, and the value is not known in this specification. Input
+variable <code>open</code> acts as a placeholder for a value, and group <code>valve</code> acts
+as a placeholder for automaton <code>valve</code>.</p>
+</div>
+<div class="paragraph">
+<p>The two CIF specifications both model a part of the system. One specification
+models the water level, and has a placeholder for the variable that indicates
+whether the valve is open. The other specification models the valve and
+controls it, but has a placeholder for the water level. If we couple the two
+CIF specifications, they provide each other with actual variables for each
+others input variables.</p>
+</div>
+<div class="paragraph">
+<p>The two specifications can be coupled or <em>merged</em> together:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">cont level = 0.0 der if valve.open: 1 else -1 end;
+
+automaton valve:
+  disc bool open = true;
+
+  location:
+    initial;
+    edge when     open and level &gt;= 10 do open := false;
+    edge when not open and level &lt;=  2 do open := true;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Using input variables to couple CIF specifications is somewhat similar to using
+<a href="#tut-reuse2-chapter-imports">imports</a> to split a CIF specification over
+multiple files. There are however important differences.</p>
+</div>
+<div class="paragraph">
+<p>The first difference is that when using imports, one CIF specification is
+coupled to another CIF specification. The coupling is hard-coded in the CIF
+specification, and can not be changed without changing the import. When using
+input variables and merging, it is possible to couple a CIF specification
+to a second CIF specification, and later couple it with a third, different
+specification instead. The decision about which models to merge can thus be
+postponed, and does not require changes to any of the CIF specifications.</p>
+</div>
+<div class="paragraph">
+<p>Another difference is that with imports it is not allowed to have declarations
+with the same name in different CIF specifications (except for groups), while
+with the merger this is allowed in many situations. See the documentation of
+the <a href="#tools-chapter-mergecif">CIF merger</a> tool for further details on what can
+be merged using that tool.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-stochastics">Stochastics</h3>
+<div class="sect3">
+<h4 id="tut-stochastics-chapter-intro">Stochastics</h4>
+<div class="paragraph">
+<p>
+For many things in the world, the behavior is not the same every time. An
+example is a
+<a href="http://en.wikipedia.org/wiki/Coin_toss">coin toss</a>,
+where
+the result can be either heads or tails. Tossing a coin exhibits
+<a href="http://en.wikipedia.org/wiki/Randomness">randomness</a>.
+It is possible to
+model the different variants in a CIF model without specifying the likelihood
+of each of the outcomes. This approach was used in the lesson on
+<a href="#tut-basics-chapter-non-determinism">non-determinism</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+It is however also possible to explicitly specify the likelihood of each of the
+outcomes in the CIF model, using a <em>stochastic distribution</em> (also called
+<a href="http://en.wikipedia.org/wiki/Probability_distribution">probability distribution</a>).
+A stochastic
+distribution describes how likely the different outcomes are. There are many
+different stochastic distributions. The
+<a href="http://en.wikipedia.org/wiki/Bernoulli_distribution">Bernoulli distribution</a>
+for instance, can be
+used to model things with two potential outcomes, such as a coin toss.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton coin_toss:
+  disc dist bool d = bernoulli(0.5);
+  disc bool outcome;
+
+  location toss:
+    initial;
+    edge do (outcome, d) := sample d goto result;
+
+  location result:
+    edge when     outcome goto heads;
+    edge when not outcome goto tails;
+
+  location heads:
+    edge tau goto toss;
+
+  location tails:
+    edge tau goto toss;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>d</code> holds a stochastic distribution that produces
+<a href="#tut-values-chapter-booleans">boolean values</a> (<code>true</code> or <code>false</code>), as
+indicated by its <code>dist bool</code>
+<a href="#tut-values-chapter-types-values-exprs">type</a>. In this case it holds a
+Bernoulli distribution, with a probability of <code>0.5</code> (or chance of 50%) for
+<code>true</code>, and thus also the same probability/chance for <code>false</code> (the only
+other possible outcome).</p>
+</div>
+<div class="paragraph">
+<p>The <code>bernoulli</code> function is used to create a Bernoulli distribution with the
+proper parameter (probability of <code>0.5</code> for <code>true</code>). Different distributions
+have different parameters. See the language reference documentation for further
+details. Distribution functions, such as the <code>bernoulli</code> function can be used
+to create distributions with specific parameters, and may only be used to
+initialize discrete variables.</p>
+</div>
+<div class="paragraph">
+<p>
+Initially, the automaton is in its <code>toss</code> location, where the coin can be
+tossed. The edge uses the <code>sample</code> operator to get a <em>sample</em> from the
+bernoulli distribution. Each time the distribution is sampled, the <code>outcome</code>
+is either a <code>true</code> value or a <code>false</code> value. As we used a probability of
+<code>0.5</code> for both outcomes, half of the times <code>true</code> will be the outcome,
+and the other half of the times <code>false</code> will be the outcome, if we were to
+sample infinitely many times.</p>
+</div>
+<div class="paragraph">
+<p>Sampling does not only result in the <code>outcome</code>, but also the distribution
+itself. This is further explained in one of the next lessons, which explains
+<a href="#tut-stochastics-chapter-pseudo-randomness">pseudo-randomness</a>.</p>
+</div>
+<div class="paragraph">
+<p>The result of sampling is stored in the <code>outcome</code> variable. In the <code>result</code>
+location, the sampling result is used to make a decision to go to either the
+<code>heads</code> location (<code>true</code> outcome) or the <code>tails</code> location (<code>false</code>
+outcome). From there, it is possible to go back to the <code>toss</code> location, to
+proceed with the next coin toss.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-stochastics-chapter-discrete-continuous-constant">Discrete, continuous, and constant distributions</h4>
+<div class="paragraph">
+<p>CIF features over a dozen different stochastic distributions. These
+distributions can be categorized into three categories: discrete, continuous,
+and constant distributions. Discrete distributions can result in only a limited
+number of possible values. Examples include tossing a coin (heads and tails)
+and throwing a dice (six possible outcomes). Continuous distributions can
+result in all values from a certain range. Examples include the time it takes
+for a machine to produce a single product (positive amount of time), and the
+purity of produced medicine (0% to 100%). Constant distributions are discrete
+distributions that always result in the same sampled value. They are useful
+during the development of a model, or for debugging. The remainder of this
+lesson further explains these three categories, and illustrates them using some
+examples.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tut-discrete-distributions">Discrete distributions</h5>
+<div class="paragraph">
+<p>Discrete distributions can result in only a limited number of possible values.
+The lesson that <a href="#tut-stochastics-chapter-intro">introduced stochastics</a>
+used the discrete
+<a href="http://en.wikipedia.org/wiki/Bernoulli_distribution">Bernoulli distribution</a>
+to model
+<a href="http://en.wikipedia.org/wiki/Coin_toss">tossing of a coin</a>, which can result
+in either heads or tails.</p>
+</div>
+<div class="paragraph">
+<p>Throwing a
+<a href="http://en.wikipedia.org/wiki/Dice">dice</a>
+can result in six
+possible outcomes: 1, 2, 3, 4, 5, and 6. For a fair dice, each of the outcomes
+is equally likely, with chance 1/6. This can be modeled using a
+<a href="http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)">discrete uniform distribution</a>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton dice:
+  disc dist int d = uniform(1, 7);
+  disc int result;
+  disc list int results = [];
+
+  location throw:
+    initial;
+    edge do (result, d) := sample d goto add;
+
+  location add:
+    edge do results := results + [result] goto throw;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>uniform</code> function is used to create a uniform integer distribution that
+produces <a href="#tut-values-chapter-integers">integer</a> samples from the range
+[1..7) (inclusive on the left side, exclusive on the right side). Each sample
+is stored in <code>result</code> and added to the <code>results</code>. If we were to simulate
+this model forever, the <code>results</code> list would contain equal amounts of each of
+the six values.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-continuous-distributions">Continuous distributions</h5>
+<div class="paragraph">
+<p>Continuous distributions return a value from a continuous range. An example is
+the weight of
+<a href="http://en.wikipedia.org/wiki/Penny_(United_States_coin)">pennies</a>.
+This
+could for instance be approximated using a continuous
+<a href="http://en.wikipedia.org/wiki/Normal_distribution">normal distribution</a>
+with a
+<a href="http://en.wikipedia.org/wiki/Mean">mean</a>
+of 2.46 grams and a
+<a href="http://en.wikipedia.org/wiki/Variance">variance</a>
+of 0.0004 grams:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton pennies:
+  disc dist int d = normal(2.46, 0.0004);
+
+  location:
+    initial;
+    edge do (weight, d) := sample d;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>normal</code> function is used to create a normal distribution with a mean of
+<code>2.46</code> and a variance of <code>0.0004</code>. The sampled weight is stored in the
+<code>weight</code> variable each time the distribution is sampled. The probability of
+the different weights as a result of the used normal distribution is depicted
+in the following figure:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tutorial/stochastics/pennies.png" alt="pennies">
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-constant-distributions">Constant distributions</h5>
+<div class="paragraph">
+<p>When developing a model with stochastic behavior, it can be hard to validate
+whether the model behaves correctly, since the stochastic results make it
+difficult to predict the outcome of experiments. As a result, errors in the
+model may not be noticed, as they hide in the noise of the stochastic results.
+One solution is to first make a model without stochastic behavior, validate
+that model, and then extend the model with stochastic sampling. Extending the
+model with stochastic behavior is however an invasive change that may introduce
+new errors. These errors can again be hard to find due to the difficulties to
+predict the outcome of an experiment. The constant distributions aim to narrow
+the gap by reducing the amount of changes that need to be done after
+validation.</p>
+</div>
+<div class="paragraph">
+<p>With constant distributions, a stochastic model with sampling of distributions
+is developed, but the stochastic behavior is eliminated by temporarily using
+constant distributions. The model performs stochastic sampling of values, but
+with predictable outcome, and thus with predictable experimental results,
+making validation easier. After validating the model, the constant
+distributions are replaced with the distributions that fit the mean value and
+variation pattern of the modeled system, giving a model with stochastic
+behavior. Changing the used distributions is however much less invasive, making
+it less likely to introduce new errors at this stage in the development of the
+model.</p>
+</div>
+<div class="paragraph">
+<p>Constant distributions always produce the same sampled value. Consider the
+following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton dice:
+  disc dist int d = constant(3); // Constant distribution.
+  disc int result;
+  disc list int results = [];
+
+  location throw:
+    initial;
+    edge do (result, d) := sample d goto add;
+
+  location add:
+    edge do results := results + [result] goto throw;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This model is identical to the dice model one used earlier in this lesson,
+except for distribution variable <code>d</code>, which now holds a constant distribution
+that only produces value <code>3</code> when sampled.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tut-stochastics-chapter-pseudo-randomness">Pseudo-randomness</h4>
+<div class="paragraph">
+<p>So far, the lessons on stochastics used the mathematical notion of stochastic
+distribution to describe how to model stochastic behavior. Simulating a model
+with stochastic behavior using a computer is however not stochastic at all.
+Computer systems are deterministic machines, and have no notion of varying
+results.</p>
+</div>
+<div class="sect4">
+<h5 id="tut-pseudorandom-number-generator-and-seed">Pseudorandom number generator and seed</h5>
+<div class="paragraph">
+<p>A
+<a href="http://en.wikipedia.org/wiki/Pseudorandom_number_generator">pseudorandom number generator</a>
+is used to
+create stochastic results instead. It starts with an initial
+<a href="http://en.wikipedia.org/wiki/Random_seed">seed</a>,
+an integer number. From
+this seed, a function creates a stream of 'random' values. When looking at the
+values there does not seem to be any pattern. It is not truly random however.
+Using the same seed again gives exactly the same stream of numbers. This is the
+reason to call the function a pseudorandom number generator, as a true random
+number generator would never produce the exact same stream of numbers.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-simulation-and-initial-seed">Simulation and initial seed</h5>
+<div class="paragraph">
+<p>A sample of a distribution uses one or more numbers from the stream to compute
+its value. The value of the <em>initial seed</em> thus decides the value of all
+samples drawn in the simulation. By default, a different seed is used each time
+you run a simulation, leading to different results each time. You can also
+explicitly state what seed you want to use when simulating a model. See the
+<a href="#tools-cifsim-chapter-distr-seeds">Stochastic distributions and seeds</a> page of the simulator for information on how
+to supply a custom seed for simulation.</p>
+</div>
+<div class="paragraph">
+<p>While doing a stochastic simulation study, performing several experiments with
+the same initial seed invalidates the results, as it is equivalent to copying
+the outcome of a single experiment a number of times. On the other hand, when
+looking for the cause of a bug in the model, performing the exact same
+experiment is useful as outcomes of previous experiments should match exactly.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tut-sampling-and-tuple-results">Sampling and tuple results</h5>
+<div class="paragraph">
+<p>The seed determines the next sampled value. Whenever a distribution is sampled,
+the seed changes to the one that follows in the stream of random numbers
+generated by the pseudorandom number generator. This ensures that the next time
+the distribution is sampled, it results in a different sampled value.</p>
+</div>
+<div class="paragraph">
+<p>In CIF, the seed is stored with the distribution and its parameters. Therefore,
+sampling does not only result in the sampled value, it also results in an
+updated distribution, with the same parameters, but a different seed value.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton coin_toss:
+  disc dist bool d = bernoulli(0.5);
+  disc bool outcome;
+
+  location:
+    initial;
+    edge do (outcome, d) := sample d goto result;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>bernoulli</code> function to create a
+<a href="http://en.wikipedia.org/wiki/Bernoulli_distribution">Bernoulli distribution</a>
+with parameter <code>0.5</code>
+(the chance for <code>true</code>). This Bernoulli distribution, along with its
+parameter and the seed, are stored in variable <code>d</code>. When the distribution
+in variable <code>d</code> is sampled (<code>sample d</code>), the result is both a sampled
+value, and a distribution (as a <a href="#tut-values-chapter-tuples">tuple</a>). The
+distribution is the same distribution with the same parameters, but with an
+updated seed. The sampled value is usually stored in a variable (<code>outcome</code>
+in this case). The changed distribution is usually assigned to the same
+variable that contains the distribution that is sampled, to ensure that we can
+use the same variable for the next sampling. In other words, variable <code>d</code>
+is updated with the changed distribution each time it is sampled. The result
+of sampling is assigned to two variables, using
+<a href="#lang-tut-values-tuples-unpacking">tuple unpacking</a>.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tut-language-extensions">Language extensions</h3>
+<div class="sect3">
+<h4 id="tut-extensions-chapter-synthesis">Supervisory controller synthesis</h4>
+<div class="paragraph">
+<p>
+Supervisory controller synthesis (or supervisor synthesis, or just synthesis)
+is a generative technique, where one derives a supervisory controller from a
+collection of plants and requirements. Synthesis allows to focus on the <em>what</em>,
+i.e. which requirements should hold, rather than on the <em>how</em>, i.e. how to
+implement this in a controller.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div id="lang-tut-extensions-synthesis-plant-req-sup" class="paragraph">
+<p>The <em>plants</em> describe capabilities or behavior of a physical system 'as is',
+without any integrated control. They represent the available behavior of the
+uncontrolled system. <em>Requirements</em> model (a part of) the functions a system is
+supposed to perform. They represents behavior that is allowed in the controlled
+system, or more precisely, they specify the behavior that is not allowed in the
+controlled system. In other words, requirements restrict the behavior of the
+plants, to ensure that only the desired behavior remains. The goal of
+supervisory controller synthesis is to compute a supervisory controller (or
+<em>supervisor</em>) that enforces the requirements, assuming the behavior of the
+plants, additionally preventing deadlock and livelock, and without restricting
+the system any further than is required.</p>
+</div>
+<div class="paragraph">
+<p>It is beyond the scope of the CIF language tutorial to go into the details of
+supervisory controller synthesis. However, CIF has several features that are
+used solely of modeling systems for the purpose of supervisory controller
+synthesis:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-tut-extensions-synthesis-autkind">Automaton kinds</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-extensions-synthesis-invkind">Invariant kinds</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-extensions-synthesis-evtctrl">Event controllability</a></p>
+</li>
+<li>
+<p><a href="#lang-tut-extensions-synthesis-marked">Marker predicates</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>These concepts are explained below. When a model is not used for supervisory
+controller synthesis, e.g. for simulation, these concepts are usually ignored.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+</p>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-extensions-synthesis-autkind">Automaton kinds</h5>
+<div class="paragraph">
+<p>For supervisory controller synthesis, different kinds of automata are treated
+in different ways. Regular automata, as used in the language tutorial so far,
+are specified using only the <code>automaton</code> keyword. Regular automata do not
+specify a kind for supervisory controller synthesis, and are therefore
+sometimes also referred to as kindless automata. Synthesis tools typically
+require knowledge about the purpose of each of the automata, and therefore
+don&#8217;t support regular automata.</p>
+</div>
+<div class="paragraph">
+<p>For supervisory controller synthesis, three different kinds of automata are
+available: plant automata, requirement automata, and supervisor automata. These
+automata are identical to regular automata, except for the keywords used to
+declare their intent. The <code>automaton</code> keyword is preceded or replaced by the
+<code>plant</code>, <code>requirement</code>, or <code>supervisor</code> keyword respectively.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following are two alternative ways to model the same plant
+automaton:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Plant automaton, long form.
+plant automaton lamp:
+  event turn_on, turn_off;
+
+  location off:
+    initial;
+    edge turn_on goto on;
+
+  location on:
+    edge turn_off goto off;
+end
+
+// Plant automaton, short form.
+plant lamp:
+  event turn_on, turn_off;
+
+  location off:
+    initial;
+    edge turn_on goto on;
+
+  location on:
+    edge turn_off goto off;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-extensions-synthesis-invkind">Invariant kinds</h5>
+<div class="paragraph">
+<p>Similar to automata, different kinds of invariants are treated in different
+ways for supervisory controller synthesis. Invariants can be declared as plant,
+requirement, or supervisor invariants, by preceding or replacing the
+<code>invariant</code> keyword with a <code>plant</code>, <code>requirement</code>, or <code>supervisor</code>
+keyword respectively.</p>
+</div>
+<div class="paragraph">
+<p>For instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">invariant lamp.on or lamp.off;      // Regular/kindless invariant.
+
+plant lamp:
+  event turn_on, turn_off;
+
+  requirement invariant not off;    // Explicit requirement invariant. Long form.
+  requirement not off;              // Explicit requirement invariant. Short form.
+
+  location off:
+    initial;
+    edge turn_on goto on;
+
+  location on:
+    edge turn_off goto off;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first invariant, above the <code>lamp</code> automaton, does not specify an
+additional supervisory kind keyword, are is therefore a regular invariant, also
+called a kindless invariant. The second invariant, in the <code>lamp</code> automaton,
+explicitly specifies a <code>requirement</code> kind and is therefore a requirement
+invariant. The third and last invariant is identical to the second invariant,
+except that the <code>invariant</code> keyword has been omitted. It is also a
+requirement invariant, but written in a shorter form.</p>
+</div>
+<div id="lang-tut-extensions-synthesis-invkind-implicit" class="paragraph">
+<p>Invariants without an additional keyword to specify their supervisory kind, are
+regular invariants or kindless invariants. However, if such an invariant is
+placed in an automaton that has a supervisory kind, the invariant inherits the
+supervisory kind of that automaton. This is a deprecated feature that will
+result in a warning. To get rid of the warning, explicitly specify the
+supervisory kind of the invariant.</p>
+</div>
+<div class="paragraph">
+<p>For instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant lamp:
+  event turn_on, turn_off;
+
+  invariant on or off;          // Inherits 'plant' kind from automaton.
+  plant invariant on or off;    // Explicit plant invariant. Long form.
+  plant on or off;              // Explicit plant invariant. Short form.
+
+  location off:
+    initial;
+    edge turn_on goto on;
+
+  location on:
+    edge turn_off goto off;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first invariant has no explicit supervisory kind specified, and therefore
+inherits the <code>plant</code> supervisory kind from the automaton. It is thus an
+invariant that is implicitly a plant invariant. This results in a warning. The
+second invariant is identical, except for the explicit specification of the
+<code>plant</code> kind. It is also a plant invariant, but due to the explicit kind
+specification, there is no warning. The third and last invariant is identical
+to the second invariant, except that the <code>invariant</code> keyword has been
+omitted. It is also explicitly a plant invariant, but written in a shorter
+form. Due to the explicit use of the <code>plant</code> keyword, this variant also gets
+no warning.</p>
+</div>
+<div class="paragraph">
+<p>There are two forms of invariants:
+<a href="#tut-data-chapter-stat-invariants">state invariants</a> and
+<a href="#tut-data-chapter-stat-evt-excl-invariants">state/event exclusion invariants</a>. Both forms can be used for
+synthesis. For instance, consider the following example of a counter:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant counter:
+  controllable increment, decrement;
+  disc int x = 0;
+
+  plant invariant 0 &lt;= x and x &lt;= 10;
+
+  requirement increment needs x &lt; 8;
+
+  location:
+    initial;
+    edge increment do x := x + 1;
+    edge decrement do x := x - 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The counter can be incremented and decremented. The plant invariant specifies
+that it is not possible for the counter to count negative values, or values
+more than 10. It is a requirement that synthesis ensures that the counter can
+only be incremented as long as the counted value is less than 8.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-extensions-synthesis-evtctrl">Event controllability</h5>
+<div class="paragraph">
+<p>Supervisory controller synthesis distinguishes two kinds of
+<a href="#lang-tut-basics-automata-events">events</a>: controllable events and
+uncontrollable events.</p>
+</div>
+<div class="paragraph">
+<p>Uncontrollable events are events that a supervisor can not prohibit, and are
+usually related to sensors. A typical example are events that indicate that a
+button has been pushed or released. A button is essentially a sensor that is
+on if the user pushes the button, and off if the user doesn&#8217;t push it. The
+supervisor can not prevent a user from physically pushing or releasing a
+button, and can also not determine when the user pushes or releases it. The
+supervisor thus also can not prevent the events from occurring.</p>
+</div>
+<div class="paragraph">
+<p>Another example is an event that indicates that a moving part has reached its
+outer position (limit sensor turns on). If the part reaches its outer position,
+the event will occur. The supervisor can not control the sensor, as it is
+physically linked to the position of the moving part.</p>
+</div>
+<div class="paragraph">
+<p>Controllable events may be restricted by a supervisor, and are usually related
+to actuators. Typical examples are events used to turn a motor on or off, to
+turn a lamp on or off, or to change the direction of movement.</p>
+</div>
+<div class="paragraph">
+<p>Even though a supervisor may not be able to control a limit sensor directly,
+and thus restrict the corresponding events, it may be able to influence it
+indirectly. For instance, a motor may be available that makes it possible for
+the part to move. That motor may then be controlled using controllable on and
+off events. Stopping the motor then makes the part stop moving, ensuring that
+the part never reaches its outer position, indirectly preventing the limit
+sensor from turning on, and the corresponding event from happening.</p>
+</div>
+<div class="paragraph">
+<p>Events and <a href="#tut-channels-chapter-intro">channels</a> in CIF are declared
+using the <code>event</code> keyword. For controllable events, the <code>event</code> keyword
+may be preceded or replaced by the <code>controllable</code> keyword. Similarly,
+for uncontrollable events, the <code>event</code> keyword may be preceded or replaced
+by the <code>uncontrollable</code> keyword. Similar to event declarations, for
+<a href="#lang-tut-reuse2-aut-def-param-kinds-event">event parameters</a> the
+<code>event</code> keyword may by preceded or replaced by the <code>controllable</code> or
+<code>uncontrollable</code> keyword, for controllable and uncontrollable event
+parameters respectively.</p>
+</div>
+<div class="paragraph">
+<p>As a convention, controllable events are given names that start with <code>c_</code>,
+and uncontrollable events are given names that start with <code>u_</code>. This allows
+them to be highlighted in different colors.</p>
+</div>
+<div class="paragraph">
+<p>For instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">controllable c_on, c_off;
+uncontrollable u_pushed, u_released;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-tut-extensions-synthesis-marked">Marker predicates</h5>
+<div class="paragraph">
+<p>Marking is very weak form of liveness, and is used by supervisory controller
+synthesis to prevent livelocks, to ensure progress. It is also used to prevent
+deadlocks. A supervisor per definition ensures that a marked state can always
+be reached, for the entire system. A system is marked if all its automata are
+marked. An automaton is marked if its active location is a marked location. In
+literature, marked location are also called <em>safe</em> locations. Note that
+deadlock in marked states is not prevented, as a marker state (the state
+itself) can be reached by not taking any transition. In literature, marked
+deadlock states are also called <em>final</em> states.</p>
+</div>
+<div class="paragraph">
+<p>Marking can be specified using <em>marker predicates</em>. Locations can be marked
+using the <code>marked</code> keyword, as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant lamp:
+  controllable c_turn_on, c_turn_off;
+
+  location off:
+    initial;
+    marked;
+    edge c_turn_on goto on;
+
+  location on:
+    edge c_turn_off goto off;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this example location <code>off</code> is both initial and marked, while location
+<code>on</code> is neither initial nor marked.</p>
+</div>
+<div class="paragraph">
+<p>Marker predicates are very similar to
+<a href="#tut-data-chapter-init-preds">initialization predicates</a>, as by default,
+locations are not marked, similar to how by default locations are not initial.
+Marker predicates can be specified in locations, automata,
+<a href="#tut-reuse2-chapter-groups">groups</a>, and the top level of the specification
+(which can be seen as a group), similar to initialization predicates.</p>
+</div>
+<div class="paragraph">
+<p>The following specification shows an example of a variable that is only marked
+for a certain value:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant counter:
+  controllable c_increment, c_decrement;
+  disc int[0..10] count = 0;
+
+  marked count = 0;
+
+  location off:
+    initial;
+    marked;
+    edge c_increment do count := count + 1;
+    edge c_decrement do count := count - 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable <code>count</code> of plant automaton <code>counter</code> is only marked if it has
+value zero. That is, the entire system can only be marked if <code>count</code> is zero.
+Supervisor synthesis will ensure that it is always possible to get back to a
+state where <code>count</code> is zero.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="lang-ref-chapter-index">Language reference</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The documentation in this language reference manual serves as reference.
+It is not intended to be read from beginning to end, but more to look up
+specific information when needed. The reference documentation generally
+provides detailed and complete information, but this information may not
+always be presented in the most accessible way.</p>
+</div>
+<div class="paragraph">
+<p>The information is divided into categories. The following categories and
+information is part of the language reference documentation:</p>
+</div>
+<div class="paragraph">
+<p><em>Syntax</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-ref-syntax-lexical">Lexical syntax</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-syntax-grammar">Grammar</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect2">
+<h3 id="lang-ref-syntax-lexical">Lexical syntax</h3>
+<div class="paragraph">
+<p>This page describes the CIF lexical syntax.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-keywords">Keywords</h4>
+<div class="paragraph">
+<p><em>Language keywords</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg            disc       group       post          switch
+alphabet       dist       id          pre           tau
+any            do         if          print         text
+attr           edge       import      printfile     time
+automaton      elif       initial     real          to
+bool           else       input       requirement   true
+break          end        int         return        tuple
+case           enum       invariant   self          type
+const          equation   list        set           uncontrollable
+cont           event      location    string        urgent
+continue       false      marked      supervisor    value
+controllable   file       monitor     svgcopy       void
+def            final      namespace   svgfile       when
+der            for        needs       svgin         while
+dict           func       now         svgmove
+disables       goto       plant       svgout</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>Trigonometric functions</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">acosh   asin    cosh   sin
+acos    atanh   cos    tanh
+asinh   atan    sinh   tan</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>General functions</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">abs    empty   ln    pop     sign
+cbrt   exp     log   pow     size
+ceil   floor   max   round   sqrt
+del    fmt     min   scale</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>Distributions</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">bernoulli   erlang        lognormal   triangle
+beta        exponential   normal      uniform
+binomial    gamma         poisson     weibull
+constant    geometric     random</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>Expression operators</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">and   mod   sample
+div   not   sub
+in    or</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-terminals">Terminals</h4>
+<div class="paragraph">
+<p>Besides the keyword terminals listed above, CIF features several other
+terminals:</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>IDENTIFIERTK</code></dt>
+<dd>
+<p>An identifier. Defined by the regular expression:
+<code>[$]?[a-zA-Z_][a-zA-Z0-9_]*</code>. They thus consist of letters, numbers
+and underscore characters (<code>_</code>). Identifiers may not start with a
+numeric digit. Keywords take priority over identifiers. To use a
+keyword as an identifier, prefix it with a <code>$</code> character.
+The <code>$</code> is not part of the identifier name.</p>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">apple       // identifier
+bear        // identifier
+int         // keyword
+$int        // identifier 'int' (override keyword priority with $)</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>RELATIVENAMETK</code></dt>
+<dd>
+<p>A relative name. Defined by the regular expression:
+<code>[$]?[a-zA-Z_][a-zA-Z0-9_]*(\.[$]?[a-zA-Z_][a-zA-Z0-9_]*)+</code>.
+It thus consists of two or more <code>IDENTIFIERTK</code> joined together
+with periods (<code>.</code>).</p>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">some_automaton.some_location</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>ABSOLUTENAMETK</code></dt>
+<dd>
+<p>An absolute name. Absolute names can be used to refer to objects that are
+otherwise hidden. It represents an absolute name from the root of the
+current scope.</p>
+<div class="paragraph">
+<p>Defined by the regular expression:
+<code>\.[$]?[a-zA-Z_][a-zA-Z0-9_]*(\.[$]?[a-zA-Z_][a-zA-Z0-9_]*)*</code>.
+It starts with a period (<code>.</code>), and then follows an <code>IDENTIFIER</code> or
+<code>RELATIVENAMETK</code>.</p>
+</div>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">.some_event
+.some_group.some_event</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>ROOTNAMETK</code></dt>
+<dd>
+<p>A root name. Absolute names can be used to refer to objects that are
+otherwise hidden. It represents an absolute name from the root the current
+specification.</p>
+<div class="paragraph">
+<p>Defined by the regular expression:
+<code>\^[$]?[a-zA-Z_][a-zA-Z0-9_]*(\.[$]?[a-zA-Z_][a-zA-Z0-9_]*)*</code>.
+It starts with a circumflex accent (<code>^</code>), and then follows an <code>IDENTIFIER</code> or
+<code>RELATIVENAMETK</code>.</p>
+</div>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">^some_group.some_event</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>NUMBERTK</code></dt>
+<dd>
+<p>An integer literal. Defined by the regular expression: <code>0|[1-9][0-9]*</code>.
+Integers thus consist of numeric digits. Only for the number <code>0</code> may an
+integer literal start with <code>0</code>. E.g. <code>02</code> is invalid.</p>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">0
+1
+123</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>REALTK</code></dt>
+<dd>
+<p>A real literal. Defined by the regular expression:
+<code>(0|[1-9][0-9]*)(\.[0-9]+|(\.[0-9]+)?[eE][\-\+]?[0-9]+)</code>.
+Simple double literals consist of an integer literal followed by
+a period (<code>.</code>) and some numeric digits. Double literals using scientific
+notation start with either an integer literal or a simple double literal.
+They then contain either an <code>e</code> or <code>E</code>, followed by the exponent.
+The exponent consists of numeric digits, optionally preceded by <code>+</code> or <code>-</code>.</p>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">0.0
+1e5
+1E+03
+1.05e-78</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>STRINGTK</code></dt>
+<dd>
+<p>A string literal. Defined by the regular expression:
+<code>\"([^\\\"\n]|\\[nt\\\"])*\"</code>. String literals are enclosed in double
+quotes (<code>"</code>). String literals must be on a single line and must thus not
+include new line characters (<code>\n</code>, Unicode U+0A). To include a double quote
+(<code>"</code>) in a string literal, it must be escaped as <code>\"</code>. Since a
+backslash (<code>\</code>) serves as escape character, to include a backslash in a string
+literal it must be escaped as <code>\\</code>. To include a tab character in a string
+literal, use <code>\t</code>. To include a newline in a string literal, use <code>\n</code>.</p>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">"hello world"
+"first line\nsecond line"</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-whitespace">Whitespace</h4>
+<div class="paragraph">
+<p>CIF supports spaces, tabs, and new line characters as whitespace.
+Whitespace is ignored (except in string literals), but can be used to separate
+tokens as well as for layout purposes. The use of tab characters is allowed,
+but should be avoided if possible, as layout will be different for text
+editors with different tab settings. You may generally format a CIF
+script as you see fit, and start on a new line when desired.</p>
+</div>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Normal layout.
+int x = 5;
+
+// Alternative layout.
+int
+  x    =
+    5
+  ;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-comments">Comments</h4>
+<div class="paragraph">
+<p>CIF features two types of comments. Single line comments start with
+<code>//</code> and end at end of the line. Multi line comments start with <code>/*</code> and
+end at <code>*/</code>. Comments are ignored.</p>
+</div>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">int x = 5; // Single line comment.
+
+int /* some comment */ x = /* some
+  more comments
+  and some more
+ end of the multi line comment */ 5;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="lang-ref-syntax-grammar">Grammar</h3>
+<div class="paragraph">
+<p>Below, the <a href="http://en.wikipedia.org/wiki/Formal_grammar">grammar</a> of the
+CIF language is shown, in a form closely resembling
+<a href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form">Backus-Naur Form</a>
+(BNF). The <code>Specification</code>
+<a href="http://en.wikipedia.org/wiki/Nonterminal_symbol">non-terminal</a> is the
+<a href="http://en.wikipedia.org/wiki/Start_symbol_(formal_languages)">start symbol</a>
+of the grammar. Text between quotes are terminals. Names using only upper case
+letters are defined in the <a href="#lang-ref-syntax-lexical">lexical syntax</a>. The
+remaining names are the non-terminals of the grammar.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-bnf" data-lang="bnf">Specification : GroupBody
+              ;
+
+GroupBody : OptGroupDecls
+          ;
+
+AutomatonBody : OptAutDecls Locations OptIoDecls
+              ;
+
+OptGroupDecls : /* empty */
+              | OptGroupDecls GroupDecl
+              ;
+
+GroupDecl : Decl
+          | "import" Imports ";"
+          | "namespace" IDENTIFIERTK ";"
+          | "namespace" RELATIVENAMETK ";"
+          | "func" Types Identifier FuncParams ":" FuncBody
+          | Identifier ":" Name ActualParms ";"
+          | "group"                "def" Identifier FormalParms ":" GroupBody     "end"
+          | OptSupKind "automaton" "def" Identifier FormalParms ":" AutomatonBody "end"
+          |    SupKind             "def" Identifier FormalParms ":" AutomatonBody "end"
+          | "group"                      Identifier             ":" GroupBody     "end"
+          | OptSupKind "automaton"       Identifier             ":" AutomatonBody "end"
+          |    SupKind                   Identifier             ":" AutomatonBody "end"
+          ;
+
+OptAutDecls : /* empty */
+            | OptAutDecls AutDecl
+            ;
+
+AutDecl : Decl
+        | "alphabet" Events ";"
+        | "alphabet" ";"
+        | "monitor" Events ";"
+        | "monitor" ";"
+        | "disc" Type DiscDecls ";"
+        ;
+
+Decl : "type" TypeDefs ";"
+     | "enum" Identifier "=" "{" Identifiers "}" ";" // Deprecated
+     | "enum" Identifier "=" Identifiers ";"
+     | OptControllability "event"           Identifiers ";"
+     | OptControllability "event" EventType Identifiers ";"
+     |    Controllability                   Identifiers ";"
+     |    Controllability         EventType Identifiers ";"
+     | "const" Type ConstantDefs ";"
+     | "alg" Type AlgVarsDefs ";"
+     | "input" Type Identifiers ";"
+     | "cont" ContDecls ";"
+     | "equation" Equations ";"
+     | "initial" Expressions ";"
+     | InvariantDecls
+     | "marked" Expressions ";"
+     | IoDecl
+     ;
+
+Identifier : IDENTIFIERTK
+           ;
+
+Imports : StringToken
+        | Imports "," StringToken
+        ;
+
+StringToken : STRINGTK
+            ;
+
+TypeDefs : Identifier "=" Type
+         | TypeDefs "," Identifier "=" Type
+         ;
+
+ConstantDefs : Identifier "=" Expression
+             | ConstantDefs "," Identifier "=" Expression
+             ;
+
+AlgVarsDefs : Identifier
+            | Identifier "=" Expression
+            | AlgVarsDefs "," Identifier
+            | AlgVarsDefs "," Identifier "=" Expression
+            ;
+
+FuncParams : "(" ")"
+           | "(" FuncParamDecls ")"
+           ;
+
+FuncParamDecls : Type Identifiers
+               | FuncParamDecls ";" Type Identifiers
+               ;
+
+FuncBody : FuncVarDecls FuncStatements "end"
+         | StringToken ";"
+         ;
+
+FuncVarDecls : /* empty */
+             | FuncVarDecls Type FuncVarDecl ";"
+             ;
+
+FuncVarDecl : Identifier
+            | Identifier "=" Expression
+            | FuncVarDecl "," Identifier
+            | FuncVarDecl "," Identifier "=" Expression
+            ;
+
+FuncStatements : FuncStatement
+               | FuncStatements FuncStatement
+               ;
+
+FuncStatement : Addressables ":=" Expressions ";"
+              | "if" Expressions ":" FuncStatements
+                OptElifFuncStats OptElseFuncStat "end"
+              | "while" Expressions ":" FuncStatements "end"
+              | "break" ";"
+              | "continue" ";"
+              | "return" Expressions ";"
+              ;
+
+OptElifFuncStats : /* empty */
+                 | OptElifFuncStats "elif" Expressions ":" FuncStatements
+                 ;
+
+OptElseFuncStat : /* empty */
+                | "else" FuncStatements
+                ;
+
+Events : Name
+       | Events "," Name
+       ;
+
+CoreEdge : EdgeEvents         OptEdgeGuard OptEdgeUrgent OptEdgeUpdate
+         | "when" Expressions              OptEdgeUrgent OptEdgeUpdate
+         | "now"                                         OptEdgeUpdate
+         | "do" Updates
+         ;
+
+OptEdgeGuard : /* empty */
+             | "when" Expressions
+             ;
+
+OptEdgeUrgent : /* empty */
+              | "now"
+              ;
+
+OptEdgeUpdate : /* empty */
+              | "do" Updates
+              ;
+
+EdgeEvents : EdgeEvent
+           | EdgeEvents "," EdgeEvent
+           ;
+
+EdgeEvent : "tau"
+          | Name
+          | Name "!"
+          | Name "!" Expression
+          | Name "?"
+          ;
+
+Locations : Location
+          | Locations Location
+          ;
+
+Location : "location" ";"
+         | "location" Identifier ";"
+         | "location" ":" LocationElements
+         | "location" Identifier ":" LocationElements
+         ;
+
+LocationElements : LocationElement
+                 | LocationElements LocationElement
+                 ;
+
+LocationElement : "initial" ";"
+                | "initial" Expressions ";"
+                | InvariantDecls
+                | "equation" Equations ";"
+                | "marked" ";"
+                | "marked" Expressions ";"
+                | "urgent" ";"
+                | "edge" CoreEdge ";"
+                | "edge" CoreEdge "goto" Identifier ";"
+                ;
+
+ActualParms : "(" ")"
+            | "(" Expressions ")"
+            ;
+
+FormalParms : "(" ")"
+            | "(" FormalDecls ")"
+            ;
+
+FormalDecls : FormalDeclaration
+            | FormalDecls ";" FormalDeclaration
+            ;
+
+FormalDeclaration : OptControllability "event"           EventParamIds
+                  | OptControllability "event" EventType EventParamIds
+                  |    Controllability                   EventParamIds
+                  |    Controllability         EventType EventParamIds
+                  | Name Identifiers
+                  | "location" Identifiers
+                  | "alg" Type Identifiers
+                  ;
+
+EventParamIds : EventParamId
+              | EventParamIds "," EventParamId
+              ;
+
+EventParamId : Identifier OptEventParamFlags
+             ;
+
+OptEventParamFlags : /* empty */
+                   | OptEventParamFlags EventParamFlag
+                   ;
+
+EventParamFlag : "!"
+               | "?"
+               | "~"
+               ;
+
+DiscDecls : DiscDecl
+          | DiscDecls "," DiscDecl
+          ;
+
+DiscDecl : Identifier
+         | Identifier "in" "any"
+         | Identifier "=" Expression
+         | Identifier "in" "{" Expressions "}"
+         ;
+
+ContDecls : ContDecl
+          | ContDecls "," ContDecl
+          ;
+
+ContDecl : Identifier OptDerivative
+         | Identifier "=" Expression OptDerivative
+         ;
+
+OptDerivative : /* empty */
+              | "der" Expression
+              ;
+
+Equations : Equation
+          | Equations "," Equation
+          ;
+
+Equation : Identifier "'" "=" Expression
+         | Identifier "=" Expression
+         ;
+
+InvariantDecls : OptSupKind "invariant" Invariants ";"
+               |    SupKind             Invariants ";"
+               ;
+
+Invariants : Invariant
+           | Invariants "," Invariant
+           ;
+
+Invariant : Expression
+          | Name                  "needs"    Expression
+          | NonEmptySetExpression "needs"    Expression
+          | Expression            "disables" Name
+          | Expression            "disables" NamesSet
+          ;
+
+NamesSet : "{" Names "}"
+         ;
+
+Names : Name
+      | Names "," Name
+      ;
+
+Updates : Update
+        | Updates "," Update
+        ;
+
+Update : Addressable ":=" Expression
+       | "if" Expressions ":" Updates
+         OptElifUpdates OptElseUpdate "end"
+       ;
+
+Addressables : Addressable
+             | Addressables "," Addressable
+             ;
+
+Addressable : Identifier
+            | Identifier Projections
+            | "(" Addressable "," Addressables ")"
+            ;
+
+Projections : Projection
+            | Projections Projection
+            ;
+
+Projection : "[" Expression "]"
+           ;
+
+OptElifUpdates : /* empty */
+               | OptElifUpdates "elif" Expressions ":" Updates
+               ;
+
+OptElseUpdate : /* empty */
+              | "else" Updates
+              ;
+
+Identifiers : Identifier
+            | Identifiers "," Identifier
+            ;
+
+OptSupKind : /* empty */
+           | SupKind
+           ;
+
+OptControllability : /* empty */
+                   | Controllability
+                   ;
+
+Controllability : "controllable"
+                | "uncontrollable"
+                ;
+
+///////////////////////////////////////////////////////////////////////////////
+
+OptIoDecls : /* empty */
+           | OptIoDecls IoDecl
+           ;
+
+IoDecl : SvgFile
+       | SvgCopy
+       | SvgMove
+       | SvgOut
+       | SvgIn
+       | PrintFile
+       | Print
+       ;
+
+SvgFile : "svgfile" StringToken ";"
+        ;
+
+OptSvgFile : /* empty */
+           | "file" StringToken
+           ;
+
+SvgCopy : "svgcopy" "id" Expression OptSvgCopyPre OptSvgCopyPost OptSvgFile ";"
+        ;
+
+OptSvgCopyPre : /* empty */
+              | "pre" Expression
+              ;
+
+OptSvgCopyPost : /* empty */
+               | "post" Expression
+               ;
+
+SvgMove : "svgmove" "id" Expression "to" Expression "," Expression
+          OptSvgFile ";"
+        ;
+
+SvgOut : "svgout" "id" Expression SvgAttr "value" Expression OptSvgFile
+         ";"
+       ;
+
+SvgAttr : "attr" StringToken
+        | "text"
+        ;
+
+SvgIn : "svgin" "id" Expression "event" SvgInEvent OptSvgFile ";"
+      ;
+
+SvgInEvent : Name
+           | "if" Expression ":" Name OptSvgInEventElifs "else" Name "end"
+           | "if" Expression ":" Name SvgInEventElifs "end"
+           ;
+
+OptSvgInEventElifs : /* empty */
+                   | SvgInEventElifs
+                   ;
+
+SvgInEventElifs : "elif" Expression ":" Name
+                | SvgInEventElifs "elif" Expression ":" Name
+                ;
+
+PrintFile : "printfile" StringToken ";"
+          ;
+
+Print : "print" PrintTxt OptPrintFors OptPrintWhen OptPrintFile ";"
+      ;
+
+PrintTxt : Expression
+         | "pre" Expression
+         | "post" Expression
+         | "pre" Expression "post" Expression
+         ;
+
+OptPrintFors : /* empty */
+             | "for" PrintFors
+             ;
+
+PrintFors : PrintFor
+          | PrintFors "," PrintFor
+          ;
+
+PrintFor : "event"
+         | "time"
+         | Name
+         | "initial"
+         | "final"
+         ;
+
+OptPrintWhen : /* empty */
+             | "when" Expression
+             | "when" "pre" Expression
+             | "when" "post" Expression
+             | "when" "pre" Expression "post" Expression
+             ;
+
+OptPrintFile : /* empty */
+             | "file" StringToken
+             ;
+
+///////////////////////////////////////////////////////////////////////////////
+
+Types : Type
+      | Types "," Type
+      ;
+
+EventType : "void"
+          | Type
+          ;
+
+Type : "bool"
+     | "int"
+     | "int" "[" Expression ".." Expression "]"
+     | "real"
+     | "string"
+     | "list" Type
+     | "list" "[" Expression "]" Type
+     | "list" "[" Expression ".." Expression "]" Type
+     | "set" Type
+     | "dict" "(" Type ":" Type ")"
+     | "tuple" "(" Fields ")"
+     | "func" Type "(" ")"
+     | "func" Type "(" Types ")"
+     | "dist" Type
+     | Name
+     ;
+
+Fields : Field
+       | Fields ";" Field
+       ;
+
+Field : Type Identifiers
+      ;
+
+///////////////////////////////////////////////////////////////////////////////
+
+Expressions : Expression
+            | Expressions "," Expression
+            ;
+
+OptExpression : /* empty */
+              | Expression
+              ;
+
+Expression : OrExpression
+           | OrExpression "=&gt;" OrExpression
+           | OrExpression "&lt;=&gt;" OrExpression
+           ;
+
+OrExpression : AndExpression
+             | OrExpression "or" AndExpression
+             ;
+
+AndExpression : CompareExpression
+              | AndExpression "and" CompareExpression
+              ;
+
+CompareExpression : AddExpression
+                  | CompareExpression "&lt;"  AddExpression
+                  | CompareExpression "&lt;=" AddExpression
+                  | CompareExpression "="  AddExpression
+                  | CompareExpression "!=" AddExpression
+                  | CompareExpression "&gt;=" AddExpression
+                  | CompareExpression "&gt;"  AddExpression
+                  | CompareExpression "in" AddExpression
+                  | CompareExpression "sub" AddExpression
+                  ;
+
+AddExpression : MulExpression
+              | AddExpression "+" MulExpression
+              | AddExpression "-" MulExpression
+              ;
+
+MulExpression : UnaryExpression
+              | MulExpression "*" UnaryExpression
+              | MulExpression "/" UnaryExpression
+              | MulExpression "div" UnaryExpression
+              | MulExpression "mod" UnaryExpression
+              ;
+
+UnaryExpression : FuncExpression
+                | "-" UnaryExpression
+                | "+" UnaryExpression
+                | "not" UnaryExpression
+                | "sample" FuncExpression
+                ;
+
+FuncExpression : ExpressionFactor
+               | FuncExpression "[" Expression "]"
+               | FuncExpression
+                 "[" OptExpression ":" OptExpression "]"
+               | FuncExpression "(" ")"
+               | FuncExpression "(" Expressions ")"
+               | StdLibFunction "(" ")"
+               | StdLibFunction "(" Expressions ")"
+               ;
+
+ExpressionFactor : "true"
+                 | "false"
+                 | NUMBERTK
+                 | REALTK
+                 | StringToken
+                 | "time"
+                 | "[" "]"
+                 | "[" Expressions "]"
+                 | "{" "}"
+                 | NonEmptySetExpression
+                 | "{" DictPairs "}"
+                 | "(" Expression "," Expressions ")"
+                 | "&lt;" Type "&gt;" ExpressionFactor
+                 | "if" Expressions ":" Expression
+                   OptElifExprs "else" Expression "end"
+                 | "switch" Expression ":" SwitchBody "end"
+                 | "(" Expression ")"
+                 | Name
+                 | Name "'"
+                 | "?"
+                 | "self"
+                 ;
+
+NonEmptySetExpression : "{" Expressions "}"
+                      ;
+
+DictPairs : Expression ":" Expression
+          | DictPairs "," Expression ":" Expression
+          ;
+
+OptElifExprs : /* empty */
+             | OptElifExprs "elif" Expressions ":" Expression
+             ;
+
+SwitchBody : SwitchCases
+           | SwitchCases "else" Expression
+           |             "else" Expression
+           ;
+
+SwitchCases : "case" Expression ":" Expression
+            | SwitchCases "case" Expression ":" Expression
+            ;
+
+Name : Identifier
+     | RELATIVENAMETK
+     | ABSOLUTENAMETK
+     | ROOTNAMETK
+     ;
+
+SupKind : "plant"
+        | "requirement"
+        | "supervisor"
+        ;
+
+StdLibFunction : "acosh"
+               | "acos"
+               | "asinh"
+               | "asin"
+               | "atanh"
+               | "atan"
+               | "cosh"
+               | "cos"
+               | "sinh"
+               | "sin"
+               | "tanh"
+               | "tan"
+               | "abs"
+               | "cbrt"
+               | "ceil"
+               | "del"
+               | "empty"
+               | "exp"
+               | "floor"
+               | "fmt"
+               | "ln"
+               | "log"
+               | "max"
+               | "min"
+               | "pop"
+               | "pow"
+               | "round"
+               | "scale"
+               | "sign"
+               | "size"
+               | "sqrt"
+               | "bernoulli"
+               | "beta"
+               | "binomial"
+               | "constant"
+               | "erlang"
+               | "exponential"
+               | "gamma"
+               | "geometric"
+               | "lognormal"
+               | "normal"
+               | "poisson"
+               | "random"
+               | "triangle"
+               | "uniform"
+               | "weibull"
+               ;</code></pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="tools-chapter-index">Tools</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Below you can find information about the individual applications of the CIF toolset.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="paragraph">
+<p><strong>Applications</strong></p>
+</div>
+<div class="paragraph">
+<p>The CIF toolset consists of applications that cover a wide range of
+functionality. The available applications are listed below, categorized by the
+different phases of the development process.</p>
+</div>
+<div class="paragraph">
+<p><em>Specification</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-chapter-text-editor">CIF text editor</a></p>
+</li>
+<li>
+<p><a href="#tools-chapter-cif2yed">CIF to yEd transformer</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><em>Supervisory controller synthesis</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-chapter-datasynth">Data-based supervisory controller synthesis</a></p>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-index">Event-based synthesis toolset</a></p>
+</li>
+<li>
+<p><a href="#tools-chapter-cif2supremica">CIF to Supremica transformer</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><em>Simulation, validation, and visualization</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-chapter-index">CIF simulator</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><em>Verification</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-chapter-cif2mcrl2">CIF to mCRL2 transformer</a></p>
+</li>
+<li>
+<p><a href="#tools-chapter-cif2uppaal">CIF to UPPAAL transformer</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><em>Real-time testing, code generation, and implementation</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-codegen-chapter-index">CIF code generator</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2plc-chapter-index">CIF PLC code generator</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><em>Miscellaneous</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-index">CIF to CIF transformer</a></p>
+</li>
+<li>
+<p><a href="#tools-chapter-mergecif">CIF merger</a></p>
+</li>
+<li>
+<p><a href="#tools-chapter-event-disabler">CIF event disabler</a></p>
+</li>
+<li>
+<p><a href="#tools-chapter-cif-explorer">CIF explorer</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="paragraph">
+<p><strong>Scripting</strong></p>
+</div>
+<div class="paragraph">
+<p>The CIF tools can be used on the command line, as well as in the
+Eclipse IDE. They can also be used in ToolDef scripts. The following additional
+information is available on scripting related to CIF and ToolDef scripts:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-scripting-chapter-intro">Introduction to scripting</a></p>
+</li>
+<li>
+<p><a href="#tools-scripting-chapter-tools">Overview of scriptable tools</a></p>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="tools-specification-tools">Specification tools</h3>
+<div class="sect3">
+<h4 id="tools-chapter-text-editor">CIF text editor</h4>
+<div class="paragraph">
+<p>
+Part of the CIF tooling is a textual editor for CIF specifications. This
+editor is part of the Eclipse IDE. Below is a list of some of the more
+notable features of this text editor:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>continuous background validation (integrated parsing and type checking), with
+error markings directly in the source</p>
+</li>
+<li>
+<p>comment spell checking</p>
+</li>
+<li>
+<p>code folding</p>
+</li>
+<li>
+<p>commands to comment/uncomment the (partially) selected line or lines</p>
+</li>
+<li>
+<p>block selection mode</p>
+</li>
+<li>
+<p>detection of external changes to files</p>
+</li>
+<li>
+<p>shows line numbers</p>
+</li>
+<li>
+<p>drag-and-drop editing</p>
+</li>
+<li>
+<p>optionally can show whitespace characters</p>
+</li>
+<li>
+<p>configurable tab key settings</p>
+</li>
+<li>
+<p>automatic removal of trailing whitespace from all lines on save</p>
+</li>
+<li>
+<p>automatic addition of a new line character at the end of the file on save,
+if none is present (includes smart detection of the platform dependent new
+line characters that are used in the file)</p>
+</li>
+</ul>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./screenshot_ide.png" alt="Screenshot CIF text editor">
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-chapter-cif2yed">CIF to yEd transformer</h4>
+<div class="paragraph">
+<p>
+
+
+The CIF to yEd transformer can be used to transform CIF specifications to
+yEd diagrams. Several <a href="#tools-cif2yed-diagram-kinds">kinds of diagrams</a>
+can be generated. These diagrams can be used to better understand the
+specification, to communicate the specification to other, or to be included in
+reports.</p>
+</div>
+<div class="paragraph">
+<p>The
+<a href="http://www.yworks.com/en/products/yfiles/yed/">yEd Graph Editor</a>
+is an
+application that can be used to view, create, edit, arrange, import and export
+various kinds of diagrams. It is freely available and runs on Windows, Linux,
+and macOS.</p>
+</div>
+<div class="paragraph">
+<p>The yEd diagrams are generated as
+<a href="http://graphml.graphdrawing.org/">GraphML</a>
+files (<code>*.graphml</code> files), using yEd specific extensions to specify the
+graphical representation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-transformation">Starting the transformation</h5>
+<div class="paragraph">
+<p>The transformation can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<b class="menuref">Convert CIF to yEd diagram&#8230;&#8203;</b>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<b class="menuref">Convert CIF to yEd diagram&#8230;&#8203;</b>.</p>
+</li>
+<li>
+<p>Use the <code>cif2yed</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cif2yed</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2yed-options">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file path</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file path</em>: The absolute or relative local file system path to the
+output yEd/GraphML diagram file. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>.kind.graphml</code> file extension is added. For the added default file
+extension, <code>kind</code> is replaced by the diagram kind (see other option), e.g.
+<code>model</code>, resulting in file extension <code>.model.graphml</code>. If multiple
+diagrams are generated, the output file path may not be specified. In such
+cases, either use the implicit/default file names, or generate one diagram at
+a time, allowing you to specify an explicit output file path for each of
+them.</p>
+</li>
+<li>
+<p><em>Diagram kinds</em>: The kinds of diagrams to generate. The default is to
+generate all the different kinds of diagrams. See the
+<a href="#tools-cif2yed-diagram-kinds">Diagram kinds</a> section for details.</p>
+</li>
+<li>
+<p><em>Syntax highlighting</em>: Whether to apply syntax highlighting (if option is
+enabled), or use plain text (if option is disabled). By default, syntax
+highlighting is enabled. For large diagrams, disabling syntax highlighting
+can significantly improve the performance, when displaying the diagrams in
+yEd.</p>
+</li>
+<li>
+<p><em>Transparent edge labels</em>: Enable option to use a transparent background for
+edge labels. Disable option to use a light gray background. By default, the
+option is disabled (a light gray background is used). See the
+<a href="#tools-cif2yed-layout">Layout</a> section below for further details.</p>
+</li>
+<li>
+<p><em>Model filters</em>: The kinds of features to include in the diagram. Only
+applies to model diagrams. See the <a href="#tools-cif2yed-diagram-model">Model diagram</a> section
+for details.</p>
+</li>
+<li>
+<p><em>Relations</em>: The kinds of relations to include in relations diagrams. The
+default is to include all kinds of relations. See the
+<a href="#tools-cif2yed-diagram-relations">Relations diagram</a> section for details.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-supported-specifications">Supported specifications</h5>
+<div class="paragraph">
+<p>For <a href="#tools-cif2yed-diagram-model">model diagrams</a>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>This transformation supports all CIF specifications.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For <a href="#tools-cif2yed-diagram-relations">relations diagrams</a>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CIF specifications with
+<a href="#lang-tut-reuse2-aut-def-param-kinds-aut">component parameters</a> are not
+supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-preprocessing">Preprocessing</h5>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this transformation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2yed-diagram-kinds">Diagram kinds</h5>
+<div class="paragraph">
+<p>Several types of diagrams can be created. They are each described below. Using
+the <em>Diagram kinds</em> option (see the <a href="#tools-cif2yed-options">Options</a> section
+above), generation of certain kind of diagrams can be enabled or disabled.</p>
+</div>
+<div class="paragraph">
+<p>In the option dialog, each diagram kind can be enabled and disabled
+individually, using a checkbox.</p>
+</div>
+<div class="paragraph">
+<p>From the command line, using the <code>-k</code> or <code>--diagram-kinds</code> option, the
+names of the diagram kinds, as indicates for each diagram kind in the sections
+below, should be used, separated by commas. By default, i.e. when the <code>-k</code> or
+<code>--diagram-kinds</code> option is not used, diagrams are generated for all the
+different kinds. As an example, consider <code>-k model</code> or
+<code>--diagram-kinds=model</code>. Only a model diagram is generated, while all
+other diagrams are not generated.</p>
+</div>
+<div class="paragraph">
+<p>The diagram kinds that are specified using the option replace the default
+diagram kinds. However, it is also possible to specify additions and removals
+relative to the default features, by prefixing features with a <code>+</code> or <code>-</code>
+respectively. For instance, when using <code>-k -model</code> or
+<code>--diagram-kinds=-model</code> the default diagrams are generated, except for the
+model diagram (due to <code>-model</code>). Replacements (no prefix) may not be
+combined with additions/removals (<code>+</code> or <code>-</code> prefix).</p>
+</div>
+<div class="paragraph">
+<p>Specifying a replacement diagram kind twice leads to a warning being printed to
+the console. Adding a diagram kind that is already present or removing a
+diagram kind that is not present, also leads to a warning being printed.
+A warning is also printed to the console if all diagram kinds are disabled, and
+thus no output is generated.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2yed-diagram-model">Model diagram</h6>
+<div class="paragraph">
+<p>The option value to use on the command line, for this kind of diagrams, is
+<code>model</code>.</p>
+</div>
+<div class="paragraph">
+<p>A diagram of the model itself, with all its details. That is, the diagram can
+be used instead of the textual representation of the model, without loss of
+details. Changes with respect to the textual representation include among
+others elimination of <a href="#tut-reuse2-chapter-imports">imports</a>, and the loss
+of comments and textual layout.</p>
+</div>
+<div class="paragraph">
+<p>All components (<a href="#tut-basics-chapter-automata">automata</a>,
+<a href="#tut-reuse2-chapter-groups">groups</a>, automaton
+<a href="#tut-reuse2-chapter-aut-def-inst">instantiations</a>, and group
+instantiations) and components
+<a href="#tut-reuse2-chapter-aut-def-inst">definitions</a> (automata and group
+definitions) are visualized in a hierarchical manner, as rectangles contained
+in other rectangles. Automaton and group instantiations are grouped together
+into a single node in the diagram. All of them can be closed (collapsed) and
+opened (expanded) in yEd, allowing to hide unimportant details while focusing
+on only a part of the diagram. The header of the component or component
+definition is shown at the top of the rectangle, while for instantiations the
+word <code>Instantiations</code> is used as header. For groups and group definitions an
+italic font is used, while for automata, automaton definitions, and
+automaton/group instantiations, a regular font is used. The background (of the
+header) is colored as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_color_comp_header.png" alt="cif2yed color comp header"></span>
+A component (group/automaton)</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_color_def_header.png" alt="cif2yed color def header"></span>
+A component definition (group/automaton definition)</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_color_inst_header.png" alt="cif2yed color inst header"></span>
+A component instantiation (group/automaton instantiation)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For instantiations, the complete instantiations are shown as code block in the
+body of the rectangle.</p>
+</div>
+<div class="paragraph">
+<p>For the declarations (e.g.
+<a href="#tut-data-chapter-discrete-variables">variables</a>),
+<a href="#tut-data-chapter-stat-invariants">invariants</a>, I/O declarations (e.g.
+<a href="#tools-cifsim-output-svgviz-chapter-cifsvg">SVG declarations</a>), etc a block of
+code is used. Code blocks use header and background colors that are distinct
+from the colors used for components, component definitions, and component
+instantiations:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_color_code_header.png" alt="cif2yed color code header"></span>
+A code block (header)</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_color_code_bg.png" alt="cif2yed color code bg"></span>
+A code block (background)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For automata, the <a href="#lang-tut-basics-automata-location">locations</a> are
+visualized as rectangles with rounded colors. Their names (if applicable),
+invariants, equations, etc are shown as code in the rectangles. The
+<a href="#tut-data-chapter-init-preds">initialization</a> of the location (if present
+and not <code>false</code>) is visualized as an incoming arrow without source location,
+with a label indicating the initialization predicates if they are not <code>true</code>.
+<a href="#lang-tut-basics-edge">Edges</a> are visualized as arrows between locations,
+with arrows to the source location itself for self loop edges. The events,
+guards, <code>now</code> keywords (for <a href="#tut-time-chapter-urgency">urgent</a> edges),
+and updates are put as labels on the edges. Locations use a background color
+that is distinct from the colors used for components, component definitions,
+and code blocks:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_color_loc_bg.png" alt="cif2yed color loc bg"></span>
+A location (background)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>As an example consider the following diagram of the CIF <code>tank</code> example:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cif2yed/tank.model.layouted.png" alt="tank.model.layouted">
+</div>
+</div>
+<div class="paragraph">
+<p>Using the <em>Model filters</em> option (see the <a href="#tools-cif2yed-options">Options</a> section
+above), certain features of the model can be included or excluded from the
+diagram. The table below indicates the features that can be enabled and
+disabled using the option. The first column lists the names to use on the
+command line. The second column indicates whether the feature is enabled
+(included) by default. The third column describes what parts of the model are
+included/excluded when the feature is enabled/disabled.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Name</th>
+<th class="tableblock halign-left valign-top">Default</th>
+<th class="tableblock halign-left valign-top">Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>io</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The I/O declarations, e.g. <a href="#tools-cifsim-output-svgviz-chapter-cifsvg">SVG declarations</a>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>decls</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The declarations of the components. Includes the alphabet (if explicitly
+specified) and monitors of the automata, event declarations, constant
+declarations, variable declarations, function declarations, invariants,
+initialization predicates, marker predicates, equations, etc.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>loc-decls</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The declarations of the locations. Includes the invariants, marker
+predicates, equations, and urgency.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>guards</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The guards of the edges. Includes also the urgency of the edge (the
+<code>now</code>) keyword.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>updates</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The updates of the edges.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>In the option dialog, each of the features can be enabled and disabled
+individually, using a checkbox.</p>
+</div>
+<div class="paragraph">
+<p>From the command line, using the <code>-f</code> or <code>--model-filters</code> option, the
+names of the different features, as indicates in the first column of the table
+above, should be used, separated by commas. The features indicated as default
+in the second column of the table, are enabled when default settings are used,
+i.e. when the <code>-f</code> or <code>--model-filters</code> option is not used. As an example,
+consider <code>-f guards,updates</code> or <code>--model-filters=guards,updates</code>. Only
+the guards and updates are included, while all the other features are excluded.</p>
+</div>
+<div class="paragraph">
+<p>The features that are specified using the option replace the default features.
+However, it is also possible to specify additions and removals relative to the
+default features, by prefixing features with a <code>+</code> or <code>-</code> respectively. For
+instance, when using <code>-f -loc-decls,+io</code> or
+<code>--model-filters=-loc-decls,+io</code> the default features are used, with the
+declarations of the locations disabled (due to <code>-loc-decls</code>), and with I/O
+declarations enabled (due to <code>+io</code>). Replacements (no prefix) may not be
+combined with additions/removals (<code>+</code> or <code>-</code> prefix).</p>
+</div>
+<div class="paragraph">
+<p>Specifying a replacement feature type twice leads to a warning being printed to
+the console. Adding a feature that is already present or removing a feature
+that is not present, also leads to a warning being printed.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2yed-diagram-relations">Relations diagram</h6>
+<div class="paragraph">
+<p>The option value to use on the command line, for this kind of diagrams, is
+<code>relations</code>.</p>
+</div>
+<div class="paragraph">
+<p>A diagram of only the <a href="#lang-tut-basics-automata-events">event</a> and
+data relations. The diagram can be used to see which events are used by which
+<a href="#tut-basics-chapter-automata">automata</a> (are in the
+<a href="#tut-basics-chapter-alphabet">alphabet</a> of those automata). It can also be
+used to see which data (variables, locations, etc) exist in the model and where
+they are used. Furthermore, it can also be used to see how events and data are
+passed via automaton and group
+<a href="#tut-reuse2-chapter-aut-def-inst">instantiations</a>. Events, variables, and
+locations can thereby potentially be renamed if the
+<a href="#tut-reuse2-chapter-aut-def-params">parameters</a> of the
+corresponding automaton or <a href="#tut-reuse2-chapter-groups">group</a>
+<a href="#tut-reuse2-chapter-aut-def-inst">definitions</a> have different names than
+the events, variables, and locations that are passed via the instantiations.</p>
+</div>
+<div class="paragraph">
+<p>All components (automata, groups, automaton instantiations, and group
+instantiations) and component definitions (automaton and group definitions) are
+visualized in a hierarchical manner, as rectangles contained in other
+rectangles. Automaton and group instantiations are unfolded to their contents
+(the body of the corresponding automaton or group definition). Essentially, it
+is as if component definition/instantiation has been
+<a href="#tools-cif2cif-chapter-elim-comp-def-inst">eliminated</a>, but the parameters are
+kept. Within components and component definition bodies, the components
+(including the component instantiations) and declarations (event declarations,
+event parameters, algebraic variables, algebraic parameters, locations, etc)
+are separated from the component definitions, using additional wrapping boxes.
+Such wrapping boxes are only added if both components and component definitions
+are present, and thus separation is needed.</p>
+</div>
+<div class="paragraph">
+<p>However, all internal details of component instantiations are omitted, as they
+can be seen in the graphical representations of component definitions (that are
+instantiated by the instantiations). That is, only the external connections are
+included, as they show the actual relations (definition here and use there,
+synchronizations between components, etc). By excluding the internal details,
+duplication is avoided for multiple instantiations of the same definition. All
+empty components and components definitions are also excluded, as they only
+clutter the diagram, and have no relations whatsoever.</p>
+</div>
+<div class="paragraph">
+<p>All components can be closed (collapsed) and opened (expanded) in yEd, allowing
+to hide unimportant details while focusing on only a part of the diagram. By
+default, all components are closed (collapsed). This allows seeing the top
+level structure. By selectively opening (expanding) components, more details
+can be shown. It is also possible to focus on a single component, to show only
+that component and its contents, by selecting
+<span class="menuseq"><b class="menu">Grouping</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">View Group Content</b></span>
+in yEd, while a closed or
+opened component is selected.</p>
+</div>
+<div class="paragraph">
+<p>The header of the component is shown at the top of the rectangle. It includes
+the name of the component or component definition, whether it is a group or
+automaton, whether it is a definition or not, etc. The parameters of component
+definitions, and the arguments of component instantiations, are all omitted
+from the headers. For wrappers either <em>Components</em> or <em>Component definitions</em>
+is used as header text. For groups, group definitions, and group instantiations
+an italic font is used, while for automata, automaton definitions, automaton
+instantiations, and wrapping boxes, a regular font is used. The background of
+the header is colored as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_color_comp_header.png" alt="cif2yed color comp header"></span>
+A component (group/automaton)</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_color_def_header.png" alt="cif2yed color def header"></span>
+A component definition (group/automaton definition)</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_color_inst_header.png" alt="cif2yed color inst header"></span>
+A component instantiation (group/automaton instantiation)</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_color_wrap_box_header.png" alt="cif2yed color wrap box header"></span>
+A wrapping box for components (incl. instantiations) or component definitions</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Event <a href="#lang-tut-basics-automata-events">declarations</a>,
+<a href="#tut-data-chapter-discrete-variables">discrete variables</a>,
+<a href="#tut-time-chapter-continuous-variables">continuous variables</a>,
+<a href="#tut-reuse1-chapter-algebraic-variables">algebraic variables</a>,
+<a href="#tut-reuse2-chapter-input-variables">input variables</a>, and
+<a href="#lang-tut-basics-automata-location">locations</a> are all visualized as
+rectangles with a thick border. The text in the rectangle is a keyword
+(<code>event</code>, <code>disc</code>, <code>cont</code>, etc), followed by the name of the declaration.
+For <a href="#tut-channels-chapter-intro">channels</a> (events with a data type), the
+name is followed by <code>!?~</code>.</p>
+</div>
+<div class="paragraph">
+<p>Event, location, and algebraic
+<a href="#tut-reuse2-chapter-aut-def-params">parameters</a> are visualized as
+octagons with a thin dashed border. The text in the rectangle is a keyword
+(<code>event</code>, <code>location</code>, etc), followed by the name of the parameter. For
+<a href="#tut-channels-chapter-intro">channels</a> (events with a data type), the name
+is followed by the <a href="#lang-tut-reuse2-aut-def-param-kinds-event-restrictions">event parameter usage restriction flags</a> (e.g. <code>!</code> for send,
+<code>?</code> for receive, and/or <code>~</code> for synchronization). For channel parameters
+without flags, <code>!?~</code> is used as text after the name of the parameter.</p>
+</div>
+<div class="paragraph">
+<p>Uses of events and data are visualized as circles. For uses of events by
+automata (event in the alphabet of the automaton), the circles indicate the
+type of use: <code>!</code> if the automaton sends over the channel, <code>?</code> if the
+automaton receives over the channel, and no text if the automaton
+<a href="#tut-basics-chapter-synchronizing-events">synchronizes</a> over the event (the
+event is in the alphabet of the automaton). For data uses, the circles never
+contain text.</p>
+</div>
+<div class="paragraph">
+<p>Different colors are used for declarations, parameters, and uses, as well as
+for events and data:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_event_decl.png" alt="cif2yed event decl"></span>
+An event declaration</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_event_param.png" alt="cif2yed event param"></span>
+An event parameter</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_event_usage_send.png" alt="cif2yed event usage send"></span>
+An event usage (automaton sends)</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_event_usage_recv.png" alt="cif2yed event usage recv"></span>
+An event usage (automaton receives)</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_event_usage_sync.png" alt="cif2yed event usage sync"></span>
+An event usage (automaton synchronizes)</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_data_decl.png" alt="cif2yed data decl"></span>
+A variable declaration or a location</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_data_param.png" alt="cif2yed data param"></span>
+A location parameter or an algebraic parameter</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2yed/cif2yed_data_usage.png" alt="cif2yed data usage"></span>
+A data (variable, location, parameter) usage in a component</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Each event usage is coupled to the event declaration or event parameter that it
+refers to, using a directed or undirected edge. For synchronizing usage an
+undirected edge is used, for send usage a directed edge from the usage to the
+event declaration or event parameter is used, and for receive usage a directed
+edge from the event declaration or event parameter to the usage is used.</p>
+</div>
+<div class="paragraph">
+<p>Each data usage in a component not related to a declaration (variable,
+location, or parameter) gets a circular node to indicate usage. It is coupled
+to the declaration it uses, via a directed edge from the declaration to the
+use, to indicate the flow of data. Duplicate edges are avoided.</p>
+</div>
+<div class="paragraph">
+<p>Event parameters of component instantiations are coupled to the actual event
+(or event parameter) that is provided by the instantiation, using a directed or
+undirected edge. If the parameter is a channel parameter that explicitly allows
+sending (has a <code>!</code> flag) and doesn&#8217;t allow receiving (has no <code>?</code> flag), a
+directed edge from the parameter to the actual event is used. If it explicitly
+allows receiving (has <code>?</code> flag) and doesn&#8217;t allow sending (has no <code>!</code>
+flag), a directed edge from the actual event to the parameter is used. If it
+explicitly allows both sending and receiving (has both a <code>!</code> and a <code>?</code>
+flag), a bidirectional edge is used. In all other cases, an undirected edge is
+used.</p>
+</div>
+<div class="paragraph">
+<p>Location parameters of component instantiations are coupled to the actual
+location (or location parameter) that is provided by the instantiation, using a
+directed edge from the actual location to the parameter, to indicate the flow
+of data. Similarly, algebraic parameters are related to the actual arguments.
+However, for algebraic parameters, an
+<a href="#tut-values-chapter-types-values-exprs">expression</a> may be provided. For
+each variable, location, and parameter used in the actual argument, a directed
+edge is added. Duplicate edges are avoided.</p>
+</div>
+<div class="paragraph">
+<p>From declarations (variables, locations, parameters), directed edges are
+included in the diagram for all relations to other declarations. For instance,
+if a discrete variable is initialized using the value of an algebraic variable,
+there will be an edge from the algebraic variable to the discrete variable.
+Similarly, if in a continuous variable is used in a guard, there will be an
+edge from the continuous variable to the location that contains the edge.
+Duplicate edges are avoided.</p>
+</div>
+<div class="paragraph">
+<p>As an example consider the following relations diagram of the CIF
+'machine/buffer' example, showing only the event relations:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cif2yed/machine_buffer.events.layouted.png" alt="machine buffer.events.layouted">
+</div>
+</div>
+<div class="paragraph">
+<p>Using the <em>Relations</em> option (see the <a href="#tools-cif2yed-options">Options</a> section
+above), certain kinds of relations included or excluded from the diagram. By
+default all kinds of relations are included. The following kinds of relations
+are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>event relations (<code>event</code>)</p>
+</li>
+<li>
+<p>data relations (<code>data</code>)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In the option dialog, each of the features can be enabled and disabled
+individually, using a checkbox.</p>
+</div>
+<div class="paragraph">
+<p>From the command line, using the <code>-r</code> or <code>--relations</code> option, the
+names of the different kinds of relations, as indicates between parentheses
+above, should be used, separated by commas. As an example, consider
+<code>-r event</code> or <code>--relations=event</code>. Only the event relations are included,
+while all the other relations are excluded.</p>
+</div>
+<div class="paragraph">
+<p>The kinds that are specified using the option replace the default kinds.
+However, it is also possible to specify additions and removals relative to the
+default kinds, by prefixing names with a <code>+</code> or <code>-</code> respectively. For
+instance, when using <code>-r -event</code> or <code>--relations=-event</code> the default kinds
+are used, with the event relations excluded (due to <code>-event</code>). Replacements
+(no prefix) may not be combined with additions/removals (<code>+</code> or <code>-</code>
+prefix).</p>
+</div>
+<div class="paragraph">
+<p>Specifying a replacement kind type twice leads to a warning being printed to
+the console. Adding a kind that is already present or removing a kind that is
+not present, also leads to a warning being printed. Finally, generating a
+relations diagram without any relations also leads to a warning being printed.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2yed-layout">Layout</h5>
+<div class="paragraph">
+<p>The generated diagrams can be opened in the yEd Diagram Editor using
+<span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Open&#8230;&#8203;</b></span>. After opening the diagram, all nodes
+overlap, as the generated diagrams don&#8217;t contain any positions for them. yEd
+can automatically layout the diagram. Several layout algorithms are available
+in the
+<b class="menuref">Layout</b>
+menu.</p>
+</div>
+<div class="paragraph">
+<p>Good results for <a href="#tools-cif2yed-diagram-model">model diagrams</a> can often
+be obtained by using the
+<b class="button">Orthogonal layout</b>.
+Select
+<span class="menuseq"><b class="menu">Layout</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Orthogonal</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Classic</b></span> to show the
+'Orthogonal Layout' window. Click the
+<b class="button">Dock</b>
+button to dock
+the window. Once docked, select
+<b class="button">Integrated</b>
+for
+<b class="button">Edge Labeling</b>
+and
+<b class="button">Free</b>
+for
+<b class="button">Edge Label Model</b>.
+Also enable the
+<b class="button">Length Reduction</b>
+and
+<b class="button">Consider Node Labels</b>
+options. Press the
+<b class="button">Apply changes</b>
+button (the green rectangle) at the top of the docked window to apply the
+changes to the layout.</p>
+</div>
+<div class="paragraph">
+<p>You may want to try different values for the 'Grid' option, to get
+more or less spacing between nodes. Once you change a value, just apply the new
+layout, as before. The automatic layout algorithms aren&#8217;t perfect, but they are
+usually a good starting point.</p>
+</div>
+<div class="paragraph">
+<p>By default, edge labels have a light gray background. This makes them easier
+to read when placed on the edges. By changing the 'Edge Label Model' from
+'Free' to 'Side Slider' , labels are not placed on the
+edges, but besides them. However, this often leads to some overlap, requiring
+manual layouting. If the 'Side Slider' variant is used, you may want
+to change the background of the edge labels to be transparent. This can be
+achieved by enabling the <em>Transparent edge labels</em> option (see the
+<a href="#tools-cif2yed-options">Options</a> section above).</p>
+</div>
+<div class="paragraph">
+<p>Good results for <a href="#tools-cif2yed-diagram-relations">relations diagrams</a>
+can often be obtained using the 'One-Click Layout' functionality of
+yEd. Select <span class="menuseq"><b class="menu">Layout</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">One-Click Layout</b></span> or use the
+corresponding toolbar button. This option is only available in yEd 3.14 or
+newer.</p>
+</div>
+<div class="paragraph">
+<p>You can also close (collapse) and open (expand) groups and apply the layout
+again.</p>
+</div>
+<div class="paragraph">
+<p>yEd has many more options. You can explore them using the included help text,
+by selecting <span class="menuseq"><b class="menu">Help</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Help</b></span>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-structure-view">Structure View</h5>
+<div class="paragraph">
+<p>yEd has a <em>Structure View</em> window that can be enabled via
+<span class="menuseq"><b class="menu">Windows</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Structure View</b></span>. The <em>Structure View</em> can be used
+to see and navigate the structure of the CIF model. By switching from
+'Text' to 'Description' (see upper right corner of the
+<em>Structure View</em> window), useful descriptions are shown for all elements.
+Furthermore, switching also ensures that the HTML code that is used for syntax
+highlighting is not shown in the <em>Structure Viewer</em> (if syntax highlighting is
+enabled, see the <a href="#tools-cif2yed-options">Options</a> section above). The following
+image shows the difference:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cif2yed/yed_structure_view.png" alt="yed structure view">
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tools-supervisory-controller-synthesis-tools">Supervisory controller synthesis tools</h3>
+<div class="sect3">
+<h4 id="tools-chapter-datasynth">Data-based supervisory controller synthesis</h4>
+<div class="paragraph">
+<p>
+
+
+The data-based supervisory controller synthesis tool performs data-based
+supervisory controller synthesis, or simply data-based synthesis. It can be
+used to <a href="#tut-extensions-chapter-synthesis">synthesize</a> a supervisor for an
+untimed CIF specification, with data
+(e.g. <a href="#tut-data-chapter-discrete-variables">discrete variables</a>). For a CIF
+specification with plants and requirements, the tool computes a supervisor.
+The supervisor restricts the plants in such a way that the resulting controlled
+system satisfies the following properties:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The controlled system is safe. That is, all reachable states in the
+controlled system satisfy the requirements.</p>
+</li>
+<li>
+<p>The controlled system is controllable. That is, for all reachable states in
+the controlled system, the
+<a href="#lang-tut-extensions-synthesis-evtctrl">uncontrollable</a> events that are
+enabled in the same state in the uncontrolled system are still possible in
+the controlled system. In other words, uncontrollable events are not
+restricted.</p>
+</li>
+<li>
+<p>The controlled system is non-blocking. That is, it is possible to reach a
+<a href="#lang-tut-extensions-synthesis-marked">marked</a> state from all reachable
+states in the controlled system.</p>
+</li>
+<li>
+<p>The controlled system is maximally permissive (or simply maximal). That is,
+the controlled system permits all safe, controllable, and non-blocking
+behaviors.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Note that <a href="#lang-tut-time-deadlock">deadlock</a> is not prevented for marked
+states.</p>
+</div>
+<div class="paragraph">
+<p>The synthesis algorithm is based on the following paper: Lucien Ouedraogo,
+Ratnesh Kumar, Robi Malik, and Knut Åkesson: Nonblocking and Safe
+Control of Discrete-Event Systems Modeled as Extended Finite Automata, IEEE
+Transactions on Automation Science and Engineering, Volume 8, Issue 3, Pages
+560-569, July 2011.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-transformation-2">Starting the transformation</h5>
+<div class="paragraph">
+<p>The transformation can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply data-based synthesis&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply data-based synthesis&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifdatasynth</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifdatasynth</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-datasynth-options">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, this application several other
+options.</p>
+</div>
+<div class="paragraph">
+<p>The following options are part of the <em>Synthesis</em> category:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file path</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file path</em>: The absolute or relative local file system path to the
+output CIF file. If not specified, defaults to the input file path, where the
+<code>.cif</code> file extension is removed (if present), and a <code>.ctrlsys.cif</code>
+file extension is added.</p>
+</li>
+<li>
+<p><em>Supervisor name</em>: The name of the resulting supervisor automaton. If not
+specified, it defaults to <code>sup</code>. For more information, see the section on
+the <a href="#tools-datasynth-supervisor">resulting supervisor</a> below.</p>
+</li>
+<li>
+<p><em>Supervisor namespace</em>: The namespace of the resulting supervisor. If not
+specified, it defaults to the empty namespace. For more information, see the
+section on <a href="#tools-datasynth-supervisor-namespace">namespaces</a> below.</p>
+</li>
+<li>
+<p><em>Forward reachability</em>: Whether to perform forward reachability during
+synthesis, or omit it. Is disabled by default. For more information, see the
+section on <a href="#tools-datasynth-forward-reach">forward reachability</a> below.</p>
+</li>
+<li>
+<p><em>Statistics</em>: The kinds of statistics to print. By default, no statistics
+are printed. For more information, see the section on
+<a href="#tools-datasynth-stats">statistics</a> below.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Internally during synthesis, predicates are represented using
+<a href="http://en.wikipedia.org/wiki/Binary_decision_diagram">Binary Decision Diagrams</a>
+(BDDs). There are
+various options that can influence the use of BDDs. The following options are
+part of the <em>BDD</em> sub-category of the <em>Synthesis</em> category:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>BDD output mode</em>: This option can be used to control how the BDDs are
+converted to CIF for the output of synthesis. For more information, see the
+<a href="#tools-datasynth-supervisor-bdd">BDD representation in CIF</a> section below.</p>
+</li>
+<li>
+<p><em>BDD output name prefix</em>: The prefix to use for BDD related names in the
+output. Only has an effect if the <em>BDD output mode</em> option is set to
+represent the internal BDD nodes directly in CIF. The default prefix is
+<code>bdd</code>. For more information, see the <a href="#tools-datasynth-supervisor-bdd">BDD representation in CIF</a>
+section below.</p>
+</li>
+<li>
+<p><em>BDD variable order</em>: CIF variables and automata are represented using one or
+more boolean variables. The initial order of the boolean variables is
+determined by this option. For more information, see the
+<a href="#tools-datasynth-var-order">BDD variable order</a> section below.</p>
+</li>
+<li>
+<p><em>BDD FORCE variable ordering algorithm</em>: CIF variables and automata are
+represented using one or more boolean variables. The initial order of the
+boolean variables can be improved by enabling this option. For more
+information, see the <a href="#tools-datasynth-var-order">BDD variable order</a> section below.</p>
+</li>
+<li>
+<p><em>BDD sliding window variable ordering algorithm</em>: CIF variables and automata
+are represented using one or more boolean variables. The initial order of the
+boolean variables can be improved by enabling this option. For more
+information, see the <a href="#tools-datasynth-var-order">BDD variable order</a> section below.</p>
+</li>
+<li>
+<p><em>BDD sliding window size</em>: The maximum length of the window to use for the
+BDD sliding window variable ordering algorithm. This option only has effect
+if the <em>BDD sliding window variable ordering algorithm</em> option is enabled.
+The size must be an integer number in the range [1 .. 12]. The default size
+is 4. For more information, see the <a href="#tools-datasynth-var-order">BDD variable order</a> section
+below.</p>
+</li>
+<li>
+<p><em>BDD predicate simplify</em>: Several BDD predicates may be simplified under the
+assumption of other predicates, resulting in smaller/simpler output. This may
+decrease the size of the resulting controller, and may give more insight. For
+more information, see the <a href="#tools-datasynth-simplification">Simplification</a> section
+below.</p>
+</li>
+<li>
+<p><em>BDD library initial node table size</em>: The BDD library that is used maintains
+an internal node table. This option can be used to set the initial size of
+that node table. The size will automatically be increased during synthesis,
+if necessary. Increasing the initial size can increase performance for large
+systems, as it will not be necessary to repeatedly increase the size of the
+node table. However, a larger node table requires more memory, and can lead
+to the node table no longer fitting within CPU caches, degrading performance.
+The default is <code>100000</code> nodes. The initial node table size must be in the
+range [1 .. 2<sup>31</sup> - 1]. For more information, see the
+<a href="#tools-datasynth-stats">Statistics</a> section.</p>
+</li>
+<li>
+<p><em>BDD library operation cache size</em>: The BDD library that is used maintains
+an internal operation cache. This option can be used to set the fixed size of
+that cache. The operation cache size must be in the range
+[2 .. 2<sup>31</sup> - 1]. By default, this option is disabled (value <code>off</code> on
+the command line), and the <em>BDD library operation cache ratio</em> option is
+used instead. For more information, see the <a href="#tools-datasynth-op-caches">BDD operation caches</a>
+section below.</p>
+</li>
+<li>
+<p><em>BDD library operation cache ratio</em>: The BDD library that is used maintains
+an internal operation cache. This option can be used to set the ratio of the
+size of the operation cache of the BDD library to the size of the node table
+of the BDD library. For instance, a ratio of <code>0.1</code> means that the size of
+the operation cache is 10% of the size of the node table. The operation cache
+ratio must be in the range [0.01 .. 1000]. The default ratio is 1.0. This
+option has no effect if the <em>BDD library operation cache size</em> option is
+enabled. For more information, see the <a href="#tools-datasynth-op-caches">BDD operation caches</a>
+section below.</p>
+</li>
+<li>
+<p><em>BDD debug max nodes</em>: Internally, predicates are represented
+using
+<a href="http://en.wikipedia.org/wiki/Binary_decision_diagram">Binary Decision Diagrams</a>
+(BDDs). This option
+control the maximum number of BDD nodes for which to convert a BDD to a
+readable CNF/DNF representation for the debug output. The default is <code>10</code>
+nodes. The maximum must be in the range [1 .. 2<sup>31</sup> - 1].
+The option
+can be set to have an infinite maximum (no maximum), using option value
+<code>inf</code>. For more information, see the <a href="#tools-datasynth-dbg-output">Debug output</a>
+section below.</p>
+</li>
+<li>
+<p><em>BDD debug max paths</em>: Internally, predicates are represented
+using
+<a href="http://en.wikipedia.org/wiki/Binary_decision_diagram">Binary Decision Diagrams</a>
+(BDDs). This option
+control the maximum number of BDD true paths for which to convert a BDD to a
+readable CNF/DNF representation for the debug output. The default is <code>10</code>
+paths. The maximum must be in the range [0 .. 1.7e308]. The option
+can be set to have an infinite maximum (no maximum), using option value
+<code>inf</code>. For more information, see the <a href="#tools-datasynth-dbg-output">Debug output</a>
+section below.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-supported-specifications-2">Supported specifications</h5>
+<div class="paragraph">
+<p>The data-based supervisory controller synthesis tool supports a subset of CIF
+specifications. The following restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Only <code>plant</code> and <code>requirement</code> automata are supported. Automata with a
+<code>supervisor</code> kind, as well as kindless/regular automata (without a
+supervisory kind) are not supported.</p>
+</li>
+<li>
+<p>Specifications without plant automata are not supported.</p>
+</li>
+<li>
+<p>Events not declared as controllable or uncontrollable are not supported.
+This includes the <code>tau</code> event, both explicitly used on edges, as well as
+implicitly for edges without explicitly mentioned events.</p>
+</li>
+<li>
+<p>The use of channels (events with data types) in requirements is not
+supported. That is, requirements that send or receive (with or without data)
+are not supported.</p>
+</li>
+<li>
+<p>Regular invariants, plant invariants, and supervisor invariants are not
+supported. Only requirement invariants are supported. To allow plant
+state/event exclusion invariants to be used in the input, manually eliminate
+them first using the <a href="#tools-cif2cif-chapter-elim-state-event-excl-invs">Eliminate state/event exclusion invariants</a> CIF to
+CIF transformation.</p>
+</li>
+<li>
+<p>Continuous variables are not supported.</p>
+</li>
+<li>
+<p>Only discrete/input variables with a boolean type, ranged integer type
+(e.g. <code>int[0..5]</code>), or enumeration type are supported. For integer types,
+ranges that include negative integer values are not supported. For algebraic
+variables and algebraic parameters of components, all types are supported.</p>
+</li>
+<li>
+<p>Discrete variables must have supported initial values. If explicit initial
+values are given, they must be supported predicates (for boolean variables)
+or supported expressions as described below (for all other variables).</p>
+</li>
+<li>
+<p>Automata with non-determinism for controllable events are not supported.
+That is, automata that have locations with multiple outgoing edges for the
+same controllable event, with overlapping guards (e.g. <code>x &gt; 1</code> and
+<code>x &lt; 4</code>), are not supported. Note that this check is performed on the
+<a href="#tools-cif2cif-chapter-linearize-product">linearized</a> guards, and may
+therefore lead to false positives, as the check is an over-approximation and
+guard overlap may be detected for unreachable states.</p>
+</li>
+<li>
+<p>Conditional updates (<code>if</code> updates), multi-assignments, and partial variable
+assignments are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Only limited forms of predicates (for markers, invariants, initialization,
+guards, etc) are supported. The supported predicates are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Boolean literals (<code>true</code>, <code>false</code>).</p>
+</li>
+<li>
+<p>Discrete/input/algebraic boolean variables (<code>x</code>, for <code>x</code> a discrete,
+input, or algebraic variable with a boolean type).</p>
+</li>
+<li>
+<p>Locations (<code>aut.loc</code>, for <code>aut</code> and automaton and <code>loc</code> a location of
+that automaton).</p>
+</li>
+<li>
+<p>The unary inverse operator (<code>not</code>) on a supported predicate.</p>
+</li>
+<li>
+<p>The binary logical conjunction (<code>and</code>) on two supported predicates.</p>
+</li>
+<li>
+<p>The binary logical disjunction (<code>or</code>) on two supported predicates.</p>
+</li>
+<li>
+<p>The binary logical implication (<code>=&gt;</code>) on two supported predicates.</p>
+</li>
+<li>
+<p>The binary logical bi-conditional (<code>&lt;=&gt;</code>) on two supported predicates.</p>
+</li>
+<li>
+<p>The binary equality comparison (<code>=</code>) on two supported predicates, or on two
+supported integer or enumeration expressions.</p>
+</li>
+<li>
+<p>The binary inequality comparison (<code>!=</code>) on two supported predicates, or on
+two supported integer or enumeration expressions.</p>
+</li>
+<li>
+<p>The binary less than comparison (<code>&lt;</code>) on two supported integer expressions.</p>
+</li>
+<li>
+<p>The binary less than or equal comparison (<code>&lt;=</code>) on two supported integer
+expressions.</p>
+</li>
+<li>
+<p>The binary greater than comparison (<code>&gt;</code>) on two supported integer
+expressions.</p>
+</li>
+<li>
+<p>The binary greater than or equal comparison (<code>&gt;=</code>) on two supported integer
+expressions.</p>
+</li>
+<li>
+<p>Conditional expressions (<code>if</code> expressions) with supported guard and
+resulting value predicates.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Only limited forms of integer and enumeration expressions (for binary
+comparisons, initial values of variables, right hand sides of assignments, etc)
+are supported. The supported expressions are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>A non-negative integer literal/value.</p>
+</li>
+<li>
+<p>An enumeration literal/value.</p>
+</li>
+<li>
+<p>Discrete/input/algebraic integer/enumeration variables (<code>x</code>, for <code>x</code> a
+discrete, input, or algebraic variable with an integer or enumeration type).</p>
+</li>
+<li>
+<p><code>+i</code> for <code>i</code> a supported integer expression.</p>
+</li>
+<li>
+<p><code>i + j</code> for <code>i</code> and <code>j</code> supported integer expressions.</p>
+</li>
+<li>
+<p><code>i div j</code> and <code>i mod j</code> for <code>i</code> a supported integer expressions, and
+<code>j</code> a positive integer value, or a computation that results in a positive
+integer value, as long as the computation is not too complex to be performed
+statically. That is, <code>j</code> must essentially be constant.</p>
+</li>
+<li>
+<p>Conditional expressions (<code>if</code> expressions) with supported guard predicates
+and supported resulting values.</p>
+</li>
+<li>
+<p>Any other valid CIF expression (computation) that that results in a
+non-negative integer value or an enumeration value, as long as the
+computation is not too complex to be performed statically. That is, the
+computation must essentially represent a fixed/constant value.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Here are some examples of computations that can be statically evaluated:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>true and false</code> (result is <code>false</code>)</p>
+</li>
+<li>
+<p><code>c or false</code>, for a constant <code>c</code> with value <code>false</code> (result is
+<code>false</code>)</p>
+</li>
+<li>
+<p><code>1 + 1</code> (result is <code>2</code>)</p>
+</li>
+<li>
+<p><code>2 * 5</code> (result is <code>10</code>)</p>
+</li>
+<li>
+<p><code>floor(3.14)</code> (result is <code>3</code>)</p>
+</li>
+<li>
+<p><code>c + 1</code>, for a constant <code>c</code> with value <code>2</code> (result is <code>3</code>)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Here are some examples of computations that can <em>not</em> be statically evaluated:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>v + 1</code>, for <code>v</code> a discrete variable. The computation results in
+different values for different values of <code>v</code>.</p>
+</li>
+<li>
+<p><code>v = true</code> for <code>v</code> a discrete variable. The computation results in
+different values for different values of <code>v</code>.</p>
+</li>
+<li>
+<p><code>v = e</code> for <code>v</code> a discrete variable and <code>e</code> an enumeration
+literal/value. The computation results in different values for different
+values of <code>v</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Only limited forms of assignments are supported. The supported assignments are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>xb := p</code></p>
+</li>
+<li>
+<p><code>xi := ie</code></p>
+</li>
+<li>
+<p><code>xi := ie - ie</code></p>
+</li>
+<li>
+<p><code>xe := ee</code></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For the following constraints:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>xb</code> is a boolean variable.</p>
+</li>
+<li>
+<p><code>xi</code> is a supported integer variable, as described above.</p>
+</li>
+<li>
+<p><code>xe</code> is an enumeration variable.</p>
+</li>
+<li>
+<p><code>p</code> is a supported predicate, as described above.</p>
+</li>
+<li>
+<p><code>ie</code> is a supported integer expression, as described above.</p>
+</li>
+<li>
+<p><code>ee</code> is a supported enumeration expression, as described above.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Additionally, the tool warns about state/event exclusion invariants for events
+that are not in the alphabet of any automaton. Such invariants have no effect,
+as they try to (further) restrict events that are never enabled to begin with.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-preprocessing-2">Preprocessing</h5>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+applied as preprocessing (in the given order), to increase the subset of CIF
+specifications that can be synthesized:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-io-decls">Remove I/O declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Additionally, the CIF specification is converted to an internal representation
+on which the synthesis is performed. This conversion also applies
+<a href="#tools-cif2cif-chapter-linearize-product">linearization (product variant)</a> to
+the edges. Predicates are represented internally using
+<a href="http://en.wikipedia.org/wiki/Binary_decision_diagram">Binary Decision Diagrams</a>
+(BDDs).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-supported-requirements">Supported requirements</h5>
+<div class="paragraph">
+<p>Three types of requirements are supported:
+<a href="#tut-data-chapter-stat-invariants">state invariants</a>,
+<a href="#tut-data-chapter-stat-evt-excl-invariants">state/event exclusion invariants</a>, and
+<a href="#lang-tut-extensions-synthesis-autkind">requirement automata</a>.</p>
+</div>
+<div class="paragraph">
+<p>State invariants are global conditions over the values of variables (and
+locations of automata) that must always hold. Such requirements are sometimes
+also called mutual state exclusions. Here are some examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">requirement invariant x != 0 and not p.b;
+requirement invariant x &gt; 5;
+requirement invariant not(x = 1 and y = 1) or q.x = a;
+
+requirement (x = 1 and y = 1) or (x = 2 and y = 2);
+requirement (3 &lt;= x and x &lt; = 5) or (2 &lt;= y and y &lt;= 7);
+requirement x = 1 =&gt; y &gt; 2;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>State/event exclusion invariants or simply state/event exclusions are
+additional conditions under which transitions may take place for certain
+events. Here are some examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">requirement invariant buffer.c_add    needs buffer.count &lt; 5;
+requirement invariant buffer.c_remove needs buffer.count &gt; 0;
+requirement invariant button.on = 1 disables lamp.c_turn_on;
+
+requirement {lamp.c_turn_on, motor.c_turn_on} needs button.Off;
+requirement p.x = 3 and p.y &gt; 7 disables p.u_something;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Requirement automata are simply automata marked as <code>requirement</code>. They
+usually introduce additional state by using multiple locations or a variable.
+The additional state is used to be able to express the requirement. One common
+example is a counter. For instance, consider the following requirement, which
+prevents more than three products being added to a buffer:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">requirement automaton counter:
+  disc int[0..5] count = 0;
+
+  requirement invariant count &lt;= 3;
+
+  location:
+    initial;
+    marked;
+
+    edge buffer.c_add do count := count + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Another common example is a requirement that introduces ordering. For instance,
+consider the following requirement, which states that <code>motor1</code> must always be
+turned on before <code>motor2</code> is turned on, and they must always be turned off in
+the opposite order:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">requirement automaton order:
+  location on1:
+    initial;
+    marked;
+    edge motor1.c_on goto on2;
+
+  location on2:
+    edge motor2.c_on goto off2;
+
+  location off2:
+    edge motor2.c_off goto off1;
+
+  location off1:
+    edge motor1.c_off goto on1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Besides the explicit requirements, synthesis also prevents runtime errors. This
+includes enforcing that integer variables stay within their range of allowed
+values. This is essentially an implicit requirement. For instance, for a CIF
+specification with a variable <code>x</code> of type <code>int[0..5]</code> and a variable <code>y</code>
+of type <code>int[1..3]</code>, requirement invariant
+<code>0 &lt;= x and x &lt;= 5 and 1 &lt;= y and y &lt;= 3</code> is
+implicitly added and enforced by the synthesis algorithm. In the resulting
+controlled system, no runtime errors due to variables being assigned values
+outside their domain (integer value range) occur.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-datasynth-supervisor">Resulting supervisor</h5>
+<div class="paragraph">
+<p>If the supervisor has to restrict so much of the behavior of the uncontrolled
+system that no initial state remains, the controlled system becomes empty. The
+synthesis algorithm then ends with an <em>empty supervisor</em> error, and no output
+CIF file is created.</p>
+</div>
+<div class="paragraph">
+<p>If an initial state remains after synthesis, an output CIF file is created. The
+contents is the controlled system. The controlled system is obtained by taking
+the input specification, and modifying it. The requirement automata are changed
+to supervisor automata. Some or all of the requirement invariants may be
+<a href="#tools-cif2cif-chapter-remove-reqs">removed</a>, depending on the
+<a href="#tools-datasynth-simplification">simplifications</a> that are applied. An
+additional external supervisor automaton is added. Also, depending on the
+simplifications that are applied, the requirement automata may serve as
+<a href="#tut-data-chapter-monitoring">monitors</a> or <em>observers</em> for the external
+supervisor, or may actually impose the requirement restrictions. An external
+supervisor is a <code>supervisor</code> automaton that adds restrictions to the
+uncontrolled system (the plants), and potentially the requirement automata,
+depending on the simplifications that are applied. The supervisor uses the
+same events as the plants, and refers to plant and requirement locations and
+variables in its conditions.</p>
+</div>
+<div class="paragraph">
+<p>By default, the resulting external supervisor automaton is put in the empty
+<a href="#tut-reuse2-chapter-namespaces">namespace</a>, at the top level of the
+resulting specification. That is, the supervisor automaton is not put in any
+groups. See the <a href="#tools-datasynth-supervisor-namespace">Namespace</a> section for more
+information.</p>
+</div>
+<div class="paragraph">
+<p>By default, the added supervisor automaton is named <code>sup</code>. Using the
+<em>Supervisor name</em> option (see <a href="#tools-datasynth-options">options</a> section
+above), it is possible to specify a different name. Custom supervisor automaton
+names must be valid CIF identifiers, i.e. they may consist of letters, digits,
+and underscores (<code>_</code>), but may not start with a digit. If the resulting
+supervisor automaton has a name that conflicts with an existing declaration, it
+is automatically renamed to have a non-conflicting name. In such cases, a
+warning is printed to the console to inform the user.</p>
+</div>
+<div class="paragraph">
+<p>The resulting supervisor has exactly one self loop edge for each of the
+controllable events in the alphabet of the controlled system (which is equal to
+the alphabet of the uncontrolled system). These self loops represent the
+possible conditions under which the supervisor allows the events to occur in
+the controlled system. The exact predicates may vary, depending on the
+<a href="#tools-datasynth-simplification">simplifications</a> that are applied.</p>
+</div>
+<div class="paragraph">
+<p>The resulting supervisor may have an initialization predicate that restricts
+the states in which the system may be initialized (may start), on top of the
+initialization constraints already present in the uncontrolled system. For more
+information on this initialization predicate, see the section on
+<a href="#tools-datasynth-init">initialization</a> below.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-datasynth-supervisor-namespace">Namespace</h6>
+<div class="paragraph">
+<p>As indicated above, by default the resulting supervisor automaton is put in the
+empty <a href="#tut-reuse2-chapter-namespaces">namespace</a>, at the top level of the
+resulting specification. That is, the supervisor automaton is not put in any
+groups.</p>
+</div>
+<div class="paragraph">
+<p>It is possible to add a namespace to the entire resulting specification. That
+is, to put groups around the original plants and requirements, the added
+supervisor automaton, etc. A namespace can be added using the
+<em>Supervisor namespace</em> option (see <a href="#tools-datasynth-options">options</a>
+section above). By default, no additional namespace is added.</p>
+</div>
+<div class="paragraph">
+<p>By adding a namespace around the entire resulting specification, the synthesis
+result can be easily <a href="#tools-chapter-mergecif">merged</a> with for instance a
+simulation model. The added namespace ensures that there are no naming
+conflicts between the plants of the simulation model and the similarly original
+plants. The events are not put in the new namespace, but are instead kept in
+their original place, wrapped in groups as necessary to keep their original
+identities (absolute names). This ensures that it remains possible to connect
+(merge) the events of the synthesis output with the events of the simulation
+model.</p>
+</div>
+<div class="paragraph">
+<p>The namespace specified using the option, must consist of one or more valid CIF
+identifiers, separated by dots (<code>.</code>). Valid CIF identifiers consist of one or
+more letters, digits, and underscores (<code>_</code>), but may not start with a digit.
+As an example, consider namespace <code>a.b</code>. A group <code>b</code> is wrapped around the
+entire synthesis result, and a group <code>a</code> is wrapped around group <code>b</code>. Group
+<code>a</code> is then the new synthesis result.</p>
+</div>
+<div class="paragraph">
+<p>If a part of the namespace has the same name as an event that remains in its
+original place, this leads to a conflict, and synthesis fails. If the namespace
+does not conflict, but is non-empty (it contains an event or it contains a
+group that contains an event), synthesis also fails.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-datasynth-supervisor-bdd">BDD representation in CIF</h6>
+<div class="paragraph">
+<p>Internally, predicates are represented using
+<a href="http://en.wikipedia.org/wiki/Binary_decision_diagram">Binary Decision Diagrams</a>
+(BDDs). The supervisor
+that is the output of synthesis, contains several predicates as well. For
+instance, it has self loops with guard predicates, and it may have an
+initialization predicate. The predicates represented as BDDs need to be
+represented as CIF predicates. There are multiple approaches to do this, and
+the <em>BDD output mode</em> option (see <a href="#tools-datasynth-options">options</a>
+section above), can be used to configure the approach to use.</p>
+</div>
+<div class="paragraph">
+<p>The first approach, which is also the default approach (named <code>normal</code>), is
+to use either
+<a href="http://en.wikipedia.org/wiki/Conjunctive_normal_form">Conjunctive Normal Form</a>
+(CNF) or
+<a href="http://en.wikipedia.org/wiki/Disjunctive_normal_form">Disjunctive Normal Form</a>
+(DNF) predicates. This
+approach has as benefit that for relatively small predicates (usually for small
+systems), the CIF predicates are often intuitive, and can easily understood.
+The downside is that for larger systems, the CIF predicates often grow
+exponentially in size.</p>
+</div>
+<div class="paragraph">
+<p>The second approached (named <code>nodes</code>), is to represent the internal BDD nodes
+directly in CIF. The BDD is then more or less coded directly in CIF, using
+some constants and algebraic variables, and is evaluated using a BDD evaluation
+function. The benefit is that for larger systems, this representation remains
+relatively small, and at the very least doesn&#8217;t blow up nearly as much as the
+CNF and DNF representations. The downside to this approach, is that it leads to
+a supervisor that can not be easily understood by inspecting it. For this
+approach, several objects are created in the top level scope of the CIF
+specification. The names of these declarations all share a common prefix. The
+default prefix is <code>bdd</code>, but it can be changed using the
+<em>BDD output name prefix</em> option (see
+<a href="#tools-datasynth-options">options</a> section above). No existing
+declarations, whose names start with that prefix, should be present in the top
+level scope of the specification.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-datasynth-init">Initialization</h5>
+<div class="paragraph">
+<p>The synthesis algorithm ensures that in the controlled system, the state
+requirement invariants hold in all reachable states. It also ensures that in the
+controlled system, for all transitions from reachable states, the events only
+occur if the requirement automata and state/event exclusion invariants allow
+them.</p>
+</div>
+<div class="paragraph">
+<p>The synthesis algorithm does not restrict any uncontrollable events. Instead,
+such restrictions are propagated backwards to the source state of the edge with
+the uncontrollable event, and from there to the transitions that lead to the
+source state, etc. They are propagated backwards until an edge with a
+controllable event is encountered (for which the guard can be restricted) or
+the initial state is reached (and the initialization predicate can be
+restricted).</p>
+</div>
+<div class="paragraph">
+<p>If a variable in the uncontrolled system has a single initial value, and the
+initialization predicate is restricted to not allow this initial value,
+initialization will be impossible, causing an <em>empty supervisor</em> error. For
+discrete variables with
+<a href="#lang-tut-data-discvar-init-multiple">multiple potential initial values</a>,
+the synthesis algorithm may restrict initialization to disallow certain initial
+values, while still leaving possibilities for initialization. For discrete
+variables declared to initially have an
+<a href="#lang-tut-data-discvar-init-any">arbitrary</a> initial value, as well as
+for input variables, the synthesis algorithm essentially determines under which
+conditions the system can be started, and still exhibits only safe,
+non-blocking behavior.</p>
+</div>
+<div class="paragraph">
+<p>If the controlled system requires more strict initialization than the
+uncontrolled system, an additional initialization predicate is added to the
+resulting supervisor. The exact predicate may differ, depending on the
+<a href="#tools-datasynth-simplification">simplifications</a> that are applied.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-datasynth-forward-reach">Forward reachability</h5>
+<div class="paragraph">
+<p>Synthesis essentially works by calculations that involve predicates that
+partition the entire state space into states that satisfy a property or don&#8217;t
+satisfy a property. For instance, a marker predicate may indicate which states
+of the state space are marked. All other states are thus not marked.</p>
+</div>
+<div class="paragraph">
+<p>
+
+Calculations during synthesis often involve
+<a href="https://en.wikipedia.org/wiki/Reachability">reachability</a>.
+For instance,
+from which states is it possible to reach a marker state? To compute the states
+that can reach a marker state, the marker predicate of the input specification
+is used. The marker predicate indicates the states that are themselves marked.
+Then, the states are calculated that can reach one of those marked states, via
+a single transition. They are put together, to form the states that are marked
+or can be marked after one transition. By taking another such step, we can add
+the states that can reach a marked state via two transitions. We then have all
+states that can reach a marked state via zero, one, or two transitions. We can
+repeat this until no new states are found, which is called reaching a
+<a href="https://en.wikipedia.org/wiki/Fixed_point_%28mathematics%29">fixed point</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+This form of reachability is called backward reachability, as it starts with
+some target (e.g. marked states), and goes backwards to find all states from
+which the target can be reached. Backward reachability can lead to states that
+could never be reached from an initial state, even in the uncontrolled system.
+This leads to two separate issues.</p>
+</div>
+<div class="paragraph">
+<p>The first issue is about unintuitive resulting supervisor guards. The
+resulting supervisor forbids certain transitions, by restricting controllable
+events. It among others forbids transitions that end up in states from which no
+marked state can be reached. However, if those forbidden states can never be
+reached from an initial state, there is no reason to restrict the controllable
+events in such cases. The guards of the resulting supervisor then appear to
+restrict the controllable events, while in fact the guard doesn&#8217;t impose a
+restriction for the controlled system. The supervisor simply doesn&#8217;t have the
+necessary information to know this.</p>
+</div>
+<div class="paragraph">
+<p>The second issue is about performance. Expanding unreachable states during
+backward reachability takes time and costs memory, while it has no useful
+effect on the resulting controlled system.</p>
+</div>
+<div class="paragraph">
+<p>
+The use of forward reachability can be a solution to both problems. Forward
+reachability starts with the initial states, and adds states reachable via one
+transitions, then via two transitions, then via three transitions, etc. This
+is repeated until all reachable states are found.</p>
+</div>
+<div class="paragraph">
+<p>By combining both forward and backward reachability, the supervisor knows about
+states that exist in the uncontrolled system (due to forward reachability) and
+about states that it should forbid (due to backward reachability). This leads
+to the supervisor only restricting transitions that are strictly necessary.
+However, both when using forward reachability and when not using it, the
+synthesized supervisor is safe, non-blocking, and maximally permissive. It is
+only the guards that are more complex than they might need to be, if forward
+reachability is not used. More complex guards are often less readable, and
+potentially more expensive to implement in an actual controller.</p>
+</div>
+<div class="paragraph">
+<p>By combining both forward and backward reachability, parts of the state space
+that are not relevant may not have to be expanded (as much), which may improve
+performance. However, computing the forward reachability may also take time
+and cost memory, thus reducing performance.</p>
+</div>
+<div class="paragraph">
+<p>It depends on the specification being synthesized whether enabling forward
+reachability increases or decreases performance. It also depends on the
+specification whether there is any benefit to using forward reachability for
+the guards of the supervisor. Forward reachability is disabled by default. It
+can be enabled using the <em>Forward reachability</em> option (see
+<a href="#tools-datasynth-options">options</a> section above).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-datasynth-simplification">Simplification</h5>
+<div class="paragraph">
+<p>The synthesis algorithm computes various predicates, such as the conditions
+under which the controllable events may take place in the controlled system,
+and the initialization predicate of the controlled system. These predicates
+are included in the supervisor that results from synthesis.</p>
+</div>
+<div class="paragraph">
+<p>However, if the controlled system imposes the exact same restrictions as the
+uncontrolled system, there is no need to list the full conditions in the
+supervisor, as the plants already define that behavior. The supervisor imposes
+no additional restrictions with respect to the plants, and it suffices to use
+<code>true</code> as condition for the supervisor to make that explicit.</p>
+</div>
+<div class="paragraph">
+<p>There are several predicates in the synthesis result that can be simplified
+under the assumption of conditions that are already present in the input
+specification. In some cases this leads to smaller/simpler supervisor
+representations. In other cases it gives insight, indicating that the
+supervisor does not impose any additional restrictions. The following
+simplifications are available:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 15%;">
+<col style="width: 5%;">
+<col style="width: 30%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Option value</th>
+<th class="tableblock halign-left valign-top">Default</th>
+<th class="tableblock halign-left valign-top">Predicate</th>
+<th class="tableblock halign-left valign-top">May be simplified assuming</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>guards-plants</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Supervisor guards of controllable events</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Plant guards, for the matching events</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>guards-req-auts</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Supervisor guards of controllable events</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">State/event exclusion requirement invariants derived from the
+requirement automata, for the matching events</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>guards-se-excl-req-invs</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Supervisor guards of controllable events</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">State/event exclusion requirement invariants from the input
+specification, for the matching events</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>guards-state-req-invs</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Supervisor guards of controllable events</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">State requirement invariants from the input specification (includes the
+range requirement invariants added by the synthesis algorithm)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>guards-ctrl-beh</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Supervisor guards of controllable events</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Controlled behavior as computed by synthesis</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>initial-unctrl</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Initialization predicate of the controlled system</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Initialization predicate of the uncontrolled system</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Which simplifications should be performed, can be specified using the
+<em>BDD predicate simplify</em> option (see <a href="#tools-datasynth-options">options</a>
+section above).</p>
+</div>
+<div class="paragraph">
+<p>The table above lists in the first column, the option values to use for each of
+the simplifications, on the command line. The names given in the first column
+should be combined using commas, and used as option value. The simplifications
+that are specified using the option replace the default simplifications (see
+the second column of the table). However, it is also possible to specify
+additions and removals relative to the default simplifications, by prefixing
+simplifications (from the first column) with a <code>+</code> or <code>-</code> respectively.
+Replacements (no prefix) may not be combined with additions/removals (<code>+</code> or
+<code>-</code> prefix). Specifying a simplification twice leads to a warning being
+printed to the console. Adding a simplification that is already present or
+removing a simplification that is not present, also leads to a warning being
+printed.</p>
+</div>
+<div class="paragraph">
+<p>In the option dialog, each of the simplifications can be enabled or disabled
+using a checkbox.</p>
+</div>
+<div class="paragraph">
+<p>The second column indicates for each simplification whether it is enabled by
+default. By default, all simplifications are enabled. The third column
+indicates the predicate in the synthesis result that can be simplified. The
+fourth column indicates under the assumption of which predicate the
+simplification is applied.</p>
+</div>
+<div class="paragraph">
+<p>The simplification algorithm is not perfect, and may not simplify the
+predicates as much as could potentially be possible.</p>
+</div>
+<div class="paragraph">
+<p>When simplifying with respect to state requirement invariants, the supervisor
+no longer enforces those requirements, as they are assumed to already hold. As
+such, the simplification prevents such invariants from being removed from the
+resulting CIF specification. This applies to some of the other simplifications
+as well. For instance, the simplification over state/event exclusion
+requirement invariants leads to them being part of the output as well. This may
+affect whether other tools can handle the resulting supervisor model as input,
+depending on what kind of features they support. In particular, for code
+generation, simplification of the guards with respect to the state requirement
+invariants and state/event exclusion requirement invariants may need to be
+disabled.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-datasynth-dbg-output">Debug output</h5>
+<div class="paragraph">
+<p>By default, the synthesis algorithm shows no progress information, and does not
+explain how the resulting supervisor is obtained. By enabling debug output,
+detailed information is printed to the console. Debug output can be enabled
+by setting the
+<b class="menuref">Output mode</b>
+option (<b class="menuref">General</b>
+category) to
+<b class="menuref">Debug</b>.</p>
+</div>
+<div class="paragraph">
+<p>The debug output also contains information about the number of states in the
+resulting controlled system (the uncontrolled system restricted by the
+synthesized supervisor). If the resulting supervisor (and thus the controlled
+system) is empty, or if
+<a href="#tools-datasynth-forward-reach">forward reachability</a> is enabled, the
+number of states that is printed is an exact number (e.g. <code>exactly 0 states</code>,
+<code>exactly 1 state</code>, <code>exactly 1,234 states</code>). In other situations, the
+controlled behavior predicate that is used to determine the number potentially
+gives an over-approximation, and an upper bound on the number of states is
+printed (e.g. <code>at most 1,234 states</code>).</p>
+</div>
+<div class="paragraph">
+<p>Enabling debug output may significantly slow down the synthesis algorithm,
+especially for larger models. The performance degradation stems mostly from the
+printing of predicates. Predicates are internally represented using
+<a href="http://en.wikipedia.org/wiki/Binary_decision_diagram">Binary Decision Diagrams</a>
+(BDDs). To print them,
+they are converted to CNF or DNF predicates, similar to one of the approaches
+to <a href="#tools-datasynth-supervisor-bdd">convert</a> BDDs to CIF predicates for
+synthesis output.</p>
+</div>
+<div class="paragraph">
+<p>To limit the performance degradation, options are available to limit the
+conversion of BDDs to CNF/DNF predicates. The <em>BDD debug max nodes</em> controls
+the maximum number of BDD nodes for which to convert a BDD to a readable
+CNF/DNF representation for the debug output. The default is <code>10</code> nodes. The
+maximum must be in the range [1 .. 2<sup>31</sup> - 1].
+The option can be set to
+have an infinite maximum (no maximum), using option value <code>inf</code>. The <em>BDD
+debug max paths</em> option controls the maximum number of BDD true paths for which
+to convert a BDD to a readable CNF/DNF representation for the debug output. The
+default is <code>10</code> paths. The maximum must be in the range [1 .. 1.7e308]. The
+option can be set to have an infinite maximum (no maximum), using option value
+<code>inf</code>. If a BDD has more than the specified maximum number of nodes, or more
+than the specified number of true paths, it is not converted to a CNF/DNF
+predicate. Instead, it is converted to a textual representation that indicates
+the number of nodes and true paths, e.g. <code>&lt;bdd 1,234n 5,678p&gt;</code> for a BDD with
+1,234 nodes and 5,678 true paths.</p>
+</div>
+<div class="paragraph">
+<p>By limiting the conversion of BDDs to CNF/DNF predicates, debug output can
+still be used for large models to see progress information, while not degrading
+the performance too much.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-datasynth-stats">Statistics</h5>
+<div class="paragraph">
+<p>The data-based synthesis tool supports printing various kinds of statistics to
+the console. By default, no statistics are printed. Statistics can be enabled
+using the the <em>Statistics</em> option (see <a href="#tools-datasynth-options">options</a>
+section above). The following statistics are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Timing</em> [<code>timing</code>]</p>
+<div class="paragraph">
+<p>Print statistics for timing of various parts of the tool. Is printed to the
+console, after execution, just termination of the tool. Timing is only
+printed for parts of the tool that were actually executed. Timing is printed
+as a tree. The root of the tree represents the total time of the synthesis
+tool. For some parts of the tool, timing is also measured for sub-parts.
+Timing is printed in milliseconds, to make it easier to compare timing for
+various parts.</p>
+</div>
+<div class="paragraph">
+<p>When measuring performance, always perform multiple measurements, and take
+the average. Also, use a warm-up phase, to avoid skewed results.</p>
+</div>
+</li>
+<li>
+<p><em>BDD garbage collection</em> [<code>bdd-gc</code>]</p>
+<div class="paragraph">
+<p>The BDD library that is used maintains an internal node table. Whenever new
+nodes no longer fit in the node table, a garbage collection is started by
+the BDD library, to clean out all nodes that are no longer needed. BDD
+garbage collection statistics are printed before and after garbage
+collection. The printed information includes the size of the node table, the
+number of free nodes, timing information, etc. See also the
+BDD library initial node table size option (see
+<a href="#tools-datasynth-options">options</a>` section above).</p>
+</div>
+</li>
+<li>
+<p><em>BDD node table resize</em> [<code>bdd-resize</code>]</p>
+<div class="paragraph">
+<p>The BDD library that is used maintains an internal node table. Whenever new
+nodes no longer fit in the node table, a garbage collection is started by
+the BDD library, to clean out all nodes that are no longer needed. If only
+very limited space could be reclaimed by garbage collection, the size of the
+node table is increased. BDD node table resize statistics are printed when
+the node table is resized. The printed information includes the old and the
+new sizes of the node table. See also the BDD library initial node table
+size option (see <a href="#tools-datasynth-options">options</a>` section above).</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In the option dialog, each of the different kinds of statistics can be enabled
+and disabled individually, using a checkbox.</p>
+</div>
+<div class="paragraph">
+<p>From the command line, using the <code>--stats</code> option, the names of the different
+kinds of statistics, as indicated above between square brackets, should be
+used, separated by commas. For instance, use <code>--stats=bdd-gc,bdd-resize</code> to
+enable both BDD garbage collection statistics and BDD node table resize
+statistics, but keep all other statistics disabled.</p>
+</div>
+<div class="paragraph">
+<p>Specifying a statistics kind twice leads to a warning being printed to the
+console.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-early-problem-detection">Early problem detection</h5>
+<div class="paragraph">
+<p>The synthesis algorithm checks the specification for common issues, for early
+detection of problems that will lead to an empty supervisor. If such a problem
+is detected, a warning is printed to the console. Among others, checks are
+included for no initial states/variables, no marked states, and no states due
+to the state requirement invariants.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-datasynth-var-order">BDD variable order</h5>
+<div class="paragraph">
+<p>Internally, predicates are represented using
+<a href="http://en.wikipedia.org/wiki/Binary_decision_diagram">Binary Decision Diagrams</a>
+(BDDs). CIF
+variables and automata are represented using one or more boolean variables
+(also called BDD variables or bits). For instance, a boolean CIF variable is
+represented using a single boolean/BDD variable, and a CIF variable of type
+<code>int[0..8]</code> is represented using four boolean/BDD variables (9 possible
+values, log<sub>2</sub>(9) ≈ 3.17). For each automaton with two or
+more locations, a location pointer variable is created, that represents the
+current or active location of that automaton. For instance, an automaton with
+three locations is represented using two boolean/BDD variables. Two boolean/BDD
+variables can represent 2<sup>2</sup> = 4 values, so one value is not
+used.</p>
+</div>
+<div class="paragraph">
+<p>The CIF variables and location pointer variables for the automata
+(together called synthesis variables) can be ordered. This ordering can
+significantly influence the performance of synthesis. Synthesis variables that
+have a higher influence on the result of predicates (simply put, occur more
+frequently in predicates) should generally be put earlier in the ordering.
+Furthermore, in general, strongly related synthesis variables (e.g. by
+comparison, integer computation, or assignment) should be kept closely together
+in the order. For two synthesis variables <code>x</code> and <code>y</code>, examples of
+predicates that introduce relations are <code>x = y</code> (by comparison) and
+<code>5 &lt; x + y</code> (by integer computation), and examples of assignments that
+introduce relations are <code>x := y</code> and <code>x := y + 1</code> (both by assignment).</p>
+</div>
+<div class="paragraph">
+<p>For the initial variable ordering, it is possible to order the BDD variables
+per synthesis variable, or to interleave the BDD/boolean variables of some
+synthesis variables. This can significantly influences the performance of
+synthesis. Generally, strongly related synthesis variables should be
+interleaved.</p>
+</div>
+<div class="paragraph">
+<p>For more information on ordering and its influence on performance, see
+Chapter 3 of <a href="#minato">[minato]</a>.</p>
+</div>
+<div class="paragraph">
+<p>For each CIF variable and location pointer, two synthesis variables are
+created, one storing the old/current value (before a transition), and one
+storing the new value (after a transition). For a single CIF variable or
+location pointer, the old and new synthesis variables are always kept together,
+and interleaved. The old synthesis variable is also always before the new
+synthesis variable.</p>
+</div>
+<div class="paragraph">
+<p>The initial order of the boolean/BDD variables is determined by the
+<em>BDD variable order</em> option (see <a href="#tools-datasynth-options">options</a>
+section above). Several default orders exist, and it is also possible to
+define a custom order. By default, the sorted order is used. The following
+default orders exist:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>model ordering without interleaving</em> (option value <code>model</code>)</p>
+<div class="paragraph">
+<p>The initial order of the synthesis variables is as they occur in the model.
+A location pointer, for an automaton with two or more locations, is put
+before the variables declared in that automaton.</p>
+</div>
+<div class="paragraph">
+<p>No synthesis variables are interleaved, except for each old variable with
+its corresponding new variable.</p>
+</div>
+</li>
+<li>
+<p><em>reverse model ordering without interleaving</em> (option value <code>reverse-model</code>)</p>
+<div class="paragraph">
+<p>The initial order of the synthesis variables is as they occur in the model,
+but reversed. A location pointer, for an automaton with two or more
+locations, is put after the variables declared in that automaton, in this
+reverse order.</p>
+</div>
+<div class="paragraph">
+<p>No synthesis variables are interleaved, except for each old variable with
+its corresponding new variable. The old variables are still before the new
+variables; this is not reversed.</p>
+</div>
+</li>
+<li>
+<p><em>sorted ordering without interleaving</em> (option value <code>sorted</code>)</p>
+<div class="paragraph">
+<p>The initial order of the synthesis variables is based on the names of the
+variables and automata. They are sorted alphabetically in ascending
+order, based on their absolute names.</p>
+</div>
+<div class="paragraph">
+<p>No synthesis variables are interleaved, except for each old variable with
+its corresponding new variable.</p>
+</div>
+</li>
+<li>
+<p><em>reverse sorted ordering without interleaving</em> (option value <code>reverse-sorted</code>)</p>
+<div class="paragraph">
+<p>The initial order of the synthesis variables is based on the names of the
+variables and automata. They are sorted alphabetically in descending
+order, based on their absolute names.</p>
+</div>
+<div class="paragraph">
+<p>No synthesis variables are interleaved, except for each old variable with
+its corresponding new variable. The old variables are still before the new
+variables; this is not reversed.</p>
+</div>
+</li>
+<li>
+<p><em>random ordering without interleaving</em> (option value <code>random</code> or <code>random:SEED</code>)</p>
+<div class="paragraph">
+<p>The variables and automata are initially ordered randomly. If no
+seed is specified, a random seed is used, resulting in a random random order.
+If a seed is specified, a fixed random order is used. That is, using the same
+seed again, results in the same random order. The <code>SEED</code> must be an integer
+number in the range [0 .. 2<sup>64</sup> - 1]. For instance, use
+<code>random:123</code> as option value to get a random order that can be repeated on
+a subsequent synthesis for the same model.</p>
+</div>
+<div class="paragraph">
+<p>No synthesis variables are interleaved, except for each old variable with
+its corresponding new variable.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Furthermore, a custom initial order can be defined. Custom orders consist of
+absolute names of variables and automata. That is, for an automaton
+<code>a</code>, with a discrete variable <code>x</code>, the absolute name of the variable is
+<code>a.x</code>. The <code>*</code> character can be used as wildcard in those names, and
+indicates zero or more characters. In case of multiple matches, the matches are
+sorted increasingly on their absolute names, and interleaved.</p>
+</div>
+<div class="paragraph">
+<p>Multiple names can be separated with <code>;</code> characters. The synthesis variables
+matching the name pattern before the <code>;</code> are ordered before the synthesis
+variables matching the name pattern after the <code>;</code>. The <code>;</code> separator does
+not introduce interleaving. The <code>,</code> separator can be used instead of the
+<code>;</code> separator to introduce order but also introduce interleaving.</p>
+</div>
+<div class="paragraph">
+<p>Each name pattern in the order must match at least one variable or automaton.
+A variable or automaton may not be included more than once in the
+order. Every variable and automaton (with two or more locations) needs to be
+included in the order. It is not possible to specify new variables, as they
+are always directly after their corresponding old variables, and they are
+always interleaved.</p>
+</div>
+<div class="paragraph">
+<p>For instance, consider two automata: <code>a</code> and <code>b</code>, each with three
+variables of type <code>int[0..3]</code>: <code>x1</code>, <code>x2</code>, and <code>x3</code>. The automata have
+three locations each, so location pointers are created for them. We thus have
+six discrete variables: <code>a.x1</code>, <code>a.x2</code>, <code>a.x3</code>, <code>b.x1</code>, <code>b.x2</code>, and
+<code>b.x3</code>, and two location pointer variables: <code>a</code> and <code>b</code>. Consider the
+following custom order: <code>b*;a.x3,a.x1;a.x2,a</code>. Pattern <code>b*</code> matches
+location pointer variable <code>b</code> as well as the three discrete variables of
+automaton <code>b</code> (<code>b.x1</code>, <code>b.x2</code>, and <code>b.x3</code>). They are ordered in
+increasing alphabetic order, and are interleaved. Variables <code>a.x3</code> and
+<code>a.x1</code> are also interleaved, with <code>a.x3</code> before <code>a.x1</code>. Finally, variable
+<code>a.x2</code> is ordered before the location pointer for automaton <code>a</code>, and they
+are interleaved as well. This results in the following initial boolean/BDD
+variable ordering, with bits whose name ends with <code>+</code> representing bits of
+new variables rather than current/old variables, and <code>x#0</code> representing bit
+zero of variable <code>x</code>:</p>
+</div>
+<div class="paragraph">
+<p><code>b#0</code><br>
+<code>b+#0</code><br>
+<code>b.x1#0</code><br>
+<code>b.x1+#0</code><br>
+<code>b.x2#0</code><br>
+<code>b.x2+#0</code><br>
+<code>b.x3#0</code><br>
+<code>b.x3+#0</code><br>
+<code>b#1</code><br>
+<code>b+#1</code><br>
+<code>b.x1#1</code><br>
+<code>b.x1+#1</code><br>
+<code>b.x2#1</code><br>
+<code>b.x2+#1</code><br>
+<code>b.x3#1</code><br>
+<code>b.x3+#1</code></p>
+</div>
+<div class="paragraph">
+<p><code>a.x3#0</code><br>
+<code>a.x3+#0</code><br>
+<code>a.x1#0</code><br>
+<code>a.x1+#0</code><br>
+<code>a.x3#1</code><br>
+<code>a.x3+#1</code><br>
+<code>a.x1#1</code><br>
+<code>a.x1+#1</code></p>
+</div>
+<div class="paragraph">
+<p><code>a.x2#0</code><br>
+<code>a.x2+#0</code><br>
+<code>a#0</code><br>
+<code>a+#0</code><br>
+<code>a.x2#1</code><br>
+<code>a.x2+#1</code><br>
+<code>a#1</code><br>
+<code>a+#1</code></p>
+</div>
+<div class="paragraph">
+<p>The default orders are often not optimal performance-wise. Manually
+specifying a custom order often requires specialist knowledge and can take
+quite some time. Luckily, there are algorithms that can automatically compute
+a decent variable order.</p>
+</div>
+<div class="paragraph">
+<p>The algorithms all take an initial variable ordering, and try to improve it
+using a fast heuristic. A better initial variable ordering may result in a
+better final variable ordering (a better local optimum), and may speed up the
+automatic variable ordering algorithm (reaching an optimum faster).</p>
+</div>
+<div class="paragraph">
+<p>For the initial variable ordering, the CIF variables and location pointers
+may be arbitrarily interleaved. If an automatic variable ordering algorithm
+changes the initial order, no synthesis variables are interleaved, except for
+each old variable with its corresponding new variable.</p>
+</div>
+<div class="paragraph">
+<p>The automatic variable ordering algorithms are not applied if the CIF model has
+less than two synthesis variables. They are also not applied if the model has
+no guards, updates, or other predicates to use as input for the algorithms,
+i.e. there are no <em>hyperedges</em> to which to apply the algorithms.</p>
+</div>
+<div class="paragraph">
+<p>The following algorithms are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>FORCE</em></p>
+<div class="paragraph">
+<p>The <a href="#force">[force]</a> algorithm is enabled by default, but can be disabled using the
+<em>BDD FORCE variable ordering algorithm</em> option (see
+<a href="#tools-datasynth-options">options</a> section above).</p>
+</div>
+<div class="paragraph">
+<p>At most 10 * ceil(log<sub>e</sub>(n)) iterations of the FORCE
+algorithm are performed, with <code>n</code> the number of current/old BDD/boolean
+variables.</p>
+</div>
+</li>
+<li>
+<p><em>Sliding window</em></p>
+<div class="paragraph">
+<p>The sliding window algorithm is enabled by default, but can be disabled using
+the <em>BDD sliding window variable ordering algorithm</em> option (see
+<a href="#tools-datasynth-options">options</a> section above).</p>
+</div>
+<div class="paragraph">
+<p>The default maximum length of the window that is used is 4. The actual window
+may be smaller, if less than 4 variables and/or location pointers are present
+in the model. The maximum length of the window can be configured using the
+<em>BDD sliding window size</em> option (see
+<a href="#tools-datasynth-options">options</a> section above). The option to set
+the maximum length only has effect if the sliding window variable ordering
+algorithm is enabled. The size must be an integer number in the range
+[1 .. 12].</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If enabled, the algorithms are applied in the order they are listed above.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-datasynth-op-caches">BDD operation caches</h5>
+<div class="paragraph">
+<p>One of the main properties of BDDs is that they employ full sharing. That is,
+if a part of a binary tree needs to be represented more than once, it is stored
+only once, and reused. This leads to BDDs being represented using directed
+acyclic graphs, rather than binary trees.</p>
+</div>
+<div class="paragraph">
+<p>The BDD library uses an operation cache to speed up synthesis. Whenever a
+certain operation is performed on one or more nodes of a BDD graph, the result
+is cached. If that same operation is performed again on the same nodes, the
+cached result is reused, if available. This way, repeated calculations can be
+prevented for shared sub-graphs.</p>
+</div>
+<div class="paragraph">
+<p>The operation cache is essential for the performance of the synthesis
+algorithm. With infinite caches, the operations are generally linear in the
+number of nodes used to represent the BDDs on which they are applied. Without
+caching, the computation time grows exponentially.</p>
+</div>
+<div class="paragraph">
+<p>Obviously, in practice we can&#8217;t have infinite caches, as a computer only has a
+finite amount of memory available. We thus need to work with finite caches.
+Whenever a new cached operation result doesn&#8217;t fit in the cache, an older
+result is overwritten, and will need to be recomputed if it is needed again.</p>
+</div>
+<div class="paragraph">
+<p>Increasing the cache size can significantly increase performance for large
+systems, as a cache that is too small is ineffective, and results in many
+operations needing to be repeated, that could have otherwise been obtained from
+the cache. However, a larger than needed cache may also significantly decrease
+performance, as a cache that is too large may no longer fit within CPU caches,
+leading to more expensive accesses to the main memory rather than e.g. L1/L2/L3
+caches.</p>
+</div>
+<div class="paragraph">
+<p>The operation cache size can be configured in two ways: as a fixed size that
+remains the same during the entire synthesis, or a variable cache size that
+grows in size as the node table grows in size. See the
+<a href="#tools-datasynth-options">options</a> section above for details.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-performance">Performance</h5>
+<div class="paragraph">
+<p>The following <a href="#tools-datasynth-options">options</a> have an effect on the
+performance of data-based synthesis:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 5.2631%;">
+<col style="width: 15.7894%;">
+<col style="width: 15.7894%;">
+<col style="width: 21.0526%;">
+<col style="width: 42.1055%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Kind</th>
+<th class="tableblock halign-left valign-top">Option</th>
+<th class="tableblock halign-left valign-top">Section</th>
+<th class="tableblock halign-left valign-top">Effect</th>
+<th class="tableblock halign-left valign-top">Choose</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">BDD output mode</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-supervisor-bdd">BDD representation in CIF</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Representation of BDDs in the output model</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Use <code>nodes</code> output variant for best performance</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">BDD predicate simplify</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-simplification">Simplification</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Potentially smaller BDDs in the output</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enable for smaller output, although simplification itself also takes
+time</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Order</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">BDD variable order</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-var-order">BDD variable order</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Better order for smaller BDD representations</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Choose the best order, depends on the model, (reversed) model/sorted
+usually good choices, custom order allows for best performance</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Order</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">BDD FORCE variable ordering algorithm</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-var-order">BDD variable order</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Better order for smaller BDD representations</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enable for automatic ordering</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Order</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">BDD sliding window variable ordering algorithm</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-var-order">BDD variable order</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Better order for smaller BDD representations</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enable for automatic ordering</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Order</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">BDD sliding window size</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-var-order">BDD variable order</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Better order for smaller BDD representations</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Larger windows might allow for more optimization, but take more time</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Library</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">BDD library initial node table size</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-stats">Statistics</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">More storage for less resizes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Increase size for less resizes, at the cost of less memory locality</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Library</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">BDD library operation cache size/ratio</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-op-caches">BDD operation caches</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Increase cache for less computations</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enable, larger costs more memory, larger leads to less memory locality,
+size/ratio depends on model</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Algorithm</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Forward reachability</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-forward-reach">Forward reachability</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Explore only reachable state space</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enable to reduce state space, although calculation itself may also be
+expensive, depends on model</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Debug</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Output mode</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-dbg-output">Debug output</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Debug output on console</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Disable for better performance</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Debug</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">BDD debug max nodes/paths</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-dbg-output">Debug output</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Size of predicates in debug output</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The smaller, the less blowup, the better the performance</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Debug</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Statistics</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-datasynth-stats">Statistics</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Statistics output on console</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Disable for better performance</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The first column categorizes the different options a bit, for different kind of
+options. The second column lists the different options. The third column
+indicates in which section on this page of the documentation you can find more
+information about that option. The fourth column indicates the effect of the
+option. The fifth column indicates what to choose for the option, for best
+performance, although a trade-off may be involved.</p>
+</div>
+<div class="paragraph">
+<p>Obviously, the actual model that is used has a large impact as well. More
+variables often leads to longer synthesis times. However, the predicates that
+are used may also significantly impact performance.</p>
+</div>
+<div class="paragraph">
+<p>Try to use state/event exclusion requirement invariants instead of requirement
+automata with a single location and self loops. Also, try to avoid an
+event-based modeling style, and use a data-based modeling style instead, if
+possible.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-input-variables">Input variables</h5>
+<div class="paragraph">
+<p>Data-based synthesis supports input variables. The model itself doesn&#8217;t specify
+which value an input variable has at any given moment. Input variables can thus
+have any value (as long as it fits within the data type of the variable), and
+the value can change at any time. Input variables are ideal to model sensors.</p>
+</div>
+<div class="paragraph">
+<p>To support this for data-based synthesis, the input variable is treated as a
+discrete variable with an arbitrary initial value. To allow the input variable
+to arbitrarily change, an uncontrollable event is added (with the same absolute
+name as the input variable). Also, a single edge is added for that event. The
+edge is always enabled (guard <code>true</code>, since the input variable can always
+change value), and the update indicates that it can get any value that it
+doesn&#8217;t currently have (<code>x+ != x</code> for <code>x</code> an input variable, with <code>x</code>
+the value of the variable before the update, and <code>x+</code> the value of the
+variable after the update). Obviously, the value of the input variable is kept
+within the range of values that is allowed by its data type.</p>
+</div>
+<div class="paragraph">
+<p>Using synthesis with requirements that restrict the allowed values of an input
+variable will result in an empty supervisor, as a supervisor can&#8217;t prevent the
+environment from changing the value of the input variable (it would have to
+restrict the uncontrollable event that is internally added to model value
+changes of the input variable). A supervisor can however impose additional
+restrictions on the <a href="#tools-datasynth-init">initial</a> value of an input
+variable. The supervisor can then only guarantee safe, non-blocking behavior
+if the system is initialized in accordance with the additional initialization
+restrictions.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-references">References</h5>
+<div class="ulist bibliography">
+<ul class="bibliography">
+<li>
+<p><a id="minato"></a>[minato] Shin-ichi Minato. Binary Decision Diagrams and Applications for
+VLSI CAD: The Springer International Series in Engineering and Computer Science,
+Volume 342, 1996, Springer US, ISBN 978-1-4613-1303-8 (E-book),
+ISBN 978-0-7923-9652-9 (hardcover), ISBN 978-1-4612-8558-8 (softcover)</p>
+</li>
+<li>
+<p><a id="force"></a>[force] Fadi A. Aloul, Igor L. Markov, Karem A. Sakallah.
+FORCE: A Fast and Easy-To-Implement Variable-Ordering Heuristic:
+GLSVLSI '03 Proceedings of the 13th ACM Great Lakes symposium on VLSI
+pages 116-119, 2003, ACM New York, NY, USA, ISBN 1-58113-677-3</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-eventbased-chapter-index">Event-based synthesis toolset</h4>
+<div class="paragraph">
+<p>
+
+Synthesis, 'supervisor synthesis', or 'supervisory controller synthesis', is a
+generative technique, where one derives a (supervisor) automaton from a
+collection of plants and requirements. The resulting supervisor is maximally
+permissive under the conditions of being free of deadlocks, and always having
+the option of reaching a marked state.</p>
+</div>
+<div class="paragraph">
+<p>While there is only one true synthesis tool (the tool that actually derives a
+supervisor automaton from a collection of plant and requirement automata),
+other tools exist to support the process. These tools together form the
+<em>event-based synthesis toolset</em>.</p>
+</div>
+<div class="paragraph">
+<p>These tools use and modify the sequences of events that can be performed. This
+in contrast to state-based tools, which operate primarily on the
+<a href="#tools-cifsim-traces-state">state</a> of the system. Event sequences
+directly hook into language theory, which places these tools firmly in the
+language theory mathematical framework.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-supported-specifications">Supported specifications</h5>
+<div class="paragraph">
+<p>The application supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Channels (events with data types), if used (present on an edge of at least
+one automaton), are not supported.</p>
+</li>
+<li>
+<p>Any use of the <code>tau</code> event is not supported. Note that both explicit use
+(keyword <code>tau</code>) and implicit use (no events on an edge) are unsupported.</p>
+</li>
+<li>
+<p>Automata with multiple initial locations are not supported.</p>
+</li>
+<li>
+<p>Edges with updates are not supported.</p>
+</li>
+<li>
+<p>Urgent locations and edges are not supported.</p>
+</li>
+<li>
+<p>Initialization predicates in components are not supported.</p>
+</li>
+<li>
+<p>Invariants in components are not supported.</p>
+</li>
+<li>
+<p>Marker predicates in components are not supported.</p>
+</li>
+<li>
+<p>Initialization predicates in locations that are not trivially true or false
+are not supported.</p>
+</li>
+<li>
+<p>State invariants in locations that are not trivially true are not supported.</p>
+</li>
+<li>
+<p>Marker predicates in locations that are not trivially true or false are not
+supported.</p>
+</li>
+<li>
+<p>State/event exclusion invariants are not supported.</p>
+</li>
+<li>
+<p>Guards of edges that are not trivially true or false are not supported.</p>
+</li>
+<li>
+<p>Multiple initialization predicates in a single location are not supported.</p>
+</li>
+<li>
+<p>Multiple state invariant predicates in a single location are not supported.</p>
+</li>
+<li>
+<p>Multiple marker predicates in a single location are not supported.</p>
+</li>
+<li>
+<p>Multiple guards on a single edge are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>To allow state/event exclusion invariants to be used in the input, manually
+eliminate them first using the <a href="#tools-cif2cif-chapter-elim-state-event-excl-invs">Eliminate state/event exclusion invariants</a>
+CIF to CIF transformation.</p>
+</div>
+<div class="paragraph">
+<p>For meaningful results, it is recommended to have an initial location and at
+least one marked location, in each automaton.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-preprocessing-3">Preprocessing</h5>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+applied as preprocessing (in the given order), to increase the subset of CIF
+specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-kinds">Automaton kinds</h5>
+<div class="paragraph">
+<p>The event-based toolset recognizes the CIF automaton kinds <code>plant</code>,
+<code>requirement</code>, and <code>supervisor</code>, and interprets them using the
+corresponding concepts of the mathematical framework of supervisor synthesis.
+Kindless/regular automata (without a supervisory kind) are treated as unknown.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-location-names-in-reports-and-errors">Location names in reports and errors</h5>
+<div class="paragraph">
+<p>Several tools output reports or give errors with locations that are
+interesting in some way.</p>
+</div>
+<div class="paragraph">
+<p>Tools that take a single automaton as input report locations by their name in
+the input specification, for example <code>location "button.off"</code> denotes the
+<code>off</code> location in the <code>button</code> automaton. The location of automata that
+have a single unnamed location use <code>*</code> as location name, for example
+<code>location "req.*"</code> denotes the single unnamed location in the <code>req</code>
+automaton.</p>
+</div>
+<div class="paragraph">
+<p>Tools that take a number of automata together, like supervisor synthesis
+report interesting states as <code>state</code> followed by the names of the locations,
+for example <code>state "button.on", "machine.idle"</code>. Such a state refers to a
+location that represents the combined locations of the automata, in the
+example, the combined locations <code>button.off</code> and <code>machine.idle</code>.</p>
+</div>
+<div class="paragraph">
+<p>Tools that combine or merge locations, like projection, report such combined
+locations as a partition, for example <code>partition "machine.down",
+"machine.off"</code> represents a location that is a combination of the <code>down</code>
+and the <code>off</code> locations in the <code>machine</code> automaton.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-available-tools">Available tools</h5>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-eventbased-chapter-product">Event-based synchronous product</a></p>
+<div class="paragraph">
+<p>Computes the product of a number of deterministic or non-deterministic
+automata, where common events are synchronized. Essentially computes the
+<a href="#tools-cifsim-traces-state-space">state space</a>.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-supervisorsynthesis">Event-based supervisor synthesis</a></p>
+<div class="paragraph">
+<p>Derivation of a maximal permissive supervisor from a collection of
+deterministic plant and requirement automata.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-synthesis-analysis">Event-based synthesis analysis</a></p>
+<div class="paragraph">
+<p>Analysis of the removed parts of a synthesized supervisor.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-nonconflicting-check">Event-based nonconflicting check</a></p>
+<div class="paragraph">
+<p>Verifies whether automata are conflicting, that is together could lead to
+non-coreachable states.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-controllability-check">Event-based controllability check</a></p>
+<div class="paragraph">
+<p>Verifies whether the supervisor does not disable uncontrollable events
+of the plant.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-language-equivalence-check">Event-based language equivalence check</a></p>
+<div class="paragraph">
+<p>Verifies whether two automata produce the same events at each point.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-nfa-to-dfa">Event-based NFA to DFA automaton conversion</a></p>
+<div class="paragraph">
+<p>Converts a non-deterministic automaton to a deterministic automaton while
+preserving the event behavior.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-dfa-minimization">Event-based DFA minimization</a></p>
+<div class="paragraph">
+<p>Minimize the number of locations of an automaton while preserving the
+event behavior.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-projection">Event-based automaton projection</a></p>
+<div class="paragraph">
+<p>Computes a projection of an automaton, resulting in a deterministic and
+language equivalent automaton over a subset of its alphabet.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-observer-check">Event-based observer check</a></p>
+<div class="paragraph">
+<p>Verifies whether an automaton can act as an observer of occurrences of
+observable events.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-automaton-abstraction">Event-based automaton abstraction</a></p>
+<div class="paragraph">
+<p>Abstracts an automaton to a set of observable events.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-trim-check">Event-based trim check</a></p>
+<div class="paragraph">
+<p>Verifies whether the automata are trim, that is, in each automaton, the
+locations must be both reachable and co-reachable.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-eventbased-chapter-trim">Event-based trim</a></p>
+<div class="paragraph">
+<p>Removes all locations that are not reachable or coreachable.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-product">Event-based synchronous product</h5>
+<div class="paragraph">
+<p>
+
+
+
+The event-based synchronous product takes one or more plant or requirement
+automata, and computes the synchronous product. Synchronous product means
+events on edges can only be taken if all automata with that event in their
+alphabet can take an edge with the same event at that time. This tool
+essentially computes the <a href="#tools-cifsim-traces-state-space">state space</a>.</p>
+</div>
+<div class="paragraph">
+<p>The tool takes a <code>.cif</code> file containing all automata to combine, and
+produces a new <code>.cif</code> file with the product automaton. If the
+<a href="#tools-eventbased-kinds">kinds</a> of the source automata are all the same,
+the resulting product automaton is of that kinds as well. Otherwise, the
+product automaton has unknown kind.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-synchronous-product-tool">Starting the synchronous product tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply synchronous product&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply synchronous product&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifprod</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifprod</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file</em>: The absolute or relative local file system path to the
+output CIF specification. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>_product.cif</code> file extension is added. The <code>product</code> part of the default
+extension depends on the <em>Result name</em> option.</p>
+</li>
+<li>
+<p><em>Result name</em>: The name to use for the product automaton. If not specified,
+defaults to <code>product</code>. Also affects the <em>Output file</em> option.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-supervisorsynthesis">Event-based supervisor synthesis</h5>
+<div class="paragraph">
+<p>
+
+
+
+The supervisor synthesis procedure takes one or more deterministic plant
+automata, one or more deterministic requirement automata, and combines
+them to a maximal permissive supervisor.</p>
+</div>
+<div class="paragraph">
+<p>
+The tool takes a <code>.cif</code> file containing <code>plant</code> and <code>requirement</code>
+automata. Besides the general event-based restrictions listed at
+<a href="#tools-eventbased-supported-specifications">Supported specifications</a>, the current implementation
+does not support:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Having no <code>plant</code> automata at all.</p>
+</li>
+<li>
+<p>Having no <code>requirement</code> automata at all.</p>
+</li>
+<li>
+<p>Having any other kind of automaton in the file. See
+<a href="#tools-eventbased-kinds">Automaton kinds</a> for a list of all automaton kinds.</p>
+</li>
+<li>
+<p>Non-determinism in the input automata. The tool reports the violating
+automaton, location, and event, for ease of reference.</p>
+</li>
+<li>
+<p>Events in the alphabet of the requirements that are not in the alphabet of
+the plants.</p>
+</li>
+<li>
+<p>Events that are not controllable or uncontrollable, if used (present in the
+alphabet or on an edge of at least one automaton).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In addition, it warns about common mistakes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Automata without a marked location.</p>
+</li>
+<li>
+<p>Non-<a href="#tools-eventbased-chapter-trim-check">trim</a> automata.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Finally, it can also perform checks about correct constructs that may not be
+the intention of its author. Each of these checks has to be enabled with an
+option:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Automata with a marked deadlock location. In a system with infinite
+behavior, you should probably never enter a deadlock location.</p>
+</li>
+<li>
+<p>Automata with an empty alphabet. Such automata never participate in an
+event, and can be removed.</p>
+</li>
+<li>
+<p>Controllable events that are used in exactly one automaton. Not always
+wrong, but creating a controllable event, and not using it for control may
+be a mistake.</p>
+</li>
+<li>
+<p>Groups of automata that share events only within the group (and not with any
+automaton outside the group). Such a group is completely independent, and
+can be synthesized separately.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The synthesis tool produces a new <code>.cif</code> file with the supervisor
+automaton (of kind <code>supervisor</code>) if the resulting automaton has at
+least an initial location. Otherwise, synthesis fails with a <code>Supervisor is
+empty</code> error, and no <code>.cif</code> file is written.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-supervisor-synthesis-tool">Starting the supervisor synthesis tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply supervisor synthesis&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply supervisor synthesis&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifsupsynth</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifsupsynth</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-2">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file</em>: The absolute or relative local file system path to the
+output CIF specification. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>_sup.cif</code> file extension is added. The <code>sup</code> part of the default
+extension depends on the <em>Result name</em> option.</p>
+</li>
+<li>
+<p><em>Result name</em>: The name to use for the supervisor automaton. If not
+specified, defaults to <code>sup</code>. Also affects the <em>Output file</em> option.</p>
+</li>
+<li>
+<p><em>Enable Synthesis dump</em>: If enabled, the synthesis algorithm writes a
+dump file containing the actions performed by the algorithm, for later
+analysis. The name of the file is decided by the <em>Dump file</em> option.</p>
+</li>
+<li>
+<p><em>Synthesis dump file</em>: The name of the dump file. Setting this option will enable
+dumping of the synthesis algorithm actions. The options contains the
+absolute or relative local file system path to the
+synthesis dump file. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>.synth_dump</code> file extension is added.</p>
+</li>
+<li>
+<p><em>Disjunct groups check</em>: If enabled, the tool will report about groups of
+automata that share events in the group only.</p>
+</li>
+<li>
+<p><em>Empty alphabet check</em>: If enabled, the tool will report about automata
+without events in their alphabet.</p>
+</li>
+<li>
+<p><em>Marked deadlock location check</em>: If enabled, the tool will report about
+marked locations without outgoing edges.</p>
+</li>
+<li>
+<p><em>Single use controllable check</em>: If enabled, the tool will report about
+controllable events that are used in exactly one automaton.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-synthesis-analysis">Event-based synthesis analysis</h5>
+<div class="paragraph">
+<p>
+
+
+
+While developing a controller with supervisory controller synthesis, the
+result is not always what you expect. To assist, the synthesis analysis tool
+has been developed. Its primary purpose is to explain why certain states or
+edges have been removed.</p>
+</div>
+<div class="paragraph">
+<p>To use the tool, enable creation of the <em>Synthesis Dump</em> file during
+synthesis, using the <em>Enable Synthesis dump</em> option or the <em>Synthesis dump
+file</em> option of the <a href="#tools-eventbased-chapter-supervisorsynthesis">Supervisor synthesis tool</a>.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/eventbased/analysis_enable_synthesis_dump.png" alt="analysis enable synthesis dump">
+</div>
+</div>
+<div class="paragraph">
+<p>By double clicking the generated dump file, or by right-clicking the dump file
+and selecting
+<b class="menuref">Analyze Synthesis Result</b>,
+the analysis tool is
+started. It loads the file (which can take a some time if the file is big),
+eventually giving the following display:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/eventbased/analysis_startup.png" alt="analysis startup">
+</div>
+</div>
+<div class="paragraph">
+<p>At the left, all automata with their initial location are shown. You can
+select a different supervisor state by changing these locations. At the top,
+in the middle, there are three buttons. The bottom button labeled <em>Search
+state</em> is used to search the information about a supervisor state selected at
+the left. The <em>Jump to initial state</em> button resets the automata locations
+to their initial state, useful when you want to start again. The middle button
+is disabled now, but allows you to go back to the previous state.</p>
+</div>
+<div class="paragraph">
+<p>At the right, a number of options are available in case the displayed
+information is not sufficient. These are explained later.</p>
+</div>
+<div class="paragraph">
+<p>Below the buttons and options is the report area, which just displays some
+statistics. When you press <em>Search</em>, the tool analyzes the selected state at
+the left. Depending on what happened with that state, different things may be
+shown. In this example, you get:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/eventbased/analysis_basic.png" alt="analysis basic">
+</div>
+</div>
+<div class="paragraph">
+<p>The report area changes to display the information about the selected state.
+It starts with the internal number of this state (<code>#0</code>), and its properties.
+The <code>initial</code> means this state is the initial state, <code>marked</code> means this
+state is marked. Then follows an explicit list of locations of every
+automaton. It is the same list as the selected locations at the left, but more
+compact. Then the analysis result is shown. This state exists in the
+supervisor, and has no outgoing edges. In other words, this state is the only
+state in the result. Below it, the edges removed by the requirements are
+listed, together with the name of the requirement automaton that disabled it.</p>
+</div>
+<div class="paragraph">
+<p>Not displayed here is the list of edges removed due to plant automata. These
+can be displayed by enabling the <em>Display disabled plant events</em> option at the
+top-right.</p>
+</div>
+<div class="paragraph">
+<p>If a state does have outgoing edges, these are displayed as well:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/eventbased/analysis_outgoing.png" alt="analysis outgoing">
+</div>
+</div>
+<div class="paragraph">
+<p>State <code>#7</code> has one outgoing edge, leading to state <code>#9</code> using event
+<code>Sensor_In_Off</code>. The last line with the removed controllable events
+displays a removed edge because destination state <code>#8</code> was removed.</p>
+</div>
+<div class="paragraph">
+<p>If you want to know what states <code>#9</code> or <code>#8</code> are, you can enable the
+<em>Display full state</em> at the top-right, and the tool will display the full
+list of automaton locations with each state, just like the first line in the
+report. You can also go to these states, by double-clicking at the blue area.
+If you click at removed state <code>#8</code> you get a display like:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/eventbased/analysis_removed.png" alt="analysis removed">
+</div>
+</div>
+<div class="paragraph">
+<p>As expected, the analysis tools displays that the state was removed,
+apparently because it was not co-reachable. Again you get the list of removed
+edges from this state, as an aid to decide which requirement should be
+checked, if this was not expected.</p>
+</div>
+<div class="paragraph">
+<p>The final screenshot shows what is displayed if a state is removed because
+another state is removed:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/eventbased/analysis_chain.png" alt="analysis chain">
+</div>
+</div>
+<div class="paragraph">
+<p>This is an example from a bigger system, where the supervisor is empty. The
+analysis of the initial state reveals that it was removed due to a removal of
+a chain of other states. State <code>#24</code> was removed due to a requirement
+(reading from bottom to top), which caused the chain of states <code>#9</code>, <code>#2</code>,
+and eventually <code>#0</code> to be removed.</p>
+</div>
+<div class="paragraph">
+<p>Removed edges with controllable events are not displayed here, since these
+have no influence to the disappearing of the states. If you want, you can
+display them by toggling the <em>Always display disabled controllable events</em>
+option at the top-right.</p>
+</div>
+<div class="paragraph">
+<p>In this example, the number of states in the chain to the disabling
+requirement was 4 states. This chain can be longer. Usually the middle part
+is not that interesting and it is omitted from the display, but if you want to
+see them, you can increase the number of displayed states at the top-right
+(which is by default <code>5</code>).
+Another way to see them is to double-click at a state in the chain, and the
+analysis tool will display the chain starting from that state.</p>
+</div>
+<div class="paragraph">
+<p>A situation that is not shown here, is that the analysis tool has no
+information about a state. It happens when the synthesis encountered a bad
+state on all paths to that state. In such a case, it displays that there is no
+information about the queried state.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-synthesis-analysis-tool">Starting the synthesis analysis tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, double-click a <code>.synth_dump</code> file generated by the supervisor
+synthesis dump.</p>
+</li>
+<li>
+<p>In Eclipse, right click a <code>.synth_dump</code> file in the
+'Project Explorer' tab or 'Package Explorer' tab and choose
+<b class="menuref">Analyze Synthesis Result</b>.</p>
+</li>
+<li>
+<p>Use the <code>cifsynthanalys</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifsynthanalys</code>
+command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-3">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input Synthesis dump file.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-nonconflicting-check">Event-based nonconflicting check</h5>
+<div class="paragraph">
+<p>
+
+
+
+The nonconflicting check verifies whether two or more automata are conflicting,
+that is, whether they together could result in non-coreachable states.</p>
+</div>
+<div class="paragraph">
+<p>One practical application is to check a supervisor, either synthesized or
+manually created, against a plant. That is, when the supervisor is used to
+control the plant, will it always stay in the safe coreachable area? If not, at
+what point does it fail to do so?</p>
+</div>
+<div class="paragraph">
+<p>Another practical application is to check several supervisors synthesized for
+parts of a system. That is, when the supervisors are used together to control
+a system, could that result in non-coreachable states? If so, which states are
+conflicting?</p>
+</div>
+<div class="paragraph">
+<p>The tool takes a <code>.cif</code> file containing two or more automata, that must be
+both deterministic and trim. Besides those restrictions, the general
+event-based restrictions listed at
+<a href="#tools-eventbased-supported-specifications">Supported specifications</a> apply as well.</p>
+</div>
+<div class="paragraph">
+<p>The nonconflicting check tool produces a text file, listing the traces that
+lead to a conflicting state. If no such traces are found, the automata are
+nonconflicting.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-nonconflicting-check-tool">Starting the nonconflicting check tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply nonconflicting check&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply nonconflicting check&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifncchk</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifncchk</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-4">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Report file</em>: The absolute or relative local file system path to the
+output report file with conflicts. If not specified, defaults to the input
+file path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>_conflicts.txt</code> file extension is added.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-controllability-check">Event-based controllability check</h5>
+<div class="paragraph">
+<p>
+
+
+
+The controllability check verifies whether a supervisor automaton does not
+disable edges with uncontrollable events of the (combined) plant automata. If
+the check fails, the tool reports where it fails. If the check succeeds, it
+reports the edges with controllable events that are disabled by the
+supervisor.</p>
+</div>
+<div class="paragraph">
+<p>
+The tool takes a <code>.cif</code> file containing a <code>supervisor</code> automaton, and one
+or more <code>plant</code> automata. Besides the general event-based restrictions listed
+at <a href="#tools-eventbased-supported-specifications">Supported specifications</a>, the current implementation
+does not support:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Having more than one <code>supervisor</code> automaton.</p>
+</li>
+<li>
+<p>Having no <code>plant</code> or <code>supervisor</code> automaton.</p>
+</li>
+<li>
+<p>Having an automaton with a different kind than <code>plant</code> or <code>supervisor</code>.</p>
+</li>
+<li>
+<p>Having a non-deterministic automaton.</p>
+</li>
+<li>
+<p>Events that are not controllable or uncontrollable, if used (present in the
+alphabet or on an edge of at least one automaton).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The controllability check tool produces a report text file with its findings.
+It states whether the controllability property holds (no edges with
+uncontrollable events of the plant are disabled) or fails (one or more edges
+with uncontrollable events in the plant are disabled by the supervisor).</p>
+</div>
+<div class="paragraph">
+<p>If the controllability property holds, the tool lists the disabled controllable
+events, which can be useful in the design process. If the property fails, the
+tool lists the edges that are disabled by the supervisor.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-controllability-check-tool">Starting the controllability check tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply controllability check&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply controllability check&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifctrlchk</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifctrlchk</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-5">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Report file</em>: The absolute or relative local file system path to the
+output report file with disabled events. If not specified, defaults to the
+input file path, where the <code>.cif</code> file extension is removed (if present),
+and a <code>_disableds.txt</code> file extension is added.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-language-equivalence-check">Event-based language equivalence check</h5>
+<div class="paragraph">
+<p>
+
+
+
+The language equivalence check verifies whether two automata produce the same
+language, that is, at every point they are marked in the same way and can
+produce the same events. Note that even automata with a different number of
+locations or edges can be language equivalent.</p>
+</div>
+<div class="paragraph">
+<p>All reachable locations of the automata are checked. In particular, it also
+checks locations that are outside the marked behavior (that is, reachable
+locations that are not marked and are not on a path to a marked location). To
+avoid false positives, you may want to ensure that both automata are
+<a href="#tools-eventbased-chapter-trim">trim</a>.</p>
+</div>
+<div class="paragraph">
+<p>One practical application is to verify whether a manually created supervisor
+is equivalent to an automatically generated one. If they are not, a counter
+example is produced.</p>
+</div>
+<div class="paragraph">
+<p>The tool takes a <code>.cif</code> file containing exactly two automata, that must
+be deterministic, have the same alphabet, and have an initial location. In
+addition, the general event-based restrictions listed at
+<a href="#tools-eventbased-supported-specifications">Supported specifications</a> apply as well.</p>
+</div>
+<div class="paragraph">
+<p>The language equivalence check tool produces output stating
+<code>Automata have the same language</code>, or it produces a counter example
+where an event can be
+performed in a location in one automaton, while from the equivalent
+location in the other automaton the same event cannot be performed.
+The equivalent location is derived by walking from the initial
+location to the location of interest in both automata, using the same
+sequence of events.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-language-equivalence-check-tool">Starting the language equivalence check tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply language equivalence check&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply language equivalence check&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>ciflngeqv</code> tool in a ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>ciflngeqv</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-6">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-nfa-to-dfa">Event-based NFA to DFA automaton conversion</h5>
+<div class="paragraph">
+<p>
+
+
+
+The event-based NFA to DFA automaton conversion takes an non-deterministic
+automaton. The algorithm produces a deterministic automaton with the same
+language.</p>
+</div>
+<div class="paragraph">
+<p>The tool takes a <code>.cif</code> file containing a single automaton. The output is
+a <code>.cif</code> file containing a deterministic automaton that is language
+equivalent with the input automaton. The resulting automaton has the same kind
+as the input automaton.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-nfa-to-dfa-automaton-conversion-tool">Starting the NFA to DFA automaton conversion tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply NFA to DFA automaton conversion&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply NFA to DFA automaton conversion&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifnfadfa</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifnfadfa</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-7">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file</em>: The absolute or relative local file system path to the
+output CIF specification. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>_dfa.cif</code> file extension is added. The <code>dfa</code> part of the
+default extension depends on the <em>Result name</em> option.</p>
+</li>
+<li>
+<p><em>Result name</em>: The name to use for the projected automaton. If not
+specified, defaults to <code>dfa</code>. Also affects the <em>Output file</em> option.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-dfa-minimization">Event-based DFA minimization</h5>
+<div class="paragraph">
+<p>
+
+
+
+Minimizing the number of locations of an automaton while preserving the
+language gives a canonical representation of the language, making it easier to
+compare automata. The DFA minimization tool computes such a minimal automaton.</p>
+</div>
+<div class="paragraph">
+<p>The tool takes a <code>.cif</code> file containing one deterministic automaton with an
+initial location. In addition, the general event-based restrictions listed at
+<a href="#tools-eventbased-supported-specifications">Supported specifications</a> apply as well.</p>
+</div>
+<div class="paragraph">
+<p>The DFA minimization tool produces an automaton with the same language, but
+with the minimal number of locations. If the original automaton already had
+the minimal number of locations, the result is the same as the input.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-dfa-minimization-tool">Starting the DFA minimization tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply DFA minimization&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply DFA minimization&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifdfamin</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifdfamin</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-8">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file</em>: The absolute or relative local file system path to the
+output CIF specification. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>_minimal.cif</code> file extension is added. The <code>minimal</code> part of the default
+extension depends on the <em>Result name</em> option.</p>
+</li>
+<li>
+<p><em>Result name</em>: The name to use for the minimized automaton. If not specified,
+defaults to <code>minimal</code>. Also affects the <em>Output file</em> option.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-projection">Event-based automaton projection</h5>
+<div class="paragraph">
+<p>
+
+
+
+The event-based automaton projection takes an automaton and a subset of the
+events of its alphabet that should be preserved. The other events of the
+alphabet are considered to be internal steps and get replaced by <code>epsilon</code>
+at the edges. The algorithm produces a deterministic automaton with the subset
+as its alphabet that has the same language.</p>
+</div>
+<div class="paragraph">
+<p>The tool takes a <code>.cif</code> file containing a single automaton, and the names
+of the events that should be preserved. The output is a <code>.cif</code> file
+containing a deterministic automaton that is language equivalent with the
+input automaton with respect to the set of preserved events.
+The resulting automaton has the same kind as the input automaton.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-automaton-projection-tool">Starting the automaton projection tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply automaton projection&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply automaton projection&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifproj</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifproj</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-9">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Preserved events</em>: Comma and/or whitespace separated absolute names of
+events that should be preserved.</p>
+</li>
+<li>
+<p><em>Output file</em>: The absolute or relative local file system path to the
+output CIF specification. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>_projected.cif</code> file extension is added. The <code>projected</code> part of the
+default extension depends on the <em>Result name</em> option.</p>
+</li>
+<li>
+<p><em>Result name</em>: The name to use for the projected automaton. If not
+specified, defaults to <code>projected</code>. Also affects the <em>Output file</em> option.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-observer-check">Event-based observer check</h5>
+<div class="paragraph">
+<p>
+
+
+
+The event-based observer check takes an automaton, and a subset of the events
+of its alphabet that are observable. The check verifies whether the automaton
+after projection (see <a href="#tools-eventbased-chapter-projection">Event-based automaton projection</a>) can derive the
+(abstracted) state of another component by synchronizing only on the
+observable events.</p>
+</div>
+<div class="paragraph">
+<p>The tool takes a <code>.cif</code> file containing a single automaton, and the names
+of the events that are observable. The output is a report file that indicates
+whether the observer check property holds. If it fails, the events causing
+failure are also listed.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-observer-check-tool">Starting the observer check tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply observer check&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply observer check&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifobschk</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifobschk</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-10">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Observable events</em>: Comma and/or whitespace separated absolute names of
+events that are observable.</p>
+</li>
+<li>
+<p><em>Report file</em>: The absolute or relative local file system path to the
+output report file. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>_observation.txt</code> file extension is added.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-automaton-abstraction">Event-based automaton abstraction</h5>
+<div class="paragraph">
+<p>
+
+
+
+The event-based automaton abstraction takes an automaton, and a subset of the events
+of its alphabet that are observable. The abstraction produces a
+non-deterministic abstracted automaton with the observable events as its
+alphabet, that is weakly bisimilar to the original automaton.</p>
+</div>
+<div class="paragraph">
+<p>The tool takes a <code>.cif</code> file containing a single automaton, and the names
+of the events that are observable. The output is a <code>.cif</code> file with the
+abstracted automaton. The resulting automaton has the same kind as the input
+automaton.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-automaton-abstraction-tool">Starting the automaton abstraction tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply automaton abstraction&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply automaton abstraction&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifabstr</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifabstr</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-11">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Observable events</em>: Comma and/or whitespace separated absolute names of
+events that are observable.</p>
+</li>
+<li>
+<p><em>Output file</em>: The absolute or relative local file system path to the
+output CIF file. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>_abstracted.cif</code> file extension is added. The <code>abstracted</code> part of the
+default extension depends on the <em>Result name</em> option.</p>
+</li>
+<li>
+<p><em>Result name</em>: The name to use for the abstracted automaton. If not
+specified, defaults to <code>abstracted</code>. Also affects the <em>Output file</em> option.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-trim-check">Event-based trim check</h5>
+<div class="paragraph">
+<p>
+
+
+
+This check verifies that the automata in the given file are trim, that is, in
+each automaton, all the locations must be both reachable and coreachable. If
+the check fails for one or more automata, the tool reports for each automaton,
+whether all its locations are reachable and coreachable. It also lists the
+locations where the property fails.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-trim-check-tool">Starting the trim check tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply trim check&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply trim check&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>ciftrimchk</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>ciftrimchk</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-12">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Report file</em>: The absolute or relative local file system path to the
+output report file with disabled events. If not specified, defaults to the
+input file path, where the <code>.cif</code> file extension is removed (if present),
+and a <code>_trimcheck.txt</code> file extension is added.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-eventbased-chapter-trim">Event-based trim</h5>
+<div class="paragraph">
+<p>
+
+
+
+The trim tool makes an automaton trim by removing all locations that are not
+reachable or coreachable.
+The input is a <code>.cif</code> file with a single automaton, and the tool produces a
+new <code>.cif</code> file with the trim automaton. If the automaton in the input was
+already trim, all locations are preserved.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-trim-tool">Starting the trim tool</h6>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply trim&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Event-based synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply trim&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>ciftrim</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>ciftrim</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-13">Options</h6>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file</em>: The absolute or relative local file system path to the
+output CIF specification. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>_trim.cif</code> file extension is added. The <code>trim</code> part of the default
+extension depends on the <em>Result name</em> option.</p>
+</li>
+<li>
+<p><em>Result name</em>: The name to use for the trim automaton. If not
+specified, defaults to <code>trim</code>. Also affects the <em>Output file</em> option.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-chapter-cif2supremica">CIF to Supremica transformer</h4>
+<div class="paragraph">
+<p>
+
+
+The CIF to Supremica transformer can be used to transform CIF specifications
+to Supremica modules (<code>*.wmod</code> files).
+<a href="http://supremica.org/">Supremica</a>
+is a tool for synthesis of discrete event supervisors.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-transformation-3">Starting the transformation</h5>
+<div class="paragraph">
+<p>The transformation can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Convert CIF to Supremica&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF synthesis tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Convert CIF to Supremica&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cif2supremica</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cif2supremica</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2supremica-options">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file path</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file path</em>: The absolute or relative local file system path to the
+output Supremica module file. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>.wmod</code> file extension is added.</p>
+</li>
+<li>
+<p><em>Supremica module name</em>: The name of the Supremica module. If not specified,
+defaults to the name of the output file, after removal of the <code>.wmod</code>
+extension (if present).</p>
+</li>
+<li>
+<p><em>Eliminate enumerations</em>: Enable this option to eliminate enumerations and
+replace them with integers before transforming to Supremica. Disable this
+option to keep enumerations in the generated Supremica module. By default this
+option is disabled.</p>
+<div class="paragraph">
+<p>Even though Supremica supports enumerations in its language, it doesn&#8217;t
+support them in all its algorithms. Even if the original CIF transformation
+being transformed does not use enumerations, enumerations may still be
+generated internally during
+<a href="#tools-cif2supremica-preprocessing">preprocessing</a>.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-supported-specifications-3">Supported specifications</h5>
+<div class="paragraph">
+<p>The CIF to Supremica transformer supports a subset of CIF specifications. The
+following restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Kindless/regular automata (without a supervisory kind) are not supported.
+Only <code>plant</code>, <code>requirement</code>, and <code>supervisor</code> automata are supported.</p>
+</li>
+<li>
+<p>Events not declared as controllable or uncontrollable are not supported.
+This includes the <code>tau</code> event, both explicitly used on edges, as well as
+implicitly for edges without explicitly mentioned events.</p>
+</li>
+<li>
+<p>Initialization predicates outside of locations are not supported.</p>
+</li>
+<li>
+<p>Marker predicates outside of locations are only supported if they have the
+form <code>discrete_variable = marked_value</code>.</p>
+</li>
+<li>
+<p>Discrete variables with multiple marker predicates are not supported.</p>
+</li>
+<li>
+<p>Locations with initialization or marker predicates that are not trivially
+true or false are not supported.</p>
+</li>
+<li>
+<p>Automata that do not have exactly one initial location are not supported.</p>
+</li>
+<li>
+<p>Invariants in locations are not supported.</p>
+</li>
+<li>
+<p>Invariants are only supported if they are requirement invariants.</p>
+</li>
+<li>
+<p>Only state invariants are supported. State/event exclusion invariants are
+not supported. To allow state/event exclusion invariants to be used in the
+input, manually eliminate them first using the
+<a href="#tools-cif2cif-chapter-elim-state-event-excl-invs">Eliminate state/event exclusion invariants</a> CIF to CIF transformation.</p>
+</li>
+<li>
+<p>Discrete variables that have multiple potential initial values
+(<code>in {...}</code> or <code>in any</code>) are not supported.</p>
+</li>
+<li>
+<p>Continuous variables are not supported.</p>
+</li>
+<li>
+<p>Input variables are currently unsupported.</p>
+</li>
+<li>
+<p>Multi-assignments on edges (such as <code>do (x, y) := (1, 2)</code>) are not
+supported. However, it is allowed to use multiple assignments on an edge
+(such as <code>do x := 1, y := 2</code>).</p>
+</li>
+<li>
+<p>Partial variable assignments (such as <code>do x[0] := 5</code>) are not supported.</p>
+</li>
+<li>
+<p>Conditional updates on edges (such as <code>do if b: x := 5 end</code>) are not
+supported.</p>
+</li>
+<li>
+<p>Urgent locations and urgent edges are not supported.</p>
+</li>
+<li>
+<p>User-defined functions are not supported.</p>
+</li>
+<li>
+<p>Channels (events with data types) are not supported.</p>
+</li>
+<li>
+<p>Only the following data types are supported: boolean types, ranged integer
+types, and enumeration types.</p>
+</li>
+<li>
+<p>Only the following expressions are supported: boolean literal values, integer
+literal values, binary expressions (partially, see below), unary expressions
+(partially, see below), and references to constants, discrete variables,
+enumeration literals, and casts that don&#8217;t change the type.</p>
+</li>
+<li>
+<p>Only the following binary operators are supported: logical equivalence
+(<code>&lt;=&gt;</code>), logical implication (<code>=&gt;</code>), conjunction (<code>and</code>) on boolean
+operands, disjunction (<code>or</code>) on boolean operands, addition (<code>+</code>) on
+ranged integer operands, subtraction (<code>-</code>) on ranged integer operands,
+multiplication (<code>*</code>) on ranged integer operands, integer division (<code>div</code>)
+on ranged integer operands, integer modulus (<code>mod</code>) on ranged integer
+operands, equality (<code>=</code>), inequality (<code>!=</code>), less than (<code>&lt;</code>) on ranged
+integer operands, less than or equal to (<code>&lt;=</code>) on ranged integer operands,
+greater than (<code>&gt;</code>) on ranged integer operands, and greater than or equal to
+(<code>&gt;=</code>) on ranged integer operands.</p>
+</li>
+<li>
+<p>Only the following unary operators are supported: logical inverse (<code>not</code>),
+negation (<code>-</code>) on a ranged integer operand, and plus (<code>+</code>) on a ranged
+integer operand.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2supremica-preprocessing">Preprocessing</h5>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+applied as preprocessing (in the given order), to increase the subset of CIF
+specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-io-decls">Remove I/O declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-pos-info">Remove position information</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-add-default-init-values">Add default initial values</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-self">Eliminate automaton <code>self</code> references</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-alg-vars">Eliminate algebraic variables</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-locs-in-exprs">Eliminate the use of locations in expressions</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-type-decls">Eliminate type declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-monitors">Eliminate monitors</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-enums-to-ints">Convert enumerations to integers</a> (if enabled via the corresponding
+<a href="#tools-cif2supremica-options">option</a>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-others">Simplify others</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-transformation-result">Transformation result</h5>
+<div class="paragraph">
+<p>The CIF automata kinds <code>plant</code>, <code>requirement</code>, and <code>supervisor</code> are
+mapped to Supremica kinds <code>Plant</code>, <code>Specification</code>, and <code>Supervisor</code>,
+respectively.</p>
+</div>
+<div class="paragraph">
+<p>All generated Supremica automata are tagged as non-deterministic, as CIF
+automata may be non-deterministic.</p>
+</div>
+<div class="paragraph">
+<p>Nameless CIF locations are given the name <code>X</code> in Supremica automata.</p>
+</div>
+<div class="paragraph">
+<p>Supremica does not support boolean values. Instead of <code>true</code>, value <code>1</code> is
+used, and instead of <code>false</code>, value <code>0</code> is used. For boolean types
+(<code>bool</code>), ranged integer types (<code>int[0..1]</code>) are used.</p>
+</div>
+<div class="paragraph">
+<p>The absolute names of all CIF objects (automata, variables, etc) are used,
+where the <code>.</code> characters are replaced by <code>:</code> characters. For enumeration
+literals, the non-absolute name of the enumeration literal is used, prefixed
+with <code>:lit:</code>.</p>
+</div>
+<div class="paragraph">
+<p>No geometry is generated. When the generated Supremica file is opened in
+Supremica, Supremica will perform auto layouting.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-initialization">Initialization</h5>
+<div class="paragraph">
+<p>For the initial values of the variables, initialization predicates are
+generated (e.g. <code>x == 3</code>). Earlier versions of Supremica that support
+variables allowed deterministic initialization (only the initial value), and
+non-deterministic initialization (initialization predicates). The most recent
+version only allows non-deterministic initialization, which is why we generate
+initialization predicates.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-marking">Marking</h5>
+<div class="paragraph">
+<p>In CIF, if none of the locations of an automaton are indicated as marked, the
+automaton has no marked locations. In Supremica, if none of the locations of
+an automaton are indicated as marked (<code>:accepting</code>), all locations of the
+automaton are implicitly marked. When transforming a CIF automaton without any
+marked locations, a warning is printed to the console to inform the user of
+this difference.</p>
+</div>
+<div class="paragraph">
+<p>In CIF, if none of the values of a variable is indicated as marked, the
+variable has no marked values. In Supremica, if none of the values of
+a variable is indicated as marked (<code>:accepting</code>), all values of the
+variable are implicitly marked. When transforming a CIF variable without any
+marked values, a warning is printed to the console to inform the user of
+this difference.</p>
+</div>
+<div class="paragraph">
+<p>Location pointer variables that are automatically generated, such as the ones
+generated by the <a href="#tools-cif2cif-chapter-elim-locs-in-exprs">Eliminate the use of locations in expressions</a> CIF to CIF
+transformation, have no marking and thus lead to warnings.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-invariants">Invariants</h5>
+<div class="paragraph">
+<p>If the CIF model being transformed contains state invariants, an uncontrollable
+<code>u_inv_bad</code> event is added to the Supremica module. It is renamed if the name
+is not unique. A plant automaton named <code>inv_plant</code> (renamed if not unique) is
+added as well. This plant enables the <code>u_inv_bad</code> event if and only if at
+least one of the invariants doesn&#8217;t hold. A requirement automaton <code>inv_req</code>
+(renamed if not unique) is added as well. The requirement disables the event
+globally. Since blocking an uncontrollable plant event in a requirement is
+forbidden, synthesis will prevent such blockage (by disabling controllable
+events), thereby ensuring that the state invariants hold after synthesis.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-alphabets">Alphabets</h5>
+<div class="paragraph">
+<p>In CIF, it is possible to explicitly specify the alphabet of an automaton. This
+alphabet may include more events than occur on the edges of the automaton,
+thereby globally disabling those additional events. Supremica automatically
+determines the alphabet automatically, based on the events that occur on the
+edges of the automaton, just like CIF does if no explicit alphabet is
+specified. If a CIF automaton with 'additional' events is transformed, a self
+loop is added to the initial state for each 'additional' event, with a
+<code>false</code> guard (<code>0</code> in Supremica). This ensures that the event occurs on
+an edge, and is thus part of the alphabet, but is not enabled.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-range-semantics">Range semantics</h5>
+<div class="paragraph">
+<p>In CIF, if an update of an edge results in out of range values of variables,
+the CIF specification is considered invalid, and the simulation will result
+in a runtime error. In Supremica, the simulation does not result in a runtime
+error, but instead the offending transition is disabled/forbidden.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-jumping-semantics">Jumping semantics</h5>
+<div class="paragraph">
+<p>Consider the following CIF model:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant automaton p:
+  controllable c_event;
+  disc int[0..3] v = 0;
+
+  location loc1:
+    initial;
+    marked;
+    edge c_event do v := v + 1 goto loc2;
+
+  location loc2:
+    edge c_event               goto loc1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>There are two locations, and the edges allow for moving from one location to
+the other. Both edges use the same event. Every odd transition (the first
+transition, the third transition, etc), the value of variable <code>v</code> is
+increased by one. Every even transition, the value of variable <code>v</code> is not
+changed. After a few transitions, the simulation crashes due to overflow of
+variable <code>v</code>.</p>
+</div>
+<div class="paragraph">
+<p>To ensure the same semantics in Supremica, such that for every even transition
+the value of variable <code>v</code> does not change, the CIF model is modified by the
+transformation, to the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant automaton p:
+  controllable c_event;
+  disc int[0..3] v = 0;
+
+  location loc1:
+    initial;
+    marked;
+    edge c_event do v := v + 1 goto loc2;
+
+  location loc2:
+    edge c_event do v := v     goto loc1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Users of the transformation don&#8217;t have to do anything themselves, as the tool
+automatically adds the dummy assignments as needed. If the tool would not have
+added such dummy assignments, then the value of variable <code>v</code> would have
+been able to <em>jump</em> to any value (in its range <code>[0..3]</code>) for every even
+transition, according to the Supremica semantics.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tools-simulation-validation-and-visualization-tools">Simulation, validation, and visualization tools</h3>
+<div class="sect3">
+<h4 id="tools-cifsim-chapter-index">CIF simulator</h4>
+<div class="paragraph">
+<p>
+
+The CIF simulator can be used to explore the
+<a href="#tools-cifsim-traces-state-space">state space</a> of CIF specifications, either
+interactively, or using a more automated approach. Powerful visualization
+features allow for interactive visualization-based validation of the CIF
+specification.</p>
+</div>
+<div class="paragraph">
+<p><strong>Basics</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-chapter-supported">Supported specifications</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-start">Starting the simulator</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-init">Initialization of the CIF specification</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-termination">Terminating the simulator</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-traces">Simulation of traces</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-repeated-simulation">Repeated simulation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Input/Output</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-input-chapter-index">Input modes</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-env-events">Environment events</a> (non-urgent events)</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-chapter-index">Simulation output</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Advanced</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-chapter-options">Simulator options</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-performance">Simulation performance</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-index">ODE solver</a> (integration and guard/event detection)</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-java-compiler">Java compiler</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Miscellaneous</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-chapter-complete-mode">Complete mode</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-extfuncs">External user-defined functions</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-profiling">Profiling</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-distr-seeds">Stochastic distributions and seeds</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Developers</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-chapter-max-time-point-tol">Maximum time point tolerance</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-debug-gen-code">Debugging generated code</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-test-mode">Test mode</a></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-simulation-basics">Simulation basics</h4>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-supported">Supported specifications</h5>
+<div class="paragraph">
+<p>
+The CIF simulator supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Input variables are currently not supported.</p>
+</li>
+<li>
+<p>Time dependent <a href="#tut-data-chapter-stat-invariants">state invariants</a> are
+not supported. This applies only to state invariants.
+<a href="#tut-data-chapter-stat-evt-excl-invariants">State/event exclusion invariants</a> are supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Specifications with component definitions/instantiations are not natively
+supported by the CIF simulator. Therefore, they are automatically eliminated
+by the simulator, as a preprocessing step, using the CIF to CIF transformation
+to <a href="#tools-cif2cif-chapter-elim-comp-def-inst">eliminate component definition/instantiation</a>.</p>
+</div>
+<div class="paragraph">
+<p>Automata with multiple possible initial locations and discrete variables with
+multiple possible initial values (including <code>any</code>) are not supported, unless
+additional <a href="#tools-cifsim-chapter-init">initialization</a> is provided.</p>
+</div>
+<div class="paragraph">
+<p>The controllability of events is ignored by the simulator, as are marker
+predicates.</p>
+</div>
+<div class="paragraph">
+<p>All automata are simulated as plants. That is, all automaton kinds are ignored
+by the simulator. However, simulating requirements as plants may lead to
+unexpected results. Therefore, the simulator prints warnings to the console,
+whenever requirements are simulated. It is highly recommended to first apply
+<a href="#tools-eventbased-chapter-supervisorsynthesis">supervisor synthesis</a> to the
+specification, and simulate the resulting specification using the simulator.
+Alternatively, apply verification to the specification,
+<a href="#tools-cif2cif-chapter-remove-reqs">remove</a> the verified requirements, and
+simulate the resulting specification using the simulator.</p>
+</div>
+<div class="paragraph">
+<p>Similar to requirement automata, the simulator warns about simulation of
+requirement invariants.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-start">Starting the simulator</h5>
+<div class="paragraph">
+<p>
+The CIF simulator can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<b class="menuref">Simulate CIF specification&#8230;&#8203;</b>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<b class="menuref">Simulate CIF specification&#8230;&#8203;</b>.</p>
+</li>
+<li>
+<p>Use the <code>cifsim</code> tool in a ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifsim</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Once you start the simulator, an option dialog will appear, where you can
+configure the simulation <a href="#tools-cifsim-chapter-options">options</a>.</p>
+</div>
+<div class="paragraph">
+<p>Instead of a CIF model (e.g. a <code>.cif</code> file), simulation can also be started
+for a <a href="#tools-cifsim-chapter-repeated-simulation">compiled code file</a> (e.g. a
+<code>.cifcode</code> file). For compiled code files, an additional option is
+available. The simulator can also be started by double clicking such a file.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-init">Initialization of the CIF specification</h5>
+<div class="paragraph">
+<p>
+CIF supports <a href="#tut-data-chapter-discrete-variables">discrete variables</a> with
+<a href="#lang-tut-data-discvar-init-multiple">multiple potential initial values</a>,
+as well as discrete variables with an
+<a href="#lang-tut-data-discvar-init-any">arbitrary initial value</a>. Furthermore,
+CIF supports automata with
+<a href="#lang-tut-data-init-preds-aut">multiple potential initial locations</a>.
+The simulator however, needs to know how to initialize the specification. The
+initial values of discrete variables, and the initial locations of automata,
+can be specified using the
+<b class="menuref">CIF specification initialization</b>
+option
+(<b class="menuref">Simulator</b>
+category). Initialization can be provided using the
+option, per discrete variable or automaton.</p>
+</div>
+<div class="paragraph">
+<p>For a discrete variable, initialization is of the form <code>var:value</code>, where
+<code>var</code> is the absolute name of a discrete variable, and <code>value</code> is a CIF
+<a href="#lang-tut-values-types-values-exprs-literal">literal</a> that represents a
+valid initial value for the variable. Providing an initialization for a
+discrete variable with a
+<a href="#tut-functions-chapter-functions-as-values">function type</a> or a
+<a href="#tut-stochastics-chapter-intro">distribution</a> type, is not supported.</p>
+</div>
+<div class="paragraph">
+<p>For an automaton, initialization is of the form <code>aut:loc</code>, where <code>aut</code> is
+the absolute name of an automaton, and <code>loc</code> is the name of a location of
+that automaton. Providing an initialization for an automata with only one
+nameless location, is not supported.</p>
+</div>
+<div class="paragraph">
+<p>It is not allowed to provide multiple initializations for a single variable or
+automaton.</p>
+</div>
+<div class="paragraph">
+<p>If insufficient initializations are provided, variables and automata may not be
+initialized. That is, the simulator may not be able to choose between the
+multiple potential initial values or locations. The simulator will report such
+problems, indicating the specification is
+<a href="#tools-cifsim-chapter-supported">unsupported</a> without additional or alternative
+initializations.</p>
+</div>
+<div class="paragraph">
+<p>It is also possible that initializations in the CIF specification itself are
+incomplete or conflicting, the provided initializations are conflicting, or
+their combination is conflicting. Furthermore, initializations may be provided
+for values or locations that are not potential initial values or locations. In
+all such cases, initialization fails. The simulator will report such problems,
+providing detailed information about what caused the initialization failure.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-termination">Terminating the simulator</h5>
+<div class="paragraph">
+<p>
+The CIF simulator can terminate for various reasons. This page explains each
+of them, as well as some other information related to termination of the
+simulator.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-initialization-failure">Initialization failure</h6>
+<div class="paragraph">
+<p>If <a href="#tools-cifsim-chapter-init">initialization</a> of the specification fails,
+the simulation will terminate immediately.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-deadlock">Deadlock</h6>
+<div class="paragraph">
+<p>If simulation results in deadlock, no more transitions are possible, and the
+simulation will terminate.</p>
+</div>
+<div class="paragraph">
+<p>Simulation does not immediately terminate when deadlock occurs, if an
+interactive <a href="#tools-cifsim-input-chapter-index">input mode</a> is used and
+<a href="#tools-cifsim-input-chapter-history">history</a> is enabled. Instead, the user is
+asked whether to terminate the simulation,
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> one or more transitions, or
+<a href="#tools-cifsim-input-history-reset-undo">reset</a> the simulation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-termination-endtime">Simulation end time</h6>
+<div class="paragraph">
+<p>Using the
+<b class="menuref">Simulation end time</b>
+option (<b class="menuref">Simulator</b>
+category), the end time of the simulation can be configured. By setting a
+simulation end time, you ensure that when the value of variable <code>time</code>
+reaches that value, the simulation terminates.</p>
+</div>
+<div class="paragraph">
+<p>By default the simulation end time is set to 'infinite', which means that
+simulation termination is not limited by a simulation end time. Settings a
+simulation end time also limits the <a href="#tools-cifsim-solver-chapter-endtime-maxdelay">maximum duration of a time transition</a>.</p>
+</div>
+<div class="paragraph">
+<p>Simulation does not immediately terminate when the configured end time is
+reached, if an interactive <a href="#tools-cifsim-input-chapter-index">input mode</a> is
+used and <a href="#tools-cifsim-input-chapter-history">history</a> is enabled. Instead, the
+user is asked whether to terminate the simulation,
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> one or more transitions, or
+<a href="#tools-cifsim-input-history-reset-undo">reset</a> the simulation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-runtime-error">Runtime error</h6>
+<div class="paragraph">
+<p>If simulation results in a runtime error, the simulation will terminate
+immediately.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-end-of-trace-file">End of trace file</h6>
+<div class="paragraph">
+<p>If the <a href="#tools-cifsim-input-chapter-trace">trace input mode</a> is used, and no
+more commands are available in the trace file, the simulation will terminate
+immediately.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-user-requested-termination">User-requested termination</h6>
+<div class="paragraph">
+<p>The user can manually request termination of the simulation in several ways.</p>
+</div>
+<div class="paragraph">
+<p>Termination requests have no effect while the simulator interactively asks
+for input from the <a href="#tools-cifsim-input-chapter-console">console</a> or via the GUI
+of the <a href="#tools-cifsim-input-chapter-gui">interactive GUI input component</a>.
+However, once input is provided via the console and <kbd>ENTER</kbd> is pressed, or
+a choice is made via the GUI, the termination request will be processed.</p>
+</div>
+<div class="paragraph">
+<p>Termination requests issued between
+<a href="#tools-cifsim-output-realtime-frames">intermediate frames</a> are delayed
+until the next intermediate frame.</p>
+</div>
+<div class="sect6">
+<h7 id="tools-interactive-console-input">Interactive console input</h7>
+<div class="paragraph">
+<p>Termination of the simulation can be requested, when using the interactive
+<a href="#tools-cifsim-input-chapter-console">console</a> input mode, by typing <code>q</code>
+and pressing <kbd>ENTER</kbd>, whenever the simulator interactively asks for input
+via the console.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-interactive-gui-input">Interactive GUI input</h7>
+<div class="paragraph">
+<p>Termination of the simulation can be requested, when using the interactive
+<a href="#tools-cifsim-input-chapter-gui">interactive GUI input mode</a>, by closing the
+GUI of the interactive GUI input component, when the simulator asks for input
+via that GUI.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-applications-view">Applications view</h7>
+<div class="paragraph">
+<p>The <em>Applications</em> view has several termination features that may terminate
+any application, including the CIF simulator. See the documentation for
+that view, for details.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-console-termination-button">Console termination button</h7>
+<div class="paragraph">
+<p>Simulation can be terminated at any time, by using the <b class="menuref">Terminate</b>
+button (<span class="image"><img src="./tools/cifsim/terminate_button.png" alt="terminate button"></span>), located at the upper right corner of the console.</p>
+</div>
+<div class="paragraph">
+<p>Note however that if the console does not have the focus, this button may not
+be visible. If the button is not visible, click somewhere in the console to
+make the button appear. If even then the button is still not available, it may
+still appear if you <b class="menuref">Maximize</b> the console. Due to these issues, use
+of the termination features of the <em>Applications</em> view is recommended over
+using the <b class="menuref">Terminate</b> button of the console. See the documentation for
+that view, for details.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-closing-last-real-time-visualizer">Closing last real-time visualizer</h7>
+<div class="paragraph">
+<p>If the last remaining
+<a href="#tools-cifsim-output-realtime-outcomp">real-time output component</a>
+(visualizer) is closed by the user, the simulator will be asked to terminate as
+soon as possible.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-termination-confirm">Confirming termination</h6>
+<div class="paragraph">
+<p>When simulating within Eclipse, all
+<a href="#tools-cifsim-output-components">visualizers</a> remain open, after the
+simulation has terminated. This allows you to observe the final state of the
+simulation, before manually closing the visualizers.</p>
+</div>
+<div class="paragraph">
+<p>When simulating on the command line (outside of Eclipse), termination of the
+simulator means that the visualizers are also closed. To allow you to observe
+the final state of the simulation, you are asked to confirm termination of the
+simulator, and therefore closing of the visualizers, by pressing <kbd>ENTER</kbd>
+at the console.</p>
+</div>
+<div class="paragraph">
+<p>By default, you are only asked to confirm termination of the simulator when
+simulating on the command line (outside of Eclipse), at least one visualizer
+is visible at the end of the simulation, simulation did not result in a runtime
+error, and <a href="#tools-cifsim-chapter-test-mode">test mode</a> is disabled. The
+<b class="menuref">Ask to confirm simulator termination</b>
+option (<b class="menuref">Simulator</b>
+category) can be used to configure whether the simulator asks the user to
+confirm termination of the simulator, terminate automatically, or decides by
+itself whether to ask the user for confirmation or terminate automatically. The
+latter (letting the simulator decide by itself) is the default.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-traces">Simulation of traces</h5>
+<div class="paragraph">
+<p>
+The CIF simulator simulates one particular trace through the state space of
+the specification. To better understand what the previous sentence means, this
+page further explains each of those concepts.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-traces-state">State</h6>
+<div class="paragraph">
+<p>Automata consist of one or more locations. However, at any time, an automaton
+can only be in <em>one</em> of its locations. This location is called the <em>current</em>
+or <em>active</em> location. The current location of an automaton is also called the
+<em>state</em> of the automaton.</p>
+</div>
+<div class="paragraph">
+<p>Similar to having multiple locations in automata, variables usually have many
+possible values. However, similar to automata having only one current location,
+variables can not have two values at the same time.</p>
+</div>
+<div class="paragraph">
+<p>The current location of each of the automata (i.e. the states of the automata),
+together with the current values of the variables (all discrete and continuous
+variables, including variable <code>time</code>), is called the <em>state</em> of the
+specification. The state of the specification (or simply 'the state'), is
+all the information that needs to be maintained about the history of the
+simulation, going forward.</p>
+</div>
+<div class="paragraph">
+<p>For instance, consider the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton button:
+  event pushed, released;
+
+  location Released:
+    initial;
+    edge pushed goto Pushed;
+
+  location Pushed:
+    edge released goto Released;
+end
+
+automaton machine:
+  event producing, produced;
+
+  location Idle:
+    initial;
+    edge producing when button.Pushed goto Producing;
+
+  location Producing:
+    edge produced goto Idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>We have two automata, <code>button</code> and <code>machine</code>. Pushing the button (event
+<code>button.pushed</code>) turns on the machine. Releasing the button (event
+<code>button.released</code>) turns it off. Initially, the machine is <code>Idle</code>. While
+the button is pushed (location <code>button.Pushed</code> is the current location of
+automaton <code>button</code>), the machine can start to create a product (event
+<code>machine.producing</code>). Once the machine has produced a product (event
+<code>machine.produced</code>), the machine becomes idle again. Note that once the
+machine starts producing a product, it always finishes producing it, even if it
+is turned off in the mean time.</p>
+</div>
+<div class="paragraph">
+<p>The state of automaton <code>button</code> is either of its locations:
+<code>button.Released</code> or <code>button.Pushed</code>. Similarly, the state of automaton
+<code>machine</code> is <code>machine.Idle</code> or <code>machine.Producing</code>. Initially, the system
+is in state <code>button: Released, machine: Idle, time: 0.0</code>. For the remainder of
+variable <code>time</code> will omitted from the state, for brevity only. Furthermore,
+also for brevity only, we&#8217;ll omit the names of the automata. Therefore, the
+initial state is <code>Released, Idle</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-traces-state-space">State space</h6>
+<div class="paragraph">
+<p>The <em>state space</em> of a specification consists all the possible states of the
+specification, connected by the transitions via which they can be reached.</p>
+</div>
+<div class="paragraph">
+<p>For the example above, the state space is (event names are abbreviated):</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/state_space.png" alt="state space">
+</div>
+</div>
+<div class="paragraph">
+<p>Since both automata can be in two states, the state space in this case consists
+of four states. From the initial state (the upper left state), the button can
+be pushed, leading to the upper right state, where the button is pushed, while
+the machine has not yet started to produce a product. The machine can then
+start to produce a product (going to the lower right state). If however the
+button is released before the machine can respond by starting to produce a
+product, we go back to the upper left state. When the machine finishes
+creation of the product, we go from the lower right state back to the upper
+right state. If on the other hand the button is released, while the product is
+still being produced, we go from the lower right state to the lower left state.
+If we then push the button again, we go back to the lower right state. If
+instead the button is not pushed, and the machine finishes producing the
+product, we go from the lower left state back to the upper left state.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-traces-traces">Traces</h6>
+<div class="paragraph">
+<p>A <em>trace</em> is a sequence of transitions, from the initial state, through the
+state space.</p>
+</div>
+<div class="paragraph">
+<p>In state spaces, most states usually have multiple outgoing transitions. This
+means there is <em>choice</em>. That is, it is possible to choose to which next state
+to go. Furthermore, it is usually possible to keep taking transitions forever,
+which means we can have infinite traces.</p>
+</div>
+<div class="paragraph">
+<p>For the example above, some of the possible traces are shown below. Only the
+first five transitions of the traces are shown. State names are abbreviated,
+to the first letters of the names of the locations.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>RI
+→ <code>pushed</code>   → PI → <code>released</code>  → RI
+→ <code>pushed</code>   → PI → <code>released</code>  → RI
+→ <code>pushed</code>   → PI → &#8230;&#8203;</p>
+</li>
+<li>
+<p>RI
+→ <code>pushed</code>   → PI → <code>producing</code> → PP
+→ <code>produced</code> → PI → <code>producing</code> → PP
+→ <code>produced</code> → PI → &#8230;&#8203;</p>
+</li>
+<li>
+<p>RI
+→ <code>pushed</code>   → PI → <code>producing</code> → PP
+→ <code>released</code> → RP → <code>produced</code>  → RI
+→ <code>pushed</code>   → PI → &#8230;&#8203;</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In the first trace, we push the button, release it, push it again, release it,
+and push it again, all without ever starting to produce a product. This traces
+shows us what happens if the button is constantly being pushed and released,
+as quickly as possible, without the machine being able to respond to this, by
+starting to produce a product.</p>
+</div>
+<div class="paragraph">
+<p>In the second trace, we push the button, we start to produce a product, we
+finish producing it, start to produce another product (the button is still
+pushed), finish producing the second product, and start to produce a third
+product. This is a trace of a typical usage scenario, where we start the
+machine, and the machine keeps running.</p>
+</div>
+<div class="paragraph">
+<p>In the third trace, we push the button, start to produce a product, release the
+button before the product is finished, finish producing the product, and push
+the button again. This trace is another typical usage scenario, which also
+includes turning off the machine.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-traces-simulation">Simulation</h6>
+<div class="paragraph">
+<p>As stated at the top of the page: <em>'The CIF simulator simulates one
+particular trace through the state space of the specification'</em>. To see why
+this is the case, we take a look at the main simulation loop, as used by the
+simulator:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Calculate the initial state, and set it as the current state.</p>
+</li>
+<li>
+<p>Forever, do:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>If the user-provided simulation end time is reached, stop simulation.</p>
+</li>
+<li>
+<p>Calculate the possible transitions for the current state.</p>
+</li>
+<li>
+<p>If no transitions are possible (deadlock), stop simulation.</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-chapter-index">Choose</a> one of the possible transitions.</p>
+</li>
+<li>
+<p>Take the chosen transition, and set its target state as the new current
+state.</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>While this main simulation loop is simplified with respect to the real
+implementation, it gives some insight into the inner workings of the simulator.
+The simulator keeps taking transitions. Once a transition is taken, the current
+state is updated to the target state of the transition. This means that the
+other possible transitions (the ones that were not chosen), are not taken.
+Therefore, if we want to take a different transition, we should restart
+simulation from the initial state, and make different choices. That is, if we
+want to simulate a different trace, we perform another simulation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-traces-validation">Validation</h6>
+<div class="paragraph">
+<p>The simulator can be used to gain confidence in the correctness of the
+specification. By simulating various traces, we can observe what happens in
+different scenarios (use cases). Since the number of traces if often infinite,
+covering the entire state space, and all possible traces, is impossible.
+However, by wisely choosing the traces we simulate, we can cover a large part
+of the state space.</p>
+</div>
+<div class="paragraph">
+<p>It should be clear by now, that simulating a single trace is almost never
+enough to conclude that your specification is 'correct'. Different traces lead
+to different behavior, and only by testing enough traces, and thus covering
+enough of the system&#8217;s behavior, can you conclude that your specification
+works as expected (for those traces).</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-repeated-simulation">Repeated simulation</h5>
+<div class="paragraph">
+<p>
+
+When simulating a CIF model, the simulator reads the CIF file, checks it for
+validity, generates
+<a href="http://oracle.com/java">Java</a>
+code,
+<a href="#tools-cifsim-chapter-java-compiler">compiles</a> the code, and uses the compiled
+code using the actual simulation. All of this takes a bit of time, or even
+quite some time, depending on the size of the model. This situation is not
+ideal for repeated simulations, for instance when trying different scenarios
+or use cases, when simulating with different
+<a href="#tools-cifsim-chapter-options">options</a>, or when repeating simulations with
+various different <a href="#tools-cifsim-chapter-init">initializations</a> or due to
+<a href="#tut-stochastics-chapter-intro">stochastic</a> behavior. The startup time for
+the first simulation is also present for the second simulation, etc.</p>
+</div>
+<div class="paragraph">
+<p>It would be much better to generate and compile the code just once, and then
+simulate multiple times using the already compiled code, significantly reducing
+the startup time of the simulations. This is especially useful for automated
+repeated simulations, where the same simulation model, either with different
+options (for instance different initializations) or with the same options for a
+model with stochastics, is simulated multiple times and the results of
+simulation are for instance compared or aggregated in some way.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-repeated-sim-compile-once">Compiling just once</h6>
+<div class="paragraph">
+<p>The simulator can be used to generate code and compile it only once. By
+enabling the <em>Compile only</em> option (<em>Compiler</em> category), the simulator will
+perform all steps needed to generate and compile the code, and will then save
+the compiled code to a file. After saving the file, the simulator will
+terminate, not simulating the model.</p>
+</div>
+<div class="paragraph">
+<p>By default, the input file name (e.g. <code>some_file.cif</code>) is used to construct
+the name of the simulator compiled Java code file, by removing the <code>.cif</code>
+file extension if present, and adding a <code>.cifcode</code> file extension to it (e.g.
+resulting in <code>some_file.cifcode</code>). It is possible to change this file name
+by using the <em>Compiled code file</em> option (<em>Compiler</em> category). If used, it
+specifies the absolute or relative local file system path to the compiled Java
+code file.</p>
+</div>
+<div class="paragraph">
+<p>The compiled code file can be put in any directory. It does not have to be in
+the same directory as the original CIF model. However, make sure that any
+additional files, such as <a href="#tools-cifsim-output-svgviz-chapter-svg">SVG images</a>
+for <a href="#tools-cifsim-output-svgviz-chapter-index">visualization</a>, remain in their
+original locations. They will be resolved relative to the original location of
+the CIF model that was compiled.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-simulating-using-a-compiled-code-file">Simulating using a compiled code file</h6>
+<div class="paragraph">
+<p>There are several ways to start simulation with a compiled code file. In fact,
+all the ways to <a href="#tools-cifsim-chapter-start">start</a> simulation for normal CIF
+models (e.g. <code>.cif</code> files), apply to compiled code files (e.g. <code>.cifcode</code>
+file) as well. The simulator checks whether the input file name ends with
+<code>.cifcode</code> and then loads the compiled code file, instead of treating the
+input model as CIF model.</p>
+</div>
+<div class="paragraph">
+<p>Alternatively, a <code>.cifcode</code> file can be double clicked in the Eclipse
+'Project Explorer' tab or 'Package Explorer' tab, to immediately
+start simulation. An option dialog is shown to configure any simulator
+<a href="#tools-cifsim-chapter-options">options</a>.</p>
+</div>
+<div class="paragraph">
+<p>A warning is printed to the console if the compiled code file was generated
+by a different version of the simulator than the one used to simulate it.
+Ignoring the warning may lead to unexpected simulation results, or even
+simulator crashes.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-option-effects-and-priorities">Option effects and priorities</h6>
+<div class="paragraph">
+<p>Most simulator <a href="#tools-cifsim-chapter-options">options</a> have no effect when the
+<em>Compile only</em> option (<em>Compiler</em> category) is enabled, as after code is
+generated, compiled, and saved to a file, the simulator terminates, and no
+actual simulation is performed.</p>
+</div>
+<div class="paragraph">
+<p>The <em>Compile only</em> option (<em>Compiler</em> category) has no effect when
+<a href="#tools-cifsim-chapter-debug-gen-code">debugging generated code</a>, by enabling
+the <em>Load debug code</em> option (<em>Simulator</em> category).</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-example">Example</h6>
+<div class="paragraph">
+<p>As an example, consider the following CIF model in file <code>machine.cif</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event enter;
+event processed;
+event exit;
+
+automaton machine:
+  disc int count = 0;
+  disc real process_time;
+  disc dist real d = normal(10, 7);
+  cont t der 1.0;
+
+  location waiting:
+    initial;
+    edge enter do (process_time, d) := sample d, t := 0 goto processing;
+
+  location processing:
+    edge processed when t &gt;= process_time goto done;
+
+  location done:
+    edge exit do count := count + 1 goto waiting;
+end
+
+print machine.count for final;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The model consists of a <code>machine</code> that processes products. Initially, the
+machine is <code>waiting</code>. Once a product enters the system, the machine will
+start <code>processing</code>. Once the product is <code>processed</code>, the machine is
+<code>done</code> and will be <code>waiting</code> for the next product to <code>enter</code>. The time it
+takes to process a product varies with each product. A
+<a href="http://en.wikipedia.org/wiki/Normal_distribution">normal distribution</a>
+with
+a mean of <code>10</code> and a variance of <code>7</code> is used to model the varying
+processing times.</p>
+</div>
+<div class="paragraph">
+<p>The <a href="#tools-cifsim-output-print-chapter-ref-printdecl">print declaration</a> at the
+end of the model is used to <a href="#tools-cifsim-output-print-chapter-index">print</a>
+the number of processed products at the end of the simulation.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following ToolDef <a href="#tools-scripting-chapter-intro">script</a>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">from "lib:cif" import *;
+
+cifsim("machine.cif --compile-only=on");
+
+rmfile("out.txt", force=true);
+
+for x in range(1000):
+    string args = "machine.cifcode -i auto -a first -t 100 -o print";
+    cifsim(args, stdout="out.txt", appendOut=true);
+end
+
+double minimum = 9999;
+double maximum = -9999;
+for line in readlines("out.txt"):
+    double value = &lt;double&gt;line;
+    minimum = min(minimum, value);
+    maximum = max(maximum, value);
+end
+
+outln("Minimum: %.2f", minimum);
+outln("Maximum: %.2f", maximum);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>import</code> statement makes the CIF tools available. The first <code>cifsim</code>
+command generates code for the <code>machine.cif</code> model, compiles it, and saves it
+to <code>machine.cifcode</code>. The <code>rmfile</code> command removes the <code>out.txt</code> file, in
+case it was left over from a previous run of the script.</p>
+</div>
+<div class="paragraph">
+<p>The body of the <code>for</code> statement is executed <code>1000</code> times. Each time, the
+<code>cifsim</code> command is used to simulate the model, using the already compiled
+code in <code>machine.cifcode</code>. The simulation uses
+<a href="#tools-cifsim-input-chapter-automatic">automatic mode</a> due to <code>-i auto</code>,
+always chooses the <a href="#tools-cifsim-input-automatic-trans">first</a> available
+transition due to <code>-a first</code>, <a href="#tools-cifsim-termination-endtime">ends</a>
+at time <code>100</code> due to <code>-t 100</code>, and only
+<a href="#tools-cifsim-output-chapter-normal">outputs</a> text for print declarations due
+to <code>-o print</code>. The output of the simulation is not written to the console,
+but to <code>out.txt</code> due to the use of the <code>stdout</code> parameter of the
+<code>cifsim</code> tool. The <code>appendOut</code> parameter is enabled to ensure that the
+output of each simulation is appended (added) to the <code>out.txt</code> file instead
+of overwriting the file for each simulation. After the simulations, the
+<code>out.txt</code> file will contain the number of processed products for each of the
+simulation experiments.</p>
+</div>
+<div class="paragraph">
+<p>The remainder of the script computes the minimum and maximum number of products
+(minimum and maximum throughput) of the machine, as observed from the
+experiments. Both the <code>minimum</code> and <code>maximum</code> are initialized. Then each
+line of the <code>out.txt</code> file is processed. The numeric value is obtained by
+casting the text of the line to a <code>double</code> number. Then the <code>minimum</code> and
+<code>maximum</code> are updated as needed. After the minimum and maximum are
+calculated, they are printed to the console as floating point numbers with two
+digits after the decimal mark.</p>
+</div>
+<div class="paragraph">
+<p>The output of the execution of the script could look like this, but may vary
+given that stochastics are used:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">Minimum: 7.00
+Maximum: 12.00</code></pre>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-applications-view-2">Applications view</h6>
+<div class="paragraph">
+<p>The <em>Applications</em> view shows the current status
+of each running application. For repeated simulation, lots of applications may
+be started in a short period of time. Also, a lot of status updates need to
+be processed by the view in a short amount of time. This may lead to many
+updates of the GUI of the <em>Applications</em> view, which could potentially reduce
+the responsiveness of Eclipse, and decrease the performance of the simulation.
+If you experience such problems, simply close the <em>Applications</em> view while
+running a repeated simulation.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-simulation-inputoutput">Simulation input/Output</h4>
+<div class="sect4">
+<h5 id="tools-cifsim-input-chapter-index">Input modes</h5>
+<div class="paragraph">
+<p>
+
+
+
+The CIF simulator simulates <a href="#tools-cifsim-chapter-traces">traces</a> through the
+<a href="#tools-cifsim-traces-state-space">state space</a> of a specification. If
+multiple transitions are possible, a choice must be made. The simulator defers
+this choice to an <em>input component</em>.</p>
+</div>
+<div class="paragraph">
+<p>The primary responsibility or an input component is to choose the transition to
+take, from the given possible transitions, calculated for the current
+<a href="#tools-cifsim-traces-state">state</a>. If the chosen transition is a time
+transition, the input component must also decide the amount of time to delay.</p>
+</div>
+<div class="paragraph">
+<p>The input component to use for the simulation, depends on the <em>input mode</em>,
+which can be configured via the
+<b class="menuref">Input mode</b>
+option
+(<b class="menuref">Input</b>
+category). The simulator has several input modes:</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-input-chapter-console">Interactive console input mode</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-chapter-gui">Interactive GUI input mode</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-chapter-automatic">Automatic input mode</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-chapter-trace">Trace input mode</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-svg-chapter-index">SVG input mode</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Only one input mode, and thus one input component, can be used for each
+simulation. By default, the <em>GUI input mode</em> is used.</p>
+</div>
+<div class="paragraph">
+<p>The following information on other topics, related to input modes, is
+available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-input-chapter-semi-automatic">Semi-automatic mode</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-chapter-history">State history</a> (reset, undo)</p>
+</li>
+</ul>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-input-chapter-console">Interactive console input mode</h6>
+<div class="paragraph">
+<p>
+
+In the interactive console input mode, the simulator interactively asks the
+user to choose the transitions to take, etc. The questions are asked via text
+printed to the console. The user enters his/her choice via the console as well.</p>
+</div>
+<div class="sect6">
+<h7 id="tools-choosing-a-transition-to-take">Choosing a transition to take</h7>
+<div class="paragraph">
+<p>The following is an example of the simulator interactively asking the user to
+choose a possible transition:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">Possible transitions:
+  #1: event machine1.c_start
+  #2: event machine2.c_start
+  #3: delay for (0 .. 100.0]
+
+Select a transition ([1..3]). Enter q to quit. Enter h for help and additional commands. Confirm with &lt;ENTER&gt;:</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, three possible transitions are given, numbered <code>1</code> to <code>3</code>. For your
+convenience, they are sorted alphabetically on the names of the events, with
+event <code>tau</code> always at the end, just before time transitions.</p>
+</div>
+<div class="paragraph">
+<p>The user should enter a command, and confirm that choice by pressing
+<kbd>ENTER</kbd>. Several command are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Entering a number in the given range, corresponding to the transition with
+that number, will result in that specific transition being taken. So,
+entering <code>2</code> and pressing <kbd>ENTER</kbd>, will result in the simulator taking
+the transition for event <code>machine2.c_start</code>. The valid choices for the
+transitions are indicated by the range <code>[1..3]</code>. In case of an invalid
+number, an error message is printed to the console, and the user can choose
+again.</p>
+</li>
+<li>
+<p>Entering nothing, and only pressing <kbd>ENTER</kbd>, defaults to choosing
+transition <code>1</code>.</p>
+</li>
+<li>
+<p>Entering <code>r</code> or <code>R</code>, and confirming that by pressing <kbd>ENTER</kbd>, will
+<a href="#tools-cifsim-input-history-reset-undo">reset</a> the simulation to the
+initial state. If reset is not enabled, or not possible for the current
+state, an error message is printed and the user can choose again.</p>
+</li>
+<li>
+<p>Entering <code>u</code> or <code>U</code>, and confirming that by pressing <kbd>ENTER</kbd>, will
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> one transition. If undo is
+not enabled, or not possible for the current state, an error message is
+printed and the user can choose again.</p>
+</li>
+<li>
+<p>Entering <code>u &lt;n&gt;</code> or <code>U &lt;n&gt;</code>, with <code>&lt;n&gt;</code> a positive number, and
+confirming that by pressing <kbd>ENTER</kbd>, will
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> <code>n</code> transitions. If undo is
+not enabled, it is not possible to undo <code>n</code> transitions for the current
+state, an error message is printed and the user can choose again.</p>
+</li>
+<li>
+<p>Entering <code>q</code> or <code>Q</code>, and confirming that by pressing <kbd>ENTER</kbd>, will
+<a href="#tools-cifsim-chapter-termination">terminate</a> the simulation.</p>
+</li>
+<li>
+<p>Entering <code>h</code> or <code>H</code>, and confirming that by pressing <kbd>ENTER</kbd>, will
+result in the simulator printing a short help text to the console, that
+shows the available commands. The user is then again asked to choose.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If a choice is made that is invalid or is not available for the current state,
+an error message is printed to the console, and the user is asked to make an
+other choice.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-choosing-a-time-transition-duration">Choosing a time transition duration</h7>
+<div class="paragraph">
+<p>If the user chooses a time transition (choice <code>3</code> in the above example), the
+simulator subsequently asks for the duration of the time delay:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">Select a duration from (0 .. 100.0]. Empty choice equals maximum delay. Enter q to quit. Confirm with &lt;ENTER&gt;:</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, the duration of the time delay is to be entered. In this case, the
+duration must be in the <code>(0 .. 100.0]</code> interval. That is, it must be larger
+than zero, and less or equal to <code>100.0</code>. Both integer and real values are
+allowed. As before, confirm with <kbd>ENTER</kbd>.</p>
+</div>
+<div class="paragraph">
+<p>Pressing <kbd>ENTER</kbd> without having entered anything, defaults to the maximum
+delay, which in this case is <code>100.0</code>. Entering <code>q</code> or <code>Q</code>, and confirming
+that by pressing <kbd>ENTER</kbd>, will
+<a href="#tools-cifsim-chapter-termination">terminate</a> the simulation.</p>
+</div>
+<div class="paragraph">
+<p>If a choice is made that is invalid, an error message is printed to the
+console, and the user is asked to make an other choice.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-choosing-between-termination-or-going-back">Choosing between termination or going back</h7>
+<div class="paragraph">
+<p>If no transitions are possible, for instance due to
+<a href="#lang-tut-time-deadlock">deadlock</a> or reaching the
+<a href="#tools-cifsim-termination-endtime">end-user provided simulation end time</a>,
+the simulator may interactively ask the
+user to choose between termination of the simulation, resetting the simulation
+to the initial state, or undoing some transitions. This choice is only
+presented if either reset or undo is enabled, as otherwise there is no choice
+to make.</p>
+</div>
+<div class="paragraph">
+<p>The following is an example of the simulator interactively asking the user to
+choose between termination and going back:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">Simulation resulted in deadlock. Enter q to quit. Enter h for help and additional commands. Confirm with &lt;ENTER&gt;:</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The user should enter a command, and confirm that choice by pressing
+<kbd>ENTER</kbd>. Several command are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Entering <code>r</code> or <code>R</code>, and confirming that by pressing <kbd>ENTER</kbd>, will
+<a href="#tools-cifsim-input-history-reset-undo">reset</a> the simulation to the
+initial state. If reset is not enabled, or not possible for the current
+state, an error message is printed and the user can choose again.</p>
+</li>
+<li>
+<p>Entering <code>u</code> or <code>U</code>, and confirming that by pressing <kbd>ENTER</kbd>, will
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> one transition. If undo is
+not enabled, or not possible for the current state, an error message is
+printed and the user can choose again.</p>
+</li>
+<li>
+<p>Entering <code>u &lt;n&gt;</code> or <code>U &lt;n&gt;</code>, with <code>&lt;n&gt;</code> a positive number, and
+confirming that by pressing <kbd>ENTER</kbd>, will
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> <code>n</code> transitions. If undo is
+not enabled, it is not possible to undo <code>n</code> transitions for the current
+state, an error message is printed and the user can choose again.</p>
+</li>
+<li>
+<p>Entering <code>q</code> or <code>Q</code>, and confirming that by pressing <kbd>ENTER</kbd>, will
+<a href="#tools-cifsim-chapter-termination">terminate</a> the simulation.</p>
+</li>
+<li>
+<p>Entering <code>h</code> or <code>H</code>, and confirming that by pressing <kbd>ENTER</kbd>, will
+result in the simulator printing a short help text to the console, that
+shows the available commands. The user is then again asked to choose.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If a choice is made that is invalid or is not available for the current state,
+an error message is printed to the console, and the user is asked to make an
+other choice.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-semi-automatic-mode">Semi-automatic mode</h7>
+<div class="paragraph">
+<p>By default, in the interactive console input mode, the user is asked to choose,
+even if for instance there is only one possible transition. Having to choose
+for every transition can become tiresome. To reduce the number of situations
+where a choice is required, the
+<a href="#tools-cifsim-input-chapter-semi-automatic">semi-automatic</a> mode is available.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-input-chapter-gui">Interactive GUI input mode</h6>
+<div class="paragraph">
+<p>
+
+In the interactive GUI input mode, the simulator interactively asks the user to
+choose the transitions to take, etc. Choices are presented using a GUI
+(Graphical User Interface). The user makes choices via the GUI as well.</p>
+</div>
+<div class="sect6">
+<h7 id="tools-layout">Layout</h7>
+<div class="paragraph">
+<p>The following is an example of the simulator interactively asking the user to
+choose a possible transition:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/interactive_gui_basic.png" alt="interactive gui basic">
+</div>
+</div>
+<div class="paragraph">
+<p>The events of the system are vertically listed, in alphabetical order, with
+event <code>tau</code> at the end, just before the
+<b class="menuref">time delay</b>,
+and
+<b class="menuref">reset</b>
+and
+<b class="menuref">undo</b>.
+If there are too many elements to fit
+vertically, more columns are used. If things still don&#8217;t fit, a horizontal
+scroll bar is shown.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-input-gui-availability">Availability</h7>
+<div class="paragraph">
+<p>Choices for events are only present if the events are interactively chosen. If
+they are (semi-)automatically chosen, they are not shown in the GUI. Similarly,
+choices for
+<b class="menuref">time delay</b>
+are only shown if time transitions or their
+durations are interactively chosen. For more information, see the
+<a href="#tools-cifsim-input-gui-semiauto">Semi-automatic mode</a> section below.</p>
+</div>
+<div class="paragraph">
+<p>For event <code>tau</code>, the choices are additionally only shown if there is at least
+one <code>tau</code> edge in the specification.</p>
+</div>
+<div class="paragraph">
+<p>The choice to
+<b class="menuref">reset</b>
+the simulation is only shown if
+<a href="#tools-cifsim-input-history-reset-undo">resetting</a> the simulation is enabled.
+Similarly, the choice to
+<b class="menuref">undo</b>
+transitions is only shown if
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> is enabled.</p>
+</div>
+<div class="paragraph">
+<p>If none of the choices are to be shown in the GUI, the GUI itself is not shown
+at all.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-buttons">Buttons</h7>
+<div class="paragraph">
+<p>For each element, there are two buttons. The left button shows the name of the
+event, or a description of the choice (e.g.
+<b class="menuref">time delay</b>,
+<b class="menuref">reset</b>),
+and can be used to quickly choose a transition. The second
+button shows an arrow, and can be used to show a popup menu, presenting
+additional choices. What exactly is chosen when clicking the button, and what
+exactly is shown in the popup menu, differs for the different choices. The
+sections below provide further details.</p>
+</div>
+<div class="paragraph">
+<p>If no choice needs to be made at the moment, all buttons are disabled. If a
+choice needs to be made, only those buttons that represent active choices are
+enabled.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-styling">Styling</h7>
+<div class="paragraph">
+<p>For <a href="#tools-cifsim-chapter-env-events">environment</a> (non-urgent) events, the
+label of the left button is italic. For non-environment (urgent) events, as
+well as for non-event choices, the label uses a normal font.</p>
+</div>
+<div class="paragraph">
+<p>Before each element a colored box is shown. The box is gray while that
+particular choice is not available. If choices are available, the box is green
+for <a href="#lang-tut-extensions-synthesis-evtctrl">controllable</a> events, red for
+<a href="#lang-tut-extensions-synthesis-evtctrl">uncontrollable</a> events, blue for
+other events, and black for everything else (<b class="menuref">time delay</b>,
+<b class="menuref">reset</b>,
+and
+<b class="menuref">undo</b>).
+The text of the left button has
+the same color as the box. The colors help to quickly identify elements with
+possible choices.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-labels">Labels</h7>
+<div class="paragraph">
+<p>Between the buttons, a label may be shown, to provide more details. When the
+label is shown, and what text is shown, differs for the different choices. The
+sections below provide further details.</p>
+</div>
+<div class="paragraph">
+<p>In the above image, the system has five events, besides the <code>tau</code> event. The
+simulator asks the user to choose between a transition for event
+<code>Switch.u_on</code> and a time transition.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-choosing-an-event-transition">Choosing an event transition</h7>
+<div class="paragraph">
+<p>For an event, the first button makes it possible to quickly choose a transition
+for that event. If clicked, the possible transitions are filtered to those for
+the chosen event, and the
+<a href="#tools-cifsim-input-chapter-automatic">automatic input component</a> is asked to
+make the actual choice, based on its own configuration.</p>
+</div>
+<div class="paragraph">
+<p>If multiple transitions are possible for a single event, the number of possible
+transitions is displayed as label between the two buttons for that event. The
+following image shows an example:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/interactive_gui_event.png" alt="interactive gui event">
+</div>
+</div>
+<div class="paragraph">
+<p>In this example, two transitions are possible for event <code>b2m</code>. By clicking
+the button labeled with <code>b2m</code>, the
+<a href="#tools-cifsim-input-chapter-automatic">automatic input component</a> is asked to
+choose between the two transitions, based on its own configuration. By clicking
+the arrow button, a popup menu is shown, showing the two transitions. The popup
+menu allows manually choosing which transition to take, by clicking the menu
+item of the transition you wish to take.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-choosing-a-time-transition-and-duration">Choosing a time transition and duration</h7>
+<div class="paragraph">
+<p>The
+<b class="button">time delay</b>
+button makes it possible to quickly choose the time
+transition. By default the maximum allowed delay duration will be used. This
+duration is displayed as label between the two buttons, in short form with
+three significant digits. By clicking the arrow button, additional options
+become available. These options also show the complete durations. The following
+image shows an example:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/interactive_gui_time.png" alt="interactive gui time">
+</div>
+</div>
+<div class="paragraph">
+<p>At most <code>0.30000000000000066</code> units of time can pass (<code>0.300</code> in short
+form). The first option is to choose a custom duration. The second option is
+to choose that maximum duration, similar to clicking the
+<b class="menuref">time delay</b>
+button. The following image shows the dialog that is presented to the user to
+enter the custom duration:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/interactive_gui_duration.png" alt="interactive gui duration">
+</div>
+</div>
+<div class="paragraph">
+<p>By entering an integer or real number for the duration, that exact amount of
+time units will pass, after clicking the
+<b class="button">OK</b>
+button. If the
+<b class="button">Cancel</b>
+button is clicked instead, the choice is canceled, and the
+user is again free to choose between all available choices.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-choosing-to-reset-the-simulation">Choosing to reset the simulation</h7>
+<div class="paragraph">
+<p>The
+<b class="button">reset</b>
+button makes it possible to
+<a href="#tools-cifsim-input-history-reset-undo">reset</a> the simulation to the initial
+state. The popup menu that can be shown by clicking on the arrow button, has
+only one option, which the same effect as clicking the button. The following
+image shows the popup menu:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/interactive_gui_reset.png" alt="interactive gui reset">
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-choosing-to-undo-some-transitions">Choosing to undo some transitions</h7>
+<div class="paragraph">
+<p>The
+<b class="button">undo</b>
+button makes it possible to
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> a single transition, and go back
+to the state just prior to that transition. The number of transitions that can
+be undone, is displayed as label between the two buttons.</p>
+</div>
+<div class="paragraph">
+<p>Clicking the arrow button shows a popup menu with additional options. Menu
+items are present to undo 1 transition, to undo 2 transitions, to undo 3
+transitions, etc, for as many transitions as can be undone. The following image
+shows an example with two transitions that can be undone:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/interactive_gui_undo2.png" alt="interactive gui undo2">
+</div>
+</div>
+<div class="paragraph">
+<p>At most 10 such menu items are shown. If more than 10 transitions can be
+undone, an additional choice is present, that allows entering a custom number
+of transitions to undo. The following image shows an example with 12
+transitions that can be undone:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/interactive_gui_undo12.png" alt="interactive gui undo12">
+</div>
+</div>
+<div class="paragraph">
+<p>Selecting that last option will present the user with a dialog, to select the
+number of transitions to undo:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/interactive_gui_undo_count.png" alt="interactive gui undo count">
+</div>
+</div>
+<div class="paragraph">
+<p>The number of transitions needs to be entered as a positive number, within the
+given range. Clicking the
+<b class="button">OK</b>
+button will undo the requested number
+of transitions. If the
+<b class="button">Cancel</b>
+button is clicked instead, the choice
+is canceled, and the user is again free to choose between all available
+choices.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-input-gui-semiauto">Semi-automatic mode</h7>
+<div class="paragraph">
+<p>By default, in the interactive GUI input mode, the user is asked to choose,
+even if for instance there is only one possible transition. Having to choose
+for every transition can become tiresome. To reduce the number of situations
+where a choice is required, the
+<a href="#tools-cifsim-input-chapter-semi-automatic">semi-automatic</a> mode is available.</p>
+</div>
+<div class="paragraph">
+<p>Choices that are no longer available due to them being automatically chosen by
+enabling semi-automatic mode, are not shown in the GUI of the interactive GUI
+input mode. See also the <a href="#tools-cifsim-input-gui-availability">Availability</a> section
+above.</p>
+</div>
+<div class="paragraph">
+<p>By enabling semi-automatic mode to automatically choose time transitions
+(option value <code>time</code>), while not automatically choosing the delay durations
+of time transitions (option value <code>timedur</code>), time transitions are
+automatically chosen, but the user is still asked to choose the duration of the
+time transitions. For this choice, all non-time choices are disabled, making
+only the time related choices available. The effect of the
+<b class="menuref">time delay</b>
+button remains the same, i.e. choosing the maximum
+allowed or available delay. The popup menu for the time delay also still shows
+the default options, to choose either a specific custom delay duration, or the
+maximum duration.</p>
+</div>
+<div class="paragraph">
+<p>By enabling semi-automatic mode to automatically choose the delay durations of
+time transitions (option value <code>timedur</code>), while not automatically choosing
+the time transition themselves (option value <code>time</code>), the effect of the
+<b class="menuref">time delay</b>
+button changes from choosing the time transition with
+the maximum allowed or available delay, to choosing the time transition and
+letting the <a href="#tools-cifsim-input-chapter-automatic">automatic input component</a>
+choose the actual delay duration, based on its own configuration. The popup
+menu for the time delay then only shows one option, to let the automatic input
+component choose, identical to the effect of the
+<b class="menuref">time delay</b>
+button.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-termination">Termination</h7>
+<div class="paragraph">
+<p>By closing the GUI of the interactive GUI input component, no more interactive
+choices can be made. The next time an interactive choice is to be made,
+simulation <a href="#tools-cifsim-chapter-termination">terminates</a>.</p>
+</div>
+<div class="paragraph">
+<p>While an interactive choice is to be made via the GUI, the red stop button of
+the Eclipse console does not function. Once a choice is made, simulation will
+<a href="#tools-cifsim-chapter-termination">terminate</a>.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-input-chapter-automatic">Automatic input mode</h6>
+<div class="paragraph">
+<p>
+
+In the automatic input mode, the simulator automatically chooses transitions
+as well time transition durations. How the simulator chooses however, can be
+influenced using options. These options are explained below. The final section
+of this page explains the
+<a href="#tools-cifsim-input-automatic-limitations">limitations</a> of using these
+options.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-input-automatic-trans">Automatic mode choice algorithm option</h7>
+<div class="paragraph">
+<p>In the automatic input mode, the simulator automatically chooses the
+transitions to take, without any user interaction. The choice that is made
+can however be influenced using the
+<b class="menuref">Automatic mode choice algorithm</b>
+option (<b class="menuref">Input</b>
+category). The following choices are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>First transition.</p>
+</li>
+<li>
+<p>Last transition.</p>
+</li>
+<li>
+<p>Random transition (random seed).</p>
+</li>
+<li>
+<p>Random transition (specific seed).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The options to choose the first or last transition do exactly what they state,
+i.e. they choose the first respectively the last transition from the list of
+possible transitions. Note that event transitions are always listed before
+time transitions, but event transitions can only be listed together with time
+transitions if <a href="#tools-cifsim-chapter-env-events">environment events</a> are
+present. Also note that if transitions for the <code>tau</code> event are present, they
+are listed after the transitions for all other events.</p>
+</div>
+<div class="paragraph">
+<p>
+The other two options randomly choose a transition from the possible
+transitions. If a random seed (for the random number generator) is used, each
+simulation will potentially choose a different trace. In this case, the seed
+that is used, is <a href="#tools-cifsim-output-chapter-normal">printed</a> to the console
+at the start of the simulation. If a specific seed is used, then the choices
+are still random, but can be reproduced. Each simulation, using random
+automatic input mode, with the same seed, for the same specification, should
+lead to the same <a href="#tools-cifsim-chapter-traces">trace</a>. Seeds are integer
+numbers from the range [0 .. 2<sup>30</sup>].</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-input-automatic-time">Automatic mode time transition duration option</h7>
+<div class="paragraph">
+<p>In the automatic input mode, the simulator automatically chooses the durations
+of the time transitions, without any user interaction. The choice that is made
+can however be influenced using the
+<b class="menuref">Automatic mode time transition duration</b>
+option (<b class="menuref">Input</b>
+category). The following choices are
+available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Maximum allowed duration.</p>
+</li>
+<li>
+<p>Random duration (random seed).</p>
+</li>
+<li>
+<p>Random duration (specific seed).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The option to choose the maximum allowed duration does exactly what it states,
+i.e. it chooses the maximum allowed duration for each time transition, until
+the next potential state event.</p>
+</div>
+<div class="paragraph">
+<p>
+The other two options randomly choose a duration for the time transitions.
+For both options, a uniform random distribution is used, which is sampled to
+obtain the time at which time transitions are to be 'interrupted' or 'cut off'.
+The upper bound (exclusive) of the uniform random distribution is to be
+provided by the user. You can think of these random options as adding an extra
+automaton to the specification, that could look as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton auto_time_trans_duration:
+  const real UPPER = ...;
+  disc dist real d = uniform(0.0, UPPER);
+  disc real timeToWait;
+  cont t der 1.0;
+
+  location sampling:
+    initial;
+    edge do (timeToWait, d) := sample d goto waiting;
+
+  location waiting:
+    edge when t &gt;= timeToWait do t := 0.0 goto sampling;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The upper bound of the uniform real distribution (<code>UPPER</code> &gt; 0), is provided
+by the user. A sample is taken from the distribution, indicating the time to
+wait before the time transition is to be interrupted. Once that much time has
+elapsed, a new sample is taken, and the process repeats itself. The actual
+implementation is slightly different, in that no actual automaton is added,
+no additional <code>tau</code> transitions result from using this option, and no zero
+length time transitions are chosen. However, the effect is very similar.</p>
+</div>
+<div class="paragraph">
+<p>So, say the user wants to use a uniform distribution over interval [0 .. 10).
+The simulator takes a sample, say 3.0. Assume we then get a time transition for
+at most 0.5 time units. We take that entire transition and are left with 2.5
+remaining time units (3.0 - 0.5). If we then get another time transition for at
+most 1.2 time units, we take that one entirely as well. We are left with 1.3
+(2.5 - 1.2) time units. If we would then get a time transition for at most 5.0
+time units, the automatic input component ensures that we instead get a time
+transition for at most 1.3 time units, instead of one for at most 5.0 time
+units. Since we choose to interrupt after 1.3 time units anyway, there is no
+reason to compute the remainder of the time transition after those 1.3 time
+units. We choose the entire time transition of 1.3 time units, and compute a
+new sample. The simulator then once again calculates new transitions, and the
+process repeats. The next time transition that is calculated will be for the
+remaining 3.7 (5.0 - 1.3) time units, unless it is interrupted again before
+that time, i.e. if the new sample is smaller than 3.7.</p>
+</div>
+<div class="paragraph">
+<p>If a random seed (for the random number generator) is used, each simulation
+will potentially choose a different trace. In this case, the seed that is used,
+is <a href="#tools-cifsim-output-chapter-normal">printed</a> to the console at the start of
+the simulation. If a specific seed is used, then the choices are still random,
+but can be reproduced. Each simulation, using random automatic time transition
+duration, with the same seed, for the same specification, should lead to the
+same <a href="#tools-cifsim-chapter-traces">trace</a>. Seeds are integer numbers from the
+range [0 .. 2<sup>30</sup>].</p>
+</div>
+<div class="paragraph">
+<p>The random durations are particularly useful in combination with
+<a href="#tools-cifsim-chapter-env-events">environment events</a>, as it allows the
+environment events to be chosen at the time the time transition is interrupted.
+That is, it allows the environment events to occur at random times.
+Using this option, the user can specify the distribution used for 'cutting up'
+the time transitions, and thus the possible moments when environment events can
+potentially take place. This is in addition to the state events, at which the
+environment events can also be chosen. These new additional possibilities
+however, are not influenced by the occurrence rate of the events of the system,
+and allow more control for the user. In particular for cases where the
+simulation allows infinite time transitions (no state events), the infinite
+time transitions can then be interrupted to allow environment events to take
+place.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-input-automatic-limitations">Limitations</h7>
+<div class="paragraph">
+<p>Using the two options described above, and choosing random for each of them,
+introduces a certain degree of randomness to the
+<a href="#tools-cifsim-chapter-traces">trace</a> that the simulator will explore. This
+randomness however, is rather limited. For one, the distributions that are
+used are mostly fixed, as the options don&#8217;t allow using for instance an
+exponential distribution. Furthermore, there is no way to specify the
+distribution for events individually, and it is not possible to specify the
+distribution between event transitions and time transitions. Concretely, the
+options for instance don&#8217;t enforce that environment events get chosen. They
+<em>may</em> be chosen when the time transitions are interrupted, or at state events,
+but that is not guaranteed, as the simulator may choose the time transition
+again, after the interruption.</p>
+</div>
+<div class="paragraph">
+<p>The options provide a lightweight, quick, and easy to use approach to adding
+some randomness. If more control is needed, the environment can instead be
+modeled explicitly in the CIF model, thus defining when the environment events
+may or will occur. One way to accomplish this, is by adding a use case.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-undoreset">Undo/reset</h7>
+<div class="paragraph">
+<p>The automatic input mode does not support
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> and
+<a href="#tools-cifsim-input-history-reset-undo">reset</a>.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-input-chapter-trace">Trace input mode</h6>
+<div class="paragraph">
+<p>
+
+In the trace input mode, the simulator automatically chooses transitions as
+well as time transition durations, based on a user provided trace file.</p>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-input-trace-file">Trace file</h7>
+<div class="paragraph">
+<p>If the trace input mode is used, the
+<b class="menuref">Trace input file</b>
+option
+(<b class="menuref">Input</b>
+category) can be used to specify the path to the trace file.
+If the path is not explicitly specified, the input CIF file path is used, where
+the <code>.cif</code> file extension is removed if present, and a <code>.trace</code> file
+extension is added.</p>
+</div>
+<div class="paragraph">
+<p>The trace file uses a line based file format. Leading (at the beginning of the
+line) and trailing (at the end of the line) whitespace is ignored. Empty lines
+as well as lines starting with a hash character (<code>#</code>) are ignored as well.
+Lines starting with a hash character can be used as comment lines. All other
+lines contain commands.</p>
+</div>
+<div class="paragraph">
+<p>There are two types of commands: option commands and non-option commands. The
+option commands must always be before the non-option commands.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-option-commands">Option commands</h7>
+<div class="paragraph">
+<p>All option commands use the <code>option NAME VALUE</code> syntax, where <code>NAME</code> is the
+name of the option, and <code>VALUE</code> is the value of the option. Option commands
+must be specified in the trace file, before any other (non-option) commands.
+The remainder of this section explains the available options.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>option strict on/off</em> (default <code>off</code>)</p>
+<div class="paragraph">
+<p>The strict option can be used to specify whether a strict match is
+expected for an event. If strict mode is on (option strict on), it is
+considered an error if more than one transition is possible for an event from
+the trace. If strict mode is off (option strict off), and there are
+multiple possible transitions for an event from the trace, the
+<a href="#tools-cifsim-input-chapter-automatic">automatic input component</a> is asked to
+choose between those possible transitions for that single event, based on its
+own configuration. The strict option applies only to events, not time delays.</p>
+</div>
+</li>
+<li>
+<p><em>option time off/implicit/explicit</em> (default <code>implicit</code>)</p>
+<div class="paragraph">
+<p>The time option can be used to specify the time mode to use.
+If the time mode is off (option time off) , time passage is not
+allowed. That is, time delays/transitions are never chosen, and the value of
+variable time remains zero during the entire simulation. For this mode,
+the time command is not allowed.</p>
+</div>
+<div class="paragraph">
+<p>If the time mode is implicit (option time implicit), time delays are
+chosen if necessary. The simulator will use the least amount of time passage
+possible, to still enable the events as specified in the trace. In other
+words, if an event is possible no time delays occur, and otherwise the
+simulator delays for as long as is needed until the event becomes enabled.
+For this mode, the time command is not allowed.</p>
+</div>
+<div class="paragraph">
+<p>If the time mode is explicit (option time explicit), time delays are
+only possible if the time command explicitly allows time passage.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-transition-commands">Transition commands</h7>
+<div class="paragraph">
+<p>The transition commands can be used to specify the actual trace itself, to
+choose specific transitions. The following commands are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>event NAME</em></p>
+<div class="paragraph">
+<p>The event command indicates that an event transition should be taken. The
+event to choose is indicated by the <code>NAME</code> part, which must be an absolute
+name of an event. For an automaton <code>a</code> with an event <code>e</code>, <code>NAME</code> must
+be <code>a.e</code>, and the full command would thus be event <code>a.e</code>.</p>
+</div>
+<div class="paragraph">
+<p>If CIF textual syntax keyword are used as names for events (such as
+<code>plant</code>), then they must be escaped in <code>.cif</code> files (e.g. <code>$plant</code>).
+For event commands however, no escape characters (<code>$</code>) should be used
+in event names.</p>
+</div>
+<div class="paragraph">
+<p>If the specified event is not enabled in the current state, the simulator
+checks whether time passage is allowed and possible. For the off time
+mode, time passage is not allowed, and the simulation results in deadlock.
+For the implicit time mode, the simulator delays if a time transition is
+possible, and otherwise simulation results in deadlock. For the explicit
+time mode, if the current event command was preceded by an explicit
+time command, the simulator delays if a time transition is possible, and
+otherwise (current command not preceded by time command or no time
+transition possible) simulation results in deadlock. Upon deadlock,
+simulation <a href="#tools-cifsim-chapter-termination">ends</a>, and a warning is printed
+to the console to indicate the event that was not enabled.</p>
+</div>
+<div class="paragraph">
+<p>If multiple transitions are possible for the event, due to
+<a href="#tut-basics-chapter-non-determinism">non-determinism</a>, the strict
+option (see above) determines if and how the simulator proceeds.</p>
+</div>
+</li>
+<li>
+<p><em>time</em></p>
+<div class="paragraph">
+<p>The time command explicitly indicates that time is allowed to pass, i.e.
+the simulator may delay by choosing a time transition. This command is only
+allowed for the explicit time mode.</p>
+</div>
+<div class="paragraph">
+<p>The time command does not ensure that time passes. It specifies that time
+passage is allowed, not that it is required. Specifying the time command
+multiple times without an intermediate event command has the same effect
+as specifying the time command only once. That is, it doesn&#8217;t matter
+how many times you allow time passage, once is enough.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The trace input mode does not support
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> and
+<a href="#tools-cifsim-input-history-reset-undo">reset</a>.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-simulation">Simulation</h7>
+<div class="paragraph">
+<p>The commands from the trace file are processed in the order they occur in the
+trace file. After all commands have been used to select transitions, and no
+more commands are available, the simulation
+<a href="#tools-cifsim-chapter-termination">ends</a>. The simulator indicates the
+simulation has terminated at the request of the user, as the user did not
+include any more commands in the trace file.</p>
+</div>
+<div class="paragraph">
+<p>Simulation is also terminated if deadlock occurs or the
+<a href="#tools-cifsim-termination-endtime">user-specified simulation end time</a>
+is reached, even if more (unprocessed) commands are still available.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-input-svg-chapter-index">SVG input mode</h6>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+In the SVG input mode, the <a href="#tools-cifsim-output-svgviz-chapter-svg">SVG</a> images
+that are used for <a href="#tools-cifsim-output-svgviz-chapter-index">SVG visualization</a>
+can be used to interactively control the simulation. Since the SVG images are
+reused, using the SVG input mode requires the use of SVG visualization.</p>
+</div>
+<div class="paragraph">
+<p>The idea is that certain SVG elements are coupled (mapped) to events from the
+CIF specification. Clicking on those graphical elements then results in the
+corresponding event being executed by the simulator. This way, the user
+interface of a system can be modeled graphically, and can be coupled to the
+specification (during simulation), by means of events. The user interface of
+the system is thus part of the specification, but is controlled interactively
+at runtime (during simulation) by the user.</p>
+</div>
+<div class="paragraph">
+<p>The events that are coupled to visualization elements are called
+<em>SVG interactive events</em> or <em>SVG input events</em>.</p>
+</div>
+<div class="paragraph">
+<p><em>Topics</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-input-svg-chapter-svgin">CIF/SVG input mappings</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-svg-chapter-simulation">Simulation with SVG input</a></p>
+</li>
+</ul>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-input-svg-chapter-svgin">CIF/SVG input mappings</h7>
+<div class="paragraph">
+<p>
+
+
+
+
+CIF/SVG input mappings couple <a href="#tools-cifsim-output-svgviz-svg-id">ids</a>
+of <a href="#tools-cifsim-output-svgviz-chapter-svg">SVG</a> elements to events from the
+CIF specification. CIF/SVG input mappings are
+<a href="#tools-cifsim-output-svgviz-chapter-cifsvg">CIF/SVG declarations</a>, similar to
+<a href="#tools-cifsim-output-svgviz-chapter-svgout">CIF/SVG output mappings</a>. If the
+CIF specification contains input mappings, and SVG input mode is not used, the
+input mappings are simply ignored.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-single-event-input-mapping">Single event input mapping</h8>
+<div class="paragraph">
+<p>The simplest form of an SVG input mapping maps to a single event. For instance:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgin id "button" event machine.button.toggle;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This input mapping maps the SVG element with
+<a href="#tools-cifsim-output-svgviz-svg-id">id</a> <code>button</code> to the
+<code>machine.button.toggle</code> event from the CIF specification.</p>
+</div>
+<div class="paragraph">
+<p>Every input mapping must
+<a href="#tools-cifsim-output-svgviz-svgout-id">specify the id</a> of an SVG
+element, and an SVG element with that id must exist in the SVG image.
+Specifying an input mapping for an SVG element turns that SVG element into an
+<em>interactive SVG element</em>. Note that
+<a href="#tools-cifsim-input-svg-simulation-groups">groups</a> may be used as
+interactive SVG elements as well.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-if-event-input-mapping"><code>if</code> event input mapping</h8>
+<div class="paragraph">
+<p>Sometimes, the simple <em>single event input mapping</em> is not enough. Consider
+for instance the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton button:
+  event u_pushed, u_released;
+
+  location Released:
+    initial;
+    edge u_pushed goto Pushed;
+
+  location Pushed:
+    edge u_released goto Released;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification models a <code>button</code> that is initially released (location
+<code>Released</code>). When the button is pushed (event <code>u_pushed</code>), the location is
+updated to <code>Pushed</code>. If we now want to couple a graphical representation of
+a button to this CIF specification, the event to choose depends on the current
+location of the <code>button</code> automaton. This can be mapped using an
+<em>if event input mapping</em>, as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgin id "button" event
+  if   button.Released: button.u_pushed
+  elif button.Pushed:   button.u_released
+  end;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If the button is released, the <code>u_pushed</code> event is chosen, and if the button
+is pushed, the <code>u_released</code> event is chosen.</p>
+</div>
+<div class="paragraph">
+<p>The <code>if</code> event input mappings are essentially an <code>if</code> expressions that
+result in an event rather than a value. The conditions (such as
+<code>button.Released</code> are guard expressions that evaluates to a boolean value.
+The guard expressions may be arbitrary expressions, similar to the use of
+expressions in output mappings.</p>
+</div>
+<div class="paragraph">
+<p>If a condition holds, the corresponding event is chosen. The entries are
+processed in the order they are specified: if the first guard (of the <code>if</code>)
+holds, the first event is chosen, otherwise if the second guard
+(of an <code>elif</code>) holds, the second event is chosen, etc.</p>
+</div>
+<div class="paragraph">
+<p>The last part of the <code>if</code> is allowed to be an <code>else</code>, to indicate that
+if none of the previous guards hold, the event of the <code>else</code> is to be chosen.
+Using an <code>else</code> entry is optional, but if used, there may only be one such
+entry, and it must be the last entry of the input mapping.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-uniqueness">Uniqueness</h8>
+<div class="paragraph">
+<p>Similar to output mappings, all input mappings must be unique, per SVG image.
+That is, no two input mappings for the same SVG image may use the
+same SVG element id. Note that it is allowed to have an input mapping and an
+output mapping (or even multiple output mappings) for the same SVG element.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-completeness">Completeness</h8>
+<div class="paragraph">
+<p>Input mappings must be complete. Single event input mappings are always
+complete, as are <code>if</code> event input mappings with an <code>else</code>. For <code>if</code>
+event input mappings without an <code>else</code>, at least one of the guards must hold.
+If none of the guards holds, the mapping results in a runtime error during
+simulation.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-input-svg-chapter-simulation">Simulation with SVG input</h7>
+<div class="paragraph">
+<p>
+This page explains the use of the SVG input mode of the CIF simulator at
+runtime (during simulation).</p>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-input-svg-simulation-works">How it works</h8>
+<div class="paragraph">
+<p>During simulation, as long as none of the interactive SVG elements (the SVG
+elements for which an input mapping exists) are clicked, the corresponding
+events are never chosen. For the other events (the non-interactive events), a
+choice is made using the <a href="#tools-cifsim-input-chapter-automatic">automatic input component</a>.
+The automatic input component makes a choice
+based on its own settings.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect8">
+<h9 id="tools-hovering">Hovering</h9>
+<div class="paragraph">
+<p>When moving over one of the interactive SVG elements of the SVG visualization,
+using the mouse pointer, the border of the SVG element is highlighted in red.
+This makes it easier to identify the interactive SVG elements in the
+<a href="#tools-cifsim-output-svgviz-chapter-viewer">SVG visualizer</a>. When an
+interactive SVG element is clicked, the color is changed from red to green, for
+as long as the mouse button is not released.</p>
+</div>
+</div>
+<div class="sect8">
+<h9 id="tools-clicking">Clicking</h9>
+<div class="paragraph">
+<p>The mouse click (and <em>not</em> the release) makes that the input component will
+interrupt any time transition that is currently being taken by the simulator.
+Then, when asked to choose a next transition, it will apply the input mapping
+for the interactive SVG element that was clicked. The event that results from
+the input mapping is then chosen. If the event is not enabled at that time,
+simulation ends in deadlock. To prevent such deadlocks, you can use a
+<a href="#tut-data-chapter-monitoring">monitor</a> automaton. If multiple transitions
+are possible for that event, the choice (between the transitions for that event
+only) is deferred to the
+<a href="#tools-cifsim-input-chapter-automatic">automatic input component</a>, which makes
+a choice based on its own settings. Note that multiple transitions are only
+possible if <a href="#tools-cifsim-chapter-complete-mode">complete mode</a> is enabled.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect8">
+<h9 id="tools-queue">Queue</h9>
+<div class="paragraph">
+<p>The SVG input mode allows interactively choosing certain events by clicking on
+interactive elements of an SVG image. The SVG input mode is however not
+officially an interactive input mode.</p>
+</div>
+<div class="paragraph">
+<p>The image plays the part of the environment. Whenever an interactive element is
+clicked, the element is added to a queue. If a user quickly clicks the same
+element multiple times, or quickly clicks different elements, they are all
+stored in the queue, and the queue can grow. The transition to take is
+automatically chosen, based on the queue of events. If the queue is empty, the
+environment (the SVG image and the user) doesn&#8217;t allow the interactive events.
+If the queue is not empty, the environment allows exactly one interactive
+event, the one at the head of the queue. The model, together with the queue,
+form a closed model, without further interaction. Each interactive SVG element
+that is clicked, will be used in the order they were clicked, to choose
+transitions.</p>
+</div>
+<div class="paragraph">
+<p>The SVG input mode internally acts as an automated input mode, that makes
+choices about which transitions to take, without further user interaction.
+Since no further user interaction is possible,
+<a href="#tools-cifsim-input-history-reset-undo">undo</a> and
+<a href="#tools-cifsim-input-history-reset-undo">reset</a> are also not supported.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-input-svg-simulation-debugging">Debugging</h8>
+<div class="paragraph">
+<p>The <a href="#tools-cifsim-output-svgviz-debugging-console">console debugging output</a> for CIF/SVG mappings includes
+debugging output for SVG input mappings. Input mappings that encounter runtime
+errors have <a href="#tools-cifsim-output-svgviz-debugging-stacktrace">stack traces</a> similar to those of output
+mappings.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-input-svg-simulation-responsiveness">Responsiveness</h8>
+<div class="paragraph">
+<p>SVG input is usually combined with <a href="#tools-cifsim-output-chapter-realtime">real-time simulation</a>.
+Clicking an interactive SVG element results
+in the application of an input mapping, which results in an event. That event
+is put in the queue. If a time transition is being taken by the simulator, the
+simulator will continue to take that time transition until the input component
+interrupts it. However, an input component can only interrupt a time transition
+during <a href="#tools-cifsim-output-realtime-frames">intermediate frames</a>. As
+such, choosing a low <a href="#tools-cifsim-output-realtime-framerate">frame rate</a>
+(typically less than 10 frames per
+second) can significantly reduce the responsiveness of the SVG input.</p>
+</div>
+<div class="paragraph">
+<p>Hovering interactive SVG elements highlights their borders in red. This too
+becomes less responsive when a low frame rate is used.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-input-svg-simulation-groups">Interactive groups</h8>
+<div class="paragraph">
+<p>It is possible to make a group of SVG elements (an <code>svg:g</code> element) an
+interactive element. By doing so, all the elements that are part of the group
+together become one single interactive element.</p>
+</div>
+<div class="paragraph">
+<p>One practical example where this is very useful, is for buttons with a text
+label. In SVG, this requires the use of a rectangle and a text label. To ensure
+that clicking either one of them results in the same event, group the rectangle
+and text label together in a group. Then assign an
+<a href="#tools-cifsim-output-svgviz-svg-id">id</a> to the group and use that id in
+an <a href="#tools-cifsim-input-svg-chapter-svgin">input mapping</a>. During simulation,
+when hovering over either the rectangle or the text label, both will will be
+highlighted. Clicking on either of them results in the corresponding input
+mapping being applied, and the resulting event being chosen by the SVG input
+component.</p>
+</div>
+<div class="paragraph">
+<p>In general, if an SVG image is clicked, the simulator will figure out on which
+graphical element the user clicked. If that element is itself an interactive
+SVG element, then the corresponding mapping is applied. If it is not an
+interactive SVG element, its parent (which may be a group) is checked. If the
+parent is not an interactive SVG element either, the parent of the parent is
+checked, etc. If none of the ancestors is an interactive SVG element, clicking
+the element has no effect on the simulation. Because of this behavior, it is
+strongly recommended not to make a child (or descendant in general) of an
+interactive SVG element interactive as well.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-input-chapter-semi-automatic">Semi-automatic mode</h6>
+<div class="paragraph">
+<p>
+By default, in the interactive <a href="#tools-cifsim-input-chapter-console">console</a>
+and <a href="#tools-cifsim-input-chapter-gui">GUI</a> input modes, the user is asked
+to choose, even if for instance there is only one possible transition. Having
+to choose for every transition can become tiresome. To reduce the number of
+situations where input is required, the semi-automatic mode is available.
+Semi-automatic mode allows the simulator to automatically choose certain
+transitions, while leaving the remaining choices for the user. The following
+choices can be automatically made by the simulator, in semi-automatic mode:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Automatically choose a transition if there is only one transition possible.</p>
+</li>
+<li>
+<p>Automatically choose time transitions, regardless of how many transitions
+are possible.</p>
+</li>
+<li>
+<p>Automatically choose the delay duration of time transitions.</p>
+</li>
+<li>
+<p>Automatically choose event transitions (for certain events), regardless of
+how many transitions are possible.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Each of these possible automatic choices can be individually enabled,
+through the
+<b class="menuref">Interactive mode automatic transition choice</b>
+option
+(<b class="menuref">Input</b>
+category). As value for the option, comma separated
+<em>filters</em> should be supplied. The following filters are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>1</code> to automatically choose a transition if there is only one transition
+possible.</p>
+</li>
+<li>
+<p><code>time</code> to automatically choose time transitions.</p>
+</li>
+<li>
+<p><code>timedur</code> to automatically choose the delay duration of time transitions.</p>
+</li>
+<li>
+<p>The name of an event, to automatically choose event transitions for that
+event.</p>
+</li>
+<li>
+<p><code>urgent</code> to automatically choose event transitions for all
+<a href="#tools-cifsim-chapter-env-events">urgent</a> (non-environment) events.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For events, the absolute names of the events are used. That is, for an
+automaton <code>a</code>, with an event <code>e</code>, the absolute name of the event is
+<code>a.e</code>. If CIF textual syntax keyword are used as names for events (such as
+<code>plant</code>), then they must be escaped in <code>.cif</code> files (<code>$plant</code>). For
+filters however, all escape characters (<code>$</code>) in event names are ignored.
+The <code>*</code> character can be used as wildcard, to indicate zero or more
+characters. The special <code>urgent</code> event filter matches all
+<a href="#tools-cifsim-chapter-env-events">urgent</a> events of the specification. If an
+event filter doesn&#8217;t match any of the events of the CIF model, a warning is
+printed to the console. If a filter doesn&#8217;t have any effect, because a previous
+filter already turned ensured that the matching events into are automatically
+chosen, a warning is printed as well.</p>
+</div>
+<div class="paragraph">
+<p>As an example, option value <code>1, g*, t*</code> consist of three filters: <code>1</code>,
+<code>g*</code>, and <code>t*</code>. The first filter indicates that the simulator should
+automatically choose a transition if there is only one transition possible. The
+second and third filters indicate that the simulator should also automatically
+choose all events starting with an <code>g</code> or a <code>t</code>, such as <code>g</code>, <code>g1</code>,
+<code>go</code>, etc. Note that the wildcards apply only to events, so <code>t*</code> does not
+mean that time transitions should be automatically chosen. The <code>t*</code> filter
+always matches the <code>tau</code> event, as that event is implicitly always present.</p>
+</div>
+<div class="paragraph">
+<p>If an automatic choice can be made, given the filter and the possible
+transitions, the transitions are filtered to only keep the ones that can be
+chosen automatically, and they are sent to the
+<a href="#tools-cifsim-input-chapter-automatic">automatic input component</a>, which then makes the actual choice,
+depending on its own configuration. Similarly, if the delay duration of a time
+transition is to be automatically chosen, the automatic input component is
+asked to choose, based on its own configuration.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-input-chapter-history">State history</h6>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="paragraph">
+<p>The CIF simulator can be used to explore the
+<a href="#tools-cifsim-traces-state-space">state space</a> of a CIF model. It is
+possible to see step by step, what is possible, and choose some transitions.
+Sometimes, after exploring a bit, you may want to go back a bit, to explore
+some alternative behavior. Obviously, you can terminate the simulation, and
+start a new one. There are several downsides to this. First, you have to start
+from the initial state again, while you may want to only go back a few states,
+and continue from there. Second, restarting the simulator may take some time,
+especially for large models. Third, if you use several visualizations, you may
+have to layout them again, to be able to see all of them.</p>
+</div>
+<div id="tools-cifsim-input-history-reset-undo" class="paragraph">
+<p>To make it easier to explore alternatives, the simulator supports resetting the
+simulation to the initial state, as well as undoing a certain number of
+transitions. This page explains that functionality in more detail.</p>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-input-history-enable">Enabling history</h7>
+<div class="paragraph">
+<p>The <em>History</em> option (<em>Input</em> category) can be used to enable or disable
+history. By default history is enabled. Using the option, it can be disabled.
+Disabling history disables both the reset and the undo functionality, which
+ensures no time or memory is consumed in keeping track of earlier states.</p>
+</div>
+<div class="paragraph">
+<p>If history is enabled, it only has an effect if an interactive input mode is
+used. Other (automatic) input modes will never perform a reset or undo. That
+is, the simulator will not keep track of any history states, unless an
+interactive (either fully interactive or
+<a href="#tools-cifsim-input-chapter-semi-automatic">semi-automatic</a>) input mode is
+used, and history is enabled via the <em>History</em> option.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-state-stack">State stack</h7>
+<div class="paragraph">
+<p>In order for the simulator to be able to go back to earlier states, it will
+need to remember those states. To that end, the simulator can store states that
+it has encountered in a state stack. The initial state is remembered
+separately. So, initially, the following is remembered:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/history_0.png" alt="history 0">
+</div>
+</div>
+<div class="paragraph">
+<p>Here, state <code>0</code> is the initial state. After two transitions are taken, the
+following is remembered:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/history_012.png" alt="history 012">
+</div>
+</div>
+<div class="paragraph">
+<p>Here, two more states, numbered <code>1</code> and <code>2</code> are remembered. After one more
+transitions is taken, the following is remembered:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/history_0123.png" alt="history 0123">
+</div>
+</div>
+<div class="paragraph">
+<p>Here, one more state, numbered <code>3</code>, is remembered. In each case, the last
+shown state is the current state. If we undo two transitions, the following is
+remembered:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/history_01.png" alt="history 01">
+</div>
+</div>
+<div class="paragraph">
+<p>As two transitions are undone, their resulting states (the last two states) are
+forgotten. If we take one more transition after the undo, we get the following:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/history_012.png" alt="history 012">
+</div>
+</div>
+<div class="paragraph">
+<p>This state <code>2</code> may be the same one as before, or it may be a new one, if a
+different simulation choice was made. If we reset the simulation, we forget all
+but the initial state, and end with up:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/history_0.png" alt="history 0">
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-input-history-size">Stack size</h7>
+<div class="paragraph">
+<p>For long simulations, a lot of states will need to be remembered. Each state
+that needs to be remembered costs some amount of memory. To limit the amount
+of states that are remembered, the <em>History size</em> option (<em>Input</em> category)
+can be used.</p>
+</div>
+<div class="paragraph">
+<p>If set to infinite, there is no limit to the amount of states that can be
+remembered. If set to a finite (non-negative) number, at most the given number
+of states are remembered, apart from the initial state. So, if set to zero,
+only the initial state is remembered. If set to one, one additional state is
+remembered, etc. The default history size is <code>100</code> states. Since if set to
+zero, only the initial state is remembered, this completely disables undo
+functionality.</p>
+</div>
+<div class="paragraph">
+<p>By introducing a maximum number of states that can be remembered, this also
+introduces a maximum number of transitions that can be undone. Let&#8217;s consider a
+history size of <code>3</code>. After three transitions, the following is remembered:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/history_0123.png" alt="history 0123">
+</div>
+</div>
+<div class="paragraph">
+<p>State <code>3</code> is the current state. It is possible to undo one, two, or three
+transitions, going back to states <code>2</code>, <code>1</code>, and <code>0</code>, respectively. Now
+consider what happens when we take another transition. We already remember
+three states besides the initial state, and have thus reached the maximum
+number of states to remember. By remembering the new target state of the fourth
+transition, we need to let go of state <code>1</code>, as it is the oldest remembered
+state, not taking into account the initial state. After this fourth transition,
+the following is remembered:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/input/history_0234.png" alt="history 0234">
+</div>
+</div>
+<div class="paragraph">
+<p>State <code>4</code> is the current state. We can undo one transition, to go back to
+state <code>3</code>. We can also undo two transitions, to go back to state <code>2</code>.
+However, as we forgot all about state <code>1</code>, we can&#8217;t undo three transitions.
+Due to the <em>gap</em> between states <code>0</code> and <code>2</code>, we can&#8217;t undo past state
+<code>2</code>. As you can see from this example, for a history size of 3, we can undo
+at most 3 transitions when there is no gap, and at most 2 transitions when
+there is a gap.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-availability">Availability</h7>
+<div class="paragraph">
+<p>If history is disabled, reset is not available. If history is enabled, reset
+is available only if the current state is not the initial state. That is, reset
+is enabled for every state, except for the initial state.</p>
+</div>
+<div class="paragraph">
+<p>If history is disabled, or the history size is zero, undo is not available. If
+history is enabled, and the history size is positive or infinite, undo is
+available. The number of transitions that can be undone depends on the number
+of states that is remembered. If <code>n</code> states are currently remembered,
+excluding the initial state, then <code>n - 1</code> transitions can be undone, at the
+least. If there is no gap, and the current state is not the initial state, then
+<code>n</code> transitions can be undone.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-requests">Requests</h7>
+<div class="paragraph">
+<p>Reset and undo are only supported by interactive input modes, as explained
+above.</p>
+</div>
+<div class="paragraph">
+<p>When the simulator interactively asks the user to choose between some possible
+transitions, it may also provide the possibility to reset the simulation to
+the initial state, or to undo some transitions. The details on how the
+different choices are presented, and how the choice can be made, are explained
+in the documentation for each of the interactive input modes.</p>
+</div>
+<div class="paragraph">
+<p>If no transitions are possible, for instance due to
+<a href="#lang-tut-time-deadlock">deadlock</a> or reaching the
+<a href="#tools-cifsim-termination-endtime">end-user provided simulation end time</a>,
+the simulator may interactively ask the
+user to choose between termination of the simulation, resetting the simulation
+to the initial state, or undoing some transitions. This choice is only
+presented if either reset or undo is enabled, as otherwise there is no choice
+to make. The details on how the different choices are presented, and how the
+choice can be made, are explained in the documentation for each of the
+interactive input modes.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-semi-automatic-mode-2">Semi-automatic mode</h7>
+<div class="paragraph">
+<p>By using <a href="#tools-cifsim-input-chapter-semi-automatic">semi-automatic</a> mode, a
+purely interactive input mode, can be made semi-automatic. This can lead to
+unexpected results, in combination with reset and undo.</p>
+</div>
+<div class="paragraph">
+<p>Consider a situation where four transitions have been taken. The first
+transition was manually chosen, as was the third. The second and fourth
+transition were automatically chosen. The user is asked to interactively choose
+the fifth transition. Consider what happens if the user chooses to undo three
+transitions. The simulator goes back to the state reached after the first
+transition. The possible transitions are the same as the first time they were
+calculated. An automatic choice was made for the second transition, so one will
+also be made the second time around. So, after the second transition is once
+again automatically chosen, the user is interactively asked to choose the third
+transition. So, instead of undoing three transitions and getting a choice for
+the second transition, three transitions are undone, a second transition is
+automatically chosen, and the user is asked to choose for the third transition.</p>
+</div>
+<div class="paragraph">
+<p>Similarly, undoing the fourth transition, will result in a fourth transition
+being automatically chosen again. If the same choice is made as before, undoing
+the fourth transition has no effect.</p>
+</div>
+<div class="paragraph">
+<p>Resetting the simulation to the initial state, will not lead to the user being
+able to choose the transition to take from the initial state, if the first
+transition is automatically chosen.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-env-events">Environment events</h5>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+By default, the CIF simulator treats all events are urgent. That is, whenever
+a transition is possible for any event, time may not progress. In other words,
+events take priority over time passage. However, not all events should be
+urgent. As such, the simulator has an
+<b class="menuref">Environment events</b>
+option
+(<b class="menuref">Input</b>
+category), that makes it possible to let the simulator know
+about the <em>environment events</em> (non-urgent events). An example of an
+environment event (non-urgent event) is a button that can be pushed. The button
+can always be pushed, now or in the future. The corresponding event is thus
+always enabled, but time should still be able to progress, as the event may
+not actually happen at this time.</p>
+</div>
+<div class="paragraph">
+<p>As value for the
+<b class="menuref">Environment events</b>
+option, comma separated
+<em>filters</em> should be supplied. Each filter specifies one or more environment
+events. The absolute names of the events are used. That is, for an automaton
+<code>a</code>, with an event <code>e</code>, the absolute name of the event is <code>a.e</code>. If CIF
+textual syntax keyword are used as names for events (such as <code>plant</code>),
+then they must be escaped in <code>.cif</code> files (<code>$plant</code>). For filters however,
+all escape characters (<code>$</code>) in event names are ignored. The <code>*</code> character
+can be used as wildcard, to indicate zero or more characters. The special
+<code>svg</code> filter can be used to turn all
+<a href="#tools-cifsim-input-svg-chapter-index">SVG interactive/input events</a> into
+environment (non-urgent) events. If a filter doesn&#8217;t match any of the events of
+the CIF model, a warning is printed to the console. If a filter doesn&#8217;t have
+any effect, because a previous filter already turned the matching events into
+environment events, a warning is printed as well.</p>
+</div>
+<div class="paragraph">
+<p>As an example, option value <code>e, a.e, f*, t*</code> consists of four filters: <code>e</code>,
+<code>a.e</code>, <code>f*</code>, and <code>t*</code>. The first filter indicates that event <code>e</code> is an
+environment event. The second filter indicates that event <code>e</code> in automaton
+<code>a</code> is an environment event. The third filter indicates that all events
+whose absolute name starts with an <code>f</code> are environment events. This could
+include events <code>f</code>, <code>f1</code>, <code>foo</code>, <code>f.e</code>, etc. The fourth filter is
+similar to the third filter, but uses character <code>t</code> as a prefix, rather than
+character <code>f</code>. The <code>t*</code> filter always matches the <code>tau</code> event, as that
+event is implicitly always present.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-input-modes">Input modes</h6>
+<div class="paragraph">
+<p>By default, the simulator does not know which events of the model are
+environment events (non-urgent events). By letting the simulator know about
+them, it can properly simulate them with non-urgent semantics. The CIF
+simulator however, has several <a href="#tools-cifsim-input-chapter-index">input modes</a>.
+This section discusses for each input mode, the influence of environment
+events, and their practical use.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-input-chapter-console">Interactive console input mode</a></p>
+<div class="paragraph">
+<p>When using the interactive console input mode, the simulator will
+interactively ask the user to choose transitions, from the list of possible
+transitions printed to the console.</p>
+</div>
+<div class="paragraph">
+<p>If however the CIF model contains events that are always enabled (such as a
+button that can always be pushed), time may never progress. The simulator
+treats all events as urgent. By specifying the always enabled events as
+environment events, those events become non-urgent, and the user is free to
+choose between those environment events and time passage (time transitions).
+If combined with the <a href="#tools-cifsim-input-chapter-semi-automatic">semi-automatic mode</a>
+for the urgent events, the user can
+choose the environment events and time transitions, while the other/urgent
+events are automatically chosen by the simulator, reducing the number of
+choices the user has to make.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-chapter-gui">Interactive GUI input mode</a></p>
+<div class="paragraph">
+<p>When using the interactive GUI input mode, the simulator will interactively
+ask the user to choose transitions, using a GUI (Graphical User Interface).</p>
+</div>
+<div class="paragraph">
+<p>If however the CIF model contains events that are always enabled (such as a
+button that can always be pushed), time may never progress. The simulator
+treats all events as urgent. By specifying the always enabled events as
+environment events, those events become non-urgent, and the user is free to
+choose between those environment events and time passage (time transitions).
+If combined with the <a href="#tools-cifsim-input-chapter-semi-automatic">semi-automatic mode</a>
+for the urgent events, the user can
+choose the environment events and time transitions, while the other/urgent
+events are automatically chosen by the simulator, reducing the number of
+choices the user has to make.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-chapter-automatic">Automatic input mode</a></p>
+<div class="paragraph">
+<p>When using the automatic input mode, the simulator will automatically choose
+transitions, based on certain criteria. If the CIF model contains a use case,
+the simulator automatically simulates that use case.</p>
+</div>
+<div class="paragraph">
+<p>If however the CIF model contains events that are always enabled (such as a
+button that can always be pushed), time may never progress. The simulator
+treats all events as urgent. By specifying the always enabled events as
+environment events, those events become non-urgent, and the simulator is
+free to choose between those environment events and time passage (time
+transitions). If combined with the <em>random</em>
+<a href="#tools-cifsim-input-automatic-trans">automatic mode choice algorithm</a>,
+and <em>random</em>
+<a href="#tools-cifsim-input-automatic-time">automatic mode time transition duration</a>,
+this allows for the automatic validation of arbitrary traces.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-svg-chapter-index">SVG input mode</a></p>
+<div class="paragraph">
+<p>When using the SVG input mode, the simulator will automatically choose
+transitions, based on certain criteria. The environment events are usually
+coupled to the SVG image (using <a href="#tools-cifsim-input-svg-chapter-svgin">CIF/SVG input mappings</a>).
+This ensures that the environment
+events are only enabled when the corresponding interactive element of the
+image is clicked by the user. The SVG image plays the role of the
+environment, closing the system. If the SVG image only partially closes the
+system, the remaining environment events can be specified, similar to the
+way they are specified for the automatic input mode.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-supervisory-control-application-domain">Supervisory control application domain</h6>
+<div class="paragraph">
+<p>This section discusses environment events in the application domain of
+supervisory control, where the system consists of a plant (the hardware),
+and a supervisor (or other controller that restricts the plant behavior).</p>
+</div>
+<div class="paragraph">
+<p>Informally, we can distinguish the following types of events:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Controller events</em></p>
+<div class="paragraph">
+<p>Controller events are those events that are initiated by a controller, such
+as a supervisor. These events are usually controllable events. However, if
+supervisor synthesis is not used, the events need not necessarily be
+controllable.</p>
+</div>
+<div class="paragraph">
+<p>For controller events, the behavior is usually fully specified in the CIF
+model. That is, if the CIF model contains both the plant and the controller,
+the CIF model determines when the events are enabled, and when they are
+disabled. The controller events should happen as soon as they are enabled.
+That is, once the controller determines that for instance a motor should be
+turned on, the motor should be turned on without further delays. Thus,
+controller events are urgent.</p>
+</div>
+<div class="paragraph">
+<p>For low-level controllers, the events generally correspond directly to the
+events of the actuators. For instance, a controller may turn a lamp on or
+off. For higher level controllers however, there usually is no such direct
+relation. Furthermore, internal events of the controller (usually event
+<code>tau</code>, or other events that are neither controllable nor uncontrollable),
+are considered controller events as well.</p>
+</div>
+</li>
+<li>
+<p><em>Plant events</em></p>
+<div class="paragraph">
+<p>Plant events are those events that are initiated by the plants. These events
+are usually uncontrollable events. However, if supervisor synthesis is not
+used, the events need not necessarily be uncontrollable.</p>
+</div>
+<div class="paragraph">
+<p>For plant events, the behavior is usually fully specified in the CIF model.
+The CIF model models exactly when the events become enabled. For instance,
+when an elevator moves and reaches its top position, the event that indicates
+that 'the top position sensor goes on' becomes enabled, and should be
+executed at that time. That is, the plant model models/follows the physical
+behavior, and determines when the plants events are enabled. This behavior
+is fully specified and known, and further delays are undesirable. As such,
+plant events are urgent.</p>
+</div>
+<div class="paragraph">
+<p>For low-level plants, the events generally correspond directly to the events
+of sensors. Typical examples include limit sensors, such as the elevator top
+position sensor described above, and sensors that detect products throughout
+the system. For higher level plants however, there usually is no such
+direct relation. Furthermore, internal events of the plants (usually event
+<code>tau</code>, or other events that are neither controllable nor uncontrollable),
+may be considered plant events as well.</p>
+</div>
+</li>
+<li>
+<p><em>Environment events</em></p>
+<div class="paragraph">
+<p>Environment events are those events that are initiated by the environment
+(anything outside and the plants and the controller). These events are
+usually uncontrollable events. However, if supervisor synthesis is not used,
+the events need not necessarily be uncontrollable.</p>
+</div>
+<div class="paragraph">
+<p>The CIF model only observes or monitors the environment events. The
+environment (outside of the behavior specified in the CIF model), determines
+when, if ever, the events actually happen, and thus defines their behavior.
+From the point of view of the CIF model, the environment events can happen at
+any time, and as such the CIF model allows them at all times. The
+behavior is left completely unrestricted/free in the CIF specification, as
+it is unknown when the events will actually happen. Since time may pass
+before these events actually happen (as determined by the environment, rather
+than the CIF model), these events are thus non-urgent (from the point of view
+of the CIF model). If the CIF model would instead consider them to be urgent,
+the model would always forbid time to progress, even if the environment does
+not currently allow any environment event to occur, leading to deadlock.</p>
+</div>
+<div class="paragraph">
+<p>For low-level plants, the events generally correspond directly to the events
+of sensors. For instance, the buttons of a user interface can be pushed and
+released. Other typical examples of environment events include events for
+other user interface elements, and events that indicate that a product has
+entered the system, from the environment of the system. For higher level
+plants however, there usually is no such direct relation. Furthermore,
+internal events of the plants (usually event <code>tau</code>, or other events that
+are neither controllable nor uncontrollable), may be considered plant events
+as well.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Thus, for plant events as well as for controller events, the CIF model
+specifies/defines when the events may/should occur, while for environment
+events the specification always allows them, and lets the environment
+choose/determine when they actually occur. In other words, plant/controller
+events originate from within the specification (internal behavior), while
+environment events originate outside of the specification (external behavior).</p>
+</div>
+<div class="paragraph">
+<p>A closed system is a system for which the entire behavior is specified in the
+CIF model. Closed systems have no environment events.</p>
+</div>
+<div class="paragraph">
+<p>An open system does not model the environment. As such, open systems typically
+have plant events, controller events, and environment events. The environment
+events are then unrestricted in the CIF model, leaving the environment (which
+is not specified) free to determine its own behavior, and thus the behavior
+(enabledness) of the environment events.</p>
+</div>
+<div class="paragraph">
+<p>An open system can be closed by adding a use case, which models one possible
+sequence of behavior of the environment, over time. That is, the added use case
+eliminates environment events, by defining when they are enabled. Open systems
+can also be closed by the simulator, as described above for the different
+input modes.</p>
+</div>
+<div class="paragraph">
+<p>As an example, consider the following open system:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant automaton Button:
+  uncontrollable u_pushed, u_released;
+
+  location Released:
+    initial;
+    edge u_pushed goto Pushed;
+
+  location Pushed:
+    edge u_released goto Released;
+end
+
+plant automaton Lamp:
+  controllable c_on, c_off;
+
+  location Off:
+    initial;
+    edge c_on goto On;
+
+  location On:
+    edge c_off goto Off;
+end
+
+supervisor automaton ButtonLampController:
+  location:
+    initial;
+    edge Lamp.c_on  when Button.Pushed;
+    edge Lamp.c_off when Button.Released;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here we have a simple button and a lamp. The lamp can only be turned on while
+the button is pushed, and will be turned off as soon as the button is released.
+The button events are environment events, since it always possible to either
+push the button, or release it.</p>
+</div>
+<div class="paragraph">
+<p>By specifying the button events as environment events, and specifying the the
+lamp events as <a href="#tools-cifsim-input-chapter-semi-automatic">semi-automatic</a>
+events, we can use the <a href="#tools-cifsim-input-chapter-console">interactive console input mode</a>
+or the <a href="#tools-cifsim-input-chapter-gui">interactive GUI input mode</a> to try different traces,
+where we only have to
+choose between the button events and how much time we want to let pass.</p>
+</div>
+<div class="paragraph">
+<p>Alternatively, we could add a use case, modeling one possible behavior of a
+user:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant automaton User:
+  cont t der 1.0;
+
+  location:
+    initial;
+    edge Button.u_pushed, Button.u_released when t &gt;= 1 do t := 0.0;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specifies that the user either pushes or releases the button, after one
+unit of time has passed (typically one second). Since clock <code>t</code> is reset each
+time, the user repeats this behavior. Thus, the button is pushed after one
+second, for one second, after three seconds, for one second, after five
+seconds, for one second, etc. This extended model (with use case), can be
+simulated using the <a href="#tools-cifsim-input-chapter-automatic">automatic input mode</a>, as the
+<code>User</code> plant automaton closes the system.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-output-chapter-index">Simulation output</h5>
+<div class="paragraph">
+<p>
+
+The CIF simulator can produce various forms of output.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-output-console">Console output</h6>
+<div id="tools-cifsim-output-mode" class="paragraph">
+<p>The default form of output is to the console. The type of console output to
+produce, is determined by the
+<b class="menuref">Output mode</b>
+option
+(<b class="menuref">General</b>
+category). The following modes are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Error</em>: produces only error output. It is recommended not to use this mode.
+Use the warning mode instead, if you wish to limit the amount of console
+output.</p>
+</li>
+<li>
+<p><em>Warning</em>: produces error and warning output. Use this mode to be informed
+about potential problems, while keeping the amount of console output to a
+minimum.</p>
+</li>
+<li>
+<p><em>Normal</em>: produces error, warning, and normal output. This is the default
+output mode. The information that is printed to the console for normal output
+can be configured using the <a href="#tools-cifsim-output-chapter-normal">Normal output</a> option.</p>
+</li>
+<li>
+<p><em>Debug</em>: produces error, warning, normal, and debug output. This mode can be
+used to print additional debugging information to the console. The
+information that is printed to the console for normal output can be
+configured using the <a href="#tools-cifsim-output-chapter-debug">Debug output</a>
+option.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The simulator can thus produce two types of configurable console output:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-chapter-normal">Normal console output</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-chapter-debug">Debug console output</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div id="tools-cifsim-output-components" class="paragraph">
+<p><strong>Output components</strong></p>
+</div>
+<div class="paragraph">
+<p>Besides console output, the simulator also features a powerful and extensible
+output framework. This framework allows for the addition of output components,
+such as visualizers. The following output components are currently available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-print-chapter-index">Print output</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-index">SVG visualizer</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-chapter-trajdata">Trajectory data output</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-chapter-plotviz">Plot visualizer</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-chapter-stateviz">State visualizer</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Other topics</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-chapter-realtime">Real-time simulation</a></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-output-chapter-normal">Normal console output</h6>
+<div class="paragraph">
+<p>
+
+
+Normal console output mainly focuses on the state of the specification, and the
+progress of the simulation.</p>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-normal-types">Available types of normal output</h7>
+<div class="paragraph">
+<p>The following types of normal output are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>The initial state</em> [<code>state-init</code>] (default)</p>
+<div class="paragraph">
+<p>Prints the initial state to the console.</p>
+</div>
+</li>
+<li>
+<p><em>The target states</em> [<code>state-target</code>] (default)</p>
+<div class="paragraph">
+<p>Prints all target states to the console. This
+includes all states reached by event transitions and time transitions.
+Specifically, it excludes the initial state, and it includes the
+final/deadlock state.</p>
+</div>
+</li>
+<li>
+<p><em>The final state</em> [<code>state-final</code>]</p>
+<div class="paragraph">
+<p>Prints the final state to the console, regardless of whether or not the final
+state is a deadlock state.</p>
+</div>
+</li>
+<li>
+<p><em>The deadlock state</em> [<code>state-deadlock</code>]</p>
+<div class="paragraph">
+<p>Prints the final state to the console, but only if it is a deadlock state.</p>
+</div>
+</li>
+<li>
+<p><em>The intermediate states</em> [<code>state-intermediate</code>]</p>
+<div class="paragraph">
+<p>Prints all intermediate states to the console. Intermediate states are the
+states that are used to generate
+<a href="#tools-cifsim-output-realtime-frames">intermediate frames</a>, for smooth
+visualizations. The intermediate states are generated for states between the
+start and end states of time transitions, when
+<a href="#tools-cifsim-output-chapter-realtime">real-time</a> simulation is enabled. Note
+that this does not include the initial state, target states, and
+final/deadlock states.</p>
+</div>
+</li>
+<li>
+<p><em>The algebraic variables as part of the state</em> [<code>state-alg-vars</code>] (default)</p>
+<div class="paragraph">
+<p>Prints the algebraic variables (derived state) as part of the state. This
+applies to all states, including the states for intermediate frames. If no
+state information is printed, this output type has no effect. Disabling
+printing of algebraic variables excludes algebraic variables, regardless of
+whether <a href="#tools-cifsim-output-normal-state-filter">state filtering</a>
+includes or excludes them.</p>
+</div>
+</li>
+<li>
+<p><em>The derivatives as part of the state</em> [<code>state-derivs</code>] (default)</p>
+<div class="paragraph">
+<p>Prints the derivatives of the continuous variables (derived state) as part of
+the state. This applies to all states, including the states for intermediate
+frames. If no state information is printed, this output type has no effect.
+The derivative of variable <code>time</code> is not included. Disabling printing of
+derivatives excludes derivatives, regardless of whether
+<a href="#tools-cifsim-output-normal-state-filter">state filtering</a> includes
+or excludes them.</p>
+</div>
+</li>
+<li>
+<p><em>The possible transitions (for interactive console choice only)</em> [<code>trans-minimal</code>]</p>
+<div class="paragraph">
+<p>Prints the possible transitions to the console, if the
+<a href="#tools-cifsim-input-chapter-console">interactive console input mode</a> is used. Multiple possible
+transition are always printed. Single possible transitions are only printed
+if automatic choice for a single possible transition is disabled. Nothing
+is printed if no transitions are possible.</p>
+</div>
+</li>
+<li>
+<p><em>The possible transitions (for interactive console choice, or if more than one transition)</em> [<code>trans-default</code>]</p>
+<div class="paragraph">
+<p>Similar to 'interactive console choice only', but additionally always prints
+the possible transitions, if there are multiple possible transitions,
+regardless of the <a href="#tools-cifsim-input-chapter-index">input mode</a>.</p>
+</div>
+</li>
+<li>
+<p><em>The possible transitions (always)</em> [<code>trans-always</code>]</p>
+<div class="paragraph">
+<p>Always print the possible transitions to the console, regardless of the input
+mode, and the number of possible transitions. However, nothing is printed if
+no transitions are possible.</p>
+</div>
+</li>
+<li>
+<p><em>The chosen transitions</em> [<code>chosen-trans</code>] (default)</p>
+<div class="paragraph">
+<p>Prints the chosen transitions (the transitions that are about to be taken),
+to the console.</p>
+</div>
+</li>
+<li>
+<p><em>The interrupted transitions</em> [<code>interrupted-trans</code>] (default)</p>
+<div class="paragraph">
+<p>Prints information about interrupted transitions (time transitions that are
+stopped prematurely) to the console.</p>
+</div>
+</li>
+<li>
+<p><em>The simulation result</em> [<code>sim-rslt</code>] (default)</p>
+<div class="paragraph">
+<p>Prints the simulation result the console, at the end of the simulation, if
+simulation did not result in a runtime error.</p>
+</div>
+</li>
+<li>
+<p><em>The random seeds used for the random generators</em> [<code>seeds</code>] (default)</p>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="tools-cifsim-output-normal-seeds" class="paragraph">
+<p>Prints the seeds used for the random generators to the console, to allow
+reproducing the simulation <a href="#tools-cifsim-chapter-traces">trace</a>. Only if a
+random seed is used, is the seed printed. That is, for user-specified seeds,
+the seed is not printed. The following seeds may be printed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The seed used for the random <a href="#tools-cifsim-input-automatic-trans">automatic mode choice algorithm</a>.</p>
+</li>
+<li>
+<p>The seed used for the random <a href="#tools-cifsim-input-automatic-time">automatic mode time transition duration</a>.</p>
+</li>
+<li>
+<p>The seed used for the first random generator for a <a href="#tools-cifsim-chapter-distr-seeds">stochastic distribution</a>.
+The seed is only printed if it is used to create a random number generator for at least one stochastic
+distribution.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p><em>The print declarations output</em> [<code>print</code>] (default)</p>
+<div id="tools-cifsim-output-normal-print" class="paragraph">
+<p>Prints the output generated by <a href="#tools-cifsim-output-print-chapter-ref-printdecl">print declarations</a>.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-normal-output-option">Normal output option</h7>
+<div class="paragraph">
+<p>In the option dialog, each of the different types of output can be enabled and
+disabled individually (<b class="menuref">Normal output</b>
+option,
+<b class="menuref">Output</b>
+category).</p>
+</div>
+<div class="paragraph">
+<p>From the command line, using the <code>-o</code> or <code>--output</code> option, the names of
+the different types of normal output, as specified between square brackets,
+should be used, separated by commas. The output types indicated with
+'(default)' are enabled when default settings are used, i.e. when the
+<code>-o</code> or <code>--output</code> option is not used. As an example, consider
+<code>-o print,seeds</code> or <code>--output=print,seeds</code>. Only output generated by print
+declarations (due to <code>print</code>) and output about the used seeds for random
+generators (due to <code>seeds</code>) is enabled, while all other output is disabled.</p>
+</div>
+<div class="paragraph">
+<p>The output types that are specified using the option replace the default output
+types. However, it is also possible to specify additions and removals relative
+to the default output, by prefixing output types with a <code>+</code> or <code>-</code>
+respectively. For instance, when using <code>-o -print,+trans-always</code> or
+<code>--output=-print,+trans-always</code> the default output is used, with print
+declarations output excluded from it (due to <code>-print</code>), and with always
+printing possible transitions enabled (due to <code>+trans-always</code>). Replacements
+(no prefix) may not be combined with additions/removals (<code>+</code> or <code>-</code>
+prefix).</p>
+</div>
+<div class="paragraph">
+<p>Specifying a replacement output type twice leads to a warning being printed to
+the console. Adding an output type that is already present or removing an
+output type that is not present, also leads to a warning being printed.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-output-details">Output details</h7>
+<div class="paragraph">
+<p>When printing states, variable <code>time</code> is always printed first. It is followed
+by the current location of each of the automata, the current values of the
+state variables (the discrete and continuous variables), the current values of
+the derivatives of the continuous variables, and the current values of the
+algebraic variables. Except for variable <code>time</code>, the state objects are sorted
+alphabetically based on their absolute names. For automata with a single
+nameless location, the current location is always <code>*</code>.</p>
+</div>
+<div class="paragraph">
+<p>For variables with a function type and implicit default values, the
+default values may include <code>defaultValueFunc</code>, <code>defaultValueFunc2</code>, etc.</p>
+</div>
+<div class="paragraph">
+<p>When printing the possible transitions, the event transitions are printed
+first, followed by the <code>tau</code> transitions, and the time transition. The event
+transitions are sorted alphabetically on the names of the events.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-normal-state-filter">State filtering</h7>
+<div class="paragraph">
+<p>By default, when printing states, all state objects are included. Using
+the
+<b class="menuref">Normal output state filters</b>
+option
+(<b class="menuref">Output</b>
+category), the state objects can be filtered. The
+<b class="menuref">Normal output state filters</b>
+option only has effect
+if states are printed at all.</p>
+</div>
+<div class="paragraph">
+<p>As value for the option, comma separated <em>filters</em> should be supplied. Each
+filter specifies one or more state objects. The absolute names of the objects
+are used. That is, for an automaton <code>a</code>, with a variable <code>x</code>, the absolute
+name of the variable object is <code>a.x</code>. If CIF textual syntax keyword are
+used as names for events (such as <code>plant</code>), then they must be escaped in
+<code>.cif</code> files (<code>$plant</code>). For filters however, all escape characters (<code>$</code>)
+in the names are ignored. The <code>*</code> character can be used as wildcard, to
+indicate zero or more characters. If a filter doesn&#8217;t match any of the state
+objects of the CIF model, a warning is printed to the console.</p>
+</div>
+<div class="paragraph">
+<p>By default, filters include matching state objects. Filters may however be
+preceded by a <code>-</code> character, turning them into exclusion filters, which
+exclude matching states objects rather than including them. Filters are
+processed in the order they are specified, allowing for alternating additions
+and removals. If a filter does not result in the addition/removal of any state
+objects to/from the filter result, a warning is printed to the console. A
+warning is also printed if the entire state is filtered out.</p>
+</div>
+<div class="paragraph">
+<p>As an example, option value <code>a.*,-a.b*,a.bc*</code> consists of three filters:
+<code>a.*</code>, <code>-a.b*</code>, and <code>a.bc*</code>. The first filter indicates that state
+objects whose absolute names start with <code>a.</code> are to be included. The second
+filter indicates that from those matching state objects, the state objects
+whose absolute names start with <code>a.b*</code> are to be excluded. To that result,
+the third filter adds those state objects whose absolute names start with
+<code>a.bc*</code>. For instance, if a specification contains state objects <code>time</code>,
+<code>a.a</code>, <code>a.b</code> <code>a.bb</code>, <code>a.bc</code>, <code>a.b.c</code>, <code>a.bc</code>, <code>a.bcc</code>, and
+<code>a.bcd</code>, the result of the three filters is that the following state objects
+are displayed: <code>a.a</code>, <code>a.bc</code>, <code>a.bc</code>, <code>a.bcc</code>, and <code>a.bcd</code>.</p>
+</div>
+<div class="paragraph">
+<p>The default option value (filter) is <code>*</code>.</p>
+</div>
+<div class="paragraph">
+<p>Regardless of whether the filtered result includes them or not, all algebraic
+variables and derivatives of continuous variables may be excluded, using the
+<a href="#tools-cifsim-output-normal-types">Normal output option</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-profiling">Profiling</h7>
+<div class="paragraph">
+<p>If <a href="#tools-cifsim-chapter-profiling">profiling</a> is enabled, all normal output is
+automatically disabled. That is, profiling suppresses all normal output.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-output-chapter-debug">Debug console output</h6>
+<div class="paragraph">
+<p>
+
+
+The following types of debug output are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Debug the CIF/SVG declarations</em> [<code>svg</code>]</p>
+<div class="paragraph">
+<p>Prints debugging information to the console, for the
+<a href="#tools-cifsim-output-svgviz-chapter-cifsvg">CIF/SVG declarations</a>. For more
+information on this kind of debugging output, see the page on
+<a href="#tools-cifsim-output-svgviz-debugging-console">console debugging</a> for
+CIF/SVG declarations.</p>
+</div>
+</li>
+<li>
+<p><em>Debug the parser</em> [<code>parser</code>]</p>
+<div class="paragraph">
+<p>Prints debugging information to the console, for the parser. This information
+is primarily intended for the developers of the simulator, and not for end
+users.</p>
+</div>
+</li>
+<li>
+<p><em>Debug the generated code (by writing it to disk)</em> [<code>gen-code</code>]</p>
+<div class="paragraph">
+<p>The simulator generates highly optimized code for the specification. Enabling
+this debugging output, writes the generated code to disk, for
+<a href="#tools-cifsim-chapter-debug-gen-code">further debugging</a>. This information is primarily
+intended for the developers of the simulator, and not for end users.</p>
+</div>
+</li>
+<li>
+<p><em>Debug the ODE solver</em> [<code>ode</code>]</p>
+<div class="paragraph">
+<p>Prints debugging information to the console, for the
+<a href="#tools-cifsim-solver-chapter-index">ODE solver</a>. This information can for
+instance be used to figure out why a state event (guard change)
+<a href="#tools-cifsim-solver-chapter-root-problems">was missed</a>.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect6">
+<h7 id="tools-debug-output-option">Debug output option</h7>
+<div class="paragraph">
+<p>In the option dialog, each of the different types of output can be enabled and
+disabled individually
+(<b class="menuref">Debug output</b>
+option,
+<b class="menuref">Output</b>
+category).</p>
+</div>
+<div class="paragraph">
+<p>From the command line, using the <code>-d</code> or <code>--debug</code> option, the names of
+the different types of debug output, as specified between square brackets,
+should be used, separated by commas. By default, i.e. when not using the
+<code>-d</code> or <code>--debug</code> option, all debug output is disabled. As an example,
+consider <code>-d parser,svg</code> or <code>--debug=parser,svg</code>. Debug output is printed
+for the parser (due to <code>parser</code>) and CIF/SVG declarations (due to <code>svg</code>).</p>
+</div>
+<div class="paragraph">
+<p>Specifying an output type twice leads to a warning being printed to the
+console.</p>
+</div>
+<div class="paragraph">
+<p>Enabling any debug output, automatically changes the <a href="#tools-cifsim-output-chapter-index">output mode</a>
+to 'debug mode'.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-profiling-2">Profiling</h7>
+<div class="paragraph">
+<p>If <a href="#tools-cifsim-chapter-profiling">profiling</a> is enabled, all debug output is
+automatically disabled. That is, profiling suppresses all debug output.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-output-print-chapter-index">Print output</h6>
+<div class="paragraph">
+<p>
+
+
+The CIF simulator supports several forms of
+<a href="#tools-cifsim-output-chapter-index">output</a>. By default, simulation results, such as the
+current <a href="#tools-cifsim-traces-state">state</a>, are printed to the console.
+While this provides useful information, it can also be useful to generate
+custom output, tailored to ones specific needs. To allow this, the CIF
+simulator supports <em>print output</em>.</p>
+</div>
+<div class="paragraph">
+<p>Simulation using the CIF simulator results in a
+<a href="#tools-cifsim-traces-traces">trace</a>. A trace consists of the
+<a href="#tools-cifsim-traces-state">states</a> that are encountered and the
+transitions that are taken, during the simulation. The print output
+declarations allow specifying for which transitions text should be printed
+(for instance only for transitions for a certain event), when the text should
+be printed (for instance before or after the transition), where the text should
+be printed (for instance to a file), and what text should be printed.</p>
+</div>
+<div class="paragraph">
+<p>Print output declarations are an extension to the CIF language, and can be
+specified directly in the CIF specification. They are only used to couple
+the model to textual output. They don&#8217;t influence the behavior of the model
+itself. The CIF <a href="#tools-chapter-text-editor">text editor</a> provides full
+integration for the print output declarations extension, complete with syntax
+highlighting, background validation, etc.</p>
+</div>
+<div class="paragraph">
+<p>
+Print output can be used to generate text that after simulation is further
+processed, for instance for visualization or for analysis using statistical
+software. Print output can also be useful for debugging,</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect6">
+<h7 id="tools-quick-example">Quick example</h7>
+<div class="paragraph">
+<p>This example serves only to give a quick taste of what print output
+declarations look like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">printfile "out.txt";
+
+print x for e;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This example prints the value of variable <code>x</code> to a file <code>out.txt</code> each
+time after a transition for event <code>e</code> is taken.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-documentation">Documentation</h7>
+<div class="paragraph">
+<p>The tutorials introduce print declarations and text formatting, they explain
+the general idea behind them, and they show how to use them, all by means of
+examples. The tutorials are focused on practical use, and do not cover all uses
+and other details.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-print-chapter-tut-print">Print output tutorial</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-chapter-tut-fmt">Text formatting tutorial</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The reference documentation discusses all details related to text output and
+text formatting. It is much more technical than the tutorials.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-print-chapter-ref-printdecl">Print declaration</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-chapter-ref-printfile">Print file declaration</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-chapter-ref-sim">Simulation with print output</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-chapter-ref-fmt">Text formatting details</a></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-print-chapter-tut-print">Print output tutorial</h7>
+<div class="paragraph">
+<p>
+
+
+This tutorial explains print output by means of examples. It does not explain
+all uses of print output, and all details related to print output. For those
+details, see the reference documentation instead.</p>
+</div>
+<div class="paragraph">
+<p>In this tutorial, when printed console output is shown, all output that the
+simulator can generate other than output for print declarations, is omitted.</p>
+</div>
+<div class="paragraph">
+<p>Before we start with the examples, the
+<a href="#tools-cifsim-output-print-tut-print-model-trace">Example model and simulation trace</a> section introduces the
+example model and simulation trace on which the examples are based. Then, the
+following examples are explained in detail:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex1">Example 1: Printing the buffer count for all states</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex2">Example 2: Printing to a file</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex3">Example 3: Printing the odd/even status for all states</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex4">Example 4: Printing only for odd states</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex5">Example 5: Printing the result of adding an item</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex6">Example 6: Printing addition/removal results</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex7">Example 7: Printing value changes</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex8">Example 8: Printing headers and footers</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex9">Example 9: Printing the new time after time passes</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex10">Example 10: Printing all unique time values</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-tut-print-ex11">Example 11: Printing transitions to/from a location</a></p>
+</li>
+</ul>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-model-trace">Example model and simulation trace</h8>
+<div class="paragraph">
+<p>The examples of print output in this tutorial all make use of the same CIF
+model:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton buffer:
+  event add, remove;
+  disc int cnt = 5;
+
+  location:
+    initial;
+    edge add    when cnt &lt; 10 do cnt := cnt + 1;
+    edge remove when cnt &gt;  0 do cnt := cnt - 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>buffer</code> initially contains five items (<code>cnt = 5</code>). As long as there
+is room in the buffer (<code>cnt &lt; 10</code>), an item can be added (event <code>add</code>) to
+the buffer. As long as the buffer is not empty (<code>cnt &gt; 0</code>), an item can be
+removed (event <code>remove</code>) from the buffer. During simulation, it is possible
+to <a href="#tools-cifsim-input-chapter-index">choose</a> between adding an item to the
+buffer, and removing an item from the buffer. The following is a potential
+simulation trace:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/print/trace_normal.png" alt="trace normal">
+</div>
+</div>
+<div class="paragraph">
+<p>In the initial state (S1), variable <code>cnt</code> has value <code>5</code>. An item is then
+added (transition for the event <code>add</code>), resulting in a new state (S2), where
+<code>cnt</code> has value <code>6</code>. After that, another item is added, leading to state
+S3, where <code>cnt</code> has value <code>7</code>. Finally, an item is removed by means of a
+transition for event <code>remove</code>, leading to state S4, where <code>cnt</code> has value
+<code>6</code> again.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex1">Example 1: Printing the buffer count for all states</h8>
+<div class="paragraph">
+<p>If we want to print for every state (S1 through S4), the number of items in the
+buffer, we could add the following print declaration to automaton <code>buffer</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print cnt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Then, as a result of this print declaration, the following text is printed to
+the console:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">5
+6
+7
+6</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>That is, for every state (S1 through S4), the value of variable <code>cnt</code> is
+printed, on a new line.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex2">Example 2: Printing to a file</h8>
+<div class="paragraph">
+<p>Consider the following print declarations:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print cnt     file "a.txt";
+print cnt * 2 file "b.txt";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first print declaration results in the number of items in the buffer being
+printed for every state of the simulation trace, to a file named <code>a.txt</code>. The
+second print declaration prints the number of items in the buffer multiplied by
+two, to a file named <code>b.txt</code>. These declarations use local file declarations
+to specify the file to which output is to be written. It is also possible to
+use global print file declarations:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">printfile "ab.txt";
+print cnt;
+print cnt * 2;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The print file declaration declares that output of this scope is to be printed
+to a file named <code>ab.txt</code>. The two print declarations don&#8217;t specify a local
+file declaration, and thus use the default file for their scope, in this case
+file <code>ab.txt</code>. Alternating lines with the number of items in the buffer and
+twice that amount are thus printed to that file.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex3">Example 3: Printing the odd/even status for all states</h8>
+<div class="paragraph">
+<p>If we want to print for every state, whether the buffer contains an odd or even
+number of items, we could add the following print declaration to automaton
+<code>buffer</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print if cnt mod 2 = 0: "even" else "odd" end;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Then, as a result of this print declaration, the following text is printed to
+the console:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">odd
+even
+odd
+even</code></pre>
+</div>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex4">Example 4: Printing only for odd states</h8>
+<div class="paragraph">
+<p>If we want to print the number of items in the buffer, but only for states
+where the number of items is odd, we could add the following print declaration
+to automaton <code>buffer</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print cnt when cnt mod 2 = 1;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Then, as a result of this print declaration, the following text is printed to
+the console:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">5
+7</code></pre>
+</div>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex5">Example 5: Printing the result of adding an item</h8>
+<div class="paragraph">
+<p>If we want to print the result of adding an item, that is the new buffer count
+after a transition for the <code>add</code> event, we could add the following print
+declaration to automaton <code>buffer</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print cnt for add;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Then, as a result of this print declaration, the following text is printed to
+the console:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">6
+7</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Since an item is added to the buffer twice, two lines of text are printed.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex6">Example 6: Printing addition/removal results</h8>
+<div class="paragraph">
+<p>If we want to print the resulting buffer count after every change to the buffer
+(addition or removal), we could add the following print declaration to
+automaton <code>buffer</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print cnt for add, remove;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Then, as a result of this print declaration, the following text is printed to
+the console:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">6
+7
+6</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Two items are added to the buffer, and one item is removed from the buffer,
+leading to three lines of text being printed.</p>
+</div>
+<div class="paragraph">
+<p>Since the <code>add</code> and <code>remove</code> events are the only events in the system, and
+no edges exist without an event (which would implicitly use the <code>tau</code> event),
+the print declaration can also be specified as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print cnt for event;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>That is, the value of variable <code>cnt</code> is printed after each event transition.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex7">Example 7: Printing value changes</h8>
+<div class="paragraph">
+<p>If we want to print the buffer count before and after removal of an item from
+the buffer, we could add the following print declaration to automaton
+<code>buffer</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print pre cnt post cnt for remove;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>As a result of this print declaration, the following text is printed to the
+console:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">7
+6</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>As only one item is removed for our example trace, two lines of text are
+printed, one with the buffer count before the removal (due to <code>pre cnt</code>),
+and one with the buffer count after the removal (due to <code>post cnt</code>).</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex8">Example 8: Printing headers and footers</h8>
+<div class="paragraph">
+<p>If we want to print for every state (S1 through S4), the number of items in the
+buffer, we could add the following print declaration to automaton <code>buffer</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print cnt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If we want to print some text before this, as a header, and some text after
+this, as a footer, we could add the following print declaration to the top
+level scope of the specification, or to automaton <code>buffer</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print "header" for initial;
+print "footer" for final;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>As a result of the original print declaration, and these two new print
+declarations, the following text is printed to the console:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">header
+5
+6
+7
+6
+footer</code></pre>
+</div>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex9">Example 9: Printing the new time after time passes</h8>
+<div class="paragraph">
+<p>In the example simulation trace given at the top of this page, no passage of
+time is included. If however a trace includes time passage, it is possible to
+filter printing to only time transitions. For instance, if we want to print the
+new time after time passes, we could use the following print declaration:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print time for time;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This prints the value of variable <code>time</code>, every time after a time transition.
+The first <code>time</code> in the print declaration denotes that the value of variable
+<code>time</code> should be printed, and the second <code>time</code> denotes that it should be
+printed only after passage of time (after time transitions). As an example,
+the following could be printed to the console:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">0.005
+0.75
+3.1
+7.9</code></pre>
+</div>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex10">Example 10: Printing all unique time values</h8>
+<div class="paragraph">
+<p>In the <a href="#tools-cifsim-output-print-tut-print-ex9">ninth example</a>, we
+printed the new time value after each time transition. However, initially time
+is zero. Since the initial state is not reached via a time transition, time
+zero is not printed. We could adapt the print declaration to the following, to
+print all unique values of variable <code>time</code>, for all states of the simulation
+trace:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print time for initial, time;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This initially prints the value of variable <code>time</code>, and also prints it after
+every time transition. As an example, the following could be printed to the
+console:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">0.0
+0.005
+0.75
+3.1
+7.9</code></pre>
+</div>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-tut-print-ex11">Example 11: Printing transitions to/from a location</h8>
+<div class="paragraph">
+<p>In the example model given at the top of this page, automaton <code>buffer</code> has
+only one location. If however an automaton has multiple locations, it may be
+useful to print the effect of transitions ending in a certain location, or the
+state of the system for transitions starting in a certain location. Consider
+the following print declaration:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print x for event when aut.loc;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This prints the value of variable <code>x</code> after event transitions leading to a
+state where location <code>loc</code> is the current location of automaton <code>aut</code>.
+That is, whenever an event transition leads to entering that location, the
+value of variable <code>x</code> after that transition is printed. Since self loops have
+the same source and target location, this includes self loops. To exclude self
+loops, use the following print declaration:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print x for event when pre not aut.loc post aut.loc;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This print declaration prints the same text, but only prints it after event
+transitions from a state where location <code>loc</code> is not the current location
+of automaton <code>aut</code> to a state where location <code>loc</code> is the current location
+of automaton <code>aut</code>.</p>
+</div>
+<div class="paragraph">
+<p>So far in this example, we printed text for transitions ending in a location.
+To print text for transitions starting in a location, consider the following
+print declaration:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print pre y for event when pre aut.loc post not aut.loc;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This print declaration prints the value of variable <code>y</code> in the state that is
+exited by the transition, for all event transitions that start in location
+<code>loc</code> of automaton <code>aut</code>, but do end in that same location.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-print-chapter-tut-fmt">Text formatting tutorial</h7>
+<div class="paragraph">
+<p>
+
+
+
+This tutorial explains text formatting by means of examples. It does not
+explain all uses of text formatting, and all details related to text
+formatting. For those details, see the
+<a href="#tools-cifsim-output-print-chapter-ref-fmt">Text formatting details</a> page instead.</p>
+</div>
+<div class="paragraph">
+<p>In this tutorial, when printed console output is shown, all output that the
+simulator can generate other than output for print declarations, is omitted.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-introduction">Introduction</h8>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print "Time=" + &lt;string&gt;time;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>When simulated, it could give the following output:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>Time=0.0
+Time=3.333333333333336
+Time=5.000000000000001
+Time=10.0</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>As you can see, due to rounding and simulation imprecision, the length of the
+textual representations of the values of <code>time</code> can vary wildly during
+simulation. Furthermore, the explicit casts (conversions) from real to string
+(<code>&lt;string&gt;</code>) and string concatenation (the <code>+</code> operator) can quickly
+become cluttered, and hard to read.</p>
+</div>
+<div class="paragraph">
+<p>To improve readability of the print declaration, we could adapt the CIF
+specification to the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print fmt("Time=%s", time);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, manual text construction has been replaced by the use of the <code>fmt</code>
+standard library function. The first argument is a <em>format pattern</em>, and the
+remaining arguments are the values that are to be included in the text, in
+this case the value of variable <code>time</code>. The <code>fmt</code> function ensures that we
+no longer have to use casts. We also no longer have to create pieces of text
+and concatenate them (using the <code>+</code> operator).</p>
+</div>
+<div class="paragraph">
+<p>This is a typical use of a format pattern. The print declaration prints the
+value that results from text formatting. The value that is used is the value of
+variable <code>time</code>. The value of this variable is not used 'as is', but is
+instead converted to a textual representation using the format pattern. This
+format pattern specifies that the resulting text should start with <code>Time=</code>.
+It also specifies that the value (of variable <code>time</code>) should be included at
+the end of the textual representation. The <code>%s</code> part of the format pattern is
+a <em>format specifier</em>. The <code>%s</code> specifier is the generic specifier that can
+convert any type of value to a textual representation.</p>
+</div>
+<div class="paragraph">
+<p>When simulated, this new specification gives the exact same output as the
+previous version.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-real-value-formatting">Real value formatting</h8>
+<div class="paragraph">
+<p>As we saw in the previous section, due to rounding and simulation imprecision,
+the length of the generic textual representations of the values of variable
+<code>time</code> can vary wildly during simulation. This reduces readability of the
+results, as a lot of irrelevant digits are included. Consider the following
+alternative CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print fmt("Time=%.2f", time);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, instead of a <code>%s</code> specifier, a <code>%f</code> specifier is used. This specifier
+can only be used for <code>real</code> numbers, and indicates that the number should be
+formatted as a floating point number in decimal representation. The <code>.2</code> part
+specifies the precision, and indicates that the floating point number in
+decimal notation should have exactly two digits after the decimal point. When
+simulated, this could give the following output:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>Time=0.00
+Time=3.33
+Time=5.00
+Time=10.00</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-putting-values-in-columns">Putting values in columns</h8>
+<div class="paragraph">
+<p>In the examples above, we included a single value in the output. Now consider
+the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print fmt("%.2f %.2f %.2f", x, y, z);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, the values of variables <code>x</code>, <code>y</code>, and <code>z</code> are included in the
+formatted result. The format pattern includes each of the values (the first
+<code>%.2f</code> includes the value of variable <code>x</code>, the second <code>%.2f</code> includes the
+value of variable <code>y</code>, etc). The format pattern includes spaces between the
+format specifiers (between the <code>%.2f</code> parts), and thus the formatted values
+include spaces between them as well. When simulated, this could give the
+following output:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>1.50 0.00 -3.57
+2.34 3.75 5.78
+4.71 12345.34 -3.12
+-3.25 1.25 99.20</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Due to some larger values being mixed with shorter values, as well as due to
+having both positive and negative values, the output is not so easy to read.
+This can be solved by using the following CIF specification instead:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print fmt("%10.2f %10.2f %10.2f", x, y, z);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>By including a <em>width</em> of <code>10</code>, the text is now nicely formatted into columns
+of ten characters wide:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>---------- ---------- ----------
+      1.50       0.00      -3.57
+      2.34       3.75       5.78
+      4.71   12345.34      -3.12
+     -3.25       1.25      99.20</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first line is not actual output, but is included to make it easier to see
+the columns. Not only is the output now nicely put in columns, but due to the
+exactly two digits after the dot (<code>.</code>), the dots are now also nicely aligned.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-large-numbers">Large numbers</h8>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print fmt("%.2f", time);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>When simulated, this could give the following output:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>0.00
+1.34
+5000.23
+2147185402.17</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>As the values of variable <code>time</code> get larger and larger, their textual
+representations become longer and longer, and it becomes more and more
+difficult to see exactly how large the values are. The following alternative
+CIF specification solves this problem:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print fmt("%,.2f", time);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The addition of the comma (<code>,</code>) <em>flag</em> ensures that we get the following
+output instead:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>0.00
+1.34
+5,000.23
+2,147,185,402.17</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>That is, a comma is used in the result as <em>thousand separator</em>, making it
+easier to see that the value of variable <code>time</code> is just over two billion,
+rather than for instance just over 200 million.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-left-alignment">Left alignment</h8>
+<div class="paragraph">
+<p>Earlier, we put values in columns. By default, if a <em>width</em> is used, text is
+right-justified (aligned to the right). We can also justify it to the left,
+as in this CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print fmt("%-10.2d %-10.2d %-10.2d", g, h, i);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here the <code>%d</code> specifier is used instead of the <code>%f</code> specifier. The <code>%d</code>
+specifier can only be used for integer values, while the <code>%f</code> specifier can
+only be used for real values. Besides a different specifier, the minus (<code>-</code>)
+flag is added, and different variables are used as values. After the changes,
+the CIF specification could result in the following output:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>---------- ---------- ----------
+184        3675       2
+19350      29         -2956
+-17        -964563    235
+2946       567        -25072563</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Once again, the first line is not actual output, but is included to make it
+easier to see the columns. Observe how the addition of the <code>-</code> flag resulted
+in the right-justified output being changed to left-justified (aligned to the
+left) output. The presence of negative numbers makes that the left-most digits
+of the columns are not nicely aligned. The following CIF specification solves
+this:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print fmt("%-+10.2d %-+10.2d %-+10.2d", x, y, z);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The addition of the plus (<code>+</code>) flag means that for non-negative numbers, a
+plus (<code>+</code>) character is always included:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>---------- ---------- ----------
++184       +3675      +2
++19350     +29        -2956
+-17        -964563    +235
++2946      +567       -25072563</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If preferred, a space can be used instead of a plus, resulting in the following
+CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print fmt("%- 10.2d %- 10.2d %- 10.2d", x, y, z);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>and the following output:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>---------- ---------- ----------
+ 184        3675       2
+ 19350      29        -2956
+-17        -964563     235
+ 2946       567       -25072563</code></pre>
+</div>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-more-formatting">More formatting</h8>
+<div class="paragraph">
+<p>In this short tutorial, we&#8217;ve seen a few forms of text formatting using the
+<code>fmt</code> function. However, CIF supports various other specifiers, besides the
+<code>%s</code>, <code>%f</code>, and <code>%d</code> specifiers that were used in this tutorial. All
+those specifiers support various flags, widths, and precisions, and allow them
+to be combined in various ways. For the complete details of text formatting,
+see the <a href="#tools-cifsim-output-print-chapter-ref-fmt">Text formatting details</a> page.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-print-chapter-ref-printdecl">Print declaration</h7>
+<div class="paragraph">
+<p>
+
+
+
+The core concept of print output is the <em>print declaration</em>. The print
+declarations allow specifying what to print. They also optionally allow
+specifying when to print it, how to print it, and to where to print it.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-transition-centric-view">Transition centric view</h8>
+<div class="paragraph">
+<p>Unlike many programming languages that have print statements, CIF has print
+declarations. Print declarations are
+<a href="http://en.wikipedia.org/wiki/Declarative_programming">declarative</a>,
+rather than
+<a href="http://en.wikipedia.org/wiki/Imperative_programming">imperative</a>.
+Print
+declarations center on transitions. The following is a schematic overview of
+a transition:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/print/transition.png" alt="transition">
+</div>
+</div>
+<div class="paragraph">
+<p>The transition is graphically depicted as an arrow, with a label. The label
+denotes the event that occurred, or <code>time</code> for time transitions. Every
+transition has a <em>pre</em> or <em>source</em> <a href="#tools-cifsim-traces-state">state</a>,
+and a <em>post</em> or <em>target</em> state. The states are graphically depicted as circles,
+with a name above them. These names are only used so that they can be referred
+to from the text.</p>
+</div>
+<div class="paragraph">
+<p>The figure thus contains the transition and its immediate environment (its
+source and target states). Print declarations allow specifying what, how, and
+when to print, for transitions. Since the transition is the central part, we
+call this the <em>transition centric view</em>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-extended-trace">Extended trace</h8>
+<div class="paragraph">
+<p>Simulation using the CIF simulator results in a
+<a href="#tools-cifsim-traces-traces">trace</a>. A trace consists of the
+<a href="#tools-cifsim-traces-state">states</a> that are encountered and the
+transitions that are taken, during the simulation. For instance, consider the
+following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton buffer:
+  event add, remove;
+  disc int cnt = 5;
+
+  location:
+    initial;
+    edge add    when cnt &lt; 10 do cnt := cnt + 1;
+    edge remove when cnt &gt;  0 do cnt := cnt - 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>buffer</code> initially contains five items (<code>cnt = 5</code>). As long as there
+is room in the buffer (<code>cnt &lt; 10</code>), an item can be added (event <code>add</code>) to
+the buffer. As long as the buffer is not empty (<code>cnt &gt; 0</code>), an item can be
+removed (event <code>remove</code>) from the buffer. The following is a potential
+simulation trace:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/print/trace_normal.png" alt="trace normal">
+</div>
+</div>
+<div class="paragraph">
+<p>In the initial state (S1), variable <code>cnt</code> has value <code>5</code>. An item is then
+added (transition for the event <code>add</code>), resulting in a new state (S2), where
+<code>cnt</code> has value <code>6</code>. After that, another item is added, leading to state
+S3, where <code>cnt</code> has value <code>7</code>. Finally, an item is removed by means of a
+transition for event <code>remove</code>, leading to state S4, where <code>cnt</code> has value
+<code>6</code> again.</p>
+</div>
+<div class="paragraph">
+<p>As can be seen in the figure, the initial state (S1) has no incoming
+transition. Furthermore, the last/final state (S4) has no outgoing
+transition. As we&#8217;ll see later, that poses some difficulties in applying the
+transition centric view. To get around these limitations, the trace is extended
+as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/print/trace_extended.png" alt="trace extended">
+</div>
+</div>
+<div class="paragraph">
+<p>A transition with the <em>initial</em> label is added before the initial state, and a
+transition with the <em>final</em> label is added after the final state. This ensures
+that all states have an incoming and outgoing transition. These two added
+transitions are <em>virtual</em>, they don&#8217;t actually exist. They are added only for
+the benefit of print output. That is, they don&#8217;t affect the simulation behavior
+of the model, and are thus not part of the 'real' trace.</p>
+</div>
+<div class="paragraph">
+<p>The added 'initial' virtual transition has no source state, and the added
+'final' virtual transition has no target state. Since in the transition centric
+view every transition should have a source and a target state, we add the
+initial state (S1) as source state (S0) for the 'initial' transition, and the
+final state (S4) as target state (S5) for the 'final' transition. This way,
+every transition (whether virtual or real) has a source and target state, and
+fits the transition centric view. For the 'initial' and 'final' virtual
+transitions, the source and target states are thus the same (S0 = S1, S4 = S5).</p>
+</div>
+<div class="paragraph">
+<p>The trace with added virtual 'initial' and 'final' transitions, and with the
+duplicates (S0 and S5) of the source and final states, is called the
+<em>extended trace</em>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-specifying-the-text-to-print">Specifying the text to print</h8>
+<div class="paragraph">
+<p>Every print declaration must specify <em>what</em> to print, using CIF expressions.
+These CIF expressions can for instance refer to variables from the CIF model.
+Since variables can change values, it is important to know in which state the
+expression is evaluated. In the transition centric view, we have two states to
+choose from, the pre/source state and the post/target state. The following
+variants are supported to specify what to print:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print EXPR;
+print pre EXPR;
+print post EXPR;
+print pre EXPR post EXPR;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first variant has only one expression, which is printed in the post/target
+state. The third variant is identical, but explicitly indicates that the
+post/target state is used. The second variant also has a single expression, but
+is evaluated in the pre/source state. The fourth variant has two expression,
+one of which is evaluated in the pre/source state, and one of which is
+evaluated in the post/target state. The first three variants only print one
+piece of text per transition, while the fourth variant prints two pieces of
+text per transition.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print "a";
+print pre x post x;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first example prints <code>a</code> after each transition. The second example prints
+the value of variable <code>x</code> as it was before the transition, as well as the
+value of variable <code>x</code> as it is after the transition, for each transition.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-quoting-and-escaping">Quoting and escaping</h8>
+<div class="paragraph">
+<p>The expressions that indicate what text to print may be of any type, and the
+result of evaluating the expression is converted to a textual representation
+that closely resembles the textual syntax of CIF. For string literals this
+means that the text is escaped, and double quotes are added. If however the
+result of the expression is a <code>string</code> typed value, then that string is used
+'as is' (without quoting, and without escaping). Thus, consider the following
+example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print ["a\"b"];
+print "a\"b";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first print declaration prints a list that contains a single string value,
+while the second print declaration prints the single string value directly.
+This results in the following printed output:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">["a\"b"]
+a"b</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>That is, in general string values are quoted and escaped, as is the case for
+the first example, where the result is a list. However, if the entire result
+is a string, as is the case with the second example, the string value is used
+'as is', without quoting and without escaping.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-transition-filtering">Transition filtering</h8>
+<div class="paragraph">
+<p>It is possible to filter the transitions to which print declarations apply, by
+looking at the kind of the transitions (their labels). The following transition
+filters are available:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 14.2857%;">
+<col style="width: 28.5714%;">
+<col style="width: 57.1429%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Filter</th>
+<th class="tableblock halign-left valign-top">Matches</th>
+<th class="tableblock halign-left valign-top">Does not match</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>event</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All event transitions, including those for the <code>tau</code> event.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All time and virtual transitions.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>time</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All time transitions.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All event and virtual transitions.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">e</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All transitions for event <code>e</code>.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All time and virtual transitions, as well as all transitions for
+'other' events (including those for the <code>tau</code> event).</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>initial</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The single virtual <em>initial</em> transition.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All event and time transitions, as well as the single virtual <em>final</em> transition.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>final</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The single virtual <em>final</em> transition.</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">All event and time transitions, as well as the single virtual <em>initial</em> transition.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Transition filters may be combined, leading to a combined transition filter
+that matches if any of the individual transition filters matches. The
+individual filters must be separated by commas.</p>
+</div>
+<div class="paragraph">
+<p>Transition filtering is optional. If no transition filter is supplied, the
+default transition filter is used, which is <code>initial, event, time</code>. That is,
+by default output is printed for all transitions, except for the <em>final</em>
+virtual transition.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print EXPR for e;
+print EXPR for time, event;
+print EXPR for initial, final;
+print EXPR for machine1.start, machine2.start;
+print EXPR;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first example prints only for transitions for event <code>e</code>. That is, time
+transitions and virtual transitions, as well as transitions for all other
+events, are filtered out. The second example prints only for event and time
+transitions, and thus filters out the virtual transitions. The third example
+prints only for the virtual transitions, and thus filters out all 'real'
+transitions (the event and time transitions). The fourth example prints only
+for transitions for the <code>start</code> events declared in <code>machine1</code> and
+<code>machine2</code> (which could for instance be automata), and filters out time
+transitions, virtual transitions, and transitions for all other events. The
+fifth example does not specify a filter, and thus prints for the <em>initial</em>
+virtual transition, as well as all event and time transitions, but excludes
+the <em>final</em> virtual transition.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-state-filtering">State filtering</h8>
+<div class="paragraph">
+<p>It is possible to filter the transitions to which print declarations apply,
+by looking at the pre/source and post/target states of the transitions.
+The following variants are supported for state filtering:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print EXPR when PRED;
+print EXPR when pre PRED;
+print EXPR when post PRED;
+print EXPR when pre PRED post PRED;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first variant has only one predicate, which is evaluated in the post/target
+state. The third variant is identical, but explicitly indicates that the
+post/target state is used. For both these variants, text is only printed if the
+post/target state satisfies the given predicate. That is, if the predicate
+evaluated in the post/target state of the transition results in value <code>true</code>,
+text may be printed. Otherwise, no text is printed for that transition.</p>
+</div>
+<div class="paragraph">
+<p>The second variant also has a single predicate, but is evaluated in the
+pre/source state. Text is thus only printed if the pre/source state satisfies
+the given predicate.</p>
+</div>
+<div class="paragraph">
+<p>The fourth variant has two predicates, one of which is evaluated in the
+pre/source state, and one of which is evaluated in the post/target state. Text
+is only printed if the pre/source state satisfies the first predicate, and the
+post/target state satisfies the second predicate. If either of the states does
+not satisfy its corresponding predicate, no text is printed for that
+transition.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print "a";
+print "b" when aut.loc;
+print "c" when pre aut.loc;
+print "d" when pre x mod 2 = 0 post x mod 2 = 1;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first example prints <code>a</code> after each transition, and does not restrict the
+pre/source or post/target states. The second example only prints <code>b</code> for
+transitions that end in location <code>loc</code> of automaton <code>aut</code>. The third
+example only prints <code>c</code> for transitions that start in location <code>loc</code> of
+automaton <code>aut</code>. The fourth example only prints <code>d</code> for transitions where
+the value of variable <code>x</code> is even before the transition, and odd after the
+transition.</p>
+</div>
+<div class="paragraph">
+<p>State filtering is thus optional. If no pre/source state predicate is
+specified, the default is <code>true</code>. Similarly, if no post/target state
+predicate is specified, the default is <code>true</code> as well.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-combining-filters">Combining filters</h8>
+<div class="paragraph">
+<p>The transition and state filters are all optional. If however both a transition
+filter and a state filter are specified, they must both match in order for text
+to be printed. Consider the following examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print time for time when time &gt; 3;
+print x for e when pre x &lt; 3 post x &gt; 5;
+print pre y post y when pre y = 5;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For the first example, the value of variable <code>time</code> is printed after time
+transitions, if after those time transitions the value of variable <code>time</code> is
+strictly larger than three. For the second example, the value of variable <code>x</code>
+is printed after transitions for event <code>e</code> if before such transitions the
+value of variable <code>x</code> is strictly less than three, and after such transitions
+the value of variable <code>x</code> is strictly larger than <code>5</code>. For the third
+example, the value of variable <code>y</code> is printed twice for all 'default'
+transitions, once in the pre/source state, and once in the post/target state,
+but only if the value of variable <code>y</code> before the transition is exactly five.
+So if the condition over the pre/source state does not hold, the value of
+variable <code>y</code> is not printed, not for the pre/source state, and also not for
+the post/target state.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-printdecl-file">Output file/target</h8>
+<div class="paragraph">
+<p>By default text is printed to the console, to the
+<a href="http://en.wikipedia.org/wiki/Standard_streams">standard output stream</a>,
+usually called 'stdout'. It
+is however possible to explicitly specify the file or special target to which
+the output is to be printed. Consider the following examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print ... file "txt_files/some_file.txt";
+print ... file "../files/some_file.txt";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For the first print declaration, the simulator will look for a <code>txt_files</code>
+directory in the same directory as the CIF file, and print text to a file named
+<code>some_file.txt</code> in that directory. For the second print declaration, the
+simulator will look for a <code>files</code> directory in the parent directory of the
+directory that contains the CIF file, and print text to a file named
+<code>some_file.txt</code> in that <code>files</code> directory.</p>
+</div>
+<div class="paragraph">
+<p>Files and directories are separated using slashes (<code>/</code>), regardless of the
+used operating system. It is also allowed to use backslashes (<code>\</code>), which are
+more common on Microsoft Windows operating systems, but they need to be escaped
+as <code>\\</code> for this to work, making it easier to use slashes (<code>/</code>) instead.</p>
+</div>
+<div class="paragraph">
+<p>The following special non-file targets are supported:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>":stdout"</code>: prints to the
+<a href="http://en.wikipedia.org/wiki/Standard_streams">standard output stream</a>.
+In Eclipse, the text ends up on the console, as black text.</p>
+</li>
+<li>
+<p><code>":stderr"</code>: prints to the
+<a href="http://en.wikipedia.org/wiki/Standard_streams">standard error stream</a>.
+In Eclipse, the text ends up on the console, as red text.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Besides these local file indications, CIF also supports global
+<a href="#tools-cifsim-output-print-chapter-ref-printfile">print file declarations</a>,
+which influence the default, in case no local file or special target is
+specified.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-scoping">Scoping</h8>
+<div class="paragraph">
+<p>Print file declarations can be specified in all components. That is, they can
+be specified in the top level scope of the specification, in groups and group
+definitions, as well as in automata and automaton definitions.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-print-chapter-ref-printfile">Print file declaration</h7>
+<div class="paragraph">
+<p>
+
+
+
+<a href="#tools-cifsim-output-print-chapter-ref-printdecl">Print declarations</a> can
+<a href="#tools-cifsim-output-print-ref-printdecl-file">specify</a> the file or
+special target to which text is to printed. If they don&#8217;t specify anything,
+the default is to print to the
+<a href="http://en.wikipedia.org/wiki/Standard_streams">standard output stream</a>,
+usually called 'stdout'.
+This default can be influenced by means of <em>print file declarations</em>, which act
+as a sort of global declaration of the file or special target. A typical print
+file declaration looks like this:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">printfile "some_file.txt";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-paths">Paths</h8>
+<div class="paragraph">
+<p>It is possible to use relative (or absolute) paths for the files. For instance:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">printfile "txt_files/some_file.txt";
+printfile "../files/some_file.txt";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For the first print file declaration, the simulator will look for a
+<code>txt_files</code> directory in the same directory as the CIF file, and print text
+to a file named <code>some_file.txt</code> in that directory. For the second print file
+declaration, the simulator will look for a <code>files</code> directory in the parent
+directory of the directory that contains the CIF file, and print text to a file
+named <code>some_file.txt</code> in that <code>files</code> directory.</p>
+</div>
+<div class="paragraph">
+<p>Files and directories are separated using slashes (<code>/</code>), regardless of the
+used operating system. It is also allowed to use backslashes (<code>\</code>), which are
+more common on Microsoft Windows operating systems, but they need to be escaped
+as <code>\\</code> for this to work, making it easier to use slashes (<code>/</code>) instead.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-special-targets">Special targets</h8>
+<div class="paragraph">
+<p>The following special non-file targets are supported:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>":stdout"</code>: prints to the
+<a href="http://en.wikipedia.org/wiki/Standard_streams">standard output stream</a>.
+In Eclipse, the text ends up on the console, as black text.</p>
+</li>
+<li>
+<p><code>":stderr"</code>: prints to the
+<a href="http://en.wikipedia.org/wiki/Standard_streams">standard error stream</a>.
+In Eclipse, the text ends up on the console, as red text.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-scoping-2">Scoping</h8>
+<div class="paragraph">
+<p>Print file declarations can (just as print declarations) be specified in all
+components. That is, they can be specified in the top level scope of the
+specification, in groups and group definitions, as well as in automata and
+automaton definitions. A print file declaration that is specified in a certain
+scope applies to that scope, as well as all child scopes that don&#8217;t have a
+print file declaration of their own. Additionally, print file declarations
+apply to all print declarations without local file declarations, in scopes to
+which the print file declarations apply.</p>
+</div>
+<div class="paragraph">
+<p>For instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">printfile "file1.txt";
+
+print 5;
+print 6 file "file2.txt";
+
+group g:
+  printfile "file3.txt";
+
+  print 7;
+  print 8;
+  print 9 file "file4.txt";
+
+  group h:
+    printfile "file5.txt";
+  end
+
+  group i:
+    print 10;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The print declaration that prints <code>5</code> is declared in the top level scope of
+the specification, and does not have a local file declaration. As such, the
+print file declaration from the top level scope (<code>file1.txt</code>) applies to it.
+The print declaration that prints <code>6</code> is declared in the same scope, but has
+a local print file declaration (<code>file2.txt</code>). The local print file
+declaration (<code>file2.txt</code>) overrides the print file declaration from the top
+level scope (<code>file1.txt</code>).</p>
+</div>
+<div class="paragraph">
+<p>Group <code>g</code> also has a print file declaration (<code>file3.txt</code>). This overrides
+the print file declaration from the top level scope (<code>file1.txt</code>). The print
+file declaration from group <code>g</code> (<code>file3.txt</code>) thus applies to the print
+declarations that print <code>7</code> and <code>8</code>, as they are declared in the same
+scope, and don&#8217;t have local print file declarations. The print declaration that
+prints <code>9</code> has a local print file declaration (<code>file4.txt</code>), and as such
+the print file declaration from group <code>g</code> (<code>file3.txt</code>) does not apply to
+it.</p>
+</div>
+<div class="paragraph">
+<p>The print file declaration (<code>file5.txt</code>) from group <code>g.h</code> does not apply to
+any print declarations. The simulator will open the file for writing, but no
+text will be printed to the file. A warning is printed to the console, to
+indicate the potential problem. However, no such warnings are ever printed for
+special target 'stdout'.</p>
+</div>
+<div class="paragraph">
+<p>Group <code>g.i</code> does not have a print file declaration, so the print file
+declaration (<code>file3.txt</code>) from group <code>g</code> (the parent scope of group
+<code>g.i</code>) applies to the print declaration that prints <code>10</code>.</p>
+</div>
+<div class="paragraph">
+<p>See also the <a href="#tools-cif2cif-chapter-print-file-into-decls">Push print file declarations into print declarations</a> CIF to CIF
+transformation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-uniqueness-2">Uniqueness</h8>
+<div class="paragraph">
+<p>In every scope (or component), in principle at most one print file declaration
+may be specified. The exception is that for a single scope, specified in
+multiple CIF files (when imports are used), if the print file declarations
+refer to the same target, they are merged. If however the two CIF files refer
+to different targets, this is still considered an error. It is also considered
+an error if two print file declarations are present in a single scope, in a
+single file, regardless of whether they refer to the same target or not. In
+the end, after processing imports, for every scope there must be a unique print
+file declaration, if one is declared at all.</p>
+</div>
+<div class="paragraph">
+<p>If the same file or special target is used/specified multiple times, in
+different print file declarations or locally in print declarations, this is
+detected by the simulator. The simulator only opens a stream to the file or
+special target once, and prints to it all the output of all print declarations
+that apply to that file or special target. For instance, consider the following
+CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print 5 file "some_file.txt";
+print 6 file "some_file.txt";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Even though both print declarations specify a file locally, they use the same
+file. The output of both print declarations is thus printed to the same file.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-print-chapter-ref-sim">Simulation with print output</h7>
+<div class="paragraph">
+<p>
+Once a CIF specification with print declarations is available, the simulator
+can be used to generate textual output. This page discusses the following
+simulation related topics:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-print-ref-sim-overwrite">Overwriting files</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-ref-sim-line-based">Line-based output</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-ref-sim-order">Output order</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-ref-sim-enable-disable">Enabling/disabling print output</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-sim-overwrite">Overwriting files</h8>
+<div class="paragraph">
+<p>If output is printed to files, those files are always overwritten for each
+simulation. That is, at the start of the simulation, the output file is removed
+if present. A new empty file is then created, to which the output is printed
+during the simulation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-sim-line-based">Line-based output</h8>
+<div class="paragraph">
+<p>Output is printed in a line-based fashion. That is, every time text is printed
+for a <a href="#tools-cifsim-output-print-chapter-ref-printdecl">print declaration</a>, the
+text is printed on a new line. If a single print declaration has two texts, one
+for the pre/source state and one for the post/target state, both texts are
+printed on new lines.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-sim-order">Output order</h8>
+<div class="paragraph">
+<p>The simulator guarantees that once text is printed for a certain state, no text
+shall ever be printed during that same simulation, for previous states. That
+is, output text is ordered by 'increasing' states. This guarantee holds for
+file output. For the special targets
+<a href="http://en.wikipedia.org/wiki/Standard_streams">standard output stream</a>
+(stdout) and
+<a href="http://en.wikipedia.org/wiki/Standard_streams">standard error stream</a>
+(stderr), the output may get mixed, for instance on the Eclipse console.</p>
+</div>
+<div class="paragraph">
+<p>The order in which text is printed for different print declarations that print
+text for the same state, is determined by the order in which the print
+declarations are specified in the CIF specification, from top to bottom. The
+order is determined per file or special target, after elimination of imports,
+component definition/instantiation, etc. A depth-first traversal of the
+component hierarchy is used, where the print declarations of components are
+considered before the print declarations of their children.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-sim-enable-disable">Enabling/disabling print output</h8>
+<div class="paragraph">
+<p>Print output is enabled by default. It can be disabled by reducing the
+types of <a href="#tools-cifsim-output-chapter-normal">normal console output</a> using the
+<b class="menuref">Normal output</b>
+option (<b class="menuref">Output</b>
+category). Using that
+option it is also possible to disable all other forms of normal output, to be
+able to see only the print output on the console. Print output can also be
+disabled by changing the <a href="#tools-cifsim-output-mode">output mode</a> to
+<em>Error</em> or to <em>Warning</em>, instead of <em>Normal</em>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-undoreset-2">Undo/reset</h8>
+<div class="paragraph">
+<p>By <a href="#tools-cifsim-input-history-reset-undo">undoing</a> one or more transitions,
+or by <a href="#tools-cifsim-input-history-reset-undo">resetting</a> the simulation, the
+state may change. However, only previously taken transitions are undone. No new
+transitions are taken by undoing transitions, or by resetting the simulation.
+As such, no new print output is generated.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-print-chapter-ref-fmt">Text formatting details</h7>
+<div class="paragraph">
+<p>
+
+
+For text formatting, CIF features the <code>fmt</code> standard library function. This
+page describes all the details of using that function. For more introductory
+information and examples of the use of the <code>fmt</code> function for print output,
+see the <a href="#tools-cifsim-output-print-chapter-tut-fmt">Text formatting tutorial</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-pattern">Format patterns</h8>
+<div class="paragraph">
+<p>The <code>fmt</code> function requires at least one argument, the <em>format pattern</em>. The
+remaining arguments of the function are the <em>values</em> that can be inserted into
+the format pattern, to allow variable output. For instance, consider:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("%s %s", x, y)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, <code>"%s %s"</code> is the format pattern, <code>x</code> is the first value, and <code>y</code> is
+the second value.</p>
+</div>
+<div class="paragraph">
+<p>The first argument, the format pattern, must be a string literal. That is, it
+must be text between double quotes (<code>"</code>).</p>
+</div>
+<div class="paragraph">
+<p>The real usefulness of format patterns comes from the inclusion of the values
+into the format pattern. The values can be included by inserting format
+specifiers (e.g. <code>%s</code>) into the format pattern. Multiple values may be used
+by including multiple format specifiers. The first format specifier includes
+the first value, the second format specifier includes the second value, etc.</p>
+</div>
+<div class="paragraph">
+<p>The result of <code>fmt</code> applied to it arguments is the text of the format
+pattern, with the format specifiers replaced by their corresponding values.</p>
+</div>
+<div class="paragraph">
+<p>Format specifiers can be customized to influence how their corresponding values
+are to be inserted. For instance, consider:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("%s %.2e", x, y)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Then, assuming variable <code>x</code> has value <code>3</code> and variable <code>y</code> has value
+<code>5.6</code>, the result of the <code>fmt</code> function is <code>3 5.60e+00</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-specifiers">Specifiers</h8>
+<div class="paragraph">
+<p>Format patterns support various types of format specifiers, each performing a
+different kind of conversion on its corresponding value. The following table
+lists the available conversions, the types of values that they support, and a
+short description of the output of the conversion:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Conversion</th>
+<th class="tableblock halign-left valign-top">Supported types</th>
+<th class="tableblock halign-left valign-top">Output</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-b">%b</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bool</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Either <code>true</code> or <code>false</code>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-b">%B</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bool</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Same as <code>%b</code>, but in upper case.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-d">%d</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Decimal integer notation.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-x">%x</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Hexadecimal integer notation, using <code>0-9</code> and <code>a-f</code>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-x">%X</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Hexadecimal integer notation, using <code>0-9</code> and <code>A-F</code>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-e">%e</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Computerized scientific notation, using <code>e</code>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-e">%E</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Computerized scientific notation, using <code>E</code>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-f">%f</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Decimal number notation.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-g">%g</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">General scientific notation, using <code>e</code>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-g">%G</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">General scientific notation, using <code>E</code>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-s">%s</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">any type</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">General textual representation.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-output-print-ref-fmt-s">%S</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">any type</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">General textual representation, in upper case.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>For the <code>%d</code>, <code>%x</code>, and <code>%X</code> specifiers, <code>int</code> typed values are
+supported, as are integer types with ranges (e.g. <code>int[0..5]</code>). The <code>%s</code>
+and <code>%S</code> specifiers support values of any type.</p>
+</div>
+<div class="paragraph">
+<p>The output of the <code>%B</code> specifier is identical to the output of the <code>%b</code>
+specifier, where all letters in the output are converted to upper case letters.
+This duality (lower case specifier conversion versus upper case specifier
+conversion) is present in all conversions that can have letters in their
+output.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-syntax">Specifier syntax</h8>
+<div class="paragraph">
+<p>Specifiers can be customized to influence the conversion of their corresponding
+values to text. The general syntax of specifiers is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>%[value_index$][flags][width][.precision]conversion</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>All specifiers start with a percentage character (<code>%</code>).</p>
+</div>
+<div class="paragraph">
+<p>They are optionally followed by a value index. If the value index is specified,
+it must be followed by a dollar sign (<code>$</code>). The value index is a positive
+decimal integer indicating the position of the value in the value list. The
+first value is referenced by <code>1$</code>, the second by <code>2$</code>, etc. Index zero and
+indices starting with zero are not allowed.</p>
+</div>
+<div class="paragraph">
+<p>The index is followed by optional flags. Flags are characters that modify the
+output, and may be specified in any order. Each flag may only be specified once
+per specifier. The set of valid flags depends on the conversion.</p>
+</div>
+<div class="paragraph">
+<p>After the flags, an optional width may be specified. The width is a
+non-negative decimal integer indicating the minimum number of characters that
+should be included in the result, for that specific specifier.</p>
+</div>
+<div class="paragraph">
+<p>After the width, a precision may optionally be specified. A precision is always
+preceded by a dot (<code>.</code>). The precision is a non-negative decimal integer used
+to restrict the number of characters. The specific behavior depends on the
+conversion.</p>
+</div>
+<div class="paragraph">
+<p>Specifiers always end with the character indicating the conversion to perform.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-indexing">Implicit and explicit indexing</h8>
+<div class="paragraph">
+<p>By default, format specifiers are processed in order. The first specifier then
+implicitly uses the first value, the second specifier implicitly uses the
+second value, etc. However, if an explicit value index is given, that explicit
+index indicates the value to use, and the specifier with the explicit index
+does not influence subsequent implicit indexing. That is, consider the
+following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("%s %1$s %3$f %d %f %1$s", 1, 2, 3.0);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first specifier (<code>%s</code>) does not specify an explicit index, and thus
+implicitly uses the first value. The second specifier (<code>%1$s</code>) explicitly
+specifies index <code>1</code> and thus uses the first value. The third specifier
+(<code>%3$f</code>) explicitly specifies index <code>3</code> and thus uses the third value. The
+fourth specifier (<code>%d</code>) is the second specifier to not explicitly specify an
+index, and thus implicitly uses the second value. The fifth specifier (<code>%f</code>)
+is the third specifier to not explicitly specify an index, and thus implicitly
+uses the third value. Finally, the sixth specifier (<code>%1$s</code>) explicitly
+specifies index <code>1</code>, and thus uses the first value. The result of the
+formatting is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>1 1 3.000000 2 3.000000 1</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-flags">Flags</h8>
+<div class="paragraph">
+<p>The following flags are available:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 7.1428%;">
+<col style="width: 7.1428%;">
+<col style="width: 7.1428%;">
+<col style="width: 7.1428%;">
+<col style="width: 7.1428%;">
+<col style="width: 7.1428%;">
+<col style="width: 7.1428%;">
+<col style="width: 7.1428%;">
+<col style="width: 42.8576%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Flag</th>
+<th class="tableblock halign-left valign-top"><a href="#tools-cifsim-output-print-ref-fmt-b">b/B</a></th>
+<th class="tableblock halign-left valign-top"><a href="#tools-cifsim-output-print-ref-fmt-d">d</a></th>
+<th class="tableblock halign-left valign-top"><a href="#tools-cifsim-output-print-ref-fmt-x">x/X</a></th>
+<th class="tableblock halign-left valign-top"><a href="#tools-cifsim-output-print-ref-fmt-e">e/E</a></th>
+<th class="tableblock halign-left valign-top"><a href="#tools-cifsim-output-print-ref-fmt-f">f</a></th>
+<th class="tableblock halign-left valign-top"><a href="#tools-cifsim-output-print-ref-fmt-g">g/G</a></th>
+<th class="tableblock halign-left valign-top"><a href="#tools-cifsim-output-print-ref-fmt-s">s/S</a></th>
+<th class="tableblock halign-left valign-top">Effect</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>-</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The result will be left-justified.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>+</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The result will always include a sign.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">(space)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The result will include a leading space for non-negative values.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>0</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The result will be zero-padded.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>,</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The result will include commas (<code>,</code>) as grouping separator.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The first column shows the available flags, the minus (<code>-</code>), the plus
+(<code>+</code>), the space, the zero (<code>0</code>), and the comma (<code>,</code>). The middle columns
+indicate for each of the different conversions, whether the flags are
+supported. The last column gives short descriptions of the effects of the
+flags.</p>
+</div>
+<div class="paragraph">
+<p>The <code>-</code> flag can be used to left-justify the text in case a
+<a href="#tools-cifsim-output-print-ref-fmt-width">width</a> is used, as the default
+is to right-justify. It is supported by all format specifiers. The <code>-</code> flag
+requires the use of a width, and can not be combined with the <code>0</code> flag.</p>
+</div>
+<div class="paragraph">
+<p>The <code>+</code> flag can be used to always include a sign. It only applies to certain
+numeric format specifiers. That is, by default non-negative numbers don&#8217;t have
+a sign, and negative numbers start with a <code>-</code> character. By including the
+<code>+</code> flag, non-negative numbers start with a <code>+</code> character, and negative
+numbers still start with a <code>-</code> character. The <code>+</code> and space flags can not
+be combined.</p>
+</div>
+<div class="paragraph">
+<p>The space flag can be used force a leading space to be included for
+non-negative values. It only applies to certain numeric format specifiers. That
+is, by default non-negative numbers don&#8217;t have a sign, and negative numbers
+start with a <code>-</code> character. By including the space flag, non-negative numbers
+start with a space character, and negative numbers still start with a <code>-</code>
+character. The <code>+</code> and space flags can not be combined.</p>
+</div>
+<div class="paragraph">
+<p>The <code>0</code> flag can be used to zero pad numbers, in case a
+<a href="#tools-cifsim-output-print-ref-fmt-width">width</a> is used, the text is
+right-justified, and the text is shorter than the width. It only applies to
+certain numeric format specifiers. The <code>0</code> flag requires the use of a width,
+and can not be combined with left-justification (the <code>-</code> flag).</p>
+</div>
+<div class="paragraph">
+<p>The <code>,</code> flag can be used to include commas (<code>,</code>) as grouping separators.
+It only applies to certain numeric format specifiers. That is, by default
+numbers are just a sequence of digits. By using the <code>,</code> flag, longer numbers
+are placed in groups of thousands and the 'thousands separator' (the <code>,</code>
+character) occurs every three digits. For instance, <code>12345678</code> would then
+become <code>12,345,678</code>.</p>
+</div>
+<div class="paragraph">
+<p>Further details on the effects of flags are given in the sections describing
+the individual conversions.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-width">Width</h8>
+<div class="paragraph">
+<p>The width is a non-negative decimal integer indicating the minimum number of
+characters that should be included in the result, for that specific specifier.
+If no width is given, there is no minimum number of characters.</p>
+</div>
+<div class="paragraph">
+<p>If the textual representation of the value is shorter than the width, the
+text is right-justified. That is, the text will be padded by spaces to the
+left of the text until the total number of characters equals the width. To
+left-justify the text, use the <code>-</code> flag in combination with a width. This
+results in padding with spaces to the right of the text.</p>
+</div>
+<div class="paragraph">
+<p>If the <code>0</code> flag is specified, and the textual representation of the value is
+shorter than the width, <code>0</code> padding is used (to the left, as the <code>-</code> flag
+may not be used when the <code>0</code> flag is used). See the sections describing the
+individual number related specifiers for further details.</p>
+</div>
+<div class="paragraph">
+<p>If the text is longer than the width, the whole text is included in the result
+(it is not truncated), and the width essentially has no effect.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-b"><code>%b</code> and <code>%B</code> specifiers</h8>
+<div class="paragraph">
+<p>The <code>%b</code> and <code>%B</code> specifiers convert boolean values to text. The specifiers
+only support boolean values. The specifiers support explicit indices, widths,
+and the <code>-</code> flag. They don&#8217;t supports any of the other flags, and precisions.</p>
+</div>
+<div class="paragraph">
+<p>The resulting text is constructed as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Value <code>true</code> results in the text <code>true</code>, and value <code>false</code> results
+in the text <code>false</code>.</p>
+</li>
+<li>
+<p>For the <code>%B</code> specifier, the text is converted to upper case, i.e.
+<code>TRUE</code> and <code>FALSE</code> respectively.</p>
+</li>
+<li>
+<p>If a width is specified, and the resulting text so far is shorter than that
+width, spaces are added until the given width is reached. If the <code>-</code> flag
+is given, spaces are added to the right, otherwise spaces are added to the
+left.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Here are some examples, assuming <code>b</code> has value <code>true</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("%b", b);       // true
+fmt("%B", b);       // TRUE
+fmt("_%10b_", b);   // _      true_
+fmt("_%-10b_", b);  // _true      _</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-d"><code>%d</code> specifier</h8>
+<div class="paragraph">
+<p>The <code>%d</code> specifier converts integer numbers to text, using decimal
+representations of integers. The specifier only support integer values
+(<code>int</code> typed values, and values of integer types with ranges, such as
+<code>int[0..5]</code>). The specifier supports explicit indices, widths, and all flags.
+It doesn&#8217;t support precisions.</p>
+</div>
+<div class="paragraph">
+<p>The resulting text is constructed as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The resulting text is initialized to the decimal representation of the
+absolute value of the integer number. It thus consists of only the digits
+<code>0</code> through <code>9</code>.</p>
+</li>
+<li>
+<p>If the <code>,</code> flag is given, thousand separators (<code>,</code> characters) are
+inserted as needed, for longer numbers.</p>
+</li>
+<li>
+<p>If the number is negative, it is prefixed with a <code>-</code> character.</p>
+</li>
+<li>
+<p>If the number is non-negative, and the space flag is given, a space is added
+before the text.</p>
+</li>
+<li>
+<p>If the number is non-negative, and the <code>+</code> flag is given, a <code>+</code> character
+is added before the text.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and the <code>0</code>
+flag is given, then <code>0</code> characters are added before the other digits, and
+after any non-digit characters, until the desired width is reached.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and the <code>-</code>
+flag is given, then space characters are added before the result, until the
+desired width is reached.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and neither
+the <code>0</code> flag nor the <code>-</code> flag is given, then space characters are added
+after the result, until the desired width is reached.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Here are some examples, assuming <code>x</code> has value <code>12345</code> and <code>y</code> has value
+<code>-2345</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("%d", x);           // 12345
+fmt("%,d", x);          // 12,345
+fmt("_%10d_", x);       // _     12345_
+fmt("_%-10d_", x);      // _12345     _
+fmt("_%0,10d_", x);     // _000012,345_
+fmt("_%- 10d_", x);     // _ 12345    _
+fmt("_%- 10d_", y);     // _-2345     _
+fmt("_%-+10d_", x);     // _+12345    _
+fmt("_%-+10d_", y);     // _-2345     _
+fmt("_%3d_", x);        // _12345_</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-x"><code>%x</code> and <code>%X</code> specifiers</h8>
+<div class="paragraph">
+<p>The <code>%x</code> and <code>%X</code> specifiers convert integer numbers to text, using
+hexadecimal representations of integers. The specifiers only support integer
+values (<code>int</code> typed values, and values of integer types with ranges, such as
+<code>int[0..5]</code>). The specifiers supports explicit indices, widths, and the <code>-</code>
+and <code>0</code> flags. They don&#8217;t supports any of the other flags, and precisions.</p>
+</div>
+<div class="paragraph">
+<p>The resulting text is constructed as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The signed integer number in range [-2,147,483,648 .. 2,147,483,647] is
+first converted to an unsigned integer number in range [0 .. 4,294,967,295].
+That is, for negative numbers, 2<sup>32</sup> is added.</p>
+</li>
+<li>
+<p>The resulting text is initialized to the hexadecimal representation of the
+unsigned integer number. It thus consists the digits <code>0</code> through <code>9</code> and
+letters <code>a</code> through <code>f</code>.</p>
+</li>
+<li>
+<p>For the <code>%X</code> specifier, the text is converted to upper case, i.e. letters
+<code>a</code> through <code>f</code> are converted to letters <code>A</code> through <code>F</code>.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and the <code>0</code>
+flag is given, then <code>0</code> characters are added before the result, until the
+desired width is reached.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and the <code>-</code>
+flag is given, then space characters are added before the result, until the
+desired width is reached.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and neither
+the <code>0</code> flag nor the <code>-</code> flag is given, then space characters are added
+after the result, until the desired width is reached.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Here are some examples, assuming <code>a</code> has value <code>5543</code> and <code>b</code> has value
+<code>-1</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("%x", a);           // 15a7
+fmt("0x%x", a);         // 0x15a7
+fmt("0x%X", a);         // 0x15A7
+fmt("0x%X", b);         // 0xFFFFFFFF
+fmt("_%10x_", a);       // _      15a7_
+fmt("_%-10x_", a);      // _15a7      _
+fmt("_%3x_", a);        // _15a7_</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-e"><code>%e</code> and <code>%E</code> specifiers</h8>
+<div class="paragraph">
+<p>The <code>%e</code> and <code>%E</code> specifiers convert real numbers to text, using
+computerized scientific notation. The specifiers only support real
+values. The specifiers supports explicit indices, widths, the <code>-</code>, <code>+</code>,
+space, and <code>0</code> flags, and precisions. They don&#8217;t supports any of the other
+flags.</p>
+</div>
+<div class="paragraph">
+<p>Real numbers include a <em>decimal mark</em>, a symbol used to separate the integer
+part from the fractional part of number, when written in decimal form. This
+decimal mark is denoted by a dot (<code>.</code>).</p>
+</div>
+<div class="paragraph">
+<p>The resulting text is constructed as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The decimal mark of the real number is shifted to ensure that at most one
+non-zero digit occurs to the left of it. That is, for real numbers <code>0.012</code>,
+<code>0.12</code>, <code>1.2</code>, <code>12.0</code>, and <code>120.0</code>, the decimal mark is shifted
+-2, -1, 0, 1, and 2 digits to the left, respectively. This results in the
+following real numbers: <code>1.2</code>, <code>1.2</code>, <code>1.2</code>, <code>1.2</code>, and <code>1.2</code>.
+For zero, the decimal mark is not shifted.</p>
+</li>
+<li>
+<p>The single decimal digit before the decimal mark is included in the result.
+If there is no digit before the decimal mark (in case the real number is
+zero), a single <code>0</code> digit is included in the result.</p>
+</li>
+<li>
+<p>If the precision is specified and is not zero, or if the default precision
+is used, a dot (<code>.</code>) is added after the single digit.</p>
+</li>
+<li>
+<p>The digits after the decimal mark are added after the dot. Exactly
+'precision' digits will be added. If no precision is specified, it defaults
+to <code>6</code> digits after the dot. If not enough digits are available after the
+dot, additional <code>0</code> characters are added after them, to reach the desired
+precision. If too many digits are available after the dot, digits are removed
+from the right until the desired precision is reached. Rounding using the
+'half up' algorithm is used to ensure correct results in case digits are
+removed.</p>
+</li>
+<li>
+<p>If the <code>%e</code> specifier is used, an <code>e</code> character is added to the end.
+If the <code>%E</code> specifier is used, an <code>E</code> character is added to the end.</p>
+</li>
+<li>
+<p>A sign character is added after that. That is, if the decimal mark was
+shifted a negative number of digits to the left, a <code>-</code> character is added,
+otherwise a <code>+</code> character is added.</p>
+</li>
+<li>
+<p>The number of digits that was shifted is added as a decimal number, at the
+end. At least two decimal digits are added, so if the number of digits that
+was shifted can be represented using a single decimal digit, a <code>0</code> is added
+between the <code>e</code> or <code>E</code> character and the number of digits that was
+shifted.</p>
+</li>
+<li>
+<p>If the real number is negative, the text is prefixed with a <code>-</code> character.</p>
+</li>
+<li>
+<p>If the real number is non-negative, and the space flag is given, a space is
+added before the text.</p>
+</li>
+<li>
+<p>If the real number is non-negative, and the <code>+</code> flag is given, a <code>+</code>
+character is added before the text.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and the <code>0</code>
+flag is given, then <code>0</code> characters are added before the other digits, and
+after any non-digit characters, until the desired width is reached.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and the <code>-</code>
+flag is given, then space characters are added before the result, until the
+desired width is reached.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and neither
+the <code>0</code> flag nor the <code>-</code> flag is given, then space characters are added
+after the result, until the desired width is reached.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Here are some examples, assuming <code>a</code> has value <code>12345.6789</code> and <code>b</code> has
+value <code>-0.00002345678</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("%e", a);           // 1.234568e+04
+fmt("%E", a);           // 1.234568E+04
+fmt("%.3e", a);         // 1.235e+04
+fmt("%.3e", b);         // -2.346e-05
+fmt("_%20e_", a);       // _        1.234568e+04_
+fmt("_%-20e_", a);      // _1.234568e+04        _
+fmt("_%5e_", a);        // _1.234568e+04_
+fmt("_%020e_", a);      // _000000001.234568e+04_
+fmt("_%-+20e_", a);     // _+1.234568e+04       _
+fmt("_%-+20e_", b);     // _-2.345678e-05       _
+fmt("_%- 20e_", a);     // _ 1.234568e+04       _
+fmt("_%- 20e_", b);     // _-2.345678e-05       _</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-f"><code>%f</code> specifier</h8>
+<div class="paragraph">
+<p>The <code>%f</code> specifier converts real numbers to text, using a decimal number
+notation. The specifier only supports real values. The specifier supports
+explicit indices, widths, all flags, and precisions. That is, all features of
+format specifiers are supported.</p>
+</div>
+<div class="paragraph">
+<p>Real numbers include a <em>decimal mark</em>, a symbol used to separate the integer
+part from the fractional part of number, when written in decimal form. This
+decimal mark is denoted by a dot (<code>.</code>).</p>
+</div>
+<div class="paragraph">
+<p>The resulting text is constructed as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The decimal digits before the decimal mark are included in the result.
+If there are no digits before the decimal mark, a single <code>0</code> digit is
+included in the result.</p>
+</li>
+<li>
+<p>If the <code>,</code> flag is given, thousand separators (<code>,</code> characters) are
+inserted as needed, for longer numbers.</p>
+</li>
+<li>
+<p>If the precision is specified and is not zero, or if the default precision
+is used, a dot (<code>.</code>) is added after the digits.</p>
+</li>
+<li>
+<p>The digits after the decimal mark are added after the dot. Exactly
+'precision' digits will be added. If no precision is specified, it defaults
+to <code>6</code> digits after the dot. If not enough digits are available after the
+dot, additional <code>0</code> characters are added after them, to reach the desired
+precision. If too many digits are available after the dot, digits are removed
+from the right until the desired precision is reached. Rounding using the
+'half up' algorithm is used to ensure correct results in case digits are
+removed.</p>
+</li>
+<li>
+<p>If the real number is negative, the text is prefixed with a <code>-</code> character.</p>
+</li>
+<li>
+<p>If the real number is non-negative, and the space flag is given, a space is
+added before the text.</p>
+</li>
+<li>
+<p>If the real number is non-negative, and the <code>+</code> flag is given, a <code>+</code>
+character is added before the text.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and the <code>0</code>
+flag is given, then <code>0</code> characters are added before the other digits, and
+after any non-digit characters, until the desired width is reached.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and the <code>-</code>
+flag is given, then space characters are added before the result, until the
+desired width is reached.</p>
+</li>
+<li>
+<p>If a width is given, the text so far is shorter than the width, and neither
+the <code>0</code> flag nor the <code>-</code> flag is given, then space characters are added
+after the result, until the desired width is reached.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Here are some examples, assuming <code>a</code> has value <code>12345.6789</code> and <code>b</code> has
+value <code>-0.00002345678</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("%f", a);           // 12345.678900
+fmt("%f", b);           // -0.000023
+fmt("%.3f", a);         // 12345.679
+fmt("_%20f_", a);       // _        12345.678900_
+fmt("_%-20f_", a);      // _12345.678900        _
+fmt("_%-,20f_", a);     // _12,345.678900       _
+fmt("_%5f_", a);        // _12345.678900_
+fmt("_%020f_", a);      // _0000000012345.678900_
+fmt("_%-+20f_", a);     // _+12345.678900       _
+fmt("_%-+20f_", b);     // _-0.000023           _
+fmt("_%- 20f_", a);     // _ 12345.678900       _
+fmt("_%- 20f_", b);     // _-0.000023           _</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-g"><code>%g</code> and <code>%G</code> specifiers</h8>
+<div class="paragraph">
+<p>The <code>%g</code> and <code>%G</code> specifiers convert real numbers to text, using general
+scientific notation. The specifiers only support real values. The specifiers
+supports explicit indices, widths, all flags, and precisions. That is, all
+features of format specifiers are supported.</p>
+</div>
+<div class="paragraph">
+<p>Real numbers include a <em>decimal mark</em>, a symbol used to separate the integer
+part from the fractional part of number, when written in decimal form. This
+decimal mark is denoted by a dot (<code>.</code>).</p>
+</div>
+<div class="paragraph">
+<p>If the real number is is greater than or equal to 10<sup>-4</sup> but
+less than 10<sup>precision</sup>, the result is as <code>%f</code>. Otherwise, the
+result is as <code>%e</code> and <code>%E</code>, for <code>%g</code> and <code>%G</code> respectively. However,
+the total number of
+<a href="http://en.wikipedia.org/wiki/Significant_figures">significant digits</a>
+of the
+result is equal to the precision of the <code>%g</code> or <code>%G</code> specifier, and
+defaults to <code>6</code> if not specified. If the specified precision is <code>0</code>, it is
+taken to be <code>1</code> instead.</p>
+</div>
+<div class="paragraph">
+<p>Here are some examples, assuming <code>a</code> has value <code>12345.6789</code> and <code>b</code> has
+value <code>-0.00002345678</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("%g", a);           // 12345.7
+fmt("%g", b);           // -2.34568e-05
+fmt("%G", b);           // -2.34568E-05
+fmt("%.3g", a);         // 1.23e+04
+fmt("_%20g_", a);       // _             12345.7_
+fmt("_%-20g_", a);      // _12345.7             _
+fmt("_%-,20g_", a);     // _12,345.7            _
+fmt("_%5g_", a);        // _12345.7_
+fmt("_%020g_", a);      // _000000000000012345.7_
+fmt("_%-+20g_", a);     // _+12345.7            _
+fmt("_%-+20g_", b);     // _-2.34568e-05        _
+fmt("_%- 20g_", a);     // _ 12345.7            _
+fmt("_%- 20g_", b);     // _-2.34568e-05        _</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-s"><code>%s</code> and <code>%S</code> specifiers</h8>
+<div class="paragraph">
+<p>The <code>%s</code> and <code>%S</code> specifiers convert any value to text. The specifiers
+support values of any type. The specifiers supports explicit indices, widths,
+and the <code>-</code> flag. They don&#8217;t supports any of the other flags, and precisions.</p>
+</div>
+<div class="paragraph">
+<p>The resulting text is constructed as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the value has a <code>string</code> type, the value of that string is used as is,
+without escaping and double quoting. Otherwise, the value is converted to
+a textual representation closely resembling the CIF textual syntax (ASCII
+syntax), with string values surrounded by double quotes, and with special
+characters (tabs, new lines, double quotes, and backslashes) escaped.</p>
+</li>
+<li>
+<p>For the <code>%S</code> specifier, the text is converted to upper case, i.e. letters
+<code>a</code> through <code>z</code> are converted to letters <code>A</code> through <code>Z</code>.</p>
+</li>
+<li>
+<p>If a width is specified, and the resulting text so far is shorter than that
+width, spaces are added until the given width is reached. If the <code>-</code> flag
+is given, spaces are added to the right, otherwise spaces are added to the
+left.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Here are some examples, assuming <code>x</code> has value <code>"aBcD"</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("%s", x);       // aBcD
+fmt("%S", x);       // ABCD
+fmt("_%10s_", x);   // _      aBcD_
+fmt("_%-10s_", x);  // _aBcD      _</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>As indicated above, <code>string</code> typed values are of special interest. For
+instance, consider the following examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("a %s b", ("some \\ text", 6));     // a ("some \\ text", 6) b
+fmt("a %s b", "some \\ text");          // c some \ text d</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first example has a tuple as value, with a string and an integer number.
+The output of this example is <code>a ("some \\ text", 6) b</code>. Note how the string
+in the tuple is included in the output with double quotes around it, and how
+the escaped backslash is also escaped in the resulting text.</p>
+</div>
+<div class="paragraph">
+<p>The second example has a value that is a string directly (e.g. not contained in
+a tuple or some other container). This mapping results in <code>c some \ text d</code>.
+Note how the string is included in the output 'as is', i.e. it is not
+surrounded by double quotes, and the backslash is not escaped.</p>
+</div>
+<div class="paragraph">
+<p>In general, when using a <code>%s</code> specifier, string values are double quoted and
+escaped. If however the entire value is a string, then that string is used
+'as is' (without quoting, and without escaping).</p>
+</div>
+<div class="paragraph">
+<p>Also of special interest are real values. The number of digits after the
+decimal point can vary. For instance, consider the following examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">fmt("a %s b", 1 / 3);       // a 0.3333333333333333 b
+fmt("c %s d", 1 / 2);       // c 0.5 d</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For more control over the number of digits after the decimal point, use one of
+the floating point number format specifiers:
+<a href="#tools-cifsim-output-print-ref-fmt-e">%e</a>,
+<a href="#tools-cifsim-output-print-ref-fmt-e">%E</a>,
+<a href="#tools-cifsim-output-print-ref-fmt-f">%f</a>,
+<a href="#tools-cifsim-output-print-ref-fmt-g">%g</a>, or
+<a href="#tools-cifsim-output-print-ref-fmt-g">%G</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-print-ref-fmt-escaping">Escaping and quoting</h8>
+<div class="paragraph">
+<p>Double quote terminate string literals, and thus also a format pattern, as
+format patterns are string literals. It is therefore not possible to include
+a double quote in the text of a format pattern without escaping it. That is,
+use <code>\"</code> inside a format pattern to include a single double quote. There are
+other escape sequences as well. Use <code>\\</code> to include a single backslash
+(<code>\</code>), <code>\n</code> to include a single new line (to continue on a new line), and
+<code>\t</code> to include a tab character (for alignment).</p>
+</div>
+<div class="paragraph">
+<p>Format specifiers start with a percentage character (<code>%</code>). If a percentage
+character is to be included as a percentage character instead of being
+interpreted as a format specifier, it needs to be escaped as well. That is,
+to include a percentage character as a percentage character, use <code>%%</code> in
+the format pattern.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the format pattern <code>"a\"b\nc\td\\e%%f"</code> results in the
+following text:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>a"b
+c       d\e%f</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-unused-values">Unused values</h8>
+<div class="paragraph">
+<p>The format pattern is automatically checked for unused values. That is, if a
+value is not used in the format pattern, there is no use in specifying it, and
+a warning will indicate this.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-output-svgviz-chapter-index">SVG visualizer</h6>
+<div class="paragraph">
+<p>
+
+
+
+The CIF simulator supports several forms of <a href="#tools-cifsim-output-chapter-index">output</a>.
+By default, simulation results, such as the
+current <a href="#tools-cifsim-traces-state">state</a>, are printed to the console.
+While this provides useful information, it is not easy to decipher the precise
+state of a (sub-)system. Also, it does not give a graphical overview of the
+current state of the system.</p>
+</div>
+<div class="paragraph">
+<p>The simulator however, also supports <em>SVG visualization</em>, which allows the user
+to make an image of the system, and have that image be updated by the simulator
+during simulation, based on the current state of the system. This allows the
+user to see changes in the state of the system, in a graphical representation
+of that system. This makes it much easier to get a global overview of the
+system during simulation. Since the user makes the image, the representation
+directly corresponds to the way the user sees the system.</p>
+</div>
+<div class="paragraph">
+<p><strong>Documentation</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-first-example">First example</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-svg">Scalable Vector Graphics (SVG)</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-inkscape">Inkscape</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-cifsvg">CIF/SVG declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-svgfile">SVG file declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-svgout">CIF/SVG output mappings</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-svgcopy">CIF/SVG copy declaration</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-svgmove">CIF/SVG move declaration</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-simulation">Simulation of SVG visualizations</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-debugging">Debugging SVG visualizations</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-viewer">SVG viewer and visualizer</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="tools-cifsim-output-svgviz-examples" class="paragraph">
+<p><strong>Examples</strong></p>
+</div>
+<div class="paragraph">
+<p>Below is a list of available examples of SVG visualizations, which show some
+often used SVG attributes, as well as some tips and tricks on how to handle
+common challenges. The following examples are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-example-sun-moon">Sun/moon example</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-example-walk">Walk example</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-example-rate">Rate example</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-example-workstation">Workstation example</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-example-tank">Tank example</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-example-lamps">Lamps example</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-example-buffers-products">Buffers/products example</a></p>
+</li>
+</ul>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-first-example">First example</h7>
+<div class="paragraph">
+<p>
+Before we go into any details about SVG visualization, let&#8217;s first look at an
+example. Here, we use a trivial example, which nonetheless serves several
+purposes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>It gives a quick overview of what the idea of SVG visualization is all about,
+and what it looks like.</p>
+</li>
+<li>
+<p>It shows how to use SVG visualization with the CIF simulator.</p>
+</li>
+<li>
+<p>It shows the two alternatives to simulation: via the options dialog, and by
+using a ToolDef <a href="#tools-scripting-chapter-intro">script</a>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Note that it is not necessary to fully understand what exactly is going on, or
+how it works. Those details should become clear after reading the remaining
+pages of the documentation.</p>
+</div>
+<div class="sect7">
+<h8 id="tools-creating-the-cif-model">Creating the CIF model</h8>
+<div class="paragraph">
+<p>In an Eclipse project or directory, create a new CIF file named <code>lamp.cif</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "lamp.svg";
+
+automaton lamp:
+  cont t der 1.0;
+
+  location Off:
+    initial;
+    edge when t &gt;= 1.0 do t := 0.0 goto On;
+
+  location On:
+    edge when t &gt;= 2.0 do t := 0.0 goto Off;
+
+  svgout id "lamp" attr "fill" value if Off: "gray" else "yellow" end;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This file describes not only the behavior of the lamp using a CIF automaton,
+but also contains a <a href="#tools-cifsim-output-svgviz-chapter-cifsvg">CIF/SVG declaration</a>, which specifies the connection between
+the behavioral CIF specification and the SVG image.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-creating-the-svg-image">Creating the SVG image</h8>
+<div class="paragraph">
+<p>Next, we&#8217;ll create an <a href="#tools-cifsim-output-svgviz-chapter-svg">SVG</a> image.
+Start
+<a href="http://inkscape.org/">Inkscape</a>,
+Select
+<b class="menuref">Document Properties&#8230;&#8203;</b>
+from the
+<b class="menuref">File</b>
+menu, to open the
+<b class="menuref">Document Properties</b>
+window. On the
+<b class="menuref">Page</b>
+tab, set the
+<b class="menuref">Units</b>
+to
+<b class="menuref">px</b>,
+the
+<b class="menuref">Width</b>
+to <code>75.00</code>, and
+the height to <code>100.00</code>. It is recommended to always
+<a href="#tools-cifsim-output-svgviz-inkscape-size">set the size</a> of the image,
+before adding any shapes or text labels.</p>
+</div>
+<div class="paragraph">
+<p>Next, select the circle tool, by clicking on the circle in the <em>Toolbox</em> on the
+left side of the application. Draw a circle on the canvas. It should look
+something like this:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/lamp/lamp_inkscape.png" alt="lamp inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>Right click the circle and choose
+<b class="menuref">Object Properties</b>.
+The
+<b class="menuref">Object Properties</b>
+window will appear. Change the
+<b class="menuref">Id</b>
+of
+the circle to <code>lamp</code> and click the
+<b class="button">Set</b>
+button. Save the image
+as <code>lamp.svg</code>, in the same directory as the <code>lamp.cif</code> file.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-simulation-and-the-options-dialog">Simulation and the options dialog</h8>
+<div class="paragraph">
+<p>Right click the <code>lamp.cif</code> file and choose
+<b class="menuref">Simulate CIF specification&#8230;&#8203;</b>
+to start the CIF simulator. An
+options dialog appears. In this case the defaults suffice, so click
+<b class="button">OK</b>
+to start the simulation. Initially, the visualization looks as
+follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/lamp/lamp_sim_off.png" alt="lamp sim off">
+</div>
+</div>
+<div class="paragraph">
+<p>Using the
+<b class="menuref">GUI input</b>,
+click the button for
+<b class="button">time delay</b>
+and then the button for
+<b class="button">tau</b>.
+After performing these two
+transitions, the visualization should look as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/lamp/lamp_sim_on.png" alt="lamp sim on">
+</div>
+</div>
+<div class="paragraph">
+<p>As you can see, the lamp is gray while it is off, and yellow while it is on.
+Close the
+<b class="menuref">GUI input</b>
+to terminate the simulator. You may also close
+the visualization window.</p>
+</div>
+<div class="paragraph">
+<p>Now restart the simulator. In the
+<b class="menuref">Simulator</b>
+category, set the
+<a href="#tools-cifsim-solver-chapter-endtime-maxdelay">Simulation end time</a> option to
+<b class="menuref">Finite end time</b>.
+You can leave the default value for
+<b class="menuref">End time</b>.
+In the
+<b class="menuref">Input</b>
+category, set the
+<a href="#tools-cifsim-input-chapter-index">Input mode</a> option to
+<b class="menuref">Automatic input mode</b>.
+In the
+<b class="menuref">Output</b>
+category, enable
+the <a href="#tools-cifsim-output-realtime-framerate">Frame rate</a> option and
+keep the default frame rate value. Click
+<b class="menuref">OK</b>
+to start the simulation
+again. This time, the simulator automatically chooses transitions. Furthermore,
+<a href="#tools-cifsim-output-chapter-realtime">real-time simulation</a> is enabled, where
+the model time is interpreted in seconds, and the visualization is regularly
+updated. Using these options, SVG visualization essentially turns into an
+SVG movie of the simulation of a flashing lamp. Simulation will automatically
+stop after ten seconds, the default simulation end time. Once simulation
+terminates, you may close the visualization window.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-simulation-using-tooldef">Simulation using ToolDef</h8>
+<div class="paragraph">
+<p>While the option dialog is useful for configuring simulation options, it is
+often easier to use a <em>ToolDef</em> file to
+<a href="#tools-scripting-chapter-intro">script</a> the execution of the CIF simulator.
+Create a new file named <code>lamp.tooldef</code>, in the same directory as the other
+files, and give it the following content:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">from "lib:cif" import *;
+
+cifsim(
+    "lamp.cif",
+    "-t 10",
+    "-i auto",
+    "--frame-rate=20",
+);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Don&#8217;t forget to save the file. Right-click the <code>lamp.tooldef</code> file and
+choose
+<b class="menuref">Execute ToolDef</b>
+to execute the ToolDef script. This script
+uses the exact same options as we manually configured in the option dialog, in
+the previous section.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-svg">Scalable Vector Graphics (SVG)</h7>
+<div class="paragraph">
+<p>
+
+
+The SVG visualization feature uses Scalable Vector Graphics (SVG) images.
+<a href="http://www.w3.org/TR/SVG11/">SVG</a>
+is a widely-deployed royalty-free standard
+for two-dimensional vector graphics, developed by the
+<a href="http://www.w3.org/">World Wide Web Consortium</a>
+(W3C). SVG images consist of
+three types of objects: vector graphic shapes (rectangles, circles, etc.),
+raster images, and text. The benefit of vector images formats over raster image
+formats, is that raster images are created with a fixed size, while vector
+images contain a description of the image and can be rendered at any size
+without loss of quality.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="tools-cifsim-output-svgviz-svg-svg11" class="paragraph">
+<p>Multiple versions of the SVG standard exist. The CIF simulator uses the
+free and open source
+<a href="http://xmlgraphics.apache.org/batik/">Apache Batik SVG Toolkit</a>
+to render SVG images. Batik supports
+version 1.1 of the SVG specification.</p>
+</div>
+<div class="paragraph">
+<p>
+SVG image files are stored in an
+<a href="http://en.wikipedia.org/wiki/XML">XML</a>-based file format. This means that
+they can be edited with any text editor. However, it is often more convenient
+to edit them with a drawing program that supports vector graphics, such as
+<a href="http://www.adobe.com/products/illustrator.html">Adobe Illustrator</a>
+or
+<a href="#tools-cifsim-output-svgviz-chapter-inkscape">Inkscape</a>. Most modern web
+browsers also support SVG images.</p>
+</div>
+<div class="paragraph">
+<p>Since SVG images are essentially XML files, we get all the benefits of XML
+for free. One of those benefits is that XML files represent tree structures,
+which can be easily manipulated by applications. This is essential for the CIF
+simulator. During initialization, the CIF simulator loads the SVG image
+file that the user provided, and subsequently has access to the XML tree.
+It then uses the aforementioned Batik toolkit to draw the SVG image
+represented by the XML tree. Once the simulator starts taking transitions and
+updates its <a href="#tools-cifsim-traces-state">state</a>, it can use the
+information from the state to modify the XML tree. Changes to the XML tree then
+result in an updated SVG image, the next time the image is rendered again.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="tools-cifsim-output-svgviz-svg-id" class="paragraph">
+<p>In order to be able to modify particular objects (shapes, text labels, etc.) of
+the SVG image, the simulator should be able to identify the objects that make
+up the image. Here we once again reap the benefits of XML. All nodes (called
+elements) in the XML tree can have an <code>id</code> attribute that specifies the
+id (also called name or identity) of the element. As such, all SVG objects can
+be identified using their unique id. The
+<a href="#tools-cifsim-output-svgviz-svgout-id">SVG element id</a> section of the
+<a href="#tools-cifsim-output-svgviz-chapter-svgout">CIF/SVG output mappings</a> page further explains the
+use of SVG element ids.</p>
+</div>
+<div class="paragraph">
+<p>
+
+The website of Jakob Jenkov has a very nice
+<a href="http://tutorials.jenkov.com/svg">SVG Tutorial</a>.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-inkscape">Inkscape</h7>
+<div class="paragraph">
+<p>
+
+SVG images can best be edited with a drawing program that supports vector
+graphics. One such program is
+<a href="http://inkscape.org/">Inkscape</a>,
+a free and
+open source vector graphics editor that uses SVG as its native file format, and
+is available for many platforms, including Microsoft Windows, macOS, and
+Linux. In this documentation, we&#8217;ll use Inkscape to create and edit SVG images.</p>
+</div>
+<div class="paragraph">
+<p>It is beyond the scope of this document to explain how Inkscape works. For
+that, see the
+<a href="http://inkscape.org/">Inkscape website</a>.
+Here is a screenshot of the Inkscape interface:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/inkscape/inkscape.png" alt="inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-changing-ids">Changing ids</h8>
+<div class="paragraph">
+<p>As described on the <a href="#tools-cifsim-output-svgviz-chapter-svg">page about SVG</a>,
+every SVG object has an id. To change the id of an object in Inkscape, right
+click on the object, and choose
+<b class="menuref">Object Properties</b>.
+The
+<b class="menuref">Object Properties</b>
+window will appear, which looks like this:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/inkscape/inkscape_props_xml.png" alt="inkscape props xml">
+</div>
+</div>
+<div class="paragraph">
+<p>In this window, you can change the object&#8217;s id, by entering a new id in the
+<b class="menuref">Id</b>
+field, and clicking the
+<b class="button">Set</b>
+button.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-xml-editor">XML editor</h8>
+<div class="paragraph">
+<p>Inkscape also features an XML editor, that can be used to view and edit the
+underlying XML representation of the SVG image. The screenshot above also shows
+Inkscape&#8217;s
+<b class="menuref">XML Editor</b>
+window, which can be opened via the
+<b class="menuref">XML Editor&#8230;&#8203;</b>
+item in the
+<b class="menuref">Edit</b>
+menu. The XML editor
+can be useful to find out the exact structure of the XML tree, and to see the
+precise definitions that were used to represent the objects that you created
+on Inkscape&#8217;s canvas.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-inkscape-size">Document size</h8>
+<div class="paragraph">
+<p>It is recommended to always set the correct size of the image, before adding
+any shapes or text labels. To do this, select
+<b class="menuref">Document Properties&#8230;&#8203;</b>
+from the
+<b class="menuref">File</b>
+menu, to open the
+<b class="menuref">Document Properties</b>
+window. On the
+<b class="menuref">Page</b>
+tab, we
+recommend to set the
+<b class="menuref">Units</b>
+to
+<b class="menuref">px</b>.
+You can then enter
+the
+<b class="menuref">Width</b>
+and
+<b class="menuref">Height</b>
+of the image.</p>
+</div>
+<div class="paragraph">
+<p>By default, Inkscape always adds a layer to new images. When changing the size
+of the image as described above, this layer gets a <code>transform</code> attribute
+that can cause all kinds of trouble later on. There are several ways to get
+rid of this <code>transform</code> attribute of the layer:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Select
+<b class="menuref">Layers&#8230;&#8203;</b>
+from the
+<b class="menuref">Layer</b>
+menu to show the
+<b class="menuref">Layers</b>
+panel. In that panel, select
+<b class="menuref">Layer 1</b>
+by
+clicking on it. Then click the
+<b class="menuref">Delete the current layer</b>
+button
+to remove the selected layer.</p>
+</li>
+<li>
+<p>Use the
+<b class="menuref">XML Editor</b>
+to select the layer
+(<code>&lt;svg:g id="layer1"</code>&#8230;&#8203; node). Then click the
+<b class="menuref">Delete node</b>
+button at the top of the
+<b class="menuref">XML Editor</b>
+window to remove the layer.
+Alternatively, after selecting the layer, press the <kbd>Delete</kbd> key on the
+keyboard to delete the selected layer.</p>
+</li>
+<li>
+<p>Use the
+<b class="menuref">XML Editor</b>
+to select the layer
+(<code>&lt;svg:g id="layer1"</code>&#8230;&#8203; node). Then, on the right, select the
+<code>transform</code> attribute by clicking on it. Then click the
+<b class="menuref">Delete attribute</b>
+button at the top of the
+<b class="menuref">XML Editor</b>
+window to remove the attribute.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The first two approaches remove the layer, the third approach keeps the layer
+and only removes the <code>transform</code> attribute.</p>
+</div>
+<div class="paragraph">
+<p>Alternatively, there is also a way to avoid the <code>transform</code> attribute from
+being added in the first place. Instead of using the
+<b class="menuref">Document Properties</b>
+window to change the size of the image, do
+the following:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Use the
+<b class="menuref">XML Editor</b>
+to select the entire image
+(<code>&lt;svg:svg</code>&#8230;&#8203; node).</p>
+</li>
+<li>
+<p>Select the <code>width</code> attribute on the right, by clicking on it.</p>
+</li>
+<li>
+<p>Change the value in the text area at the lower right corner of the window.</p>
+</li>
+<li>
+<p>Click the
+<b class="menuref">Set</b>
+button to save the new width value. Alternatively,
+after typing the new value, press <span class="keyseq"><kbd>Ctrl</kbd>+<kbd>ENTER</kbd></span> to save the
+new width value.</p>
+</li>
+<li>
+<p>Repeat for the <code>height</code> attribute.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-coordinate-systems">Coordinate systems</h8>
+<div class="paragraph">
+<p>The coordinate system used by Inkscape uses the lower left
+corner of the canvas as origin, while the underlying SVG representation uses
+the upper left corner of the canvas as origin. Also, Inkscape uses x and y
+coordinates of objects relative to the outside of their border (called <em>stroke</em>
+in Inkscape), while SVG uses x and y coordinates of objects relative to the
+middle of their border. These are two most commonly encountered differences
+between Inkscape and SVG. See the <a href="#tools-cifsim-output-svgviz-chapter-example-tank">tank example</a>
+for some tips and tricks regarding the difference in coordinate systems.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-inkscape-textarea">Text areas</h8>
+<div class="paragraph">
+<p>When using the Inkscape text tool, select the tool, and left click once on the
+canvas to add a text label. Once you added it, start typing text.</p>
+</div>
+<div class="paragraph">
+<p>Inkscape also allows you to select the text tool, left click anywhere on the
+canvas, drag the mouse pointer to another position, and only then release the
+left mouse button. This creates a text area, where text is automatically
+wrapped to multiple lines, so that it stays within the bounds of the text area.
+This feature uses SVG <code>flowRoot</code> elements. These elements are defined in
+version 1.2 of the SVG standard, which is currently still a working draft.
+These elements are <em>not</em> supported by the CIF simulator, which only supports
+version 1.1 of the SVG standard.</p>
+</div>
+<div class="paragraph">
+<p>Using an SVG image with a <code>flowRoot</code> or other unsupported SVG feature,
+results in the following error when the SVG file is
+<a href="#tools-cifsim-output-svgviz-chapter-viewer">opened</a> in Eclipse:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">ERROR: SVG image file "some_image.svg" is not an SVG file, is an invalid SVG file, or contains unsupported SVG features.
+CAUSE: invalid.element</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-cifsvg">CIF/SVG declarations</h7>
+<div class="paragraph">
+<p>
+
+
+
+The connection between the <a href="#tools-cifsim-traces-state">state</a> of the CIF
+specification and the SVG image can be specified by using CIF/SVG declarations
+(sometimes also called SVG declarations, for simplicity). Such declarations can
+be specified directly in the CIF specification. CIF/SVG declarations are an
+extension to the CIF language, and can only be used to couple the model to the
+image. They don&#8217;t influence the behavior of the model itself.</p>
+</div>
+<div class="paragraph">
+<p>The CIF <a href="#tools-chapter-text-editor">text editor</a> provides full integration for
+the CIF/SVG declarations extension, complete with syntax highlighting,
+background validation, etc.</p>
+</div>
+<div class="sect7">
+<h8 id="tools-declarations">Declarations</h8>
+<div class="paragraph">
+<p>The following types of CIF/SVG declarations are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-svgfile">SVG file declarations</a>:
+Specifies which SVG image file to use.</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-svgcopy">CIF/SVG copy declaration</a>:
+Specifies that a part of the SVG image should be copied.</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-svgmove">CIF/SVG move declaration</a>:
+Specifies that a part of the SVG image should be moved.</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-svgout">CIF/SVG output mappings</a>:
+Specifies how to update a certain property of an element of the SVG image.</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-svg-chapter-svgin">CIF/SVG input mappings</a>:
+Specifies how interaction with the SVG image affects simulation.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-svgfile">SVG file declarations</h7>
+<div class="paragraph">
+<p>
+
+
+Before any other CIF/SVG declarations can be specified, you need to indicate to
+which SVG image (file) they apply, using an SVG file declaration. A typical SVG
+file declaration looks like this:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "some_file.svg";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The SVG files are declared based on their file names. If possible, it is
+recommended to use the same file name for the CIF specification and for the
+SVG image, only with different file extensions. This way, it is easy to see
+which images goes with which CIF specification.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-paths-2">Paths</h8>
+<div class="paragraph">
+<p>It is possible to use relative (or absolute) paths for the SVG files. For
+instance:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "svg_files/some_file.svg";
+svgfile "../images/some_file.svg";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For the first SVG file declaration, the tools will look for an <code>svg_files</code>
+directory in the same directory as the CIF file, and for a <code>some_file.svg</code>
+file in that <code>svg_files</code> directory. For the second SVG file declaration, the
+tools will look for an <code>images</code> directory in the parent directory of the
+directory that contains the CIF file, and for a <code>some_file.svg</code> file in that
+<code>images</code> directory.</p>
+</div>
+<div class="paragraph">
+<p>Files and directories are separated using slashes (<code>/</code>), regardless of the
+used operating system. It is also allowed to use backslashes (<code>\</code>), which are
+more common on Microsoft Windows operating systems, but they need to be escaped
+as <code>\\</code> for this to work, making it easier to use slashes (<code>/</code>) instead.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-scoping-3">Scoping</h8>
+<div class="paragraph">
+<p>CIF/SVG file declarations (and all 'other' CIF/SVG declarations) can be
+specified in all components. That is, they can be specified in the top level
+scope of the specification, in groups and group definitions, as well as in
+automata and automaton definitions. An SVG file declaration that is specified
+in a certain scope applies to that scope, as well as all child scopes that
+don&#8217;t have an SVG file declaration of their own. Additionally, all 'other'
+CIF/SVG declarations (such as
+<a href="#tools-cifsim-output-svgviz-chapter-svgout">SVG output mappings</a>) may include
+a local SVG file declaration, that only applies to that specific CIF/SVG
+declaration.</p>
+</div>
+<div class="paragraph">
+<p>For instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "file1.svg";
+
+svgout id "a" attr "b" value 5;
+
+svgout id "c" attr "d" value 6 file "file2.svg";
+
+group g:
+  svgfile "file3.svg";
+
+  svgout id "e" attr "f" value 7;
+
+  svgout id "g" attr "h" value 8;
+
+  svgout id "i" attr "j" value 9 file "file4.svg";
+
+  group h:
+    svgfile "file5.svg";
+  end
+
+  group i:
+    svgout id "k" attr "l" value 10;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The mapping for the SVG element with id <code>a</code> is declared in the top level
+scope of the specification, and does not have a local SVG file declaration.
+As such, the SVG file declaration from the top level scope (<code>file1.svg</code>)
+applies to it. The mapping for the SVG element with id <code>b</code> is declared in
+the same scope, but has a local SVG file declaration (<code>file2.svg</code>). The local
+SVG file declaration (<code>file2.svg</code>) overrides the SVG file declaration from
+the top level scope (<code>file1.svg</code>).</p>
+</div>
+<div class="paragraph">
+<p>Group <code>g</code> also has an SVG file declaration (<code>file3.svg</code>). This overrides
+the SVG file declaration from the top level scope (<code>file1.svg</code>). The SVG
+file declaration from group <code>g</code> (<code>file3.svg</code>) thus applies to the
+mappings for ids <code>e</code> and <code>g</code>, as they are declared in the same scope, and
+don&#8217;t have local SVG file declarations. The mapping for SVG element id <code>i</code>
+has a local SVG file declaration (<code>file4.svg</code>), and as such the SVG file
+declaration from group <code>g</code> (<code>file3.svg</code>) does not apply to it.</p>
+</div>
+<div class="paragraph">
+<p>The SVG file declaration (<code>file5.svg</code>) from group <code>g.h</code> does not apply to
+any mappings. The simulator will show the image, but the image will not change
+during simulation. A warning is printed to the console, to indicate the
+potential problem.</p>
+</div>
+<div class="paragraph">
+<p>Group <code>g.i</code> does not have an SVG file declaration, so the SVG file
+declaration (<code>file3.svg</code>) from group <code>g</code> (the parent scope of group
+<code>g.i</code>) applies to the mapping for SVG element id <code>k</code>.</p>
+</div>
+<div class="paragraph">
+<p>See also the <a href="#tools-cif2cif-chapter-svg-file-into-decls">Push SVG file declarations into other CIF/SVG declarations</a> CIF to CIF
+transformation.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-completeness-and-uniqueness">Completeness and uniqueness</h8>
+<div class="paragraph">
+<p>Every CIF/SVG declaration that is not itself an SVG file declaration, requires
+an SVG file declaration, in its scope, in one of its ancestor scopes, or
+locally in that CIF/SVG declaration itself.</p>
+</div>
+<div class="paragraph">
+<p>In each scope, there may be at most one SVG file declaration.</p>
+</div>
+<div class="paragraph">
+<p>In every scope (or component), in principle at most one SVG file declaration
+may be specified. The exception is that for a single scope, specified in
+multiple CIF files (when imports are used), if the SVG file declarations
+refer to the same image file, they are merged. If however the two CIF files
+refer to different image files, this is still considered an error. It is also
+considered an error if two SVG file declarations are present in a single scope,
+in a single file, regardless of whether they refer to the same image file or
+not. In the end, after processing imports, for every scope there must be a
+unique SVG file declaration, if one is declared at all.</p>
+</div>
+<div class="paragraph">
+<p>If the same SVG image file is specified multiple times, in different SVG file
+declarations, this is detected by the simulator, and the image will only be
+shown once. For instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgout id "..." attr "..." value 5 file "some_file.svg";
+
+svgout id "..." attr "..." value 6 file "some_file.svg";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Even though both output mappings specify an SVG file locally, they use the same
+file. The SVG image will thus only be shown once, and both mappings apply to
+the same image.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-svgout">CIF/SVG output mappings</h7>
+<div class="paragraph">
+<p>
+
+
+
+
+For each update of a single attribute of an element in the SVG image, an
+<em>output mapping</em> is needed. An output mapping essentially defines a connection
+between the CIF specification and the SVG image, for updating that specific
+attribute of that specific element.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-simple">A simple output mapping</h8>
+<div class="paragraph">
+<p>Assume we have the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">cont pos der 1.0;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Where variable <code>pos</code> is the position of some object, say a box. Then the
+following output mapping:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgout id "box" attr "x" value pos;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Keeps the value of the <code>x</code> attribute of the SVG element with id <code>box</code> equal
+to the value of continuous variable <code>pos</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-syntax">Syntax</h8>
+<div class="paragraph">
+<p>The general syntax of CIF/SVG output mappings is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgout id &lt;id&gt; attr &lt;attr&gt; value &lt;value&gt;;
+svgout id &lt;id&gt; attr &lt;attr&gt; value &lt;value&gt; file &lt;file&gt;;
+svgout id &lt;id&gt; text        value &lt;value&gt;;
+svgout id &lt;id&gt; text        value &lt;value&gt; file &lt;file&gt;;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>svgout</code> keyword is followed by a specification of an SVG element
+<a href="#tools-cifsim-output-svgviz-svg-id">id</a>. Every output mapping must
+<a href="#tools-cifsim-output-svgviz-svgout-id">specify the id</a> of an SVG
+element, and an SVG element with that id must exist in the SVG image. The
+<code>id</code> indicates the element for which an attribute or text is to be updated.</p>
+</div>
+<div class="paragraph">
+<p>The <code>id</code> is followed by a specification of what part of the SVG element is to
+updated. That is, either an
+<a href="#tools-cifsim-output-svgviz-svgout-attr">attribute</a> or
+<a href="#tools-cifsim-output-svgviz-svgout-text">text</a> (label) is updated.</p>
+</div>
+<div class="paragraph">
+<p>After that, the <a href="#tools-cifsim-output-svgviz-svgout-value">value</a> of the
+attribute or text (label) is specified.</p>
+</div>
+<div class="paragraph">
+<p>In the syntax examples above, we see that it is also allowed to declare an
+optional local
+<a href="#tools-cifsim-output-svgviz-chapter-svgfile">SVG file declaration</a>, that only
+applies to that specific output declaration.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-id">SVG element id</h8>
+<div class="paragraph">
+<p>Every output mapping needs to specify the
+<a href="#tools-cifsim-output-svgviz-svg-id">id</a> of the SVG element to update.
+The id is checked, to make sure an SVG element with that id actually exists in
+the SVG image.</p>
+</div>
+<div class="paragraph">
+<p>Only valid SVG names may be used as ids. Valid SVG names start with a letter
+(<code>a</code> to <code>z</code>, <code>A</code> to <code>Z</code>), an underscore (<code>_</code>), or a colon (<code>:</code>),
+and may be followed by more of the same characters, as well as dashes (<code>-</code>),
+dots (<code>.</code>), and numbers (<code>0</code> to <code>9</code>).</p>
+</div>
+<div class="paragraph">
+<p>Ids must be put between double quotes. For instance, to use <code>some-name</code> as
+id, it must be written as <code>"some-name"</code>.</p>
+</div>
+<div class="paragraph">
+<p>Instead of using a hard coded SVG element id, it is also allowed to use an
+expression that when evaluated results in the SVG element id. Such an
+expression must evaluate to a <code>string</code> typed value, and must be statically
+evaluable (must not refer to variables that can change value during simulation,
+etc). For instance:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Hard coded SVG element id.
+svgout id "box" attr "width" value ...;
+
+// Computed SVG element id.
+const string c = "bo";
+svgout id c + "x" attr "width" value ...;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first output mapping applies to the SVG element with the id <code>box</code>. The
+<code>box</code> id is hard coded into the output mapping. The second
+output mapping uses the expression <code>c + "x"</code> to specify the SVG element id.
+Once the expression is evaluated (its value is computed), this results in the
+<code>string</code> typed value <code>"box"</code>. As such, the second mapping applies to the
+SVG element with id <code>box</code> as well.</p>
+</div>
+<div class="paragraph">
+<p>The expressions may also refer to for instance algebraic parameters of
+automaton definitions. Since different values can be given to the parameters
+for each instantiation, this allows the SVG element id to vary for the
+different instantiations of the automaton definition. This particular usage
+allows for reuse and scalable solutions. The
+<a href="#tools-cifsim-output-svgviz-chapter-example-lamps">lamps example</a> and
+<a href="#tools-cifsim-output-svgviz-chapter-example-workstation">workstation example</a>
+are good examples of this usage. This usage is often combined with
+<a href="#tools-cifsim-output-svgviz-chapter-svgcopy">CIF/SVG copy declarations</a> and
+<a href="#tools-cifsim-output-svgviz-chapter-svgmove">CIF/SVG move declarations</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-attr">SVG attribute name</h8>
+<div class="paragraph">
+<p>Every output mapping needs to specify the name of the attribute of the SVG
+element to update (or <code>text</code>, see the
+<a href="#tools-cifsim-output-svgviz-svgout-text">Text labels</a> section).
+Similarly to specifying ids, attribute names must be valid SVG names. They also
+need to be put between double quotes. Unlike SVG element ids, it is not
+possible to use expressions to specify attribute names. That is, only hard
+coded names can be used to specify attribute names.</p>
+</div>
+<div class="paragraph">
+<p>It is not allowed to change the ids of SVG elements, as it could lead to
+duplicate or missing ids. As such, output mappings for the <code>id</code> attribute
+(in any casing) are explicitly not supported. Similarly, changing the <code>style</code>
+attribute (in any casing) using an output mapping is explicitly not supported,
+to avoid conflicting style changes. See also the
+<a href="#tools-cifsim-output-svgviz-svgout-svgcss">SVG presentation attributes vs CSS style attributes</a> section for more
+information about the <code>style</code> attribute.</p>
+</div>
+<div class="paragraph">
+<p>The supported attributes for an SVG element depend on what kind of element it
+is. For instance, a <code>rect</code> element can have an <code>x</code> and <code>y</code> position, a
+<code>width</code> and <code>height</code>, a <code>fill</code> color, etc. A <code>g</code> element (a group)
+however, does not support those position attributes. It is beyond the scope of
+this document to go into more detail. The software however, will warn about
+using attribute names that are not supported according to the SVG standard (to
+catch simple spelling mistakes), and specifying attributes on elements that
+don&#8217;t support them. Consult the official
+<a href="http://www.w3.org/TR/SVG11/">SVG specification</a>
+for further details. The
+<a href="#tools-cifsim-output-svgviz-examples">examples</a> showcase several
+commonly used attributes as well.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-svgcss">SVG presentation attributes vs CSS style attributes</h8>
+<div class="paragraph">
+<p>SVG uses two kinds of attributes: SVG presentation attributes, and CSS style
+attributes. For instance, in the following partial SVG image:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-svg" data-lang="svg">&lt;rect fill="red"        id="rect1" width="25" height="25" x="65" y="5"/&gt;
+&lt;rect style="fill:red;" id="rect2" width="25" height="25" x="15" y="5"/&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Rectangle <code>rect1</code> uses the SVG presentation attribute <code>fill</code> to specify the
+fill color the rectangle. Rectangle <code>rect2</code> uses the CSS style attribute
+<code>fill</code> to specify the fill color the rectangle. The SVG presentation
+attributes are all direct attributes of the SVG element. CSS style attributes
+on the other hand, are always part of the SVG presentation attribute <code>style</code>.</p>
+</div>
+<div class="paragraph">
+<p><a href="https://en.wikipedia.org/wiki/Cascading_Style_Sheets">CSS</a>
+stands for
+<em>Cascading Style Sheets</em>, and it is a style sheet language used
+for describing the look and formatting of a document. It&#8217;s best known for its
+use in styling web pages written in
+<a href="https://en.wikipedia.org/wiki/HTML">HTML</a>.
+Like SVG, CSS is an international
+standard developed and maintained by the
+<a href="http://www.w3.org/">World Wide Web Consortium</a>
+(W3C). SVG reuses the CSS standard for its CSS style
+attributes. The most commonly used attributes for certain elements are also
+available in the SVG standard as SVG presentation attributes. Furthermore, SVG
+adds additional presentation attributes not found in CSS.</p>
+</div>
+<div class="paragraph">
+<p>If an attribute is specified on an element using both an SVG presentation
+attribute, and a CSS style attribute, the CSS style attribute usually takes
+precedence. The output mappings handle all of this automatically and
+transparently. That is, you just specify the attribute name in the header of
+the output mapping, and the simulator makes sure the proper attribute is
+update, regardless of whether it is an SVG presentation attribute, or a CSS
+style attribute. It is explicitly not supported to change the <code>style</code>
+attribute directly (using an output mapping), in order to avoid conflicting
+style changes when other output mappings update CSS style attributes that are
+part of that same <code>style</code> SVG presentation attribute.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-text">Text labels</h8>
+<div class="paragraph">
+<p>Changing the text of text labels is a special case, as text is not stored in
+attributes. Consider the following partial SVG image, which contains a text
+label (created using <a href="#tools-cifsim-output-svgviz-chapter-inkscape">Inkscape</a>,
+and with some of the irrelevant details omitted):</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-svg" data-lang="svg">&lt;text x="5" y="5" id="text1" style="font-size:16px;"&gt;
+  &lt;tspan x="5" y="5" id="tspan2"&gt;
+    The actual text.
+  &lt;/tspan&gt;
+&lt;/text&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here we see a <code>text</code> element with id <code>text1</code>, which contains a <code>tspan</code>
+element with id <code>tspan2</code>. The <code>tspan</code> element contains some text. To change
+the text of this text label, use one of the following mappings:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgout id "text1" text value ...;
+
+svgout id "tspan2" text value ...;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, instead of the <code>attr</code> keyword followed by the name of the attribute, we
+simply specify the <code>text</code> keyword. We can either use the id of the <code>text</code>
+element, or the id of the <code>tspan</code> element. More precisely, we can use the id
+of an element that contains text (such as the <code>tspan</code> element in our
+example), or an element (such as the <code>text</code> element in our example) that has
+a single child, which contains text, or an element that has a single child,
+which has an single child, which contains text, etc.</p>
+</div>
+<div class="paragraph">
+<p>In practice, it is usually the easiest to use the
+<b class="menuref">Object Properties</b>
+dialog of <a href="#tools-cifsim-output-svgviz-chapter-inkscape">Inkscape</a>, to get the
+properties of the text label. The
+<b class="menuref">Id</b>
+that is then shown, is the id of the <code>text</code> element.</p>
+</div>
+<div class="paragraph">
+<p>Note that Inkscape can create
+<a href="#tools-cifsim-output-svgviz-inkscape-textarea">text areas</a> (SVG <code>flowRoot</code> elements),
+which are not supported by the CIF tooling.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-value">Output mapping value</h8>
+<div class="paragraph">
+<p>In order for an output mapping to be able to update attributes or text labels,
+it needs a value. The
+<a href="#tools-cifsim-output-svgviz-svgout-simple">simple output mapping</a> example
+already showed how
+a value can be specified. This section further explains the details of the
+specification of such values.</p>
+</div>
+<div class="paragraph">
+<p>The <code>value</code> keyword is followed by an expression. This expression may
+for instance be a literal value, such as <code>1</code>, <code>true</code>, <code>1.0</code>,
+<code>"some text"</code>, or <code>[1, 2]</code>. At first, it might not seem useful to use a
+literal as a value for an output mapping, since the mapping will then produce
+the same value every time it is applied. However, the
+<a href="#tools-cifsim-output-svgviz-chapter-example-rate">rate example</a> shows why this can in fact be
+very useful.</p>
+</div>
+<div class="paragraph">
+<p>The expressions however, may also contain references to variables (discrete,
+continuous, or algebraic), functions, constants, locations, etc. For instance,
+we could use the value of a continuous variable and multiply it by two, by
+using <code>x * 2</code> as expression, assuming that the continuous variable is named
+<code>x</code>. Since we may refer to the <a href="#tools-cifsim-traces-state">state</a> of
+the CIF specification, the value of the expression can change as the simulation
+continues, resulting in different values being mapped to the image.</p>
+</div>
+<div class="paragraph">
+<p>The expressions can also include <code>if</code> expressions, which are particularly
+powerful in this context. Using <code>if</code> expressions, a different value can be
+used for several different conditions. See the
+<a href="#tools-cifsim-output-svgviz-chapter-example-workstation">workstation example</a> for an example of using
+<code>if</code> expressions in an output mapping.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-quote-escape">Quoting and escaping</h8>
+<div class="paragraph">
+<p>The value expression of an output mapping may be of any type. The result of
+evaluating the expression is converted to a textual representation that closely
+resembles the textual syntax of CIF, before using it to set the value of an
+attribute, or the text of a text label. For string literals this means that the
+text is escaped, and double quotes are added. If however the result of the
+expression is a <code>string</code> typed value, then that string is used 'as is'
+(without quoting, and without escaping). Thus, consider the following examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgout id "..." attr "..." value ["a\"b"];
+svgout id "..." attr "..." value "a\"b";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The value of the first output mapping is a list that contains a single string
+value, while the value of the second output mapping is a string value directly.
+This results in the following texts being used as values of the attributes:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">["a\"b"]
+a"b</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>That is, in general string values are quoted and escaped, as is the case for
+the first example, where the result is a list. However, if the entire result
+is a string, as is the case with the second example, the string value is used
+'as is', without quoting and without escaping.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-whitespace">Whitespace handling</h8>
+<div class="paragraph">
+<p>If the textual result of an output mapping contains a new line character (for
+instance due to including <code>\n</code> in a string literal or
+<a href="#tools-cifsim-output-print-ref-fmt-pattern">format pattern</a>), the new
+line character is ignored by SVG. Furthermore, tabs (<code>\t</code>) are replaced by a
+single space character. Finally,
+<a href="http://www.w3.org/TR/SVG/text.html#WhiteSpace">by default</a>
+consecutive
+spaces (including tabs) are merged together into a single space, and spaces at
+the beginning and end of the output of a mapping are discarded by SVG.</p>
+</div>
+<div class="paragraph">
+<p>This essentially renders <code>\n</code> and <code>\t</code> useless, as the first is ignored,
+and for the second spaces can be used instead.</p>
+</div>
+<div class="paragraph">
+<p>This also means that it is not possible to set multiple lines of text using a
+single output mapping. This is a fundamental restriction of SVG, not of CIF/SVG
+output mappings. In order to set multiple lines of text, multiple output
+mappings are needed, where each mapping sets a different text label (a
+different line).</p>
+</div>
+<div class="paragraph">
+<p>Note that if you enter multiple lines of text in
+<a href="#tools-cifsim-output-svgviz-chapter-inkscape">Inkscape</a>, this results in a
+single <code>text</code> element, with multiple <code>tspan</code> child elements. The actual
+text of such <code>tspan</code> elements can then be updated using an output mapping
+for each <code>tspan</code> element. The benefit over multiple text labels (multiple
+<code>text</code> elements with a single <code>tspan</code> child element each) is that the one
+<code>text</code> element can be moved, making all the <code>tspan</code> child elements
+automatically move with it. That is, the lines of text are kept together by
+Inkscape.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-unique">Uniqueness of output mappings</h8>
+<div class="paragraph">
+<p>All output mappings must be unique, per SVG image. That is, no two mappings may
+use the exact same SVG element id and attribute name. Similarly, no two
+mappings may update the same text. That is, for the example above, it is not
+allowed to specify two mappings for the text of the SVG element with id
+<code>text1</code>. However, since both elements <code>text1</code> and <code>tspan1</code> have the same
+text, it is also not allowed to specify output mappings for the text of those
+two elements.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-svgout-appl">Application</h8>
+<div class="paragraph">
+<p>SVG output mappings are applied for <a href="#tools-cifsim-traces-state">states</a>
+<a href="#tools-cifsim-output-realtime-frames">frames</a>, throughout simulation.
+Their first application is after
+<a href="#tools-cifsim-output-svgviz-chapter-svgcopy">copy declarations</a> and
+<a href="#tools-cifsim-output-svgviz-chapter-svgmove">move declarations</a> declarations
+have been applied. For more information, see the
+<a href="#tools-cifsim-output-svgviz-simulation-order">Application order</a> section.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-svgcopy">CIF/SVG copy declaration</h7>
+<div class="paragraph">
+<p>
+
+
+
+
+A CIF/SVG copy declaration can be used to create copies of existing graphical
+elements of an SVG image. This page explains the technical details of such
+copy declarations. For concrete examples, see the
+<a href="#tools-cifsim-output-svgviz-chapter-example-lamps">lamps example</a> or the
+<a href="#tools-cifsim-output-svgviz-chapter-example-buffers-products">buffers/products example</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-example-2">Example</h8>
+<div class="paragraph">
+<p>Consider the following SVG file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-svg" data-lang="svg">&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
+&lt;svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1"&gt;
+  &lt;rect style="fill:red;"   id="rect"  width="100" height="100" x="20" y="20"/&gt;
+  &lt;g id="grp"&gt;
+    &lt;rect style="fill:green;" id="rect2" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+  &lt;rect style="fill:blue;"  id="rect3" width="100" height="100" x="80" y="80"/&gt;
+&lt;/svg&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It features three rectangles, with ids <code>rect</code>, <code>rect2</code>, and <code>rect3</code>, each
+with the same size. They have different <code>fill</code> colors and positions. The
+second rectangle is enclosed in a group with id <code>grp</code>. Also consider the
+following CIF file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "svgcopy.svg";
+
+svgcopy id "rect" pre "a";
+svgcopy id "grp" post "b";
+svgcopy id "rect3" pre "_" post "x";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The effect of the copy declarations on the SVG image is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-svg" data-lang="svg">&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
+&lt;svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1"&gt;
+  &lt;rect style="fill:red;"   id="arect"   width="100" height="100" x="20" y="20"/&gt;
+  &lt;rect style="fill:red;"   id="rect"    width="100" height="100" x="20" y="20"/&gt;
+  &lt;g id="grpb"&gt;
+    &lt;rect style="fill:green;" id="rect2b" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+  &lt;g id="grp"&gt;
+    &lt;rect style="fill:green;" id="rect2" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+  &lt;rect style="fill:blue;"  id="_rect3x" width="100" height="100" x="80" y="80"/&gt;
+  &lt;rect style="fill:blue;"  id="rect3"   width="100" height="100" x="80" y="80"/&gt;
+&lt;/svg&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-syntax">Syntax</h8>
+<div class="paragraph">
+<p>The general syntax of CIF/SVG copy declarations is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgcopy id &lt;orig-elem-id&gt; pre &lt;prefix&gt;;
+
+svgcopy id &lt;orig-elem-id&gt; post &lt;postfix&gt;;
+
+svgcopy id &lt;orig-elem-id&gt; pre &lt;prefix&gt; post &lt;postfix&gt;;
+
+svgcopy id &lt;orig-elem-id&gt; pre &lt;prefix&gt; file "...";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>svgcopy</code> keyword is followed by a specification of an SVG element
+<a href="#tools-cifsim-output-svgviz-svg-id">id</a>. Every copy declaration must
+<a href="#tools-cifsim-output-svgviz-svgout-id">specify the id</a> of an SVG
+element, and an SVG element with that id must exist in the original SVG image,
+or must exist after applying one of the other copy declarations of the same
+CIF specification. The <code>id</code> indicates the element that is to be copied.</p>
+</div>
+<div class="paragraph">
+<p>The prefix and postfix are both optional, but at least one of them must be
+specified. The prefix and postfix are used to generate unique ids for the
+copied elements. The prefix (if any) is prepended to the ids of the copied
+elements, while the postfix (if any) is appended to the ids of the copied
+elements. Prefixes (if specified) must be valid SVG name prefixes, which means
+they must be valid SVG names, just as
+<a href="#tools-cifsim-output-svgviz-svgout-id">SVG element ids</a>.
+Similarly, postfixes (if specified) must be valid SVG name postfixes, which
+means they must be valid SVG names, but may start with dashes (<code>-</code>), dots
+(<code>.</code>), and numbers (<code>0</code> to <code>9</code>). Similar to
+<a href="#tools-cifsim-output-svgviz-svgout-id">ids</a>, expressions may be
+used for both prefixes and postfixes, as long as they result in a <code>string</code>
+typed value when they&#8217;re evaluated.</p>
+</div>
+<div class="paragraph">
+<p>If we look at the rectangles example above, we see that the <code>rect</code> element is
+copied, and that the <code>id</code> of the copied element is prefixed with <code>a</code>,
+resulting in <code>arect</code> as <code>id</code> of the copy. Similarly, <code>rect3</code> is prefixed
+with <code>_</code> and postfixed with <code>x</code> resulting in <code>_rect3x</code> as <code>id</code> of the
+copy.</p>
+</div>
+<div class="paragraph">
+<p>The <code>grp</code> element is copied as well, with a <code>b</code> postfix. This results in
+a copied group with <code>grpb</code> as its <code>id</code>. Group <code>grp</code> also contains the
+rectangle with id <code>rect2</code>. When an element is copied, all its contents are
+copied as well. That is, the copy is recursive. This means that the <code>rect2</code>
+element is copied as well, and that copy is also given a <code>b</code> postfix,
+resulting in <code>rect2b</code> as its <code>id</code>.</p>
+</div>
+<div class="paragraph">
+<p>In the syntax examples above, we see that it is also allowed to declare a
+local <a href="#tools-cifsim-output-svgviz-chapter-svgfile">SVG file declaration</a>, that
+only applies to that specific copy declaration.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-placement">Placement</h8>
+<div class="paragraph">
+<p>The copies are added to the SVG image, as siblings of their originals. That is,
+the copies are added just before their originals. In the rectangles example
+above, this means that the <code>arect</code> copy is added just before the <code>rect</code>
+original, and the <code>grpb</code> copy is added just before the <code>grp</code> original.</p>
+</div>
+<div class="paragraph">
+<p>The order of the <code>rect</code>, <code>rect2</code>, and <code>rect3</code> rectangles is important,
+in that it determines their <em>rendering order</em>. Elements that are listed first,
+get <em>rendered</em> or <em>painted</em> first. Subsequent elements are painted on top of
+previously painted elements. Thus, the red <code>rect</code> rectangle is painted first,
+and is partially covered by the green <code>rect2</code> rectangle, which is painted
+second and is partially covered by the blue <code>rect3</code> rectangle, which is
+painted third.</p>
+</div>
+<div class="paragraph">
+<p>By including copies near their originals (as siblings), the copies get a
+similar rendering order.</p>
+</div>
+<div class="paragraph">
+<p>It is not allowed to copy the root element (the element with id <code>root</code> in the
+rectangles example above), as that would result in two root elements, which is
+not allowed by the SVG standard.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-uniqueness-3">Uniqueness</h8>
+<div class="paragraph">
+<p>All copied elements (the element that is copied, its children, the children of
+its children, etc) have their ids pre- and postfixed to create their new ids.
+These ids must be unique in the SVG image. That is, the new ids must not yet
+exist in the original SVG image, or have been used for previously copied
+elements. The unique ids are requires to ensure that we can still uniquely
+identify all elements by their ids, and we can thus use the ids to uniquely
+indicate to which elements other CIF/SVG declarations apply.</p>
+</div>
+<div class="paragraph">
+<p>Consider once again the rectangles example above:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-svg" data-lang="svg">&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
+&lt;svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1"&gt;
+  &lt;rect style="fill:red;"   id="rect"  width="100" height="100" x="20" y="20"/&gt;
+  &lt;g id="grp"&gt;
+    &lt;rect style="fill:green;" id="rect2" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+  &lt;rect style="fill:blue;"  id="rect3" width="100" height="100" x="80" y="80"/&gt;
+&lt;/svg&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>We add the following copy declaration:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgcopy id "rect" post "2";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This would result in the <code>rect</code> element being copied, and the copy being
+given a <code>rect2</code> id. However, there is already an element with that id. As
+such, the copy declaration is illegal.</p>
+</div>
+<div class="paragraph">
+<p>At least a prefix or a postfix is required for every copy declaration, as
+otherwise the new ids would be identical to the original ids.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-overlap">Overlap</h8>
+<div class="paragraph">
+<p>Consider the following SVG file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
+&lt;svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1"&gt;
+  &lt;g id="g"&gt;
+    &lt;rect style="fill:green;" id="r" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+&lt;/svg&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>We use the following copy declarations:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgcopy id "g" post "a";
+svgcopy id "r" post "b";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Both the <code>g</code> element and the <code>r</code> element are copied. However, the <code>r</code>
+element is a part of the <code>g</code> element. Therefore, the <code>r</code> element is copied
+twice, once for the copy of that element itself, and once for the copy of its
+parent (<code>g</code>). This leads to the following SVG image:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
+&lt;svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1"&gt;
+  &lt;g id="ga"&gt;
+    &lt;rect style="fill:green;" id="ra" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+  &lt;g id="g"&gt;
+    &lt;rect style="fill:green;" id="rb" width="100" height="100" x="50" y="50"/&gt;
+    &lt;rect style="fill:green;" id="r" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+&lt;/svg&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>However, if we switch the order of the copies, we get:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
+&lt;svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1"&gt;
+  &lt;g id="ga"&gt;
+    &lt;rect style="fill:green;" id="rba" width="100" height="100" x="50" y="50"/&gt;
+    &lt;rect style="fill:green;" id="ra" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+  &lt;g id="g"&gt;
+    &lt;rect style="fill:green;" id="rb" width="100" height="100" x="50" y="50"/&gt;
+    &lt;rect style="fill:green;" id="r" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+&lt;/svg&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Copying an element twice by copying the element itself (e.g. <code>g</code>), but also
+copying an element that it contains (e.g. <code>r</code>) is not recommended. As seen
+above, the outcome depends on the order, and can be very confusing. CIF gives
+a warning in case such overlapping copies are used. Generally, instead of
+copying the element twice, what is really wanted, is to copy the copied
+element. This can be done as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgcopy id "g" post "a";
+svgcopy id "ra" post "b";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>And this results in the following SVG file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
+&lt;svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1"&gt;
+  &lt;g id="ga"&gt;
+    &lt;rect style="fill:green;" id="rab" width="100" height="100" x="50" y="50"/&gt;
+    &lt;rect style="fill:green;" id="ra" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+  &lt;g id="g"&gt;
+    &lt;rect style="fill:green;" id="r" width="100" height="100" x="50" y="50"/&gt;
+  &lt;/g&gt;
+&lt;/svg&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>See the <a href="#tools-cifsim-output-svgviz-chapter-example-buffers-products">buffers/products example</a> for a
+more concrete example of the usefulness of copying copied elements.</p>
+</div>
+<div class="paragraph">
+<p>Not that overlap is only detected for copying an element and an element that
+it contains. Copying the same element multiple times is perfectly valid and
+useful, and does not result in warnings.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-application">Application</h8>
+<div class="paragraph">
+<p>Copy declarations are only applied once, at the beginning of the simulation,
+before any of the other CIF/SVG declarations have been applied. For more
+information, see the <a href="#tools-cifsim-output-svgviz-simulation-order">Application order</a>
+section.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-svgmove">CIF/SVG move declaration</h7>
+<div class="paragraph">
+<p>
+
+
+
+
+A CIF/SVG move declaration can be used to move parts of an SVG image to a
+certain position, regardless of transformations applied to the elements that
+are moved, or any surrounding groups and layers, etc. This page explains the
+technical details of such move declarations. For a concrete example, see the
+<a href="#tools-cifsim-output-svgviz-chapter-example-lamps">lamps example</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-example-3">Example</h8>
+<div class="paragraph">
+<p>Consider the following SVG file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-svg" data-lang="svg">&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
+&lt;svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="400" height="400" id="root" version="1.1"&gt;
+  &lt;g id="grp1"&gt;
+    &lt;rect style="fill:green;" id="rect1" width="20" height="20" x="5" y="10"
+          transform="translate(15, 20)"/&gt;
+  &lt;/g&gt;
+  &lt;g id="grp2" transform="scale(5, 2)"&gt;
+    &lt;rect style="fill:blue;" id="rect2" width="20" height="20" x="5" y="10"
+          transform="translate(15, 20)"/&gt;
+  &lt;/g&gt;
+&lt;/svg&gt;</code></pre>
+</div>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/svgmove/svgmove.png" alt="svgmove">
+</div>
+</div>
+<div class="paragraph">
+<p>It features a group <code>grp1</code>, with a green rectangle <code>rect1</code>. It is 20 by 20
+pixels in size. Its position is 20 pixels from the left (<code>x</code> is 5, but the
+horizontal translation is 15 pixels) and 30 pixels from the top (<code>y</code> is 10,
+but the vertical translation is 20 pixels).</p>
+</div>
+<div class="paragraph">
+<p>Group <code>grp2</code> and rectangle <code>rect2</code> are similar. Rectangle <code>rect2</code> is
+blue, and group <code>grp2</code> is scaled 5 times horizontally, and 2 times
+vertically. This means that rectangle <code>rect2</code> is 100 by 40 pixels in size
+(5 times 20, and 2 times 20). It also means that the position of <code>rect2</code>
+is 100 pixels from the left (5 times 20) and 60 pixels from the top (2 times
+30).</p>
+</div>
+<div class="paragraph">
+<p>Also consider the following CIF file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "svgmove.svg";
+
+svgmove id "rect1" to 10, 10;
+svgmove id "rect2" to 10, 50;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The upper left corner of the bounding box of rectangle <code>rect1</code> is moved to
+10 pixels from the left side, and 10 pixels from the top. The upper left corner
+of the bounding box of rectangle <code>rect2</code> is moved to 10 pixels from the left
+side, and 50 pixels from the top. The effect of the move declarations on the
+SVG image is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-svg" data-lang="svg">&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
+&lt;svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="400" height="400" id="root" version="1.1"&gt;
+  &lt;g id="grp1"&gt;
+    &lt;rect style="fill:green;" id="rect1" width="20" height="20" x="5" y="10"
+          transform="translate(15, 20) translate(-10.000000,-20.000000)"/&gt;
+  &lt;/g&gt;
+  &lt;g id="grp2" transform="scale(5, 2)"&gt;
+    &lt;rect style="fill:blue;" id="rect2" width="20" height="20" x="5" y="10"
+          transform="translate(15, 20) translate(-18.000000,-5.000000)"/&gt;
+  &lt;/g&gt;
+&lt;/svg&gt;</code></pre>
+</div>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/svgmove/svgmove.out.png" alt="svgmove.out">
+</div>
+</div>
+<div class="paragraph">
+<p>Note the translations that have been added to the <code>transform</code> attributes of
+the rectangles. The additional translation for rectangle <code>rect1</code> is -10 in
+the x direction and -20 in the y direction, as the rectangle has been moved
+from position (20, 30) to position (10, 10).</p>
+</div>
+<div class="paragraph">
+<p>Rectangle <code>rect2</code> has been moved from position (100, 60) to position
+(10, 50). You might have expected a horizontal translation of -90 and a
+vertical translation of -10. However, its added translation is for -18 pixels
+horizontally, and -5 pixels vertically. This is because the scaling applies to
+this translation as well, and 5 * 18 = 90, and 2 * 5 = 10.</p>
+</div>
+<div class="paragraph">
+<p>The scaling of the surrounding group complicates the calculations for the
+transformations of its children (<code>rect2</code> in this case). Moving elements to
+certain positions becomes more and more complicated when the elements
+themselves have transformations, their parents have transformations, the
+parents of their parents have transformations, etc. This especially holds for
+non-translation transformations, such as <code>scale</code>, <code>rotate</code>, etc. The
+CIF/SVG move declarations make moving easy, by allowing you to specify the
+target position, regardless of the existence of such transformations.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-syntax-2">Syntax</h8>
+<div class="paragraph">
+<p>The general syntax of CIF/SVG move declarations is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgmove id &lt;id&gt; to &lt;x&gt;, &lt;y&gt;;
+
+svgmove id &lt;id&gt; to &lt;x&gt;, &lt;y&gt; file "...";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>svgmove</code> keyword is followed by a specification of an SVG element
+<a href="#tools-cifsim-output-svgviz-svg-id">id</a>. Every move declaration must
+<a href="#tools-cifsim-output-svgviz-svgout-id">specify the id</a> of an SVG
+element, and an SVG element with that id must exist in the SVG image. The
+<code>id</code> indicates the element that is to be moved.</p>
+</div>
+<div class="paragraph">
+<p>The x and y target coordinates are both mandatory, and indicate the coordinates
+of the upper left corner of the bounding box of element that is being moved,
+relative to the upper left corner of the canvas, after the move is completed.
+Similar to <a href="#tools-cifsim-output-svgviz-svgout-id">ids</a>,
+expressions may be used for both the x and y coordinates, as long as they
+result in a <code>int</code> or <code>real</code> typed value when they&#8217;re evaluated. That is,
+the x and y coordinates must be numeric.</p>
+</div>
+<div class="paragraph">
+<p>In the syntax examples above, we see that it is also allowed to declare a
+local <a href="#tools-cifsim-output-svgviz-chapter-svgfile">SVG file declaration</a>, that
+only applies to that specific move declaration.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-moving-graphical-elements">Moving graphical elements</h8>
+<div class="paragraph">
+<p>In order for an element to be moved, it must have a graphical representation.
+Elements that have a graphical representation include rectangles, paths, text
+labels, groups, etc. However, certain elements don&#8217;t have a graphical
+representation, and thus can not be moved. An example of elements that can not
+be moved are the <code>tspan</code> sub-elements of <code>text</code> elements. The <code>tspan</code>
+sub-elements don&#8217;t have graphical representations of their own, they are part
+of the text labels, and only the <code>text</code> elements have graphical
+representations.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-conflicting-transformations">Conflicting transformations</h8>
+<div class="paragraph">
+<p>The SVG standard allows for powerful
+<a href="http://www.w3.org/TR/SVG11/coords.html#TransformAttribute">transformations</a>,
+including the <code>scale</code> and <code>matrix</code> transformations. Now assume we use a
+<code>scale(0, 0)</code> transformation. Then all coordinates are multiplied by zero,
+always resulting in zero. As such, the entire image is scaled into zero by
+zero pixels. In such cases, there is no translation that can be added to an
+element, that after application of the scaling transformation, moves it to a
+certain position. Thus, if such conflicting transformations are present, the
+move can not be accomplished, and the CIF/SVG move declaration is considered
+illegal. It should be noted however, that such conflicting transformations are
+rare, and usually indicate an error has been made in those transformations.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-application-2">Application</h8>
+<div class="paragraph">
+<p>Move declarations are only applied once, at the beginning of the simulation,
+after the <a href="#tools-cifsim-output-svgviz-chapter-svgcopy">copy declarations</a> have
+been applied. For more information, see the
+<a href="#tools-cifsim-output-svgviz-simulation-order">Application order</a> section.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-simulation">Simulation of SVG visualizations</h7>
+<div class="paragraph">
+<p>
+Once a CIF specification with CIF/SVG declarations, and the SVG image or images
+are available, it is time to start simulating the CIF specification with SVG
+visualization. This page discusses the following simulation related topics:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-simulation-order">Application order</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-simulation-option">SVG visualization option</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-simulation-demos">Demonstrations</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-simulation-order">Application order</h8>
+<div class="paragraph">
+<p>When the simulator is started, the SVG image is loaded. First, the
+<a href="#tools-cifsim-output-svgviz-chapter-svgcopy">CIF/SVG copy declarations</a> are
+applied, to ensure all elements exist. For copies of copied elements, the
+former are applied after the latter, to ensure the elements that need to be
+copied actually exist. Besides that, the copy declarations from a CIF file
+are applied in the order in which they are specified (after
+<a href="#tools-cif2cif-chapter-elim-comp-def-inst">elimination of component definition/instantiation</a>).
+The copy declarations are only applied once.</p>
+</div>
+<div class="paragraph">
+<p>After the copy declarations, the
+<a href="#tools-cifsim-output-svgviz-chapter-svgmove">CIF/SVG move declarations</a>
+are applied. The move declarations from a CIF file are applied in the order in
+which they are specified (after
+<a href="#tools-cif2cif-chapter-elim-comp-def-inst">elimination of component definition/instantiation</a>).
+The move declarations are only applied once.</p>
+</div>
+<div class="paragraph">
+<p>The <a href="#tools-cifsim-output-svgviz-chapter-svgout">CIF/SVG output mappings</a> are
+applied after that, for the initial <a href="#tools-cifsim-traces-state">state</a>.
+After the output mappings have been applied, the resulting SVG image is shown
+by the simulator. The output mappings are applied again and again, as the state
+of the CIF model changes.</p>
+</div>
+<div class="paragraph">
+<p>The output mappings from a CIF file are applied in the order in
+which they are specified (after
+<a href="#tools-cif2cif-chapter-elim-comp-def-inst">elimination of component definition/instantiation</a>).
+Note however, that the order does not matter, as all output mappings are
+<a href="#tools-cifsim-output-svgviz-svgout-unique">unique</a> and independent of each
+other.</p>
+</div>
+<div class="paragraph">
+<p>Each mapping that is applied, results in an update of an attribute or text
+label. Either the new value is different from the previous value, or the value
+is updated to the value that was already there. The results of the mappings
+are cumulative. That is, the first mapping is applied to the original SVG
+image, the second mapping is applied to the image that resulted from applying
+the first mapping, the third mapping is applied to the image that resulted
+from applying the second mapping, etc.</p>
+</div>
+<div class="paragraph">
+<p>During simulation, the simulator provides states to the SVG visualizer, which
+applies the mappings to each of those states, in order to generate
+<a href="#tools-cifsim-output-realtime-frames">frames</a>. Whenever the
+mappings are applied, they are all applied, one after the other. Between the
+application of the individual output mappings, the display is never updated.
+That is, only after all mappings are applied, is the visualization updated.
+This assures that the images are in a consistent state when they are rendered.</p>
+</div>
+<div class="paragraph">
+<p>By changing the <code>width</code> and <code>height</code> attributes of the root <code>svg</code> element
+of an SVG image, it is possible to change the size of the image, and thus the
+canvas on which it is displayed during simulation. Changes to these attributes
+currently only have effect for the initial state. If the size of the image is
+changed during simulation, such changes are ignored.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-simulation-option">SVG visualization option</h8>
+<div class="paragraph">
+<p>The
+<b class="menuref">SVG visualization</b>
+option
+(<b class="menuref">Output: SVG visualization</b>
+category) can be used to disable SVG
+visualization. By default, the option is enabled, and SVG visualization is used
+if the CIF file being simulated declares any CIF/SVG declarations. By disabling
+the option, SVG visualization is disabled, regardless of whether the CIF
+specification has any CIF/SVG declarations.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-simulation-demos">Demonstrations</h8>
+<div class="paragraph">
+<p>For demonstrations and presentations, it may be useful to record a movie of a
+simulation with SVG visualization. This way, during the demonstration, there is
+no need to manually control the simulation input. Furthermore, a prerecorded
+movie can&#8217;t fail to execute, which may be a problem for live demonstrations.
+Finally, a prerecorded movie doesn&#8217;t change, and is not influenced by the
+<a href="#tools-cifsim-chapter-performance">performance</a> of the computer on which the
+demonstration is given.</p>
+</div>
+<div class="paragraph">
+<p>To record a movie of the SVG visualization, screen recording or screen
+capturing software can be used. For instance:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="http://camstudio.org/">CamStudio</a>
+for Microsoft Windows.</p>
+</li>
+<li>
+<p><a href="http://recordmydesktop.sourceforge.net/about.php">recordMyDesktop</a>
+for Linux.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Both these screen recording applications are free and open source.</p>
+</div>
+<div class="paragraph">
+<p>Ideally a capturing software supports capturing a region of the screen, so
+that it is for instance possible to only capture the visualization.
+Furthermore, it may be beneficial to be able to capture the mouse pointer, so
+that it is clear where interaction takes place, etc.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-undoreset-3">Undo/reset</h8>
+<div class="paragraph">
+<p>By <a href="#tools-cifsim-input-history-reset-undo">undoing</a> one or more transitions,
+or by <a href="#tools-cifsim-input-history-reset-undo">resetting</a> the simulation, the
+state may change. The SVG visualizer is automatically updated to reflect such
+changes.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-debugging">Debugging SVG visualizations</h7>
+<div class="paragraph">
+<p>
+
+If an SVG visualization does not behave as you would expect it to behave, there
+are several ways to debug such problems. The following approaches are
+available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-debugging-console">Console debugging</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-debugging-saveas">Save as SVG</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-debugging-stacktrace">Stack traces</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-debugging-console">Console debugging</h8>
+<div class="paragraph">
+<p>Console debugging for CIF/SVG declarations can be enabled or disabled by using
+the
+<b class="menuref">Debug output</b>
+option (<b class="menuref">Output</b>
+category). It is
+disabled by default. If enabled, it produces debug output to the console,
+whenever CIF/SVG declarations are applied. Here is an example of what such
+output looks like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">SVG output ("some_file.svg") id "a" text: "10.00"
+SVG output ("some_file.svg") id "b" text: "0.0"
+SVG output ("some_file.svg") id "c" text: "3.16"
+SVG output ("some_file.svg") id "n" attr "fill" (CSS attr): "#ff0000"
+SVG output ("some_file.svg") id "water" attr "height" (SVG attr): "75.0"
+SVG output ("some_file.svg") id "water" attr "y" (SVG attr): "104.5"</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each of the output mappings that is applied, results in a line of debugging
+output. For output mappings that update the value of an attribute, the output
+indicates whether the attribute is handled as an
+<a href="#tools-cifsim-output-svgviz-svgout-svgcss">SVG presentation attribute</a> or as a
+<a href="#tools-cifsim-output-svgviz-svgout-svgcss">CSS style attribute</a>.</p>
+</div>
+<div class="paragraph">
+<p>The textual representations of the values that are set, are put between double
+quotes, and their content is not escaped in any way.</p>
+</div>
+<div class="paragraph">
+<p>
+Due to the asynchronous nature of the SVG visualizer, the simulator will
+continue to calculate the next states that are to become a frame, while the SVG
+visualizer is still applying mappings for previous frames. As such, the debug
+output and other simulation output are likely to be out of sync and
+interleaved. To ease debugging, you can enable the
+<a href="#tools-cifsim-chapter-test-mode">test mode option</a>, which ensures synchronous
+execution, and thus synchronous output.</p>
+</div>
+<div class="paragraph">
+<p>For the input mappings, whenever an interactive SVG element is clicked, and
+the corresponding mapping is used to determine the event to take, a line of
+debug output is produced. Here is an example of what such output looks like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">SVG input ("some_file.svg") id "button": event "button.u_pushed"
+Transition: event button.u_pushed</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>From the line of debugging output, it can be seen that the SVG element with id
+<code>button</code> was clicked, and this resulted in the execution of event
+<code>button.u_pushed</code>.</p>
+</div>
+<div class="paragraph">
+<p>Similar debug output is available for the other CIF/SVG declarations:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">SVG copy ("some_file.svg") id "button" post "1".
+SVG copy ("some_file.svg") id "button" post "2".
+
+SVG move ("some_file.svg") id "button1" to 10.0, 10.0.
+SVG move ("some_file.svg") id "button2" to 30.0, 10.0.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-debugging-saveas">Save as SVG</h8>
+<div class="paragraph">
+<p>During simulation, the SVG visualizer can be used to
+<a href="#tools-cifsim-output-svgviz-viewer-saveas">save</a> the currently visible image as
+an SVG image file. This way, the actual XML representation of the SVG image as
+it is displayed at that time, can be inspected in an XML editor or text editor.
+This may give insight in the actual effect of the CIF/SVG declarations applied
+until that moment.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-debugging-stacktrace">Stack traces</h8>
+<div class="paragraph">
+<p>If the application of a CIF/SVG declaration results in a runtime error, a stack
+trace is printed to the console. This stack trace makes it possible to track
+the exact origin of the error. Here is an example of such a stack trace for an
+output mapping:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">ERROR: Simulation resulted in a runtime error.
+CAUSE: Evaluation of the SVG output mapping ("some_file.svg") for the text of the SVG element with id "txt1" failed for state: time=0.0, x=-1.5265566588595902e-16.
+CAUSE: Evaluation of SVG output mapping value "sqrt(x)" failed.
+CAUSE: Invalid operation: sqrt(-1.5265566588595902e-16).</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, we see that simulation resulted in a runtime error. The cause is that
+the SVG output mapping for the text of the SVG element with id <code>txt1</code> failed.
+This points to the exact CIF/SVG mapping that failed, and includes the file
+name of the SVG image file, as the same id may exist in multiple images. It
+also includes the state at which the error occurred. The stack trace further
+indicates that evaluation of the value expression failed, and the actual
+failure was the evaluation of the <code>sqrt</code> standard library function, with a
+negative argument.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-viewer">SVG viewer and visualizer</h7>
+<div class="paragraph">
+<p>
+
+
+
+
+Our software comes with an SVG viewer for Eclipse. SVG image files can now be
+opened for viewing within Eclipse. This same viewer is used as a basis for the
+SVG visualizer used by the CIF simulator.</p>
+</div>
+<div class="sect7">
+<h8 id="tools-svg-viewer">SVG viewer</h8>
+<div class="paragraph">
+<p>Opening SVG files in Eclipse results in them being opened by the SVG viewer.
+The SVG viewer can be used to preview SVG images from within Eclipse.</p>
+</div>
+<div class="paragraph">
+<p>If the SVG viewer can not open an SVG image, for instance because it contains
+<a href="#tools-cifsim-output-svgviz-svg-svg11">unsupported features</a> such
+as <a href="#tools-cifsim-output-svgviz-inkscape-textarea">text areas</a>, the SVG
+viewer will indicate this. Therefore, opening an SVG image in Eclipse can be
+used to verify that the SVG image can be used for SVG visualization.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-refresh">Refresh</h8>
+<div class="paragraph">
+<p>The SVG viewer does <em>not</em> refresh its display if the image file is changed. To
+refresh the image, close the image, and open it again.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cifsim-output-svgviz-viewer-saveas">Save as</h8>
+<div class="paragraph">
+<p>The SVG viewer and SVG visualizer can export the currently visible image to
+several different image formats. To export the image, first make sure that
+the SVG viewer or SVG visualizer has the focus. Then select
+<span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Save As&#8230;&#8203;</b></span> to open the
+<b class="menuref">Save SVG as</b>
+dialog. Alternatively, right click the SVG image itself, and choose
+<b class="menuref">Save As&#8230;&#8203;</b>
+from the popup menu, to open the
+<b class="menuref">Save SVG as</b>
+dialog. In the dialog, specify the file name of the
+exported image. Click
+<b class="button">OK</b>
+to confirm and to actually export the
+image.</p>
+</div>
+<div class="paragraph">
+<p>The following
+<a href="http://en.wikipedia.org/wiki/Raster_graphics">raster image</a>
+formats are supported:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/Portable_Network_Graphics">Portable Network Graphics</a>
+(<code>*.png</code>)</p>
+</li>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/JPEG">JPEG</a>
+(<code>*.jpg</code>)</p>
+</li>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/Graphics_Interchange_Format">Graphics Interchange Format</a>
+(<code>*.gif</code>)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following
+<a href="http://en.wikipedia.org/wiki/Vector_graphics">vector image</a>
+formats are supported:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics">Scalable Vector Graphics</a>
+(<code>*.svg</code>)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The image format that is used to export the image, is derived from the file
+extension that is used. For each of the supported file formats, the allowed
+file names (with file extensions) are indicated above (between parentheses).</p>
+</div>
+<div class="paragraph">
+<p>After the image is exported, the workspace is refreshed to show that new image
+file, if the image was saved in a project that is visible in the
+'Project Explorer' tab or 'Package Explorer' tab.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-example-sun-moon">Sun/moon example</h7>
+<div class="paragraph">
+<p>
+
+
+This example shows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Grouping of SVG objects.</p>
+</li>
+<li>
+<p>Controlling the visibility of objects based on the current locations of
+automata.</p>
+</li>
+</ul>
+</div>
+<div class="sect7">
+<h8 id="tools-svg-image">SVG image</h8>
+<div class="paragraph">
+<p>The following SVG image is used for this example:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/sun_moon/sun_moon_inkscape.png" alt="sun moon inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>The image features a sun and a moon. The sun consists of a circle and several
+lines. They are grouped together, using the
+<b class="menuref">Group</b>
+command from
+Inkscape&#8217;s
+<b class="menuref">Object</b>
+menu. The group can also be seen in the XML
+representation, as an <code>svg:g</code> element, with the actual shapes (paths in this
+case) as children. We assigned the <code>sun</code> id to the <code>svg:g</code> element, as it
+represents the entire sun. For clarity we gave the sub-elements ids as well,
+although that was not necessary, as we won&#8217;t directly reference them in the
+CIF/SVG declarations.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cif-specification">CIF specification</h8>
+<div class="paragraph">
+<p>The following CIF specification models the sun/moon example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "sun_moon.svg";
+
+automaton sun_moon:
+  cont t der 1.0;
+
+  location Day:
+    initial;
+    edge when t &gt;= 12.0 do t := 0.0 goto Night;
+
+  location Night:
+    edge when t &gt;= 12.0 do t := 0.0 goto Day;
+
+  svgout id "sun" attr "visibility"
+    value if Day: "visible" else "hidden" end;
+
+  svgout id "moon" attr "visibility"
+    value switch self:
+      case Day:   "hidden"
+      case Night: "visible"
+    end;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Initially, it is day (location <code>Day</code>). It is day for 12 hours, after which it
+becomes night (location <code>Night</code>). After 12 hours, it becomes day again, etc.</p>
+</div>
+<div class="paragraph">
+<p>There is one mapping to control the visibility of the sun, and one to control
+the visibility of the moon. Changing the visibility of the <code>svg:g</code> group
+element with id <code>sun</code> influences the visibility of all its children. This
+saves us from having to control the visibility of all the individual shapes
+that together represent the sun.</p>
+</div>
+<div class="paragraph">
+<p>Both mappings map the current location of automaton <code>sun_moon</code> to either
+<code>"visible"</code> or <code>"hidden"</code>, although they do it in a different methods. The
+mapping for the sun uses an <code>if</code> expression, which is shorter in syntax, and
+especially suited for automata with only two locations. The mapping for the
+moon uses a <code>switch</code> expression over <code>self</code>, which is a way to refer to
+automaton <code>sun_moon</code>, from inside that automaton itself. The cases list all
+the possible locations, and map them to the corresponding visibility values.
+The <code>switch</code> method is a bit more explicit, and becomes more elegant as the
+automaton has more locations.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-example-walk">Walk example</h7>
+<div class="paragraph">
+<p>
+
+
+
+The first part of this example shows a person walking on a floor, and features:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Grouping of SVG objects.</p>
+</li>
+<li>
+<p>The position of grouped objects in SVG.</p>
+</li>
+<li>
+<p>Changing the position of grouped objects using an output mapping.</p>
+</li>
+<li>
+<p>Using the <code>scale</code> standard library function.</p>
+</li>
+<li>
+<p>Using <a href="#tools-cifsim-output-print-chapter-tut-fmt">text formatting</a>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The second part of this example shows a person walking around in a room, and
+features:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Using multiple values in an output mapping.</p>
+</li>
+<li>
+<p>Using multiple format specifiers in a format pattern.</p>
+</li>
+</ul>
+</div>
+<div class="sect7">
+<h8 id="tools-svg-image-walking-on-floor">SVG image (walking on floor)</h8>
+<div class="paragraph">
+<p>The following SVG image is used for the example of a person walking on a floor:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/walk_floor/walk_floor_orig_inkscape.png" alt="walk floor orig inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>The image features a floor (gray bar), a person, and a text label. The
+person consists of some lines and a circle. These shapes are grouped together,
+using the
+<b class="menuref">Group</b>
+command from Inkscape&#8217;s
+<b class="menuref">Object</b>
+menu.
+The group can also be seen in the XML representation, as an <code>svg:g</code> element,
+with the actual shapes (paths in this case) as children. We assigned the
+<code>person</code> id to the <code>svg:g</code> element, as it represents the entire person. For
+clarity we gave the sub-elements ids as well, although that was not necessary,
+as we won&#8217;t directly reference them in the CIF/SVG declarations.</p>
+</div>
+<div class="paragraph">
+<p>Note that we moved the person as a whole, to the start of the floor. Since
+<code>svg:g</code> elements don&#8217;t have an <code>x</code> and <code>y</code> attribute in SVG, Inkscape
+applies a translation to move the group. This is reflected in the XML as a
+<code>transform</code> attribute, with the <code>translate(-290,-467)</code> value. This
+indicates that the person was moved 290 pixels to the left, and 467 pixels to
+the top (as SVG has its origin in the upper left corner of the canvas).</p>
+</div>
+<div class="paragraph">
+<p>To get rid of this, once the person is at the correct initial position, we
+can ungroup the <code>person</code> group (
+<b class="menuref">Ungroup</b>
+command from Inkscape&#8217;s
+<b class="menuref">Object</b>
+menu), and regroup it. By ungrouping the group, the
+transformation is pushed to the individual elements of the group. The regroup
+simply adds a new group around the elements, without a translation
+transformation. The new group is given an automatically generated name, so we
+need to rename it to <code>person</code>. This ungroup/group trick is often very useful.
+After this trick, the image looks as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/walk_floor/walk_floor_inkscape.png" alt="walk floor inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>The text label is to be used to show the position of the person, as a
+percentage. The left position is represented as 0%, and the right position is
+represented as 100%. The id of the text label is <code>pos_txt</code>.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cif-specification-walking-on-floor">CIF specification (walking on floor)</h8>
+<div class="paragraph">
+<p>The following CIF specification models a person walking on a floor:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Behavior.
+automaton person:
+  cont pos = 0.0;
+
+  location forward:
+    initial;
+    equation pos' =  1.0;
+    edge when pos &gt;= 5.0 goto backward;
+
+  location backward:
+    equation pos' = -1.0;
+    edge when pos &lt;= 0.0 goto forward;
+end
+
+// Visualization.
+svgfile "walk_floor.svg";
+
+// width of the floor - width of the person = movement
+// 180px              - 19px                = 161px
+svgout id "person" attr "transform"
+  value fmt("translate(%s,0)", scale(person.pos, 0, 5, 0, 161));
+
+svgout id "pos_txt" text
+  value fmt("%.1f%%", scale(person.pos, 0, 5, 0, 100));</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A person starts at position (variable <code>person.pos</code>) zero (value <code>0.0</code>), and
+initially moves <code>forward</code>. After (s)he has reached position <code>5.0</code>, the
+movement is reversed. Once the person is back at the start position, the
+movement repeats itself.</p>
+</div>
+<div class="paragraph">
+<p>There are two mappings, one that controls the horizontal position of the
+<code>person</code>, and another that controls the text of the text label.</p>
+</div>
+<div class="paragraph">
+<p>As stated above, the values of variable <code>person.pos</code> are in the range
+[0 .. 5]. As can be seen from the comments of the CIF model, the width of the
+floor and person are 180 pixels and 19 pixels respectively. The person can
+thus move 161 pixels to the right. The output interval of the <code>scale</code>
+standard library function is thus [0 .. 161]. As the vertical position is
+fixed, no vertical translation is required. The
+<a href="#tools-cifsim-output-print-ref-fmt-pattern">format pattern</a>
+<code>"translate(%s,0)"</code> inserts the scaled value into the horizontal amount of
+the translation. The formatted output updates the <code>transform</code> attribute,
+making the person move horizontally.</p>
+</div>
+<div class="paragraph">
+<p>The text of the text label with id <code>pos_txt</code> is updated using a second
+mapping. The value of variable <code>person.pos</code> is once again scaled using the
+<code>scale</code> standard library function. This time the output range is [0 .. 100],
+to get a percentage. Format pattern <code>"%.1f%%"</code> uses a <code>%.1f</code> format
+specifier to convert that percentage to a textual value, with a single digit
+after the decimal point. After the value of the percentage, a percentage
+character is included in escaped form (<code>%%</code>), to ensure it is not interpreted
+as a format specifier.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-svg-image-walking-in-room">SVG image (walking in room)</h8>
+<div class="paragraph">
+<p>The following SVG image is used for the example of a person walking around in
+a room:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/walk_room/walk_room_inkscape.png" alt="walk room inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>The image features a room (black rectangle) and a person. The person is the
+same group of elements as in the example of a person walking on a floor. The
+same group/ungroup trick is used here as well, to make sure the group has no
+translation transformation.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cif-specification-walking-in-room">CIF specification (walking in room)</h8>
+<div class="paragraph">
+<p>The following CIF specification models a person walking around in a room:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Behavior.
+automaton person:
+  cont x = 0.0;
+  cont y = 0.0;
+
+  location right:
+    initial;
+    equation x' =  1.0;
+    equation y' =  0.0;
+    edge when x &gt;= 5.0 goto down;
+
+  location down:
+    equation x' =  0.0;
+    equation y' =  1.0;
+    edge when y &gt;= 5.0 goto left;
+
+  location left:
+    equation x' = -1.0;
+    equation y' =  0.0;
+    edge when x &lt;= 0.0 goto up;
+
+  location up:
+    equation x' =  0.0;
+    equation y' = -1.0;
+    edge when y &lt;= 0.0 goto right;
+end
+
+// Visualization.
+svgfile "walk_room.svg";
+
+// width of the room - width of the person = horizontal movement
+// 180px             - 19px                = 161px
+//
+// height of the room - height of the person = vertical movement
+// 180px              - 40x                  = 140px
+svgout id "person" attr "transform"
+  value fmt("translate(%s,%s)", scale(person.x, 0, 5, 0, 161),
+                                scale(person.y, 0, 5, 0, 140));</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>A person starts at the top left position, and initially moves to the <code>right</code>.
+Once (s)he reaches the right side, (s)he start to move <code>down</code>, followed by
+a <code>left</code> and <code>up</code> movement. After the <code>up</code> movement, the person is once
+again at the top left position, start another walk around the room, etc.</p>
+</div>
+<div class="paragraph">
+<p>There is only one mapping, which controls both the horizontal and vertical
+position of the <code>person</code>. The mapping is similar to the example of a person
+walking on a floor, except that now both the horizontal and vertical movements
+are included. The mapping uses two scaled values, one for the horizontal
+movement, and one for the vertical movement. The format pattern includes both
+values in the output. The first scaled value controls the horizontal movement,
+while the second scaled value controls the vertical movement.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-example-rate">Rate example</h7>
+<div class="paragraph">
+<p>
+
+
+This example shows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The use of literal values in output mappings.</p>
+</li>
+<li>
+<p>How it is best to use simple solutions to solve visualization problems.</p>
+</li>
+</ul>
+</div>
+<div class="sect7">
+<h8 id="tools-svg-image-2">SVG image</h8>
+<div class="paragraph">
+<p>The following SVG image is used for this example:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/rate/rate_inkscape.png" alt="rate inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>The SVG image visualizes a machine as a circle. The rate of the machine is
+visualized as the background of the circle. The higher the rate, the more the
+circle is filled.</p>
+</div>
+<div class="paragraph">
+<p>Instead of working with complicated clippings or linear gradients, we use a
+more simple solution here. The black circle has a transparent background
+(<code>fill</code> attribute set to <code>none</code>). This is the SVG element with id
+<code>circle</code>. Behind it is the same circle (id <code>circle_bg</code>), but without a
+border (<code>stroke</code> attribute set to <code>none</code>), and with a green fill color.
+Between those two circles, is a rectangle (id <code>circle_bg_rect</code>), that at the
+top is aligned to the top of the circle. By changing the height of the circle,
+we can now control what part of the green background circle is obscured by the
+rectangle.</p>
+</div>
+<div class="paragraph">
+<p>During the actual visualization, we&#8217;ll use a white fill color for the
+rectangle. Since the background is also white, this 'hides' the rectangle, and
+makes for a partial green background of the circle. Because a white rectangle
+can not be distinguished from the background, we used a cyan fill color for the
+rectangle. This makes that we can easily edit the rectangle, and see whether it
+has the correct initial position, size, etc.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cif-specification-2">CIF specification</h8>
+<div class="paragraph">
+<p>The following CIF specification models the rate example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Behavior.
+const real MARGIN = 0.01;
+
+automaton machine:
+  cont rate der if rate &lt; target_rate:  1.0
+                else                   -1.0
+                end;
+  disc real target_rate = 0.5;
+  disc dist real rate_sampler = uniform(0.0, 1.0);
+
+  location:
+    initial;
+    edge when rate - MARGIN &lt;= target_rate and target_rate &lt;= rate + MARGIN
+         do (target_rate, rate_sampler) := sample rate_sampler;
+end
+
+// Visualization.
+svgfile "rate.svg";
+
+svgout id "circle_bg_rect" attr "height"
+  value scale(machine.rate, 0, 1, 58, 0);
+
+svgout id "circle_bg_rect" attr "fill" value "white";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This rather artificial machine has a <code>rate</code> at which it produces. The rate
+is a value in the interval [0 .. 1]. A target rate (variable <code>target_rate</code>)
+is randomly chosen in the same interval. The rate is automatically adapted to
+get closer to the target rate. As soon as the rate is close enough to the
+target rate, a new target rate is randomly selected, using the
+<code>rate_sampler</code>, which is a continuous uniform stochastic distribution.</p>
+</div>
+<div class="paragraph">
+<p>The first mapping controls the <code>height</code> of the rectangle. The value of
+variable <code>machine.rate</code> has a value in the interval [0 .. 1]. This interval
+is mapped to the [58 .. 0] pixels interval. That is, if the rate is 0, the
+height of the rectangle is 58 pixels, and it completely covers the background
+of the circle. The circle then appears with a completely white background. If
+the rate is 1, the height of the rectangle is 0, and a completely green
+background is shown. For rates in between 0 and 1, the lower part of the
+background of the circle is green, and the upper part is white.</p>
+</div>
+<div class="paragraph">
+<p>The second mapping sets the <code>fill</code> color of the rectangle to <code>white</code>.</p>
+</div>
+<div class="paragraph">
+<p>The following image shows an example of the visualization of a partial rate:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/rate/rate_partial.png" alt="rate partial">
+</div>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-example-workstation">Workstation example</h7>
+<div class="paragraph">
+<p>
+
+
+
+
+This example shows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Basing the width of an object on the value of a clock in one location, and
+setting it to a fixed value in another location.</p>
+</li>
+<li>
+<p>Changing the fill color of a rectangle based on the current location of an
+automaton.</p>
+</li>
+<li>
+<p>Updating multiple attributes of an SVG element, using multiple output
+mappings.</p>
+</li>
+<li>
+<p>Specifying colors in SVG.</p>
+</li>
+<li>
+<p>Improving scalability by making use of the reuse of mappings.</p>
+</li>
+</ul>
+</div>
+<div class="sect7">
+<h8 id="tools-svg-image-3">SVG image</h8>
+<div class="paragraph">
+<p>The following SVG image is used for this example:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/workstation/workstation_inkscape.png" alt="workstation inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>In the image, two machines are clearly visible. Each machine has a bar that
+shows the progress of the machine. Looking at the
+<b class="menuref">XML Editor</b>
+window, we can see the bar has a background (box), and a foreground (front)
+rectangle. The <code>width</code> and <code>fill</code> color of the latter will be updated to
+reflect the machine&#8217;s status.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cif-specification-3">CIF specification</h8>
+<div class="paragraph">
+<p>The following CIF specification models the workstation example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "workstation.svg";
+
+event generate, transfer, exit;
+
+m1: Machine(1, 1.0, generate, transfer);
+m2: Machine(2, 2.5, transfer, exit);
+
+automaton def Machine(alg int nr; alg real ptime; event start, done):
+  cont t der 1.0;
+
+  location idle:
+    initial;
+    edge start do t := 0.0 goto processing;
+
+  location processing:
+    edge when t &gt;= ptime goto completed;
+
+  location completed:
+    edge done goto idle;
+
+  svgout id "m" + &lt;string&gt;nr + "_bar_front" attr "width"
+    value scale(if processing: t else ptime end, 0, ptime, 0, 130);
+
+  svgout id "m" + &lt;string&gt;nr + "_bar_front" attr "fill"
+    value if idle : "gray" else "dodgerblue" end;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The example models a workstation with two machines. The first machine has a
+processing time of <code>1.0</code> time units and the second machine has a processing
+time of <code>2.5</code> time units. Each machine gets products to <code>start</code> processing,
+processes them, and sends them out as it is <code>done</code>. The first machine gets
+its input from an infinite generator (event <code>generate</code>). The second machine
+sends its finished products to an infinite exit buffer (event <code>exit</code>).
+Products are transported from the first machine to the second machine via a
+transport system (event <code>transfer</code>). Note that the <code>Machine</code> automaton
+definition has three locations. In location <code>idle</code> it is waiting for a
+product to enter the machine (event <code>start</code>). In location <code>processing</code> it
+processes the product, which takes <code>ptime</code> time units. Finally, in location
+<code>completed</code> it has completed processing the product, and waits until it can
+send it as output. After that, the machine is back in the <code>idle</code> location,
+where it waits for the next product.</p>
+</div>
+<div class="paragraph">
+<p>Both machines (<code>m1</code> and <code>m2</code>) are instantiations of the same automaton
+definition (<code>Machine</code>). The definition/instantiation mechanism allows us to
+specify the behavior of a machine only once, and still have multiple machines.
+This reuse improves scalability, as well as maintainability. The reuse of the
+behavior applies to the visualization as well. By declaring the output mappings
+in the automaton definition, we get mappings for each instantiation of an
+actual machine.</p>
+</div>
+<div class="paragraph">
+<p>Since each machine has its own graphical representation in the SVG image, the
+graphical elements for the different machines have different ids as well.
+However, they only differ in the number that is used. For instance, there is
+an <code>m1_bar_front</code> rectangle for the first machine, and an <code>m2_bar_front</code>
+rectangle for the second machine. In order to make sure each machine gets the
+correct mappings that apply to their own ids, we added an algebraic parameter
+<code>nr</code> to the definition of <code>Machine</code>, that indicates to the machine which
+machine it is. We can then use that <code>nr</code> to compute the id. For machine
+<code>m1</code>, the <code>Machine</code> automaton definition is instantiated with value <code>1</code>
+for the <code>nr</code> parameter. The <code>"m" + &lt;string&gt;nr + "_bar_front"</code> id expression
+then evaluates to <code>"m1_bar_front"</code>, and <code>m1_bar_front</code> is used as the id
+for the output mapping.</p>
+</div>
+<div class="paragraph">
+<p>The first mapping updates the width of the <code>m*_bar_front</code> rectangles to show
+the progress of the machines. If a machine is actually <code>processing</code>, the
+value of clock <code>t</code> is used, as that clock indicates how much of the
+processing has been completed.</p>
+</div>
+<div class="paragraph">
+<p>When a machine is <code>idle</code> (and waiting for a product) or has <code>completed</code>
+processing (but can not yet push the processed product out of the machine),
+the progress is either nothing, or everything. In both cases, we choose the
+full processing time (variable <code>ptime</code>) as the value. The reason to choose
+this value for the <code>idle</code> location, becomes clear in the next output mapping.</p>
+</div>
+<div class="paragraph">
+<p>The <code>ptime</code> value is chosen for the <code>completed</code> location to ensure that
+the rectangle does not get wider than the box (rectangle <code>m*_bar_back</code>). If
+we would have used the value of clock <code>t</code> in this location as well, then
+since the value of the clock keeps increasing in that location, the value
+becomes larger than <code>ptime</code>, and thus the progress bar would be partly
+outside the box (rectangle <code>m*_bar_back</code>).</p>
+</div>
+<div class="paragraph">
+<p>The value that is selected for this first mapping, is transformed using the
+<code>scale</code> standard library function. The function is used to scale the
+processing time interval [0 .. <code>ptime</code>] to the [0 .. 130] interval, which
+represents the <code>width</code> of the rectangle in pixels. The upper bound of 130
+pixels matches the <code>width</code> of the box (rectangle <code>m*_bar_back</code>).</p>
+</div>
+<div class="paragraph">
+<p>The second mapping updates the <code>fill</code> color (foreground color) of the same
+SVG element. In the <code>idle</code> location, the color is <code>gray</code>. Since we used the
+full width in that location (value <code>ptime</code> in the [0 .. <code>ptime</code>] interval),
+the entire box is then filled by a gray rectangle, indicating that the machine
+is idle.</p>
+</div>
+<div class="paragraph">
+<p>For the other locations, the <code>fill</code> color is set to <code>dodgerblue</code>. Since the
+width in pixels is a value in the interval [0 .. 30], part of the box will be
+blue, and part will be the background color of the box, which is white. In the
+<code>completed</code> location, the full width is used as well, resulting in a
+completely blue box, indicating that the machine has a completely processed
+product, waiting to be released as output.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-colors-in-svg">Colors in SVG</h8>
+<div class="paragraph">
+<p>In the mappings, as described above, we used names to identify colors. SVG
+however, provides several ways to specify
+<a href="http://www.w3.org/TR/SVG11/types.html#DataTypeColor">colors</a>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="http://www.w3.org/TR/SVG11/types.html#ColorKeywords">Named colors</a>,
+such as <code>red</code>, <code>yellow</code>, <code>lightblue</code> or <code>burlywood</code>.</p>
+</li>
+<li>
+<p>Decimal RGB (red-green-blue) colors, such as <code>rgb(255,0,0)</code> for <code>red</code>, or
+<code>rgb(255,255,0)</code> for <code>yellow</code>.</p>
+</li>
+<li>
+<p>Hexadecimal RGB (red-green-blue) colors, such as <code>#f00</code> or <code>#ff0000</code> for
+<code>red</code>, or <code>#ff0</code> or <code>#ffff00</code> for <code>yellow</code>.</p>
+</li>
+<li>
+<p>RGB (red-green-blue) colors in percentages, such as <code>rgb(100%,0%,0%)</code> for
+<code>red</code>, or <code>rgb(100%,100%,0%)</code> for <code>yellow</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Every color can be specified by one of the three RGB color variants. The colors
+that have a predefined color name, can be specified in four different ways.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-example-tank">Tank example</h7>
+<div class="paragraph">
+<p>
+
+
+
+This example shows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Use of the <code>scale</code> standard library function.</p>
+</li>
+<li>
+<p>The difference between the coordinate systems of <a href="#tools-cifsim-output-svgviz-chapter-inkscape">Inkscape</a>
+and <a href="#tools-cifsim-output-svgviz-chapter-svg">SVG</a>.</p>
+</li>
+<li>
+<p>How inverting the y-axis can reduce the number of output mappings.</p>
+</li>
+</ul>
+</div>
+<div class="sect7">
+<h8 id="tools-svg-image-4">SVG image</h8>
+<div class="paragraph">
+<p>The following SVG image is used for this example:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/tank/tank_inkscape.png" alt="tank inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>The image features a tank (black lines) and the water in the tank (blue
+rectangle). The water rectangle is selected. At the top of the screenshot, you
+see the object&#8217;s position as Inkscape represents it. It shows <code>15</code> for the
+<code>x</code> position, and <code>10</code> for the <code>y</code> position. These values are relative to
+the lower left corner of the canvas. In the
+<b class="menuref">XML Editor</b>
+window, you
+see the position as SVG represents it. It shows <code>15</code> for the <code>x</code> position
+as well, but <code>30</code> for the <code>y</code> position. These values are relative to the
+upper left corner of the canvas. Inkscape and SVG use different coordinate
+systems, where the <code>y</code>-axis is reversed. The CIF/SVG declarations works on
+SVG images, and thus uses the coordinate system of SVG.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cif-specification-4">CIF specification</h8>
+<div class="paragraph">
+<p>The following CIF specification models the tank example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Behavior.
+const real CAPACITY   = 10.0;
+const real MAX_LEVEL  =  8.0;
+const real INIT_LEVEL =  5.0;
+const real MIN_LEVEL  =  2.0;
+
+automaton tank:
+  cont level = INIT_LEVEL;
+
+  location open:
+    initial;
+    equation level' =  1.0;
+    edge when level &gt;= MAX_LEVEL goto closed;
+
+  location closed:
+    equation level' = -1.0;
+    edge when level &lt;= MIN_LEVEL goto open;
+end
+
+// Visualization.
+svgfile "tank.svg";
+
+svgout id "water" attr "height" value scale(tank.level, 0, CAPACITY, 0, 80);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this specification, we have a tank filled with water. Initially, the
+<code>level</code> (height) of the water is <code>5.0</code>, and the valve is <code>open</code>. The
+level linearly increases with a rate of <code>1.0</code> per time unit. Once the level
+is <code>MAX_LEVEL</code>, we close the valve, and go to the <code>closed</code> location. Here
+the level linearly decreases until we reach the minimum level (<code>MIN_LEVEL</code>),
+after which we open the valve again. The level controller keeps the level
+between the minimum and maximum allowed levels.</p>
+</div>
+<div class="paragraph">
+<p>There is only one mapping, and it controls the height of the <code>water</code>
+rectangle. The water level in the model stays between zero and <code>CAPACITY</code>, by
+definition (as a higher level would overflow). This results in an input
+interval of [0 .. <code>CAPACITY</code>]. The height of the tank in the SVG image is
+<code>80</code> pixels. The output interval thus becomes [0 .. 80].</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-simulation-2">Simulation</h8>
+<div class="paragraph">
+<p>When we simulate the tank example using the CIF specification and SVG image
+as specified above, we immediately observe a problem:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/tank/tank_problem.png" alt="tank problem">
+</div>
+</div>
+<div class="paragraph">
+<p>In SVG the origin is in the upper left corner of the canvas. Changing the
+height of an object results in the top of the object being fixed, and the
+bottom of the object being closer to or farther away from that top. What we
+want in this case, is to have the bottom of the object fixed, and the top of
+the object being closer to or farther away from the top, depending on the
+height of the object.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-svg-image-revisited">SVG image (revisited)</h8>
+<div class="paragraph">
+<p>A naive solution would be to add a second output mapping, to correct the
+vertical position (<code>y</code> attribute) of the <code>water</code> rectangle. This is a valid
+solution, and it works. There is however a simpler and more elegant solution.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following, updated SVG image:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/tank/tank2_inkscape.png" alt="tank2 inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>This SVG image is the same as the original SVG image for this example, but with
+an inverted <code>y</code>-axis, for the <code>water</code> rectangle. The <code>y</code>-axis was
+inverted by using the
+<b class="menuref">Flip Vertical</b>
+command from Inkscape&#8217;s
+<b class="menuref">Object</b>
+menu, while the <code>water</code> rectangle was selected. As can be
+seen in the screenshot, Inkscape corrects for the applied transformation, and
+still indicates the same <code>x</code> and <code>y</code> coordinates (at the top of the
+screenshot). In SVG (and thus the
+<b class="menuref">XML Editor</b>
+window), we see a new
+<code>transform</code> attribute, <code>scale(1,-1)</code> as value, which represents the
+inversion of the <code>y</code>-axis. Also, the bottom of the water (the inverted top of
+the water) is now <code>90</code> pixels (the inverted <code>-90</code> value of the <code>y</code>
+attribute) from the top of the image. Using this vertical flip, we now fixated
+the 'bottom' of the water, and we can thus change the height of the water
+without having to correct its position. The mappings for this modified SVG
+image are the same as the original mappings.</p>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-example-lamps">Lamps example</h7>
+<div class="paragraph">
+<p>
+
+
+
+This example shows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Scalability of CIF models and SVG visualizations.</p>
+</li>
+<li>
+<p>The use of <a href="#tools-cifsim-output-svgviz-chapter-svgcopy">CIF/SVG copy declarations</a>.</p>
+</li>
+<li>
+<p>The use of <a href="#tools-cifsim-output-svgviz-chapter-svgmove">CIF/SVG move declarations</a>.</p>
+</li>
+</ul>
+</div>
+<div class="sect7">
+<h8 id="tools-introducing-the-lamps-example">Introducing the lamps example</h8>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">// Behavior.
+automaton def Lamp():
+  event toggle;
+  disc bool on = false;
+
+  location:
+    initial;
+    edge toggle do on := not on;
+end
+
+lamp1: Lamp();
+lamp2: Lamp();
+
+// Visualization.
+svgfile "lamps2.svg";
+
+svgout id "lamp1" attr "fill" value if lamp1.on: "yellow" else "silver" end;
+svgout id "lamp2" attr "fill" value if lamp2.on: "yellow" else "silver" end;
+
+svgout id "lamp1" attr "stroke-width" value if lamp1.on: 5 else 2 end;
+svgout id "lamp2" attr "stroke-width" value if lamp2.on: 5 else 2 end;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification has two lamps, <code>lamp1</code> and <code>lamp2</code>. Both lamps have
+identical behavior, and therefore the behavior is only specified once, using
+automaton definition <code>Lamp</code>. This definition is instantiated two times, once
+for each of the lamps. A lamp is initially off, can go on, go off again, go on
+again, etc. The following SVG image is used for this example:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/lamps/lamps2_inkscape.png" alt="lamps2 inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>The visualization shows the two lamps. The first lamp is off, and has a silver
+background color. The second lamp is on and has a yellow background color. The
+lamp that is off has a thin border and the lamp that is on has a thicker
+border. The CIF specification also contains four
+<a href="#tools-cifsim-output-svgviz-chapter-svgout">CIF/SVG output mappings</a>, two for
+the background colors of the circles and two for the thickness of the borders
+(strokes) of the circles.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-svg-visualization-scalability-issues">SVG visualization scalability issues</h8>
+<div class="paragraph">
+<p>The use of the automaton definition allows us to add another lamp by simply
+adding the following line to the CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">lamp3: Lamp();</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This single line ensures that we have a third lamp, with the corresponding
+behavior. However, we also need to adapt the SVG image, by adding another
+circle, and we need to add two more output mappings to the CIF model. In this
+case, the additional amount of work is manageable. If however our lamp would
+have been represented in the image by many different graphical elements,
+adding another lamp would require copying all those graphical elements, and
+might also lead to adding many more output mappings per lamp.</p>
+</div>
+<div class="paragraph">
+<p>Furthermore, if we were to decide to change the graphical representation of
+lamps from a circle to a square, we would have to change the graphical
+representation of each of the lamps in the image.</p>
+</div>
+<div class="paragraph">
+<p>It should be clear that this approach does not scale very well. Ideally, we
+would add another lamp by just adding another instantiation of the <code>Lamp</code>
+definition as we did above, and automatically get another circle in the image,
+and two more output mappings in the CIF model.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-a-scalable-solution">A scalable solution</h8>
+<div class="paragraph">
+<p>For the behavior of the lamp, we already had a scalable solution, by using the
+component definition/instantiation mechanism. That same mechanism can be used
+to make the image and mappings scalable. First, we&#8217;ll change the SVG image:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/lamps/lamps3_inkscape.png" alt="lamps3 inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>The second lamp has been removed from the image. We only keep one lamp, as a
+sort of template for all the lamps. Since we want to use the same graphical
+representation for all lamps, we only want to include it once in the SVG image.
+This allows us to change the graphical representation of the template, to have
+all the lamps change appearance at once. The lamp has been moved outside of the
+visible part of the canvas, and its <code>id</code> has been changed from <code>lamp1</code> to
+<code>lamp</code>. The reason for these last two changes will become clear once we look
+at the new CIF model, and especially the new output mappings:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "lamps3.svg";
+
+automaton def Lamp(alg int nr):
+  // Behavior.
+  event toggle;
+  disc bool on = false;
+
+  location:
+    initial;
+    edge toggle do on := not on;
+
+  // Visualization.
+  svgcopy id "lamp" post &lt;string&gt;nr;
+
+  svgmove id "lamp" + &lt;string&gt;nr to 20 + (nr - 1) * 100, 20;
+
+  svgout id "lamp" + &lt;string&gt;nr attr "fill"
+    value if on: "yellow" else "silver" end;
+
+  svgout id "lamp" + &lt;string&gt;nr attr "stroke-width"
+    value if on: 5 else 2 end;
+end
+
+lamp1: Lamp(1);
+lamp2: Lamp(2);
+lamp3: Lamp(3);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first change is that the <code>Lamp</code> automaton definition now has a <code>nr</code>
+parameter, that indicates which lamp it is. Each lamp is given a different
+number when instantiated. This allows the lamp automata to know their own
+identity, and use that for the SVG visualization.</p>
+</div>
+<div class="paragraph">
+<p>We also put the CIF/SVG declarations for the visualization inside the automaton
+definition. By doing this, we ensure that each instantiation (each lamp) gets
+their own version of these declarations.</p>
+</div>
+<div class="paragraph">
+<p>The CIF/SVG declarations have changed as well. A
+<a href="#tools-cifsim-output-svgviz-chapter-svgcopy">CIF/SVG copy declaration</a> has been added. The copy
+declaration states that the SVG element with id <code>lamp</code> (the circle) should
+be copied. It also states that the copy should be postfixed with
+<code>&lt;string&gt;nr</code>. That is, for automaton <code>lamp1</code>, the value of the <code>nr</code>
+parameter is <code>1</code>, and the id is thus postfixed with <code>"1"</code>. In other words,
+circle <code>lamp</code> is copied, and the copy is given name <code>lamp1</code> (composed
+from <code>lamp</code> and <code>1</code>). For <code>lamp2</code>, the id of the copied circle is
+<code>lamp2</code>, etc. For each of the lamps, the copy gets a different name, that is
+unique within the SVG image. This single copy declaration takes care of the
+scalability of the SVG image, by ensuring we have exactly as many circles as we
+have lamps (not counting the template circle <code>lamp</code>).</p>
+</div>
+<div class="paragraph">
+<p>The copies of the template circle all get exactly the same attributes as the
+template (except for their <code>id</code> attribute). As such, they are all positioned
+outside the visible part of the canvas. The easiest way to put them at the
+correct positions, is to use a
+<a href="#tools-cifsim-output-svgviz-chapter-svgmove">CIF/SVG move declaration</a>, which
+is also new compared to the previous CIF model. The move declarations use the
+ids of the copied circles, so that each move declaration moves the circle for
+that specific lamp. They are all moved to 20 pixels from the top of the canvas,
+and '20 + (<code>nr</code> - 1) * 100' pixels from the left side of the canvas. So, the
+first lamp (<code>nr</code> 1) is moved to (20, 20), the second lamp (<code>nr</code> 2) is moved
+to (120, 20), and the third lamp (<code>nr</code> 3) is moved to (220, 20). This single
+move declaration takes care of the scalability of the positions of the lamps,
+by ensuring we have exactly as many movements as we have lamps. By using the
+<code>nr</code> parameter, each lamp can easily be moved to their own unique position.</p>
+</div>
+<div class="paragraph">
+<p>The output mappings for the background color of the circles and thickness of
+the borders of the circles, are very similar to the output mappings of the
+first version of the CIF model, though there are a few changes. The mappings
+use the same method as the move declaration, to construct the ids. Since the
+mappings are now defined within the automaton definition, they can directly
+refer to the <code>on</code> variable. This ensures that for each different lamp, the
+mappings refer to the <code>on</code> variable of that specific lamp. We now have only
+one output mapping for the background color, and also only one output mapping
+for the thickness of the border.</p>
+</div>
+<div class="paragraph">
+<p>By putting the CIF/SVG declarations inside the automaton definition, and by
+using the copy and move declarations, we now have a scalable solution. We only
+have one lamp in our SVG image, only one behavioral specification in the CIF
+model, and only one output mapping per attribute that we want to couple. No
+matter how many instantiations of the <code>Lamp</code> automaton definition we add, we
+don&#8217;t have to manually change the SVG image or the visualization coupling.</p>
+</div>
+<div class="paragraph">
+<p>For completeness, take a look at this CIF model after the
+<a href="#tools-cif2cif-chapter-elim-comp-def-inst">elimination of component definition/instantiation</a>, the
+<a href="#tools-cif2cif-chapter-elim-alg-vars">elimination of algebraic variables</a>, and
+the <a href="#tools-cif2cif-chapter-simplify-values">simplification of values</a>.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton lamp1:
+  event toggle;
+  disc bool on = false;
+  svgcopy id "lamp" post "1";
+  svgmove id "lamp1" to 20, 20;
+  svgout id "lamp1" attr "fill" value if on: "yellow" else "silver" end;
+  svgout id "lamp1" attr "stroke-width" value if on: 5 else 2 end;
+  location:
+    initial;
+    edge toggle do on := not on;
+end
+automaton lamp2:
+  event toggle;
+  disc bool on = false;
+  svgcopy id "lamp" post "2";
+  svgmove id "lamp2" to 120, 20;
+  svgout id "lamp2" attr "fill" value if on: "yellow" else "silver" end;
+  svgout id "lamp2" attr "stroke-width" value if on: 5 else 2 end;
+  location:
+    initial;
+    edge toggle do on := not on;
+end
+automaton lamp3:
+  event toggle;
+  disc bool on = false;
+  svgcopy id "lamp" post "3";
+  svgmove id "lamp3" to 220, 20;
+  svgout id "lamp3" attr "fill" value if on: "yellow" else "silver" end;
+  svgout id "lamp3" attr "stroke-width" value if on: 5 else 2 end;
+  location:
+    initial;
+    edge toggle do on := not on;
+end
+svgfile "lamps3.svg";</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-svgviz-chapter-example-buffers-products">Buffers/products example</h7>
+<div class="paragraph">
+<p>
+
+
+This example shows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Improving hierarchical scalability by making use of the reuse of mappings.</p>
+</li>
+<li>
+<p>Improving hierarchical scalability by making copies of copied elements.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>It is assumed the reader is already familiar with the
+<a href="#tools-cifsim-output-svgviz-chapter-example-workstation">workstation example</a>.</p>
+</div>
+<div class="sect7">
+<h8 id="tools-svg-image-5">SVG image</h8>
+<div class="paragraph">
+<p>The following SVG image is used for this example:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/buffers_products/buffers_products_inkscape.png" alt="buffers products inkscape">
+</div>
+</div>
+<div class="paragraph">
+<p>The SVG image contains a single template for a buffer (large rectangle), with
+one product (small rectangle). The template is moved outside of the canvas to
+ensure the template itself is not shown.</p>
+</div>
+<div class="paragraph">
+<p>The SVG file has the following XML content:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-svg" data-lang="svg">&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
+&lt;svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="220" height="70" id="root" version="1.1"&gt;
+  &lt;g id="buffer"&gt;
+    &lt;rect width="100" height="50" x="-120" y="10" id="background" style="fill:#ff0000"/&gt;
+    &lt;rect width="10"  height="30" x="-110" y="20" id="product"    style="fill:#8b0000;visibility:hidden;"/&gt;
+  &lt;/g&gt;
+&lt;/svg&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>We&#8217;ll use CIF to turn this into two buffers with three products each, in a
+scalable manner. That is, to add a single buffer, we only need one more
+instantiation, and also to put an additional product in each buffer, we also
+only need one more instantiation.</p>
+</div>
+</div>
+<div class="sect7">
+<h8 id="tools-cif-specification-5">CIF specification</h8>
+<div class="paragraph">
+<p>The following CIF specification models the buffers/products example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "buffers_products.svg";
+
+buffer0: Buffer(0);
+buffer1: Buffer(1);
+
+group def Buffer(alg int nr):
+  svgcopy id "buffer" post &lt;string&gt;nr;
+
+  svgmove id "buffer" + &lt;string&gt;nr to 10 + nr * 110, 10;
+
+  product0: Product(nr, 0);
+  product1: Product(nr, 1);
+  product2: Product(nr, 2);
+end
+
+group def Product(alg int bufferNr, productNr):
+  svgcopy id "product" + &lt;string&gt;bufferNr post "_" + &lt;string&gt;productNr;
+
+  svgout id fmt("product%d_%d", bufferNr, productNr)
+         attr "transform"
+         value fmt("translate(%d,0)", productNr * 20);
+
+  svgout id fmt("product%d_%d", bufferNr, productNr)
+         attr "visibility"
+         value "visible";
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Two buffers are present (<code>buffer0</code> and <code>buffer1</code>). Both are instances of
+the <code>Buffer</code> definition, and are provided with their own identity (parameter
+<code>nr</code>). For each buffer, the <code>buffer</code> element of the image is copied, and
+the copy is given a unique number. For instance, for instantiation <code>buffer0</code>,
+<code>nr</code> is <code>0</code>, and thus <code>buffer</code> is copied to <code>buffer0</code>, <code>background</code>
+is copied to <code>background0</code> and <code>product</code> is copied to <code>product0</code>.</p>
+</div>
+<div class="paragraph">
+<p>Each buffer is also moved. The first buffer (<code>nr</code> <code>0</code>) gets moved to
+position (10, 10), while the second (<code>nr</code> <code>1</code>) gets moved to position
+(120, 10).</p>
+</div>
+<div class="paragraph">
+<p>Each buffer contains three products, as the <code>Product</code> definition is
+instantiated three times. The number of the buffer is passed along, as is a
+unique product number. For the copy of the products, the copy of the product
+in the copied buffer is copied, and given a unique name using the product
+number. For <code>buffer0</code>, the copy of the <code>product</code> was already named
+<code>product0</code>. This already copied element is copied another three times, to
+<code>product0_0</code> (by the copy declaration in CIF group <code>buffer0.product0</code>),
+<code>product0_1</code> (by the copy declaration in CIF group <code>buffer0.product1</code>),
+and <code>product0_2</code> (by the copy declaration in CIF group <code>buffer0.product2</code>).
+Similarly, three copies are made for <code>buffer1</code>.</p>
+</div>
+<div class="paragraph">
+<p>Unlike the buffers, which are moved to an absolute position using an
+<code>svgmove</code>, the products are moved relatively, using an <code>svgout</code> for their
+<code>transform</code> attribute. The first product (<code>product0_0</code>) is not moved, the
+second product (<code>product0_1</code>) is moved <code>20</code> pixels, etc.</p>
+</div>
+<div class="paragraph">
+<p>The buffer template was put outside of the canvas to show only the copies and
+not the template. For the products, which are contained in the buffers, this
+trick is not possible. So, instead the <code>visibility</code> of the template
+<code>product</code> was set to <code>hidden</code> in the original SVG image. To show the actual
+(copied) products, an <code>svgout</code> is used to set the <code>visibility</code> attribute
+to <code>visible</code>. The template <code>product</code> is not changed, so it remains hidden.</p>
+</div>
+<div class="paragraph">
+<p>The result of all this hierarchical 2-level structure is the following SVG
+image:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/svgviz/buffers_products/buffers_products.png" alt="buffers products">
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-output-chapter-trajdata">Trajectory data output</h6>
+<div class="paragraph">
+<p>
+
+
+The trajectory data (values of the variables as time progresses), calculated
+by the <a href="#tools-cifsim-solver-chapter-index">ode solver</a>, can be written to a
+file, using the trajectory data output component.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div id="tools-cifsim-output-trajdata-option" class="paragraph">
+<p>Enable the
+<b class="menuref">Trajectory data</b>
+option (<b class="menuref">Output: Trajectory data</b>
+category) to enable writing the trajectory data to a file.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="tools-cifsim-output-trajdata-file" class="paragraph">
+<p>By default, the file to which to write the trajectory data, is the name of the
+input specification file, with <code>.trajdata</code> added to it. Using the
+<b class="menuref">Trajectory data file</b>
+option (<b class="menuref">Output: Trajectory data</b>
+category), a different file can be specified. The value of the option is the
+absolute or relative local file system path to use for the trajectory data
+file.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect6">
+<h7 id="tools-filtering">Filtering</h7>
+<div class="paragraph">
+<p>Variable <code>time</code> is always included in the trajectory data file. The following
+additional variables (officially 'state objects') are included by default:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The state variables, which includes the discrete variables and the continuous
+variables.</p>
+</li>
+<li>
+<p>The derivatives of the continuous variables. This does not include the
+derivative of variable <code>time</code>.</p>
+</li>
+<li>
+<p>The algebraic variables.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Only variables of type <code>bool</code>, <code>int</code> (with or without ranges), or <code>real</code>
+are included.</p>
+</div>
+<div id="tools-cifsim-output-trajdata-filters" class="paragraph">
+<p>Using the
+<b class="menuref">Trajectory data filters</b>
+option
+(<b class="menuref">Output: Trajectory data</b>
+category), the state objects can be
+filtered. The
+<b class="menuref">Trajectory data filters</b>
+option only has effect
+if trajectory data output is enabled, using the
+<b class="menuref">Trajectory data</b>
+option.</p>
+</div>
+<div class="paragraph">
+<p>As value for the option, comma separated <em>filters</em> should be supplied. Each
+filter specifies one or more state objects. The absolute names of the objects
+are used. That is, for an automaton <code>a</code>, with a variable <code>x</code>, the absolute
+name of the variable object is <code>a.x</code>. If CIF textual syntax keyword are
+used as names for events (such as <code>plant</code>), then they must be escaped in
+<code>.cif</code> files (<code>$plant</code>). For filters however, all escape characters (<code>$</code>)
+in the names are ignored. The <code>*</code> character can be used as wildcard, to
+indicate zero or more characters. If a filter doesn&#8217;t match any of the state
+objects of the CIF model (after filtering them for supported types etc), a
+warning is printed to the console. A warning is also printed if the entire
+state is filtered out.</p>
+</div>
+<div class="paragraph">
+<p>By default, filters include matching state objects. Filters may however be
+preceded by a <code>-</code> character, turning them into exclusion filters, which
+exclude matching states objects rather than including them. Filters are
+processed in the order they are specified, allowing for alternating additions
+and removals. If a filter does not result in the addition/removal of any state
+objects to/from the filter result, a warning is printed to the console.</p>
+</div>
+<div class="paragraph">
+<p>As an example, option value <code>a.*,-a.b*,a.bc*</code> consists of three filters:
+<code>a.*</code>, <code>-a.b*</code>, and <code>a.bc*</code>. The first filter indicates that state
+objects whose absolute names start with <code>a.</code> are to be included. The second
+filter indicates that from those matching state objects, the state objects
+whose absolute names start with <code>a.b*</code> are to be excluded. To that result,
+the third filter adds those state objects whose absolute names start with
+<code>a.bc*</code>. For instance, if a specification contains state objects <code>time</code>,
+<code>a.a</code>, <code>a.b</code> <code>a.bb</code>, <code>a.bc</code>, <code>a.b.c</code>, <code>a.bc</code>, <code>a.bcc</code>, and
+<code>a.bcd</code>, the result of the three filters is that the following state objects
+are displayed: <code>a.a</code>, <code>a.bc</code>, <code>a.bc</code>, <code>a.bcc</code>, and <code>a.bcd</code>.</p>
+</div>
+<div class="paragraph">
+<p>The default option value (filter) is <code>*</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-output">Output</h7>
+<div class="paragraph">
+<p>
+The variables are sorted alphabetically, based on their absolute names. The
+only exception is variable <code>time</code>, which is always listed first.</p>
+</div>
+<div class="paragraph">
+<p>For variables with a boolean type, value <code>false</code> is represented by <code>0</code>, and
+value <code>true</code> is represented by <code>1</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+For each time transition, the trajectories of the variables are printed to the
+trajectory data file. The first line is a comment, and contains the names of
+the variables. Each of the subsequent lines contain the values of the variables
+for a specific value of variable <code>time</code>. The exact times for which the
+values are printed to the trajectory data file, is determined by the
+<a href="#tools-cifsim-solver-chapter-basics-int">ODE solver integrator</a>, and can be
+influenced using the <a href="#tools-cifsim-solver-chapter-options">integration options</a>,
+as well as the <a href="#tools-cifsim-solver-chapter-options-outstep">fixed output step size</a> option.</p>
+</div>
+<div class="paragraph">
+<p>An example of a trajectory data file, for a single time transition:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code># time controller.n tank.V tank.V' tank.Qi tank.Qo
+0.0 0 10.0 -3.1622776601683795 0.0 3.1622776601683795
+0.08763429266802605 0 9.7247959763441 -3.1184605138343664 0.0 3.1184605138343664
+0.587634292668026 0 8.228065719426915 -2.868460513834366 0.0 2.868460513834366
+1.087634292668026 0 6.8563354625097315 -2.618460513834366 0.0 2.618460513834366
+1.587634292668026 0 5.609605205592543 -2.3684605138343646 0.0 2.3684605138343646
+2.0876342926680262 0 4.487874948675351 -2.1184605138343624 0.0 2.1184605138343624
+2.5876342926680262 0 3.491144691758149 -1.8684605138343569 0.0 1.8684605138343569
+3.0876342926680262 0 2.619414434840913 -1.618460513834339 0.0 1.618460513834339
+3.496128195593086 0 1.9999999999999958 -1.4142135623730936 0.0 1.4142135623730936</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-trajdata-prettify">Prettifying</h7>
+<div class="paragraph">
+<p>To make the output in the trajectory data file easier to read, the output
+can be <em>prettified</em>. If prettifying is enabled, then after the simulation ends,
+the trajectory data file is read, prettified, and rewritten. A fixed width is
+then used for each column (each variable), with a fixed column separation.
+After prettification, the above trajectory data file looks like this:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code># time                controller.n   tank.V               tank.V'               tank.Qi   tank.Qo
+0.0                   0              10.0                 -3.1622776601683795   0.0       3.1622776601683795
+0.08763429266802605   0              9.7247959763441      -3.1184605138343664   0.0       3.1184605138343664
+0.587634292668026     0              8.228065719426915    -2.868460513834366    0.0       2.868460513834366
+1.087634292668026     0              6.8563354625097315   -2.618460513834366    0.0       2.618460513834366
+1.587634292668026     0              5.609605205592543    -2.3684605138343646   0.0       2.3684605138343646
+2.0876342926680262    0              4.487874948675351    -2.1184605138343624   0.0       2.1184605138343624
+2.5876342926680262    0              3.491144691758149    -1.8684605138343569   0.0       1.8684605138343569
+3.0876342926680262    0              2.619414434840913    -1.618460513834339    0.0       1.618460513834339
+3.496128195593086     0              1.9999999999999958   -1.4142135623730936   0.0       1.4142135623730936</code></pre>
+</div>
+</div>
+<div id="tools-cifsim-output-trajdata-sep" class="paragraph">
+<p>By default, the trajectory data output is prettified using a column separation
+of three spaces. This can be changed using the
+<b class="menuref">Trajectory data separation amount</b>
+option
+(<b class="menuref">Output: Trajectory data</b>
+category). Using this option,
+prettification can be disabled, or a different number of spaces can be used
+between the columns.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-undoreset-4">Undo/reset</h7>
+<div class="paragraph">
+<p>It is possible to go back in time, by
+<a href="#tools-cifsim-input-history-reset-undo">undoing</a> one or more transitions, or
+by <a href="#tools-cifsim-input-history-reset-undo">resetting</a> the simulation.
+However, once a time transition is taken, trajectory data is written to the
+output file. The simulator does not remove data for time points that are then
+suddenly in the future. If simulation continues after the undo or reset, new
+data may be written at the end of the trajectory, for the same time points that
+were already present earlier in the data file. As such, the data contained in
+the trajectory data file, may no longer be useful after an undo or reset, if
+simulation continues afterwards.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-output-chapter-plotviz">Plot visualizer</h6>
+<div class="paragraph">
+<p>
+
+
+For models with variables, especially continuous ones, it may be useful to be
+able to observe how their values change, as time progresses during simulation.
+The <em>plot visualizer</em> can be used for that exact purpose. The plot visualizer
+can create graphical plots, where the x-axis represents the values of variable
+<code>time</code>, and the y-axis represents values of the variables being plotted. Here
+is an example screenshot of the visualizer:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/plotviz_sshot.png" alt="plotviz sshot">
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div id="tools-cifsim-output-plotviz-option" class="paragraph">
+<p>Plot visualization is disabled by default. It can be enabled using the
+<b class="menuref">Plot visualization</b>
+option (<b class="menuref">Output: Plot visualization</b>
+category).</p>
+</div>
+<div class="sect6">
+<h7 id="tools-variables">Variables</h7>
+<div class="paragraph">
+<p>The plot visualizer can plot the values of the following variables (officially
+'state objects'):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The state variables, which includes the discrete variables and the continuous
+variables.</p>
+</li>
+<li>
+<p>The derivatives of the continuous variables. This does not include the
+derivative of variable <code>time</code>.</p>
+</li>
+<li>
+<p>The algebraic variables.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Only variables of type <code>bool</code>, <code>int</code> (with or without ranges), or <code>real</code>
+can be plotted. For variables with a boolean type, value <code>false</code> is
+represented by <code>0</code>, and value <code>true</code> is represented by <code>1</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-plotviz-filtering">Filtering</h7>
+<div class="paragraph">
+<p>By default, if plot visualization is enabled, all variables (officially
+'state objects') that can be plotted are plotted. The one exception is variable
+<code>time</code>, which is excluded by default, as it already represents the x-axis.
+That is, variables are plotted against time. Using the
+<b class="menuref">Plot visualization filters</b>
+option
+(<b class="menuref">Output: Plot visualization</b>
+category), the state objects can
+be filtered. The
+<b class="menuref">Plot visualization filters</b>
+option only has effect
+if plot visualization is enabled, using the
+<b class="menuref">Plot visualization</b>
+option.</p>
+</div>
+<div class="paragraph">
+<p>As value for the option, comma separated <em>filters</em> should be supplied. Each
+filter specifies one or more state objects. The absolute names of the objects
+are used. That is, for an automaton <code>a</code>, with a variable <code>x</code>, the absolute
+name of the variable object is <code>a.x</code>. If CIF textual syntax keyword are
+used as names for events (such as <code>plant</code>), then they must be escaped in
+<code>.cif</code> files (<code>$plant</code>). For filters however, all escape characters (<code>$</code>)
+in the names are ignored. The <code>*</code> character can be used as wildcard, to
+indicate zero or more characters. If a filter doesn&#8217;t match any of the state
+objects of the CIF model, a warning is printed to the console. A warning is
+also printed if the entire state is filtered out.</p>
+</div>
+<div class="paragraph">
+<p>By default, filters include matching state objects. Filters may however be
+preceded by a <code>-</code> character, turning them into exclusion filters, which
+exclude matching states objects rather than including them. Filters are
+processed in the order they are specified, allowing for alternating additions
+and removals. If a filter does not result in the addition/removal of any state
+objects to/from the filter result, a warning is printed to the console.</p>
+</div>
+<div class="paragraph">
+<p>As an example, option value <code>a.*,-a.b*,a.bc*</code> consists of three filters:
+<code>a.*</code>, <code>-a.b*</code>, and <code>a.bc*</code>. The first filter indicates that state
+objects whose absolute names start with <code>a.</code> are to be included. The second
+filter indicates that from those matching state objects, the state objects
+whose absolute names start with <code>a.b*</code> are to be excluded. To that result,
+the third filter adds those state objects whose absolute names start with
+<code>a.bc*</code>. For instance, if a specification contains state objects <code>time</code>,
+<code>a.a</code>, <code>a.b</code> <code>a.bb</code>, <code>a.bc</code>, <code>a.b.c</code>, <code>a.bc</code>, <code>a.bcc</code>, and
+<code>a.bcd</code>, the result of the three filters is that the following state objects
+are displayed: <code>a.a</code>, <code>a.bc</code>, <code>a.bc</code>, <code>a.bcc</code>, and <code>a.bcd</code>.</p>
+</div>
+<div class="paragraph">
+<p>The default option value (filter) is <code>*,-time</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-multiple-plot-visualizers">Multiple plot visualizers</h7>
+<div class="paragraph">
+<p>By default, only one visualizer is shown. However, using the
+<b class="menuref">Plot visualization filters</b>
+option
+(<b class="menuref">Output: Plot visualization</b>
+category), it is possible to specify
+that multiple visualizers should be used. The option allows for filtering of
+the state objects, as described above. However, such filters can be separated
+by semicolons, to specify the filters per visualizer.</p>
+</div>
+<div class="paragraph">
+<p>As an example, consider option value <code>time,a.x;b.y</code>. This results in two
+plot visualizers. The first one displays state objects <code>time</code> and <code>a.x</code>,
+while the second one displays state object <code>b.y</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-plotviz-mode">Plot visualization modes</h7>
+<div class="paragraph">
+<p>There are two plot visualization modes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Live plotting. In this mode, the plots are shown at the start of the
+simulation, and are continuously updated as new data becomes available during
+simulation.</p>
+</li>
+<li>
+<p>Postponed plotting. In this mode, the plots are shown after the simulation
+has <a href="#tools-cifsim-chapter-termination">ended</a>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Which plot visualization mode to use, can be configured using the
+<b class="menuref">Plot visualization mode</b>
+option
+(<b class="menuref">Output: Plot visualization</b>
+category). Using that option it is
+possible to explicitly choose one of the modes. By default, an automatic mode
+is used, which chooses between live and postponed mode, as follows:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top"><a href="#tools-cifsim-input-chapter-index">Input mode</a> vs <a href="#tools-cifsim-output-chapter-realtime">real-time simulation</a></th>
+<th class="tableblock halign-left valign-top">Real-time enabled</th>
+<th class="tableblock halign-left valign-top">Real-time disabled</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-input-chapter-console">Interactive console input mode</a> (pure interactive)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">live</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">live</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-input-chapter-console">Interactive console input mode</a> (<a href="#tools-cifsim-input-chapter-semi-automatic">semi-automatic</a>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">live</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">postponed</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-input-chapter-gui">Interactive GUI input mode</a> (pure interactive)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">live</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">live</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-input-chapter-gui">Interactive GUI input mode</a> (<a href="#tools-cifsim-input-chapter-semi-automatic">semi-automatic</a>)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">live</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">postponed</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-input-chapter-automatic">Automatic input mode</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">live</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">postponed</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-input-chapter-trace">Trace input mode</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">live</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">postponed</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-input-svg-chapter-index">SVG input mode</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">live</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">postponed</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>When doing a non real-time simulation, using a non-interactive input mode leads
+to as fast as possible simulation, where a lot of data points are calculated in
+a short amount of time. If live plotting mode is then enabled, this floods the
+visualizer with so much data that it can&#8217;t keep up. The effect is a
+non-responsive user interface. While the automatic default can thus be
+overridden using the option, it is generally not recommended.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-plotviz-range">Plot visualization range</h7>
+<div class="paragraph">
+<p>For simulations that span longer periods of (model) time, there may be too
+much data to display, for the limited width of the time axis (x-axis). To keep
+the plot useful, the range of time values to display on the x-axis can be
+configured using the
+<b class="menuref">Plot visualization range</b>
+option
+(<b class="menuref">Output: Plot visualization</b>
+category).</p>
+</div>
+<div class="paragraph">
+<p>By default, only the <code>50</code> most recent time units are displayed. That is, if
+the current model time is <code>120</code>, then the plot only shows the values of the
+variables from time <code>70</code> to time <code>120</code>. Using the option, the length of the
+range can configured to any other positive value. The option can also be used
+to set the range to infinite, to display the values of the variables during
+the entire simulation, from time <code>0</code> to the current model time.</p>
+</div>
+<div class="paragraph">
+<p>For long running simulations, with lots variables, using an infinite range can
+lead to large numbers of data points, which can have a significant effect on
+performance. This applies especially for live plotting mode.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-plotviz-data">Data points</h7>
+<div class="paragraph">
+<p>This section describes which data points are visualized. For most users, this
+will be of little interest, as it essentially works as you would expect.</p>
+</div>
+<div class="paragraph">
+<p>The plot visualizer adds data points (a <code>time</code> value and a value of a
+variable at that time) for all variables, for the following
+<a href="#tools-cifsim-traces-state">states</a>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The initial state of the simulation.</p>
+</li>
+<li>
+<p>The start state of every time transition.</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-realtime-frames">Intermediate states</a> of time
+transitions, only if real-time simulation is enabled.</p>
+</li>
+<li>
+<p>Trajectory data points of time transitions, only if real-time simulation is
+disabled.</p>
+</li>
+<li>
+<p>The end state of every time transition.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For real-time simulation, the amount of model time between two intermediate
+states is the <a href="#tools-cifsim-output-realtime-delta">model time delta</a>,
+and can be influenced using the
+<a href="#tools-cifsim-output-realtime-framerate">frame rate</a> and
+<a href="#tools-cifsim-output-realtime-simspeed">simulation speed</a>.</p>
+</div>
+<div class="paragraph">
+<p>For non real-time simulation, the trajectory data points are determined by the
+<a href="#tools-cifsim-solver-chapter-basics-int">ODE solver integrator</a>, and can be
+influenced using the <a href="#tools-cifsim-solver-chapter-options">integration options</a>,
+as well as the <a href="#tools-cifsim-solver-chapter-options-outstep">fixed output step size</a> option.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-plotviz-trajdata-relation">Relation to trajectory data output</h7>
+<div class="paragraph">
+<p>The plot visualizer can be used for simple plotting. It can be customized a bit
+through options, as described above. However, the level of customization is
+somewhat limited. For instance, the appearance can not be customized. This is
+intentional.</p>
+</div>
+<div class="paragraph">
+<p>If further customization is required, use the
+<a href="#tools-cifsim-output-chapter-trajdata">trajectory data output component</a>
+instead. It allows saving the data to a file, for further processing with
+external tools, such as
+<a href="http://www.r-project.org/">R</a>.</p>
+</div>
+<div class="paragraph">
+<p>Such post processing is then performed after the simulation has
+<a href="#tools-cifsim-chapter-termination">ended</a>. A benefit of the plot visualizer, is
+that it allows live plotting mode, without the need of post processing, and
+which can be enabled with little effort. The plot visualizer is meant to be
+used only to get a basic understanding of how values of variables change as
+time progresses.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-plotviz-trajdata-save">Saving a plot image</h7>
+<div class="paragraph">
+<p>The plot visualizer can export the currently visible plot to several different
+image formats. To export the image, first make sure that the plot visualizer
+has the focus. Then select <span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Save As&#8230;&#8203;</b></span> to open the
+<b class="menuref">Save plot as</b>
+dialog. Alternatively, right click the plot itself,
+and choose
+<b class="menuref">Save As&#8230;&#8203;</b>
+from the popup menu, to open the
+<b class="menuref">Save plot as</b>
+dialog. In the dialog, specify the file name of the
+exported image. Click
+<b class="button">OK</b>
+to confirm and continue.</p>
+</div>
+<div class="paragraph">
+<p>A second dialog appears, in which the size of the exported image can be
+specified. By default, the current size of the visualizer is used. A custom
+size can be entered. The width and height need to specified in pixels,
+separated by a <code>x</code> character. For instance, for a width of <code>640</code> pixels and
+a height of <code>480</code> pixels, enter <code>640x480</code> into the dialog. Click <code>OK</code> to
+confirm and to actually export the image.</p>
+</div>
+<div class="paragraph">
+<p>The following
+<a href="http://en.wikipedia.org/wiki/Raster_graphics">raster image</a>
+formats are supported:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/Portable_Network_Graphics">Portable Network Graphics</a>
+(<code>*.png</code>)</p>
+</li>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/JPEG">JPEG</a>
+(<code>*.jpg</code>)</p>
+</li>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/Graphics_Interchange_Format">Graphics Interchange Format</a>
+(<code>*.gif</code>)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The image format that is used to export the image, is derived from the file
+extension that is used. For each of the supported file formats, the allowed
+file names (with file extensions) are indicated above (between parentheses).</p>
+</div>
+<div class="paragraph">
+<p>After the image is exported, the workspace is refreshed to show that new image
+file, if the image was saved in a project that is visible in the
+'Project Explorer' tab or 'Package Explorer' tab.</p>
+</div>
+<div class="paragraph">
+<p>In order for the export to succeed, data points must be available for at least
+two time values.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-undoreset-5">Undo/reset</h7>
+<div class="paragraph">
+<p>It is possible to go back in time, by
+<a href="#tools-cifsim-input-history-reset-undo">undoing</a> one or more transitions, or
+by <a href="#tools-cifsim-input-history-reset-undo">resetting</a> the simulation.</p>
+</div>
+<div class="paragraph">
+<p>If one or more transitions are undone, data for all time points that are then
+suddenly in the future, are removed. More precisely, all data for time points
+added for time transitions that have been undone, are removed.</p>
+</div>
+<div class="paragraph">
+<p>If the simulation is reset, the entire plot is cleared.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-output-chapter-stateviz">State visualizer</h6>
+<div class="paragraph">
+<p>
+
+
+The <a href="#tools-cifsim-output-chapter-normal">normal console output</a>, which may
+include the <a href="#tools-cifsim-traces-state">state</a> of the specification,
+is printed to the console. The entire state is then printed as a single line
+of text, which can be hard to read as the specification grows, and the state
+contains more and more variables. The <em>state visualizer</em> can be used as an
+alternative. It shows the same information, but in a table in a separate
+window. Here is an example screenshot of the visualizer:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/output/stateviz_sshot.png" alt="stateviz sshot">
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div id="tools-cifsim-output-stateviz-option" class="paragraph">
+<p>Unlike <a href="#tools-cifsim-output-svgviz-chapter-index">SVG visualization</a>, which
+requires that the user makes an image of the system and couples the image to
+the specification, the state visualizer can be used directly, without any
+additional effort. All that is required to use it, is to enable it. The state
+visualizer is disabled by default, and can be enabled using the
+<b class="menuref">State visualization</b>
+option (<b class="menuref">Output: State visualization</b>
+category).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect6">
+<h7 id="tools-contents">Contents</h7>
+<div class="paragraph">
+<p>The state visualizer shows all the discrete, continuous, and algebraic
+variables of the specification, as well as their values. It also shows the
+derivatives of the continuous variables, and their values. This includes
+variable <code>time</code>, but not its derivative. It also shows the automata, with
+their current locations. The variables and automata are listed in alphabetical
+order, except for variable <code>time</code>, which is always shown at the top.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-icons-and-legend">Icons and legend</h7>
+<div class="paragraph">
+<p>The icons on the left indicate the kind of object that is shown in a particular
+row of the table:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><span class="image"><img src="./tools/cifsim/output/stateviz_aut.png" alt="stateviz aut"></span>
+An automaton, with its current location.</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cifsim/output/stateviz_discvar.png" alt="stateviz discvar"></span>
+A discrete variable, with its current value.</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cifsim/output/stateviz_contvar.png" alt="stateviz contvar"></span>
+A continuous variable (includes variable <code>time</code>),
+with its current value.</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cifsim/output/stateviz_deriv.png" alt="stateviz deriv"></span>
+A derivative of a continuous variable (excludes variable
+<code>time</code>), with its current value.</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cifsim/output/stateviz_algvar.png" alt="stateviz algvar"></span>
+An algebraic variable, with its current value.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+The values are updated for the initial state, states reached after transitions
+(event transitions and time transitions), as well as for
+<a href="#tools-cifsim-output-realtime-frames">frames</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-stateviz-filtering">Filtering</h7>
+<div class="paragraph">
+<p>By default, all state objects are displayed by the state visualizer. Using
+the
+<b class="menuref">State visualization filters</b>
+option
+(<b class="menuref">Output: State visualization</b>
+category), the state objects can
+be filtered. The
+<b class="menuref">State visualization filters</b>
+option only has effect
+if state visualization is enabled, using the
+<b class="menuref">State visualization</b>
+option.</p>
+</div>
+<div class="paragraph">
+<p>As value for the option, comma separated <em>filters</em> should be supplied. Each
+filter specifies one or more state objects. The absolute names of the objects
+are used. That is, for an automaton <code>a</code>, with a variable <code>x</code>, the absolute
+name of the variable object is <code>a.x</code>. If CIF textual syntax keyword are
+used as names for events (such as <code>plant</code>), then they must be escaped in
+<code>.cif</code> files (<code>$plant</code>). For filters however, all escape characters (<code>$</code>)
+in the names are ignored. The <code>*</code> character can be used as wildcard, to
+indicate zero or more characters. If a filter doesn&#8217;t match any of the state
+objects of the CIF model, a warning is printed to the console. A warning is
+also printed if the entire state is filtered out.</p>
+</div>
+<div class="paragraph">
+<p>By default, filters include matching state objects. Filters may however be
+preceded by a <code>-</code> character, turning them into exclusion filters, which
+exclude matching states objects rather than including them. Filters are
+processed in the order they are specified, allowing for alternating additions
+and removals. If a filter does not result in the addition/removal of any state
+objects to/from the filter result, a warning is printed to the console.</p>
+</div>
+<div class="paragraph">
+<p>As an example, option value <code>a.*,-a.b*,a.bc*</code> consists of three filters:
+<code>a.*</code>, <code>-a.b*</code>, and <code>a.bc*</code>. The first filter indicates that state
+objects whose absolute names start with <code>a.</code> are to be included. The second
+filter indicates that from those matching state objects, the state objects
+whose absolute names start with <code>a.b*</code> are to be excluded. To that result,
+the third filter adds those state objects whose absolute names start with
+<code>a.bc*</code>. For instance, if a specification contains state objects <code>time</code>,
+<code>a.a</code>, <code>a.b</code> <code>a.bb</code>, <code>a.bc</code>, <code>a.b.c</code>, <code>a.bc</code>, <code>a.bcc</code>, and
+<code>a.bcd</code>, the result of the three filters is that the following state objects
+are displayed: <code>a.a</code>, <code>a.bc</code>, <code>a.bc</code>, <code>a.bcc</code>, and <code>a.bcd</code>.</p>
+</div>
+<div class="paragraph">
+<p>The default option value (filter) is <code>*</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-multiple-state-visualizers">Multiple state visualizers</h7>
+<div class="paragraph">
+<p>By default, only one visualizer is shown. However, using the
+<b class="menuref">State visualization filters</b>
+option
+(<b class="menuref">Output: State visualization</b>
+category), it is possible to specify
+that multiple visualizers should be used. The option allows for filtering of
+the state objects, as described above. However, such filters can be separated
+by semicolons, to specify the filters per visualizer.</p>
+</div>
+<div class="paragraph">
+<p>As an example, consider option value <code>time,a.x;b.y</code>. This results in two
+state visualizers. The first one displays state objects <code>time</code> and <code>a.x</code>,
+while the second one displays state object <code>b.y</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-undoreset-6">Undo/reset</h7>
+<div class="paragraph">
+<p>By <a href="#tools-cifsim-input-history-reset-undo">undoing</a> one or more transitions,
+or by <a href="#tools-cifsim-input-history-reset-undo">resetting</a> the simulation, the
+state may change. The state visualizer is automatically updated to reflect such
+changes.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-output-chapter-realtime">Real-time simulation</h6>
+<div class="paragraph">
+<p>
+
+
+The CIF simulator allows for a form of real-time simulation. By enabling
+real-time simulation, the simulator interprets the model time (the value of
+variable <code>time</code>) in seconds. The simulator attempts to ensure that the actual
+simulation time is equal to the model time. This feature is very useful for
+visualizers, which then visualize their output at a steady rate. Without
+real-time simulation, the rate at which such visualizers would visualize their
+output, would primarily be determined by the amount of time it takes for the
+simulator to compute the output, leading to abrupt slow downs and sudden speed
+increases.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-realtime-frames">Frames</h7>
+<div class="paragraph">
+<p>If real-time simulation is disabled, visualizations are only updated for the
+<a href="#tools-cifsim-traces-state">states</a> that are reached. That is, the
+visualizations are updated for the initial state, and each new state that is
+reached after taking a transition. The visual representations of the
+visualizations resulting from these states are called <em>frames</em>.</p>
+</div>
+<div class="paragraph">
+<p>As time progresses, the values of continuous variables (and algebraic variables
+for which the value is directly or indirectly derived from a continuous
+variable, etc) change. If the visualization is only updated before and after
+time transitions, as is done when real-time simulation is disabled, this leads
+to 'jumps' in the visualization. For real-time simulation, the simulator
+calculates states that are evenly spaced over time. This ensures that we get
+regular updates of the visualizations, as time progresses, and the
+visualizations thus become 'smooth' or 'fluent'. If enough states are
+visualized per second, a visualization essentially becomes a <em>movie</em>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+The states that result from transitions are always calculated. For real-time
+simulation, the simulator calculates additional states for the purpose
+of visualization, as mentioned above. These additional states are called
+<em>intermediate states</em>, and the corresponding visual representations of the
+visualizations to which they lead are called <em>intermediate frames</em>.</p>
+</div>
+<div class="paragraph">
+<p>For real-time simulation, the simulator thus uses intermediate frames that are
+evenly spaced over time, for smooth visualizations. A consequence of this, is
+that state changes between those intermediate frames are lost. If the effect is
+still visible in the next intermediate state, this is not a problem. If however
+the effect is temporary, and does not last until the next intermediate state,
+the effect is thus not visualized.</p>
+</div>
+<div class="paragraph">
+<p>For real-time simulation combined with an interactive
+<a href="#tools-cifsim-input-chapter-index">input mode</a>, the
+simulator uses both the state frames and the intermediate frames. This ensures
+that at the moment an interactive choice has to be made about which
+transition to take, the visualization reflects the current state of the system.
+Semi-automatic mode is not taken into account.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-realtime-framerate">Frame rate</h7>
+<div class="paragraph">
+<p>Using the
+<b class="menuref">Frame rate</b>
+option (<b class="menuref">Output</b>
+category), it is
+possible to specify how often per second of real time, visualizations should
+be updated. A higher frame rate leads to more updates per second, and thus to
+a more fluent visualization. However, since a higher frame rate also leads to
+more frequent updates, the amount of CPU power it takes to perform these
+updates increases as well. If the computer can not update the visualization in
+time for the next update to take place, the visualization may start to
+'stutter'.</p>
+</div>
+<div class="paragraph">
+<p>
+The frame rate will thus always be a compromise between fluency and
+performance. Choosing an appropriate frame rate depends not only on the
+complexity of the specification being simulated and the visualization that is
+being shown, but also on the computer on which the simulation is run.
+Furthermore, it may depend on the other tasks the computer is performing while
+the simulation is being run.</p>
+</div>
+<div class="paragraph">
+<p>Frame rates are always positive, and may be fractional. For instance, a frame
+rate of <code>7.5</code> is valid, and will update the visualization 7.5 times per
+second.</p>
+</div>
+<div class="paragraph">
+<p>A low frame rate (typically less than 10 frames per second) can have a
+devastating effect on the
+<a href="#tools-cifsim-input-svg-simulation-responsiveness">responsiveness of SVG input</a>.
+Similarly, it can hinder
+<a href="#tools-cifsim-chapter-termination">termination</a> of the simulation, as the red
+<em>Terminate</em> button has no effect between intermediate frames. That is, the
+effect of clicking the button is postponed until the next frame, or until the
+time transition ends.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-realtime-simspeed">Simulation speed</h7>
+<div class="paragraph">
+<p>If real-time simulation is enabled, the simulator by default interprets the
+model time (the value of variable <code>time</code>) in seconds. However, this can be
+changed using the
+<b class="menuref">Simulation speed</b>
+option (<b class="menuref">Output</b>
+category). This option specifies a scaling factor. A scaling factor of <code>1.0</code>
+interprets model time as seconds, <code>2.0</code> is twice as fast (1 unit of model
+time takes 0.5 seconds), etc. The simulation speed must always be positive,
+and may be fractional. For instance, a simulation speed of <code>0.5</code> is valid,
+and will interpret model time as twice as slow (1 unit of model time takes 2
+seconds).</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-enabling-real-time-simulation">Enabling real-time simulation</h7>
+<div class="paragraph">
+<p>By default, real-time simulation is disabled, and the simulator will try to
+simulate as fast as possible (infinite speed, taking time transitions takes no
+time). By setting a frame rate and/or a simulation speed, real-time simulation
+can be enabled. If only one of the options is specified, the other gets a
+default value. The default frame rate for real-time simulation is <code>20.0</code>
+frames per second. The default simulation speed is <code>1.0</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div id="tools-cifsim-output-realtime-outcomp" class="paragraph">
+<p>Enabling real-time simulation requires a real-time output component
+(visualizer). Currently, the following real-time output components are
+available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-index">SVG visualizer</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If real-time simulation is enabled without using a real-time output component,
+simulation can&#8217;t be started. Closing the visualizer of a real-time simulation
+during the simulation, if it is the last remaining real-time output component,
+leads to the simulation being <a href="#tools-cifsim-chapter-termination">stopped</a>.</p>
+</div>
+<div class="paragraph">
+<p>All real-time output components can also be used when real-time simulation is
+disabled, but obviously without any real-time effects.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-output-realtime-delta">Model time delta</h7>
+<div class="paragraph">
+<p>The simulation speed does not influence the frame rate. That is, both options
+can be specified orthogonally. The two options together however, do influence
+the model time delta, the amount of model time between two consecutive updates
+of the visualizations, i.e. the amount of model time between two consecutive
+intermediate frames. The model time delta is calculated using the following
+formula (where <code>r</code> is the frame rate, and <code>s</code> is the simulation speed):
+1 / (<code>r</code> / <code>s</code>). Doubling the frame rate results in half the model time
+delta, while doubling the simulation speed results in double the model time
+delta.</p>
+</div>
+<div class="paragraph">
+<p>If the model time delta becomes to big, this may lead to 'jumps' in the
+visualization. In such cases, increasing the frame rate, or reducing the
+simulation speed causes a smaller model time delta, leading to a more fluent
+visualization.</p>
+</div>
+<div class="paragraph">
+<p>The model time delta (and thus the frame rate and simulation speed) also
+affects the <a href="#tools-cifsim-solver-chapter-options-outstep">ODE solver fixed output step size</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-test-mode">Test mode</h7>
+<div class="paragraph">
+<p><a href="#tools-cifsim-chapter-test-mode">Test mode</a> disables all real-time delays of
+the real-time simulation mode, but still updates the visualizations for the
+intermediate frames. With test mode enabled, it is also allowed to perform a
+real-time simulation without real-time output component.</p>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-simulation-advanced-topics">Simulation advanced topics</h4>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-options">Simulator options</h5>
+<div class="paragraph">
+<p>
+The CIF simulator can be configured via various options. The available
+options are listed below, per category.</p>
+</div>
+<div class="paragraph">
+<p><strong>General</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Help</em>: Prints the help text of the application to the console.</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-mode">Output mode</a></p>
+</li>
+<li>
+<p><em>License</em>: Prints the license text of the application to the console.</p>
+</li>
+<li>
+<p><em>Developer mode</em>: Option to control whether exceptional situations return
+limited and user-friendly information (the default), or extended developer
+oriented information. This option is primarily intended for the developers of
+the CIF simulator, and should not be used by end users.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Simulation</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>CIF specification</em>: The absolute or relative local file system path to the
+CIF specification (<code>.cif</code> file) to simulate. May also be a
+<a href="#tools-cifsim-chapter-repeated-simulation">compiled code file</a> (<code>.cifcode</code>
+file).</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-init">CIF specification initialization</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-termination-endtime">Simulation end time</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-endtime-maxdelay">Maximum delay</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-distr-seeds">Initial seed for stochastic distributions</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-complete-mode">Complete mode</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-extfuncs-async">External functions asynchronous execution</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-profiling">Profiling</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-termination-confirm">Ask to confirm simulator termination</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-max-time-point-tol">Maximum time point tolerance</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-debug-gen-code">Load debug code</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Compiler</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-repeated-sim-compile-once">Compile only</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-repeated-sim-compile-once">Compiled code file</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-java-compiler">Java compiler</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Input</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-input-chapter-index">Input mode</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-automatic-trans">Automatic mode choice algorithm</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-automatic-time">Automatic mode time transition duration</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-trace-file">Trace input file</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-chapter-semi-automatic">Interactive mode automatic transition choice</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-env-events">Environment events</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-history-enable">History</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-input-history-size">History size</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Output</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-chapter-normal">Normal output</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-normal-state-filter">Normal output state filters</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-chapter-debug">Debug output</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-realtime-framerate">Frame rate</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-realtime-simspeed">Simulation speed</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-test-mode">Test mode</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Output: SVG visualization</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-simulation-option">SVG visualization</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Output: Trajectory data</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-trajdata-option">Trajectory data</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-trajdata-file">Trajectory data file</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-trajdata-filters">Trajectory data filters</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-trajdata-sep">Trajectory data separation amount</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Output: Plot visualization</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-plotviz-option">Plot visualization</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-plotviz-mode">Plot visualization mode</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-plotviz-filtering">Plot visualization filters</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-plotviz-range">Plot visualization range</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Output: State visualization</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-stateviz-option">State visualization</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-stateviz-filtering">State visualization filters</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>ODE solver</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-options-outstep">ODE solver fixed output step size</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>ODE solver: ODE integrator</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-solver-options-int-algo">ODE solver integrator algorithm</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-options-int-tol">ODE solver integrator absolute tolerance</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-options-int-tol">ODE solver integrator relative tolerance</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-options-int-step">ODE solver integrator minimum step size</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-options-int-step">ODE solver integrator maximum step size</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-options-int-numstep">ODE solver integrator number of steps</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>ODE solver: ODE root finder</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-solver-options-root-maxcheck">ODE solver root finder maximum check interval</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-options-root-algo">ODE solver root finding algorithm</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-options-root-tol">ODE solver root finder absolute tolerance</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-options-root-tol">ODE solver root finder relative tolerance</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-options-root-maxiter">ODE solver root finder maximum iterations</a></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-performance">Simulation performance</h5>
+<div class="paragraph">
+<p>
+
+General performance information about Java or Eclipse typically applies to the
+CIF simulator as well. This page provides additional information specific to
+the CIF simulator.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-closing-the-simulator">Closing the simulator</h6>
+<div class="paragraph">
+<p>Closing the simulator ensures that all its resources are freed, and become
+available for other applications.
+The CIF simulator however, may ask you to press <kbd>ENTER</kbd> to
+<a href="#tools-cifsim-termination-confirm">confirm termination</a> of the
+simulator. If asked, as long as you haven&#8217;t pressed <kbd>ENTER</kbd> yet, the
+status of the console will still show it&#8217;s running, and the application can&#8217;t
+release its resources.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-slow-starting-of-the-simulator">Slow starting of the simulator</h6>
+<div class="paragraph">
+<p>If simulation is slow to start, you can try a different
+<a href="#tools-cifsim-chapter-java-compiler">Java compiler</a>. You can also try to
+<a href="#tools-cifsim-repeated-sim-compile-once">compile the model once</a>,
+reducing the start time of the simulator for
+<a href="#tools-cifsim-chapter-repeated-simulation">repeated simulations</a>.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-slow-termination-of-the-simulator">Slow termination of the simulator</h6>
+<div class="paragraph">
+<p>If termination of the simulator is slow, this may be related to
+the <a href="#tools-cifsim-output-chapter-trajdata">trajectory data output component</a>.
+If its <a href="#tools-cifsim-output-trajdata-prettify">prettifying</a> option is
+enabled, it will read the trajectory data file after the simulation terminates,
+and write the whole file again in a prettier from. This may take some time,
+especially on slow remote/network file systems or storage devices. Disabling
+the option or the trajectory data output may solve this problem, as may
+switching to a faster file system or storage device.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-value-simplification">Value simplification</h6>
+<div class="paragraph">
+<p>By applying the <a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a> CIF to CIF transformation
+before simulation, you may be able to simplify the specification, and thus
+improve the performance of both starting up the simulator, as well as the
+actual simulation.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-simulation-options">Simulation options</h6>
+<div class="paragraph">
+<p>Various simulation options can be tweaked to increase the simulation
+performance:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-console">Console output</a></p>
+<div class="paragraph">
+<p>Reducing the amount of console output significantly improves simulation
+performance.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-components">Output components</a></p>
+<div class="paragraph">
+<p>By disabling certain output components, the simulator needs to do less work,
+and this may improve the performance of the simulation.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-chapter-realtime">Real-time simulation</a></p>
+<div class="paragraph">
+<p>The performance and perceived 'smoothness' or 'fluency' of visualizations can
+be influenced via the
+<a href="#tools-cifsim-output-realtime-framerate">frame rate</a> and
+<a href="#tools-cifsim-output-realtime-simspeed">simulation speed</a>.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-endtime-maxdelay">Maximum delay</a></p>
+<div class="paragraph">
+<p>By decreasing the maximum allowed length of a single time transition, shorter
+time transitions are calculated, which takes less time. After the shorter
+time delay, the simulator will calculate the remainder of the time
+transition. Essentially, the time transitions are cut into parts, which are
+calculated separately, over time. As such, the calculation time is spread
+out over time as well. This can make
+<a href="#tools-cifsim-output-svgviz-chapter-index">SVG visualizations</a> feel more fluent. However, each time
+transition calculation has a certain amount of overhead, so reducing the
+maximum delay too much is not a good idea.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-cifsim-chapter-complete-mode">Complete mode</a></p>
+<div class="paragraph">
+<p>By disabling the complete mode, the simulator has to perform less work to
+calculate the possible transitions, improving the simulation performance.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-index">Solver</a></p>
+<div class="paragraph">
+<p>The ODE solver options can be used to make the ODE solver faster, usually at
+the expense of accuracy. For instance, increasing the various tolerances
+reduces the number of calculations needed by the ODE solver, but makes the
+calculated trajectories less accurate. Switching algorithms may also improve
+the performance, as may increasing the maximum check interval.</p>
+</div>
+</li>
+<li>
+<p><a href="#tools-cifsim-extfuncs-async">External functions synchronous execution</a></p>
+<div class="paragraph">
+<p>Using synchronous execution for external user-defined functions reduces
+their execution overhead.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-solver-chapter-index">ODE solver</h5>
+<div class="paragraph">
+<p>
+
+
+
+During time transitions, the values of the continuous variables and their
+derivatives change. These changes are calculated using an
+<a href="http://en.wikipedia.org/wiki/Ordinary_differential_equation">ODE</a>
+<a href="http://en.wikipedia.org/wiki/Numerical_ordinary_differential_equations">integrator</a>.
+As soon as a guard for an event becomes enabled, time should no longer
+progress. To calculate whether (and when) guards change value, a
+<a href="http://en.wikipedia.org/wiki/Root-finding_algorithm">root finding algorithm</a>
+is used.
+Software to solve ODEs, through integration and root finding, are often called
+ODE solvers. The CIF simulator uses the
+<a href="http://commons.apache.org/proper/commons-math/">The Apache Commons Mathematics Library</a>.
+This library
+contains ODE solvers, with several different integrators and root finding
+algorithms.</p>
+</div>
+<div class="paragraph">
+<p>Debug information about what the ODE solver calculates, and for what time
+points, can be enabled using the <em>Debug output</em> option. See the
+<a href="#tools-cifsim-output-chapter-debug">Debug console output</a> page for more information.</p>
+</div>
+<div class="paragraph">
+<p><strong>Basic topics</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-basics-int">The basics of numeric integration</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-basics-root">The basics of numeric root finding</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-root-problems">Problems with root finding</a> (and missed guards/events)</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-options-outstep">Fixed output step size</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><strong>Advanced topics</strong></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-endtime-maxdelay">Simulation end time and maximum delay</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-options">ODE solver integrator options</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-solver-chapter-options-root">ODE solver root finder options</a></p>
+</li>
+</ul>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-solver-chapter-basics-int">The basics of numeric integration</h6>
+<div class="paragraph">
+<p>
+
+
+
+During time transitions, the values of the continuous variables and their
+derivatives change. The derivatives have explicit equations, the continuous
+variables change according to the value of their derivatives. Using the
+equations for the derivatives as a system of
+<a href="http://en.wikipedia.org/wiki/Ordinary_differential_equation">ordinary differential equations</a>
+(ODEs),
+together with the initial values of the continuous variables as the <em>initial
+conditions</em>, this essentially comes down to solving an
+<a href="http://en.wikipedia.org/wiki/Initial_value_problem">initial value problem</a>
+(IVP).</p>
+</div>
+<div class="paragraph">
+<p>Such problems can be solved through
+<a href="http://en.wikipedia.org/wiki/Integral">integration</a>.
+For some problems it is possible to do this
+<a href="http://en.wikipedia.org/wiki/Symbolic_integration">symbolically</a>.
+For more complex systems of ODEs however,
+<a href="http://en.wikipedia.org/wiki/Numerical_ordinary_differential_equations">numerical methods</a>
+are used. The CIF simulator uses
+<a href="http://commons.apache.org/proper/commons-math/">The Apache Commons Mathematics Library</a>,
+which contains several numerical integrators.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect6">
+<h7 id="tools-linear-ode">Linear ODE</h7>
+<div class="paragraph">
+<p>Consider the following CIF specification, with a linear ODE:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">cont x = 0.0;
+equation x' = 1.0;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The solution to this IVP, is the values of continuous variable <code>x</code> and its
+derivative <code>x'</code>, as function of variable <code>time</code>:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/solver/integr_linear.png" alt="integr linear">
+</div>
+</div>
+<div class="paragraph">
+<p>Here, the numerical integrator start with the initial value of continuous
+variable <code>x</code>, which is <code>0.0</code>. For the initial value of variable <code>time</code>,
+which is also <code>0.0</code>, it computes <code>x'</code>, which is <code>1.0</code>. It then slightly
+increases the value of variable <code>time</code> to say <code>1e-6</code>. Assuming a linear
+continuous variable <code>x</code>, the value of variable <code>x</code> at that time is <code>1e-6</code>
+as well.</p>
+</div>
+<div class="paragraph">
+<p>The numerical integrator tries to predict the values of the derivative as time
+progresses. It gradually increases the value of variable <code>time</code>, predicting
+the value of the derivative at the next time point. If the next prediction
+closely matches the actual calculated value, the integrator moves on to the
+next time point. If the next prediction is not close enough to the actual
+calculated value of the derivative for that time point, more intermediate
+values are calculated. That is, the integrator tries to approximate the
+derivative as time progresses, while increasing the time between two
+consecutive time points. As long as the predictions match the actual
+calculated value of the derivative at the next time point, it keeps increasing
+the step size even further. If the predictions are not good enough (the
+difference with the actual calculated value is above a certain tolerance), more
+intermediate time points are investigated. The values calculated for those
+time points can then be used to come up with a better approximation, that
+better predicts the value of the derivative at future time points.</p>
+</div>
+<div class="paragraph">
+<p>For the linear ODE given above, the <a href="#tools-cifsim-output-chapter-trajdata">trajectory data</a>
+calculated by the integrator is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code># time                 x                       x'
+0.0                    0.0                     1.0
+9.999999999999999e-5   1.0000000000000003e-4   1.0
+0.0011                 0.0011000000000000005   1.0
+0.0111                 0.011100000000000006    1.0
+0.1                    0.10000000000000006     1.0</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Note that the time points for which the values were calculated, are indicated
+in the figure above by small plus signs (<code>+</code>).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-nonlinear-ode">Nonlinear ODE</h7>
+<div class="paragraph">
+<p>The approximations of the integrator don&#8217;t need to be linear. Some integrators
+for instance support
+<a href="http://en.wikipedia.org/wiki/Nonlinear#Nonlinear_differential_equations">nonlinear differential equations</a>.
+Consider the following CIF specification, with such a nonlinear ODE:</p>
+</div>
+<div class="paragraph">
+<p>The solution calculated by the numerical integrator is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">cont x = 0.0;
+equation x' = (x * x) - x - 2;</code></pre>
+</div>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/solver/integr_nonlinear.png" alt="integr nonlinear">
+</div>
+</div>
+<div class="paragraph">
+<p>Here, we see how the step size is increased initially, as the linear
+approximation is good enough. As soon as we get to the bend, the step size is
+reduced to better approximate the actual values. After the bend, the step size
+is slowly increased again. The integrator internally uses a polynomial of a
+higher degree to approximate this differential equation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-discontinuities">Discontinuities</h7>
+<div class="paragraph">
+<p>If the derivative has a
+<a href="http://en.wikipedia.org/wiki/Discontinuity_%28mathematics%29">discontinuity</a>,
+such as in the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">cont x = 1.0;
+equation x' = if x &lt; 2: 1.0
+              else      3.0
+              end;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The integrator will try to figure out the time point at which the discontinuity
+occurs, by decreasing the step size as it nears the discontinuity. After the
+discontinuity, the step size is gradually increased, as integration continues:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/solver/integr_discont.png" alt="integr discont">
+</div>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-solver-chapter-basics-root">The basics of numeric root finding</h6>
+<div class="paragraph">
+<p>
+
+During time transitions, the values of the continuous variables and their
+derivatives change. If continuous variables or their derivatives are (directly
+or indirectly) used in guards of edges, changes in their values may result in
+the guard becoming enabled, as time progresses. To detect such changes during
+<a href="#tools-cifsim-solver-chapter-basics-int">integration</a>, a
+<a href="http://en.wikipedia.org/wiki/Root-finding_algorithm">root finding algorithm</a>
+can be used.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton p:
+  cont x = 0.0;
+  equation x' = 0.5;
+
+  location:
+    initial;
+    edge when x &gt;= 1.5 do x := 0.0;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, the value of continuous variable <code>x</code> increases with <code>0.5</code> every time
+unit. Once the value of <code>1.5</code> is reached, the variable is reset to <code>0.0</code>.
+This process is repeated:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/solver/root_simple.png" alt="root simple">
+</div>
+</div>
+<div class="paragraph">
+<p>If we look at the data calculated by the numerical integrator, to solve the ODE
+problem:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/solver/root_simple2.png" alt="root simple2">
+</div>
+</div>
+<div class="paragraph">
+<p>we see that values are calculated for time points <code>1.1111</code> and <code>5.0</code>. If we
+then also look at the value of the guard, where we use value <code>-1</code> for
+<code>false</code> and <code>+1</code> for <code>true</code>:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/solver/root_simple_guard.png" alt="root simple guard">
+</div>
+</div>
+<div class="paragraph">
+<p>we see that at time <code>1.1111</code>, the value of the guard is <code>-1</code> (<code>false</code>).
+At time <code>5.0</code> it is <code>+1</code> (<code>true</code>). That is, the guard changed value
+between two time points calculated by the integrator. If this is the case, the
+ODE solver tries to calculate the exact time point at which the guard changes
+its value. That is, it calculates the exact time point at which the guard
+function crosses the time axis, and thus has a
+<a href="http://en.wikipedia.org/wiki/Zero_of_a_function">root</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+One of the simplest root finding algorithms, is the
+<a href="http://en.wikipedia.org/wiki/Bisection_method">bisection method</a>.
+This algorithm starts with
+the two time points where the guard has opposite
+<a href="http://en.wikipedia.org/wiki/Sign_%28mathematics%29">signs</a>.
+This is the interval
+where the guard sign change occurs (it contains the root). The bisection method
+tries to reduce the size of the interval, by calculating the value of the guard
+in the middle of the interval. Depending on the sign of the value of the guard
+at this middle point, this middle point replaces either the lower bound or the
+upper bound of the interval. This is done in such a way that the values of the
+guard at the lower and upper bound of the interval have opposite signs, and the
+interval thus <em>brackets</em> the root.</p>
+</div>
+<div class="paragraph">
+<p>For the example above, the root is calculated as follows:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/solver/root_root.png" alt="root root">
+</div>
+</div>
+<div class="paragraph">
+<p>We start with the interval <code>[1.1111 .. 5.0]</code>. The middle point is <code>3.0555</code> at which
+the guard holds, just like the upper bound (at <code>5.0</code>). Thus <code>5.0</code> is replaced by
+<code>3.0555</code>. The middle point of <code>1.1111</code> and <code>3.0555</code> is <code>1.5972</code>. Since the guard holds
+for time <code>1.5972</code>, upper bound <code>3.0555</code> is replaced by <code>1.5972</code>. The middle point
+of <code>1.1111</code> and <code>1.5972</code> is <code>1.3542</code>. The guard does not hold at time <code>1.3542</code>, so the
+lower bound of <code>1.1111</code> (at which the guard does not hold) is replaced by <code>1.3542</code>.
+This process continues until the interval is smaller than a certain tolerance
+value. Once we have that interval, we can choose a value from the interval as
+the computed root.</p>
+</div>
+<div class="paragraph">
+<p>While the bisection method is relatively simple, the root finding algorithms
+used by the CIF simulator work using the same principles. However, they
+converge much faster. That is, they requires much less iterations of updating
+the bounds, to get to a satisfactory answer.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-solver-chapter-root-problems">Problems with root finding</h6>
+<div class="paragraph">
+<p>
+With <a href="#tools-cifsim-solver-chapter-basics-root">numeric root finding</a>, there is
+the risk of missing guard changes, which means there is the risk of missing
+event transitions.</p>
+</div>
+<div class="sect6">
+<h7 id="tools-the-problem">The problem</h7>
+<div class="paragraph">
+<p>To illustrate the problem, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton p:
+  cont x = 0.0;
+  equation x' = 1.0;
+
+  location:
+    initial;
+    edge when x &gt;= 2.33 and x &lt;= 2.34 do x := 0.0;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification, when simulated using the CIF simulator, using default
+settings, results in:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/solver/root_problem.png" alt="root problem">
+</div>
+</div>
+<div class="paragraph">
+<p>From the image, where the values calculated by the integrator are indicated
+using small plus signs (<code>+</code>), we can see that for times <code>2.1111</code> and
+<code>2.6111</code>, the integrator calculated points. Since the function is linear
+between those two time points, no additional intermediate time points were
+investigated. Since the guard becomes <code>true</code> after time point <code>2.1111</code> (at
+time point <code>2.33</code>) and also becomes <code>false</code> again before time point
+<code>2.61111</code> (at time point <code>2.34</code>), the integrator misses the guard change.
+That is, for every time point that the guard is evaluated, it is <code>false</code>, and
+the change in guard value is thus not detected. We miss the guard, and thus
+the event that resets variable <code>x</code> to <code>0.0</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-solution-1-maximum-check-interval">Solution 1: maximum check interval</h7>
+<div class="paragraph">
+<p>The first solution is to use the
+<b class="menuref">ODE solver root finder maximum check interval</b>
+option (<b class="menuref">ODE solver: ODE root finder</b>
+category). This
+option can be used to set the maximum time interval between two consecutive
+checks of the sign of the guard. By default, this is <code>0.5</code> time units. If we
+set this value to <code>0.001</code>, then we ensure that at least once every <code>0.001</code>
+time units, the guard sign is checked. This means that between time points
+<code>2.1111</code> and <code>2.61111</code>, the guard will be checked approximately 500 times.
+This also means that between time points <code>2.33</code> and <code>2.34</code>, the guard will
+be checked approximately 10 times. Therefore, this ensures that we check a time
+point just before time <code>2.33</code>, and one just after it, which means we can&#8217;t
+miss the guard change.</p>
+</div>
+<div class="paragraph">
+<p>In the above example, <code>x'</code> is <code>1.0</code>. If however <code>x'</code> would be <code>2.0</code>,
+then the time interval where the guard is enabled reduces from <code>0.01</code> time
+units to <code>0.005</code> time units. Using a maximum check interval of <code>0.001</code>
+would then still suffice, as the guard would be checked approximately 5 times
+in that time interval. If however <code>x'</code> is <code>100</code>, then the time interval
+would become <code>0.0001</code>, which is smaller than the maximum check interval of
+<code>0.001</code>. That is, the derivatives of the values occurring in guards influence
+the value that should be chosen for the maximum delay interval.</p>
+</div>
+<div class="paragraph">
+<p>In general, to choose an appropriate value for the maximum check interval, not
+only the the ranges of values of the variables where the guard is enabled
+should be taken into account, but the steepness of their derivatives as well.
+That is, the value of the maximum check interval should be based on the time
+interval where the guard is enabled. Choosing half the duration of the smallest
+of such time intervals, for all guards, is generally a good choice.</p>
+</div>
+<div class="paragraph">
+<p>
+Note that choosing a smaller interval results in more guard change checks, and
+thus negatively impacts the performance of the simulation. Therefore, choosing
+a maximum check interval that is unnecessarily small also unnecessarily
+reduces performance of the simulation.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-solution-2-splitting-the-guard">Solution 2: splitting the guard</h7>
+<div class="paragraph">
+<p>We can reformulate the original CIF specification, by splitting the guard:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton p:
+  cont x = 0.0;
+  equation x' = 1.0;
+
+  location:
+    initial;
+    edge when x &gt;= 2.33, x &lt;= 2.34 do x := 0.0;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification, when simulated using the CIF simulator, using default
+settings, results in:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/cifsim/solver/root_problem2.png" alt="root problem2">
+</div>
+</div>
+<div class="paragraph">
+<p>The difference with the original specification is the guard of the edge. In the
+original specification, the <code>and</code> binary operator is used, making it a single
+guard. In the new specification, a comma (<code>,</code>) is used, which constructs two
+separate guards. Both guards can be individually checked by the root finding
+algorithm. As shown in the image, each of the guards changes value only once.</p>
+</div>
+<div class="paragraph">
+<p>The comma between guards means that both guards have to hold, in order for the
+edge to be enabled. This is similar, but not identical, to the <code>and</code> binary
+operator. For the <code>and</code> binary operator, the left hand side must be evaluated
+before the right hand side, and the right hand side may only be evaluated if
+the left hand side evaluates to <code>true</code>. This is called
+<a href="http://en.wikipedia.org/wiki/Short-circuit_evaluation">short-circuit evaluation</a>.
+For guards separated by commas, no such relation may be assumed. That is, even if
+the first guard evaluates to false, can the second guard still be evaluated by
+the root finding algorithm, for guard changes. It can even be the case that the
+second guard is evaluated before the first guard. These differences not only
+influence root finding, but are also of particular interest when the right hand
+side can result in a runtime evaluation failure. For instance, the following
+specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton p:
+  cont x der 1.0;
+  location:
+    initial;
+    edge when x &gt; 0, 1 / x &lt; 0.5 do x := 0.0;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>results in a runtime error. The second guard (<code>1 / x &lt; 0.5</code>) is evaluated
+even if the first guard (<code>x &gt; 0</code>) does not hold. Initially, the first guard
+does not hold, and the second guard results in division by zero. Changing the
+comma between the guards to an <code>and</code> operator, makes it possible to simulate
+this specification.</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-debug-information">Debug information</h7>
+<div class="paragraph">
+<p>Debug information about what the ODE solver calculates, and for what time
+points, can be enabled using the <em>Debug output</em> option. This may be useful in
+figuring out why the guard was missed, and what settings need to be changed.
+See the <a href="#tools-cifsim-output-chapter-debug">Debug console output</a> page for more information.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-solver-chapter-options-outstep">Fixed output step size</h6>
+<div class="paragraph">
+<p>
+
+
+The <a href="#tools-cifsim-solver-chapter-basics-int">integrator</a> determines the time
+points for which values are calculated. By default, those points are included
+in the trajectories. This means that they are also the output of the
+<a href="#tools-cifsim-output-chapter-trajdata">trajectory data output component</a>.
+The integrator determines the time points for which to calculate values, based
+on the complexity of the ODEs. The integrator can be influenced using
+the <a href="#tools-cifsim-solver-chapter-options">integrator options</a>.</p>
+</div>
+<div class="paragraph">
+<p>Sometimes however, it may be more convenient to have the integration output
+at more regular intervals. Using the
+<b class="menuref">ODE solver fixed output step size</b>
+option (<b class="menuref">ODE solver</b>
+category), a fixed output step size can be
+configured. This value must be an integer or real number larger than zero.</p>
+</div>
+<div class="paragraph">
+<p>This option does not influence the actual time points for which the integrator
+calculates the values. Instead, it influences how these results are put in the
+trajectories, that are subsequently used by the simulator.</p>
+</div>
+<div class="paragraph">
+<p>Setting a fixed output step size, ensures that the trajectories contain output
+for all multiples of the given step size. They will however also contain output
+for the start and end of each time transition, which may not be at multiples
+of the step size, due to guards becoming enabled or disabled at other times.</p>
+</div>
+<div class="paragraph">
+<p>
+
+If <a href="#tools-cifsim-output-chapter-realtime">real-time</a> simulation is enabled, the
+default is changed to automatically use the
+<a href="#tools-cifsim-output-realtime-delta">model time delta</a> that is used for
+real-time simulation, as the fixed output step size. This way, the trajectories
+contain the time points for which intermediate
+<a href="#tools-cifsim-output-realtime-frames">frames</a> are generated. If
+real-time simulation is enabled, setting a custom fixed output step size is
+not supported.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-solver-chapter-endtime-maxdelay">Simulation end time and maximum delay</h6>
+<div class="paragraph">
+<p>
+
+
+The maximum length of a time transition is determined by several factors:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The current simulation time.</p>
+</li>
+<li>
+<p>The simulation <a href="#tools-cifsim-termination-endtime">end time</a>.</p>
+</li>
+<li>
+<p>The maximum allowed delay amount.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The current simulation time is the value of variable <code>time</code>. Each time
+transition starts at the current time.</p>
+</div>
+<div class="paragraph">
+<p>Using the
+<b class="menuref">Simulation end time</b>
+option (<b class="menuref">Simulator</b>
+category), the <a href="#tools-cifsim-termination-endtime">end time</a> of the
+simulation can be configured. By setting a simulation end time, you ensure that
+when the value of variable <code>time</code> reaches that value, the simulation
+<a href="#tools-cifsim-chapter-termination">terminates</a>. Settings a simulation end time
+also limits the maximum length of a time transition, since from the current
+time, a limited amount of time can pass before the end time is reached. By
+default the simulation end time is set to 'infinite', which means that
+simulation termination, and the maximum length of a time transition, are not
+limited by a simulation end time.</p>
+</div>
+<div class="paragraph">
+<p>
+Using the
+<b class="menuref">Maximum delay</b>
+option (<b class="menuref">Simulator</b>
+category),
+the maximum delay amount for a single time transition can be set. If set, no
+time transitions longer than the specified value may be calculated. This limits
+the maximum length of time transitions to that value. Essentially, this cuts
+time transitions into parts with a maximum length specified by this option. By
+default, the maximum delay is set to 'infinite', which means that the maximum
+length of a time transition is not limited by this option. Restricting the
+maximum delay amount for a time transition should generally be avoided.
+For debugging purposes however, it may be useful to disable passage of time
+altogether. This can be achieved by using a maximum delay of <code>0</code>.</p>
+</div>
+<div class="paragraph">
+<p>If both a simulation end time and a maximum allowed delay amount are specified,
+the most restrictive of them determines the maximum length of the time
+transition. If neither is specified, the simulator will attempt to calculate a
+time transition of length <code>100.0</code>.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-solver-chapter-options">ODE solver integrator options</h6>
+<div class="paragraph">
+<p>
+
+The <a href="#tools-cifsim-solver-chapter-basics-int">integrator</a> used by the ODE solver
+of the CIF simulator, can be configured using several options.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-solver-options-int-algo">Integration algorithm</h7>
+<div class="paragraph">
+<p>The
+<b class="menuref">ODE solver integrator algorithm</b>
+option
+(<b class="menuref">ODE solver: ODE integrator</b>
+category) can be used to configure the
+integrator algorithm to use. The following algorithms are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Higham and Hall 5(4)</p>
+</li>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/Dormand-Prince">Dormand-Prince 5(4)</a></p>
+</li>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/Dormand-Prince">Dormand-Prince 8(5,3)</a>
+(default)</p>
+</li>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/Bulirsch-Stoer_algorithm">Gragg-Bulirsch-Stoer</a></p>
+</li>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/Adams_method">Adams-Bashforth</a>
+(experimental)</p>
+</li>
+<li>
+<p><a href="http://en.wikipedia.org/wiki/Adams_method">Adams-Moulton</a>
+(experimental)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The algorithms differ in the complexity of the systems of ODEs that they can
+handle, their performance, the precision of their results, etc. All these
+algorithms use an
+<a href="http://en.wikipedia.org/wiki/Adaptive_stepsize">adaptive step size</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-solver-options-int-tol">Absolute and relative tolerance</h7>
+<div class="paragraph">
+<p>The
+<b class="menuref">ODE solver integrator absolute tolerance</b>
+option
+(<b class="menuref">ODE solver: ODE integrator</b>
+category) and the
+<b class="menuref">ODE solver integrator relative tolerance</b>
+option
+(<b class="menuref">ODE solver: ODE integrator</b>
+category), can be used to configure how
+precise the results of the integrator should be. The lower the tolerance (or
+error), the higher the precision of the results, but also the more computing
+time it costs to get to that precision. The absolute precision is the
+difference between the prediction and the actual value, while the relative
+precision is that same difference, as a fraction of the actual value. In the
+latter case, precision reduces with increasing values.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-solver-options-int-step">Minimum and maximum step size</h7>
+<div class="paragraph">
+<p>The interval between two consecutive time points calculated by the integrator
+can be configured using the
+<b class="menuref">ODE solver integrator minimum step size</b>
+option (<b class="menuref">ODE solver: ODE integrator</b>
+category) and the
+<b class="menuref">ODE solver integrator maximum step size</b>
+option
+(<b class="menuref">ODE solver: ODE integrator</b>
+category).</p>
+</div>
+<div class="paragraph">
+<p>The default minimum step size is <code>1e-15</code> and the default maximum step size is
+<code>0.5</code>. Note however that the last step can be smaller than the value
+specified for the minimum step size option.</p>
+</div>
+<div class="paragraph">
+<p>
+Increasing the maximum default step size may lead to better performance, but
+can also lead to less precision, and <a href="#tools-cifsim-solver-chapter-root-problems">root finding problems</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-solver-options-int-numstep">Number of steps</h7>
+<div class="paragraph">
+<p>The
+<b class="menuref">ODE solver integrator number of steps</b>
+option
+(<b class="menuref">ODE solver: ODE integrator</b>
+category) can be used to configure the
+number of steps to use for the experimental
+<a href="http://en.wikipedia.org/wiki/Adams_method">Adams-Bashforth</a>
+and
+<a href="http://en.wikipedia.org/wiki/Adams_method">Adams-Moulton</a>
+integrators. The number of steps must be greater or equal to two.</p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-solver-chapter-options-root">ODE solver root finder options</h6>
+<div class="paragraph">
+<p>
+
+The <a href="#tools-cifsim-solver-chapter-basics-root">root finder</a> used by the ODE
+solver of the CIF simulator, can be configured using several options.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-solver-options-root-maxcheck">Maximum check interval</h7>
+<div class="paragraph">
+<p>The
+<b class="menuref">ODE solver root finder maximum check interval</b>
+option
+(<b class="menuref">ODE solver: ODE root finder</b>
+category) is explained on a separate
+page. See <a href="#tools-cifsim-solver-chapter-root-problems">Problems with root finding</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-solver-options-root-algo">Root finding algorithm</h7>
+<div class="paragraph">
+<p>The
+<b class="menuref">ODE solver root finding algorithm</b>
+option
+(<b class="menuref">ODE solver: ODE root finder</b>
+category) can be used to configure the
+root finding algorithm to use. The following algorithms are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Regula Falsi
+(<a href="http://en.wikipedia.org/wiki/False_position_method">False position</a>)
+method</p>
+</li>
+<li>
+<p>Illinois method</p>
+</li>
+<li>
+<p>Pegasus method (default)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The <em>Illinois</em> and <em>Pegasus</em> methods are modified <em>Regula Falsi</em> methods. The
+algorithms differ only in how they choose the middle point of the interval.
+This influences their convergence speed. The <em>Regula Falsi</em> method in
+particular should be avoided in practice.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-solver-options-root-tol">Absolute and relative tolerance</h7>
+<div class="paragraph">
+<p>The
+<b class="menuref">ODE solver root finder absolute tolerance</b>
+option
+(<b class="menuref">ODE solver: ODE root finder</b>
+category) and the
+<b class="menuref">ODE solver root finder relative tolerance</b>
+option
+(<b class="menuref">ODE solver: ODE root finder</b>
+category), can be used to
+configure how precise the results of the root finder should be. The lower the
+tolerance (or error), the higher the precision of the results, but also the
+more computing time it costs to get to that precision. The absolute precision
+is the difference between the prediction and the actual value, while the
+relative precision is that same difference, as a fraction of the actual value.
+In the latter case, precision reduces with increasing values.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-cifsim-solver-options-root-maxiter">Maximum iterations</h7>
+<div class="paragraph">
+<p>The
+<b class="menuref">ODE solver root finder maximum iterations</b>
+option
+(<b class="menuref">ODE solver: ODE root finder</b>
+category) can be used to set the
+maximum number of iterations to use for root finding. This value must be at
+least one. If the root interval is larger than the tolerances allow, after the
+maximum number of iterations, root finding fails.</p>
+</div>
+<div class="paragraph">
+<p>If it fails for your CIF specification, increase the value of this option. If
+that does not help, your specification is most likely too complex (by nature),
+or has a modeling error that causes the specification to become too complex
+for the root finding algorithm to handle. The problem however, may also be in
+one of the other root finder options, or in one of the
+<a href="#tools-cifsim-solver-chapter-options">integrator options</a>.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-java-compiler">Java compiler</h5>
+<div class="paragraph">
+<p>
+
+The simulator internally generates
+<a href="http://oracle.com/java">Java</a>
+code from
+the CIF model. This code is compiled using a Java compiler and executed. Code
+generation and compilation result in faster simulation. However, compilation
+itself also takes time. The time it takes to compile is different for different
+Java compilers.</p>
+</div>
+<div class="paragraph">
+<p>Using the <em>Java Compiler</em> option (<em>Compiler</em> category), the Java compiler
+implementation to use, can be configured. We currently provide two different
+Java compilers:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Java compiler from the Java Development Kit (<code>jdk</code>)</p>
+<div class="paragraph">
+<p>The Java Development Kit (JDK) that is required to use our tooling
+includes a Java compiler. This compiler has the advantage that is has a bit
+less overhead of accessing the file system, while it has as disadvantage that
+it is a slower in actually compiling the Java code.</p>
+</div>
+</li>
+<li>
+<p>Eclipse Compiler for Java (<code>eclipse</code>)</p>
+<div class="paragraph">
+<p>The Eclipse Compiler for Java (ecj) is part of the Eclipse Java Development
+Tools (JDT), and is provided with our tooling. This compiler has the
+advantage that is is a faster in actually compiling the Java code, while it
+has as disadvantage that it has a bit more overhead of accessing the file
+system.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The names given above, in parentheses, indicate the command line option values
+to use for selecting the different compilers.</p>
+</div>
+<div class="paragraph">
+<p>In general, the JDK compiler is faster for small CIF models, while the Eclipse
+compiler is faster for larger CIF models. By default, the JDK compiler is
+used.</p>
+</div>
+<div class="paragraph">
+<p>The <em>Java Compiler</em> option has no effect when simulating using a
+<a href="#tools-cifsim-chapter-repeated-simulation">compiled code file</a> (e.g. a
+<code>.cifcode</code> file) for repeated simulations, or when
+<a href="#tools-cifsim-chapter-debug-gen-code">debugging generated code</a> by enabling
+the <em>Load debug code</em> option (<em>Simulator</em> category).</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-simulation-miscellaneous-topics">Simulation miscellaneous topics</h4>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-complete-mode">Complete mode</h5>
+<div class="paragraph">
+<p>
+The CIF simulator calculates for each <a href="#tools-cifsim-traces-state">state</a>
+the set of transitions that are possible from
+that state. It is up to the <a href="#tools-cifsim-input-chapter-index">input component</a>
+to choose one of those transitions, as the transition to take. Using the
+<a href="#tools-cifsim-input-chapter-automatic">automatic input mode</a>, it is possible to
+always choose the first transition that is possible.</p>
+</div>
+<div class="paragraph">
+<p>In that situation, it is then a waste of resources to calculate the other
+possible transitions. Using the
+<b class="menuref">Complete mode</b>
+option (<b class="menuref">Simulator</b>)
+category), it is possible to enable complete mode. If
+complete mode is enabled, the calculation of the possible transitions stops as
+soon as one possible transition is found.</p>
+</div>
+<div class="paragraph">
+<p>The following values are available for the complete mode option:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Auto: disable if possible, enable otherwise</em></p>
+<div class="paragraph">
+<p>Automatically chooses whether to enable or disable complete mode. If it is
+allowed to disable complete mode, it will be disabled. Otherwise, complete
+mode will be enabled.</p>
+</div>
+</li>
+<li>
+<p><em>On: forced enabled</em></p>
+<div class="paragraph">
+<p>Enables complete mode. All possible transitions will be calculated.</p>
+</div>
+</li>
+<li>
+<p><em>Off: forced disabled</em></p>
+<div class="paragraph">
+<p>Disables complete mode. Only the first possible transitions will be
+calculated.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Currently, it is only allowed to disable complete mode, if the
+<a href="#tools-cifsim-input-chapter-automatic">automatic input mode</a> or
+<a href="#tools-cifsim-input-svg-chapter-index">SVG input mode</a> is used, together with
+always choosing the first possible transition.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-extfuncs">External user-defined functions</h5>
+<div class="paragraph">
+<p>
+
+The CIF simulator supports external user-defined functions. Currently, the
+following external languages are supported:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-chapter-extfuncs-java">Java</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-extfuncs-async">Asynchronous execution</h6>
+<div class="paragraph">
+<p>By default, external user-defined functions are executed asynchronously. This
+ensures that the simulation can be <a href="#tools-cifsim-chapter-termination">terminated</a>
+during the execution of such a function. This is
+useful if such functions take a long time to execute. It is also particularly
+useful for external functions that never terminate, for instance because they
+get stuck in a loop, often due to a bug.</p>
+</div>
+<div class="paragraph">
+<p>
+This asynchronous execution however, does lead to a performance penalty. To
+get rid of this performance penalty, disable asynchronous execution, leading
+to synchronous execution. Asynchronous execution can be disabled using the
+<b class="menuref">External functions asynchronous execution</b>
+option
+(<b class="menuref">Simulator</b>
+category).</p>
+</div>
+<div class="paragraph">
+<p>By disabling the asynchronous execution, the simulator can no longer be
+terminated if it gets stuck executing an external user-defined function. If the
+functions runs for a long time, the termination is postponed until the external
+function finishes its execution.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cifsim-extfuncs-side-effects">Side effects</h6>
+<div class="paragraph">
+<p>All user-defined functions in CIF are pure mathematical functions. They must
+therefore be deterministic, and may not have side effects. For internal
+user-defined functions, this is enforced. For external user-defined functions,
+it is mostly impossible to check this constraint in an implementation, and the
+responsibility for checking this is therefore delegated to the end user.
+Practically, this means that for instance logging statements in functions,
+while essentially side effects, may be permitted, as long as the function
+returns the same value, if given the same arguments. This is essential for
+correct simulation results, as the results of function calls may for instance
+be cached by the simulator.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-value-semantics">Value semantics</h6>
+<div class="paragraph">
+<p>The CIF simulator uses value semantics for the parameters and return values
+of functions. That is, changes to the parameters of functions in external
+user-defined functions are <em>not</em> reflected back to the CIF specification.
+Furthermore, changes to the return values in the CIF simulator have no effect
+on subsequent calls to external user-defined functions.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-extfuncs-java">External user-defined Java functions</h5>
+<div class="paragraph">
+<p>
+External user-defined Java functions allow the use of static Java methods from
+CIF specifications. This page explains how to use such Java methods, how the
+simulator loads and invokes them, what is allowed, etc. It explicitly does not
+explain how to write or compile Java code.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-external-implementation-reference">External implementation reference</h6>
+<div class="paragraph">
+<p>Consider the following examples of external user-defined Java function:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">func real f1(real x): "java:java.lang.Math.expm1";
+
+func int f2(bool x): "java:pkg.Cls.method|../some.jar;bin";</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Two external user-defined functions are given as examples. Both have a string
+literal as external implementation reference. For Java functions, the string
+literal must start with <code>java:</code>. Then the absolute name of the Java method
+that is to be invoked is given. That is, the package name, class name, and
+method name are given, separated by dots (<code>.</code>).</p>
+</div>
+<div class="paragraph">
+<p>Optionally, a Java class path may be given at the end, preceded by a bar
+(<code>|</code>) character. The class path entries must be separated by semicolons
+(<code>;</code>) regardless of the operating system. The class path entries are absolute
+or relative local file system paths to Jar files or directories with Java class
+files. Relative paths are resolved against the directory that contains the
+CIF specification in which the external user-defined function is declared. Both
+Linux/Mac path separators (<code>/</code>) and Windows path separators (<code>\</code>) may be
+used in class path entries. However, <code>\</code> must be escaped as <code>\\</code> in CIF
+string literals, and thus it is recommended to always use <code>/</code> as path
+separator. A discussion of the Java class path concept is beyond the scope of
+this documentation.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-types-and-values">Supported types and values</h6>
+<div class="paragraph">
+<p>Not all CIF data types are supported for the parameters and return values of
+external user-defined Java functions. The following table lists the allowed
+CIF types, and their corresponding Java types.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">CIF type</th>
+<th class="tableblock halign-left valign-top">Java type</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bool</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.lang.Boolean</code> / <code>boolean</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.lang.Integer</code> / <code>int</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int[a..b]</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.lang.Integer</code> / <code>int</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.lang.Double</code> / <code>double</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>string</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.lang.String</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>list t</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.util.List&lt;t&gt;</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>set t</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.util.List&lt;t&gt;</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>dict(k: v)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.util.Map&lt;k, v&gt;</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>tuple(t1, t2, ..., tn)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.util.List&lt;java.lang.Object&gt;</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Unless otherwise specified, the primitive Java types (<code>boolean</code>, <code>int</code>,
+and <code>double</code>) can be used interchangeably with their class variants
+(<code>java.lang.Boolean</code>, <code>java.lang.Integer</code>, and <code>java.lang.Double</code>).
+For lists and sets, the element type recursively affects the type parameters of
+the Java types. Similarly, for dictionaries, the key and value types affect
+the type parameters of the Java <code>Map</code> type. Since Java doesn&#8217;t have tuples,
+and there is no way in Java to define a type with a variable number of type
+parameters, CIF tuples are passed to Java as a list of objects. It may be
+assumed that such lists have the same number of elements as there are fields in
+the original tuple, and that the elements have types that correspond to the
+types of the field of the tuple. The following table shows a few examples:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">CIF type</th>
+<th class="tableblock halign-left valign-top">Java type</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bool</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>boolean</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>list int</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.util.List&lt;java.lang.Integer&gt;</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>set tuple(int a, b)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.util.Set&lt;java.util.List&lt;java.lang.Object&gt;&gt;</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>For parameters, no <code>null</code> values are ever passed, not even as elements of
+lists, etc. Furthermore, for <code>real</code> typed values, <code>NaN</code>, positive infinity,
+and negative infinity are never passed along.</p>
+</div>
+<div class="paragraph">
+<p>For return values, <code>null</code> values, as well as <code>NaN</code>, positive infinity, and
+negative infinity are considered runtime errors. Furthermore, integer values
+outside their CIF integer type range bounds are considered runtime errors as
+well.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-method-resolution">Method resolution</h6>
+<div class="paragraph">
+<p>The class as specified in the external implementation reference is loaded using
+a Java class loader. By default, the system class loader is used. If additional
+class path entries are specified in the external implementation reference, an
+extended class loader is used that searches in the additional class path
+entries before deferring to the system class loader. The class is loaded using
+the
+<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html#name">binary name</a>
+of the class.</p>
+</div>
+<div class="paragraph">
+<p>The method that is resolved must be a static method. The access modifier of the
+static method is irrelevant. That is, it doesn&#8217;t matter whether the method is
+<code>private</code>, <code>protected</code>, <code>public</code>, etc.</p>
+</div>
+<div class="paragraph">
+<p>The method is resolved in the Java Virtual Machine (JVM) that runs the
+simulator. The method is resolved by name, and parameter types. The parameter
+types only include the top level type. That is, for CIF type <code>list int</code>, the
+Java type <code>java.util.List</code> is used as the type of the parameter. If more than
+one method with the same parameter types is declared in the class, and one of
+these methods has a return type that is more specific than any of the others,
+that method is used. Otherwise one of the methods is chosen arbitrarily.</p>
+</div>
+<div class="paragraph">
+<p>For parameters that have primitive Java types as their type, the primitive
+types are used to resolve the method instead of their classes. In other words,
+when resolving the method, or the proper overload of the method, <code>int</code> and
+<code>java.lang.Integer</code> are considered incompatible.</p>
+</div>
+<div class="paragraph">
+<p>The CIF simulator employs lazy loading. That is, if the external Java
+function is never called, it is also never loaded.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-method-invocation">Method invocation</h6>
+<div class="paragraph">
+<p>The method is invoked in the Java Virtual Machine (JVM) that runs the
+simulator, using reflection. By default, it is invoked
+<a href="#tools-cifsim-extfuncs-async">asynchronously</a>.</p>
+</div>
+<div class="paragraph">
+<p>Since the parameter types are not checked recursively when the method is
+resolved, methods may fail to execute properly if the type signatures don&#8217;t
+match exactly. Similarly, for the return type only the top level type is
+checked. If a return value does not match the CIF type (wrong element type,
+wrong tuple length, etc), simulation will fail with a runtime error.</p>
+</div>
+<div class="paragraph">
+<p>Any exceptions that occur during execution of the Java method are caught by
+the simulator. When the simulator catches such an exception, it will print the
+Java stack trace of the exception to the console, and simulation will be
+<a href="#tools-cifsim-chapter-termination">terminated</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-side-effects">Side effects</h6>
+<div class="paragraph">
+<p>As all functions in CIF, external user-defined Java functions should not have
+any <a href="#tools-cifsim-extfuncs-side-effects">side effects</a>. That is, if
+called with the same arguments, it should return the same value each time.
+More concretely, maintaining state information should be avoided, as should
+file I/O, and reading from stdin.</p>
+</div>
+<div class="paragraph">
+<p>Writing to stdout and stderr should not affect the result of the method. It
+should however be avoided as well, as such writes are associated with the
+streams of the Java Virtual Machine (JVM), and not the simulator. The output
+will not end up on the Eclipse console of the simulator.</p>
+</div>
+<div class="paragraph">
+<p>By default, the Java methods are invoked <a href="#tools-cifsim-extfuncs-async">asynchronously</a>,
+on a freshly created thread. That is, there
+is no guarantee that an invocation uses the same thread as the previous
+invocation. If static fields (class variables) are used to maintain state, this
+may cause problems if thread safety is not ensured by the Java method. If
+synchronous execution is used, all external function calls are invoked from the
+simulation thread, and such thread safety issues should not be a problem.</p>
+</div>
+<div class="paragraph">
+<p>You should assume that each external function is loaded using a different
+class loader. As such, multiple Java methods from the same class, from the
+same external library, may be loaded using different class loaders as
+well. As such, shared static fields (class variables) of those classes can in
+general not be shared by different external functions.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-profiling">Profiling</h5>
+<div class="paragraph">
+<p>
+
+
+The CIF simulator has a
+<b class="menuref">Profiling</b>
+option (<b class="menuref">Simulator</b>
+category). If the option is enabled, information about the number of
+transitions taken per second, is printed to the console. Enabling profiling
+disables most other types of console
+<a href="#tools-cifsim-output-chapter-index">output</a>. By default, profiling is disabled.</p>
+</div>
+<div class="paragraph">
+<p>The profiling output looks somewhat like this:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">750431.42 transitions/second
+640589.87 transitions/second
+890939.01 transitions/second
+887228.57 transitions/second
+890143.25 transitions/second
+893674.44 transitions/second
+891812.69 transitions/second</code></pre>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-distr-seeds">Stochastic distributions and seeds</h5>
+<div class="paragraph">
+<p>
+
+<a href="#tut-stochastics-chapter-intro">Stochastics</a> can be used to model
+randomness in CIF models. The CIF simulator exhibits
+<a href="#tut-stochastics-chapter-pseudo-randomness">pseudo-randomness</a>. This page
+explains how to influence that pseudo-randomness.</p>
+</div>
+<div class="paragraph">
+<p>The randomness of the stochastic distributions is implemented in the CIF
+simulator using
+<a href="http://en.wikipedia.org/wiki/Pseudorandom_number_generator">pseudorandom number generators</a>
+(PRNGs). The PRNG used is the
+<a href="http://en.wikipedia.org/wiki/Mersenne_twister">Mersenne Twister</a>.
+The sequences of
+random numbers that are generated by the MT are not truly random. They are
+pseudorandom, as they start to repeat after some time. The Mersenne Twister
+however, has a very long <em>period</em> of 2<sup>19937</sup> - 1 numbers.</p>
+</div>
+<div class="paragraph">
+<p>Since the sequence of generated random numbers is always the same, the only
+way to vary it, is to use a different starting place. The starting place is
+determined by the initial
+<a href="http://en.wikipedia.org/wiki/Random_seed">seed</a>,
+which can be configured through the
+<b class="menuref">Initial seed for stochastic distributions</b>
+option (<b class="menuref">Simulator</b>
+category). If specified, it must
+be a value in the range [1 .. 2<sup>30</sup>]. If it is not specified, a random
+initial seed in that range is chosen by the simulator. If a random initial seed
+is chosen, and it is used, it is <a href="#tools-cifsim-output-normal-seeds">printed</a> to the console.</p>
+</div>
+<div class="paragraph">
+<p>The initial seed as provided by the option, is used for the first stochastic
+distribution that is created. Each subsequent distribution uses the next
+available seed. That is, if you specify an initial seed of 5, then the first
+distribution is created with an initial seed of 5, the next one uses 6, the
+third one uses 7, etc. The initial seeds are kept in the range
+[1 .. 2<sup>30</sup>]. After seed 2<sup>30</sup>, 1 is used as seed, then 2 is used as seed, etc.</p>
+</div>
+<div class="paragraph">
+<p>Simulating the same specification multiple times, using the same initial seed,
+results in the same samples. Therefore, using a fixed seed can make your
+simulation deterministic, even though you use stochastic distributions to
+introduce randomness into your specification.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-simulation-developer-topics">Simulation developer topics</h4>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-max-time-point-tol">Maximum time point tolerance</h5>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+This page is primarily intended for the developers of the CIF simulator,
+and not its end users.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The CIF simulator internally often queries the trajectories computed by the
+<a href="#tools-cifsim-solver-chapter-index">ODE solver</a>. Due to the limited precision
+of binary floating point number representations, requests of time points for
+which no exact match is present in the trajectories, but for which a very close
+match is present, are allowed. The simulator compensates for these small
+deviations, to avoid accumulation of such deviations.</p>
+</div>
+<div class="paragraph">
+<p>
+The simulator uses the value of the
+<b class="menuref">Maximum time point tolerance</b>
+option (<b class="menuref">Simulation</b>
+category) to determine whether two time points
+are close enough to each other to constitute a match. The tolerance is given in
+<a href="http://en.wikipedia.org/wiki/Unit_in_the_last_place">ulps</a>
+(<em>units in the
+last place</em>, or <em>units of least precision</em>). One ulp is the difference
+between two subsequent floating point numbers, for the limited precision
+binary floating point number representation used by the simulator. That is, two
+floating point numbers are one ulp away from each other, if there is no other
+floating point number between them, that can be represented using the floating
+point number representation used by the simulator. Since an ulp increases as
+the floating point numbers increase, the tolerance is thus relative to the
+values of the time points.</p>
+</div>
+<div class="paragraph">
+<p>The tolerance values chosen using the option must be in the range
+[1 .. 2<sup>30</sup>]. The default tolerance is 2<sup>10</sup> (= 1024) ulps. The default
+tolerance should suffice, but if it doesn&#8217;t, you may
+be presented with an error like this:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">ERROR: Simulation resulted in a runtime error, for state: time=0.0, x=1.0.
+CAUSE: Requested time point "1.6000000000000005" is "2.0" ulps (1 ulp = 2.220446049250313e-16) away from the closest time point in the trajectories "1.6", which is farther away than the maximum tolerance of "1" ulps. You can try increasing the value of the maximum time point tolerance option. Please also contact the development team.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If you get such an error, you can try to increase the tolerance using the
+<b class="menuref">Maximum time point tolerance</b>
+option, in order to be able to
+continue your simulation. However, as this shouldn&#8217;t actually happen, you
+should also contact the development team, who will then figure out why the
+default tolerance doesn&#8217;t suffice for your model.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-debug-gen-code">Debugging generated code</h5>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+This page is primarily intended for the developers of the CIF simulator, and not its end users.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The CIF simulator generates highly optimized code for the specification, to
+speed up the simulation. By enabling the
+<b class="menuref">Debug the generated code (by writing it to disk)</b>
+<a href="#tools-cifsim-output-chapter-debug">debugging output</a>,
+the generated code can be written to disk, for further debugging.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-output-directory">Output directory</h6>
+<div class="paragraph">
+<p>If the simulation is performed from within Eclipse, and a project named
+<code>org.eclipse.escet.cif.simulator.debug</code> exists, is not closed, and has a <code>src</code>
+directory, the generated code will be written to that <code>src</code> directory.
+Otherwise, the generated code will be written to the directory containing the
+input specification file.</p>
+</div>
+<div class="paragraph">
+<p>Regardless, the code is also always written to a <code>cifcode</code>
+sub-directory. If this sub-directory does not yet exist, it is created. If it
+already exists, all existing <code>.java</code> files are removed from the
+sub-directory first, before the newly generated code is written.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-written-files">Written files</h6>
+<div class="paragraph">
+<p>The generated code consists of Java files only. This results in several
+<code>.java</code> files being written to the <code>cifcode</code> directory.</p>
+</div>
+<div class="paragraph">
+<p>Additionally, an Eclipse launch configuration file (<code>_cifsim_debug.launch</code>)
+is written. This launch configuration can be used to reproduce the simulation
+implemented by the generated code. The launch configuration
+reproduces the simulation options that were used, and always shows the option
+dialog. The working directory for the simulation performed via the generated
+launch configuration is the same working directory as the original simulation.
+This allows additional files, such as configuration files, to be found.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-how-to-use">How to use</h6>
+<div class="paragraph">
+<p>To use this feature, follow these steps:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Import all CIF related source projects into your Eclipse workspace.</p>
+</li>
+<li>
+<p>Make sure your workspace is automatically rebuilt, by enabling the
+<b class="menuref">Build Automatically</b>
+option in the
+<b class="menuref">Project</b>
+menu.</p>
+</li>
+<li>
+<p>Start a sub-Eclipse application, by right clicking on any plug-in project in
+the workspace, and choosing <span class="menuseq"><b class="menu">Run as</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Eclipse Application</b></span>
+or <span class="menuseq"><b class="menu">Debug as</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Eclipse Application</b></span>.</p>
+</li>
+<li>
+<p>In the sub-Eclipse that opens, make sure the CIF specification (the <code>.cif</code>
+file) that you like to simulate is available in the workspace.</p>
+</li>
+<li>
+<p>In the sub-Eclipse, import the <code>org.eclipse.escet.cif.simulator.debug</code> source
+project.</p>
+</li>
+<li>
+<p>Simulate the CIF specification, and make sure you enable the
+<b class="menuref">Debug the generated code</b>
+option.</p>
+</li>
+<li>
+<p>Continue simulation, if desired.</p>
+</li>
+<li>
+<p>Once the simulation has terminated, switch back to the main Eclipse.</p>
+</li>
+<li>
+<p>Refresh the <code>org.eclipse.escet.cif.simulator.debug</code> project.</p>
+</li>
+<li>
+<p>Set breakpoints in the generated Java code, or in the simulator code, as
+desired.</p>
+</li>
+<li>
+<p>Right click the launch configuration in the <code>src/cifcode</code> directory, and
+choose <span class="menuseq"><b class="menu">Debug as</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">_cifsim_debug</b></span>.</p>
+</li>
+<li>
+<p>Debug the simulation, with the generated code, as you would any Java program.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-starting-the-simulator-with-generated-code">Starting the simulator with generated code</h6>
+<div class="paragraph">
+<p>The launch configuration that is written to disk with the generated code, uses
+the
+<b class="menuref">Load debug code</b>
+option (<b class="menuref">Simulator</b> category). Using
+this option, the classpath (directory) where the already generated code is
+located, is specified. By specifying it, the simulator knows from where to load
+it.</p>
+</div>
+<div class="paragraph">
+<p>Simulations not started from the generated launch configuration, generally
+don&#8217;t use this option. They load the input specification, validate it, generate
+fresh code, and compile the code in-memory, or use
+<a href="#tools-cifsim-repeated-sim-compile-once">compiled code files</a></p>
+</div>
+<div class="paragraph">
+<p>Simulations using the generated code ignore all options related to
+<a href="#tools-cifsim-chapter-repeated-simulation">repeated simulations</a>. That is, the
+<em>Load debug code</em> option takes priority over the <em>Compile only</em> option
+(<em>Compiler</em> category), and simulating with
+<a href="#tools-cifsim-repeated-sim-compile-once">compiled code files</a>.</p>
+</div>
+<div class="paragraph">
+<p>A warning is printed to the console if the generated code was generated with
+a different version of the simulator than the one used to simulate it. Ignoring
+the warning may lead to unexpected simulation results, or even simulator
+crashes.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cifsim-chapter-test-mode">Test mode</h5>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+This page is primarily intended for the developers of the CIF simulator,
+and not its end users.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>In order to be able to perform automated testing, the
+<b class="menuref">Test mode</b>
+option (<b class="menuref">Output</b>
+category) can be used. This option has the following
+effect:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The visual interfaces for all
+<a href="#tools-cifsim-output-chapter-index">output components</a> (such as visualizers)
+are disabled.</p>
+</li>
+<li>
+<p>The user is no longer asked to
+<a href="#tools-cifsim-termination-confirm">confirm termination</a> of the
+simulator, if the the
+<b class="menuref">Ask to confirm simulator termination</b>
+option (<b class="menuref">Simulator</b>
+category) is configured to let the simulator
+decide whether to ask the user for confirmation or terminate automatically.
+By not asking for user input at the console, the automated test set can be
+fully automatically executed.</p>
+</li>
+<li>
+<p>It is allowed to perform <a href="#tools-cifsim-output-chapter-realtime">real-time</a>
+simulation without using any
+<a href="#tools-cifsim-output-realtime-outcomp">real-time output components</a>,
+allowing testing of the real-time functionality in the automated test set.</p>
+</li>
+<li>
+<p>All <a href="#tools-cifsim-output-chapter-realtime">real-time delays</a> are skipped. By
+not performing unnecessary real-time delays, the automated test set executes
+as fast as possible.</p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-index">SVG visualization</a> operates in
+synchronous mode, rather than asynchronous mode. This ensures that debug
+output becomes synchronous as well, and we thus get consistent output for our
+test cases. This is not only useful for automated testing, but also for
+debugging.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tools-verification-tools">Verification tools</h3>
+<div class="sect3">
+<h4 id="tools-chapter-cif2mcrl2">CIF to mCRL2 transformer</h4>
+<div class="paragraph">
+<p>
+
+
+The CIF to mCRL2 transformer is used to convert a CIF specification to a
+mCRL2 specification.
+<a href="http://www.mcrl2.org/">mCRL2</a>
+is a tool for verifying properties of the model.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-transformation-4">Starting the transformation</h5>
+<div class="paragraph">
+<p>The transformation can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF verification tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Convert CIF to mCRL2&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF verification tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Convert CIF to mCRL2&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cif2mcrl2</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cif2mcrl2</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2mcrl2-options">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file path</em>: The absolute or relative file system path to the input
+CIF specification.</p>
+</li>
+<li>
+<p><em>Instance tree definition</em>: mCRL2 uses a tree of processes which you can
+specify manually here. If not specified, it takes the default solution,
+which first merges all CIF automata (one at a time), and on top of that, the
+variable processes of the shared variables (also one at a time).
+How to define your own tree is explained in the
+<a href="#tools-cif2mcrl2-instancetree-syntax">instantiation tree syntax</a> Section.</p>
+</li>
+<li>
+<p><em>Enable debug output</em>: The transformer derives information about used and
+available variables in the instantiation tree, and uses that information to
+generate the mCRL2 action operations at every level. By enabling this
+option, this information is also written to an output file for further
+external analysis. By default, the information is written in a file with the
+same name as the input file, except first the <code>.cif</code> extension is removed
+(if present), and a <code>_dbg.txt</code> extension is appended. The name of the
+output file can be changed with the <em>Debug output file path</em> option. Setting
+the latter option enables this option.</p>
+</li>
+<li>
+<p><em>Debug output file path</em>: The absolute or relative file system path to use
+for writing derived information about used and available variables at every
+level in the instantiation tree. Setting this option changes the debug
+output file path to the given path. It also enables the <em>Enable debug
+output</em> option.</p>
+</li>
+<li>
+<p><em>Output file path</em>: The absolute or relative file system path for writing
+the generated mCRL2 output file. By default, the output file path is the
+same as the input file path, but with the <code>.cif</code> extension removed (if it
+exists), and the <code>.mcrl2</code> extension added. By setting this option, the
+default is overridden by the given value.</p>
+</li>
+<li>
+<p><em>Generate 'value' actions</em>: To query the value of variable <code>x</code>,
+a <code>value_x</code> action can be used. By default, such actions are generated for
+every variable in the system. Using this option, you can define precisely
+which variables should have such an action. See the
+<a href="#cif2mcrl2-value-select">Generation of 'value' actions</a> Section for more details.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-supported-specifications-4">Supported specifications</h5>
+<div class="paragraph">
+<p>The CIF to mCRL2 transformer supports a subset of CIF specifications. The
+following restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The transformer ignores the supervisory kind of the automata.</p>
+</li>
+<li>
+<p>Algebraic variables are not supported.</p>
+</li>
+<li>
+<p>Continuous variables are not supported.</p>
+</li>
+<li>
+<p>Input variables are not supported.</p>
+</li>
+<li>
+<p>Equations are not supported.</p>
+</li>
+<li>
+<p>Initialization predicates are not supported, except for initialization
+predicates in a location.</p>
+</li>
+<li>
+<p>Invariants are not supported.</p>
+</li>
+<li>
+<p>Marker predicates are ignored.</p>
+</li>
+<li>
+<p>Discrete variables must have type <code>bool</code> or <code>int</code>. The latter may have
+a range.</p>
+</li>
+<li>
+<p>Multiple potential initial values are not supported.</p>
+</li>
+<li>
+<p>Initial value must be a constant.</p>
+</li>
+<li>
+<p>There must be at least one automaton.</p>
+</li>
+<li>
+<p>The transformation translates the range of integer variables if used, but it
+does not enforce the maximum and minimum integer value of CIF.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In automata, there are a number of extra conditions:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The <code>initial</code> expression in locations must be constant.</p>
+</li>
+<li>
+<p>There must be a single initial location in each automaton.</p>
+</li>
+<li>
+<p>Conditional updates are not supported, only assignment updates are allowed.</p>
+</li>
+<li>
+<p>Multi-assignments are not supported.</p>
+</li>
+<li>
+<p>Channels are not supported.</p>
+</li>
+<li>
+<p>The <code>tau</code> event is not supported.</p>
+</li>
+<li>
+<p>Urgency of locations and edges is ignored.</p>
+</li>
+<li>
+<p>Location references are not supported.</p>
+</li>
+<li>
+<p>All expressions and sub-expressions must be of type <code>bool</code> or <code>int</code>. The
+latter may have a range.</p>
+</li>
+<li>
+<p>Boolean constants, discrete variables, and operators <code>and</code>, <code>or</code>,
+<code>==</code>, <code>&gt;=</code>, <code>&gt;</code>, <code>&lt;=</code>, <code>&lt;</code>, <code>!=</code>, and <code>not</code> are allowed.</p>
+</li>
+<li>
+<p>Integer constants, discrete variables, binary operators <code>+</code>, <code>*</code>, <code>-</code>,
+and unary operators <code>-</code> and <code>+</code> are allowed.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>However, some of these limitations are resolved by preprocessing of the
+specification, as explained in the next section.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-preprocessing-4">Preprocessing</h5>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+applied as preprocessing (in the given order), to increase the subset of CIF
+specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-io-decls">Remove I/O declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-self">Eliminate automaton <code>self</code> references</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-alg-vars">Eliminate algebraic variables</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-consts">Eliminate constants</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-enums-to-ints">Convert enumerations to integers</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-monitors">Eliminate monitors</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-add-default-init-values">Add default initial values</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="cif2mcrl2-value-select">Generation of 'value' actions</h5>
+<div class="paragraph">
+<p>The CIF to mCRL2 transformer generates a <code>value</code> action for each variable by
+default. In some cases, this may not be wanted. Variables that never have to
+be queried for their value do not need such an action. Having such an action
+available anyway increases the amount of work that has to be done by the mCRL2
+tool. To eliminate these unneeded <code>value</code> actions, the CIF to mCRL2
+transformer has the <em>Generate 'value' actions</em> option.</p>
+</div>
+<div class="paragraph">
+<p>The option takes a comma separated list of variable patterns. Each pattern
+can add or remove variables. If the pattern starts with a <code>+</code> character,
+variables are added. If the pattern starts with a <code>-</code> character, variables
+are removed. If the pattern start neither with a <code>+</code> nor with a <code>-</code>
+character, variables are added. The main part of each pattern is the name of
+the variable to add or remove. In addition, you can use the <code>*</code> character
+as a shorthand for 'zero or more arbitrary characters', allowing you to write
+abbreviations, and match several variables at the same time.</p>
+</div>
+<div class="paragraph">
+<p>For example, assume existence of the following variables in a CIF model:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>A.p12 A.q2 A.z B.x B.y1 B.y2 B.z C.q</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Below a number of example option values, and what variables they select from
+the above list.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The option value <code>B.x,+A.z</code> selects variables <code>B.x</code> and <code>A.z</code>.</p>
+</li>
+<li>
+<p>The option value <code>+*1</code> matches all variables that end with a <code>1</code>, which
+is variable <code>B.y1</code> only (Variable <code>A.p12</code> does have a <code>1</code> in it, but
+not at the end.)</p>
+</li>
+<li>
+<p>The option value <code>+*1*</code> matches all variables with a <code>1</code> at any
+position. This matches both <code>A.p12</code> and <code>B.y1</code>.</p>
+</li>
+<li>
+<p>The option value <code>+*,-B.*</code> selects all variables, except those in
+automaton <code>B</code>. (<code>*</code> adds all variables, then <code>-B.*</code> removes all
+variables that start with <code>B.</code>, that is all variables in automaton <code>B</code>.)</p>
+</li>
+<li>
+<p>The option value <code>-*</code> removes all <code>value</code> actions, since the pattern
+removes all variables.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2mcrl2-instancetree-syntax">Syntax of the instance tree</h5>
+<div class="paragraph">
+<p>In mCRL2, a behavior process is required for every automaton in the input, and
+a variable process is needed for every variable used (read or written) by two
+or more automata. In addition, it is allowed to have a variable process for
+variables that are used in one automaton only (that is, a local variable of
+the automaton).</p>
+</div>
+<div class="paragraph">
+<p>All these processes must be instantiated using the parallel composition
+operator. For larger specifications, the naive solution of instantiating all
+processes together in one level fails due to having too many allowed
+combinations of actions for the mCRL2 tool to handle.</p>
+</div>
+<div class="paragraph">
+<p>A different solution is to instantiate smaller groups of processes at a time,
+and then use these groups again in other instantiations. Instantiation happens
+in multiple levels in this case, leading to a tree of process instantiations.
+At each level, the set of allowed actions is restricted by adding action
+operators. This results in a large reduction of the number of possible
+combinations of actions that need to be explored by the mCRL2 tool. Fewer
+combinations of actions in turn leads to enabling larger specifications to be
+verified.</p>
+</div>
+<div class="paragraph">
+<p>Which processes and groups are taken together at each level in the tree has a
+large impact on feasibility. The CIF to mCRL2 transformer has a default
+scheme, where pairs of one group and one behavior process are taken together
+at each level (except at the bottom, where two behavior processes are merged
+instead). On top of that tree, pairs of a group and a variable process are
+taken together.</p>
+</div>
+<div class="paragraph">
+<p>The CIF to mCRL2 transformer does not perform analysis to decide how processes
+and variables should combined. In many cases this provides a working solution.
+For some specifications however, you may want to have more influence in the
+order of grouping. For this reason, the <em>Instance tree definition</em> option
+exists. It allows you to define which processes should be taken together at
+each level in the instantiation tree.</p>
+</div>
+<div class="paragraph">
+<p>The current implementation has limits with respect to ordering. Automata
+processes must be merged first (but the number of levels and the order of
+combining is free), and then variables must be added one at a time (but which
+variable to use at each level is free).</p>
+</div>
+<div class="paragraph">
+<p>The option expects absolute names of all automata in the specification and
+absolute names of all discrete variables used in two more automata, separated
+by white space or commas. In addition you may add the absolute names of
+variables used in only one automaton. For each element mentioned, a process is
+created in mCRL2. Variables used in one automaton that are not mentioned,
+become local variables of the behavior process of the automaton that uses the
+variable.</p>
+</div>
+<div class="paragraph">
+<p>Processes for the mentioned CIF elements are instantiated. Sub-groups of
+processes are written by surrounding them with parentheses. For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>( ( A B C ) A.x ) B.y</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>takes automata <code>A</code>, <code>B</code>, <code>C</code> together. One level higher, variable
+<code>A.x</code> is added, and finally variable <code>B.y</code> is added at the highest level.
+Another order is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>( ( ( A B ) C ) B.y ) A.x</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>First processes <code>A</code> and <code>B</code> are combined, then process <code>C</code> is added, and
+finally variables <code>B.y</code> and <code>A.x</code> at the top-most two levels.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-debug-output">Debug output</h5>
+<div class="paragraph">
+<p>The transformer analyzes use of the variables by each automaton, and computes
+variable usage and availability of the variables at each level in the
+instantiation tree. This information is written to a file with debug output by
+enabling the <em>Enable debug output</em> option. As an example, consider the
+following artificial CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event a, b, c;
+
+automaton P:
+  disc int[0..10] x = 0;
+  disc int[-5..5] zero = 0;
+
+  location p1:
+    initial;
+    edge a do x := x + 1 goto p2;
+
+  location p2:
+    edge c when Q.y != 0 goto p1;
+    edge a do x := 1 goto p1;
+end
+
+automaton Q:
+  disc int[0..1] y = 1;
+
+  location q1:
+    initial;
+    edge a when y = 1 goto q2;
+
+  location q2:
+    edge b when y = 1 and P.x &lt; 8 and P.zero = 0 goto q1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specification has two automata <code>P</code> and <code>Q</code>, and two shared variables
+<code>P.x</code> and <code>Q.y</code>. The ranges of the variables are important, mCRL2
+considers the integer type unbounded, depending on your CIF file, without
+giving upper and lower bounds for the variables, you may end up in the
+situation that mCRL2 tries every single value of its infinite integer type,
+which takes a very long time!</p>
+</div>
+<div class="paragraph">
+<p>Variable <code>zero</code> is not shared, only automaton <code>Q</code> uses it. The transformer
+moves it to the <code>Q</code> process. Normally however, you would use a constant
+instead of a variable.</p>
+</div>
+<div class="paragraph">
+<p>The instance tree used in the transformation is <code>( ( P Q ) P.x ) Q.y</code>. The
+debug output for <code>P</code> is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>===============================================================
+Node 1.1.1.1
+
+Variable use by behavior processes ordered by event:
+    a:
+        P.x  read:SOMETIMES  write:ALWAYS
+    c:
+        Q.y  read:ALWAYS  write:NEVER</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Automaton <code>P</code> has one <code>c</code> edge, which checks the value of <code>Q.y</code> but it
+does not change its value. It has two <code>a</code> edges, only the <code>a</code> edge in
+location <code>p1</code> reads <code>P.x</code> (to compute <code>x + 1</code>). Both edges assign a new
+value to <code>P.x</code>.</p>
+</div>
+<div class="paragraph">
+<p>In a similar way, the node information for automaton <code>Q</code> is computed. The
+result is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>===============================================================
+Node 1.1.1.2
+
+Variable use by behavior processes ordered by event:
+    a:
+        Q.y  read:ALWAYS  write:NEVER
+    b:
+        Q.y  read:ALWAYS  write:NEVER
+        P.x  read:ALWAYS  write:NEVER</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The automaton only checks values rather than writing them. As you can see,
+variable <code>P.x</code> is not mentioned with event <code>a</code>, since there is no edge in
+the automaton with event <code>a</code> that accesses variable <code>P.x</code>.</p>
+</div>
+<div class="paragraph">
+<p>The node that merges both automata, i.e. <code>( P Q )</code>, has the following
+formation:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>===============================================================
+Node 1.1.1
+
+Variable use by behavior processes ordered by event:
+    a:
+        P.x  read:SOMETIMES  write:ALWAYS
+        Q.y  read:ALWAYS     write:NEVER
+    c:
+        Q.y  read:ALWAYS  write:NEVER
+    b:
+        Q.y  read:ALWAYS  write:NEVER
+        P.x  read:ALWAYS  write:NEVER
+
+Children:
+    node 1.1.1.1
+    node 1.1.1.2</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Variable use by each event is simply merged. In this example there is no
+overlap, but that works as you would expect, <code>SOMETIMES</code> overrides
+<code>NEVER</code>, and <code>ALWAYS</code> overrides <code>SOMETIMES</code>.</p>
+</div>
+<div class="paragraph">
+<p>The node for variable process for <code>P.x</code> only provides a variable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>===============================================================
+Node 1.1.2
+
+Available variable processes:
+    P.x</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The output states that variable <code>P.x</code> is available here.</p>
+</div>
+<div class="paragraph">
+<p>At <code>( P Q ) P.x</code> node, the merge of the variable <code>P.x</code> with the two
+automata, this results in:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>===============================================================
+Node 1.1
+
+Available variable processes:
+    P.x
+
+Variable use by behavior processes ordered by event:
+    a:
+        P.x  read:SOMETIMES  write:ALWAYS
+        Q.y  read:ALWAYS     write:NEVER
+    c:
+        Q.y  read:ALWAYS  write:NEVER
+        P.x  read:NEVER   write:NEVER
+    b:
+        Q.y  read:ALWAYS  write:NEVER
+        P.x  read:ALWAYS  write:NEVER
+
+Children:
+    node 1.1.1
+    node 1.1.2</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this node, variable <code>P.x</code> is also available. The variable process does
+not perform events, so the event variable table of node <code>1.1.1</code> is copied.
+The only exception is the additional line <code>P.x</code> for event <code>c</code>. The reason
+for this line is that while <code>( P Q )</code> may not use <code>P.x</code> in combination
+with event <code>c</code>, other automata higher up in the tree may still need that
+variable. (In a future version of the transformer tool, it may be detected
+that such use never happens, and there is no need to add the line here.)</p>
+</div>
+<div class="paragraph">
+<p>Node <code>1.2</code> is the variable process of <code>Q.y</code>. It looks the same as node
+<code>1.1.2</code>, except for the name of the variable.</p>
+</div>
+<div class="paragraph">
+<p>Finally the top-node that merges <code>( P Q ) P.x</code> with <code>Q.y</code>, bringing
+everything together, looks like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>===============================================================
+Node 1
+
+Available variable processes:
+    P.x
+    Q.y
+
+Variable use by behavior processes ordered by event:
+    a:
+        P.x  read:SOMETIMES  write:ALWAYS
+        Q.y  read:ALWAYS     write:NEVER
+    c:
+        Q.y  read:ALWAYS  write:NEVER
+        P.x  read:NEVER   write:NEVER
+    b:
+        Q.y  read:ALWAYS  write:NEVER
+        P.x  read:ALWAYS  write:NEVER
+
+Children:
+    node 1.1
+    node 1.2</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>Q.y</code> variable is now also available. The event variable table is again
+copied. Since all events already used variable <code>Q.y</code> no additional lines
+were added.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-output-of-the-transformation">Output of the transformation</h5>
+<div class="paragraph">
+<p>A variable process in mCRL2 handles shared access to a variable. For variable
+<code>P.x</code> in the above example it looks like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>act value_x, vread_x, vwrite_x, sync_x, aread_x, awrite_x : Int;
+
+proc VarProc_x(v:Int) =
+  value_x(v) . VarProc_x(v) +
+  vread_x(v) . VarProc_x(v) +
+  sum m:Int . ((m &gt;= 0) &amp;&amp; (m &lt;= 10)) -&gt; vwrite_x(m) . VarProc_x(m) +
+  sum m:Int . ((m &gt;= 0) &amp;&amp; (m &lt;= 10)) -&gt; vread_x(v) | vwrite_x(m) . VarProc_x(m);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The name of the actions all end with the name of the variable. If the CIF
+specification has two or more variables with the same name, a number gets
+appended to make each variable unique in mCRL2.</p>
+</div>
+<div class="paragraph">
+<p>A behavior process is generated for each automaton instance. Like the
+variables, the name of the automaton is used in the output. If there are
+name conflicts, a number is appended to make it unique. The process is
+the same list of edges of the original CIF automaton, with added read and
+write actions for synchronizing with the variable processes:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>sort LocSort_P = struct loc_P_p1 | loc_P_p2;
+
+proc BehProc_P(Locvar_P : LocSort_P) =
+  sum x : Int . ((x &gt;= 0) &amp;&amp; (x &lt;= 10) &amp;&amp; (Locvar_P == loc_P_p1)) -&gt; a | aread_x(x) | awrite_x((x + 1)) . BehProc_P(loc_P_p2) +
+  sum y : Int . ((y &gt;= 0) &amp;&amp; (y &lt;= 1) &amp;&amp; (Locvar_P == loc_P_p2) &amp;&amp; (y != 0)) -&gt; c | aread_y(y) . BehProc_P(loc_P_p1) +
+  (Locvar_P == loc_P_p2) -&gt; a | awrite_x(1) . BehProc_P(loc_P_p1);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Locations are encoded in a <code>struct</code> and variable read and write actions are
+added as needed.</p>
+</div>
+<div class="paragraph">
+<p>The instantiation tree is dominated by the action operators needed for
+synchronizing and restricting actions. The <code>value_...</code> actions are allowed
+up the to top level node, to give access to variable values in the
+verification. This leads to:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>act a, renamed_a, c, renamed_c, b, renamed_b;
+
+init block({aread_y, awrite_y, vread_y, vwrite_y},
+     hide({sync_y},
+     comm({aread_y | vread_y -&gt; sync_y,
+           awrite_y | vwrite_y -&gt; sync_y},
+     (
+       block({aread_x, awrite_x, vread_x, vwrite_x},
+       hide({sync_x},
+       comm({aread_x | vread_x -&gt; sync_x,
+             awrite_x | vwrite_x -&gt; sync_x},
+       (
+         allow({value_zero,
+            a | awrite_x | aread_y,
+                a | awrite_x | aread_x | aread_y,
+                c | aread_y,
+                b | aread_y | aread_x},
+         rename({renamed_a -&gt; a},
+         block({a},
+         comm({a | a -&gt; renamed_a},
+         (
+           BehProc_P(loc_P_p1)
+         ||
+           BehProc_Q(loc_Q_q1, 0)
+         )))))
+       ||
+         VarProc_x(0)
+       ))))
+     ||
+       VarProc_y(1)
+     ))));</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-chapter-cif2uppaal">CIF to UPPAAL transformer</h4>
+<div class="paragraph">
+<p>
+
+
+The CIF to UPPAAL transformer can be used to transform CIF specifications
+to UPPAAL systems (<code>*.xml</code> files).
+<a href="http://www.uppaal.org/">UPPAAL</a>
+is a tool modeling, validation, and verification of networks of timed automata with
+variables. The transformer only transforms untimed CIF specifications.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-transformation-5">Starting the transformation</h5>
+<div class="paragraph">
+<p>The transformation can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF verification tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Convert CIF to UPPAAL&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF verification tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Convert CIF to UPPAAL&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cif2uppaal</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cif2uppaal</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-options-14">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file path</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file path</em>: The absolute or relative local file system path to the
+output UPPAAL file. If not specified, defaults to the input file path, where
+the <code>.cif</code> file extension is removed (if present), and a <code>.xml</code> file
+extension is added.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-supported-specifications-5">Supported specifications</h5>
+<div class="paragraph">
+<p>The CIF to UPPAAL transformer supports a subset of CIF specifications. The
+following restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Specifications without automata are not supported.</p>
+</li>
+<li>
+<p>Channels (events with data types) are not supported.</p>
+</li>
+<li>
+<p>Initialization predicates in components are not supported.</p>
+</li>
+<li>
+<p>Automata that do not have exactly one initial location are not supported.</p>
+</li>
+<li>
+<p>Locations with initialization predicates that are too complex to evaluate
+statically, are not supported. That is, those predicates must essentially be
+be constant. For instance, <code>true</code> and <code>true or false</code> are supported, as
+is <code>c</code> if <code>c</code> is a constant. However, <code>v =&gt; c</code> with <code>v</code> a discrete
+variable that can initially have several different values, is not supported.</p>
+</li>
+<li>
+<p>Discrete variables with multiple potential initial values are not supported.</p>
+</li>
+<li>
+<p>Discrete variables with initial values that are too complex to evaluate
+statically, are not supported. That is, their initial values must essentially
+be constant. For instance, <code>1 + 1</code> and <code>2 * 5</code> are supported, as is
+<code>c + 1</code> if <code>c</code> is a constant. However, <code>v * 2</code> with <code>v</code> a discrete
+variable that can initially have several different values, is not supported.</p>
+</li>
+<li>
+<p>Enumerations are not supported.</p>
+</li>
+<li>
+<p>Continuous variables are not supported.</p>
+</li>
+<li>
+<p>Algebraic variables are not supported.</p>
+</li>
+<li>
+<p>Input variables are not supported.</p>
+</li>
+<li>
+<p>User-defined functions are not supported.</p>
+</li>
+<li>
+<p>Urgent edges are not supported.</p>
+</li>
+<li>
+<p>Multi-assignments on edges (such as <code>do (x, y) := (1, 2)</code>) are not
+supported. However, it is allowed to use multiple assignments on an edge
+(such as <code>do x := 1, y := 2</code>).</p>
+</li>
+<li>
+<p>Partial variable assignments (such as <code>do x[0] := 5</code>) are not supported.</p>
+</li>
+<li>
+<p>Conditional updates (<code>if</code> updates) on edges (such as
+<code>do if b: x := 5 end</code>) are not supported.</p>
+</li>
+<li>
+<p>Only the following data types are supported: boolean types and integer (both
+with a range and without a range).</p>
+</li>
+<li>
+<p>Only the following expressions are supported: boolean literal values
+(<code>true</code> and <code>false</code>), integer literal values, binary expressions
+(partially, see below), unary expressions (partially, see below), casts that
+don&#8217;t change the type, <code>if</code> expressions, and references to constants,
+discrete variables, and locations.</p>
+</li>
+<li>
+<p>Only the following binary operators are supported: logical equivalence
+(<code>&lt;=&gt;</code>), logical implication (<code>=&gt;</code>), logical conjunction (<code>and</code> on
+boolean operands), logical disjunction (<code>or</code> on boolean operands), addition
+(<code>+</code>) on integer operands, subtraction (<code>-</code>) on integer operands,
+multiplication (<code>*</code>) on integer operands, integer division (<code>div</code>),
+integer modulus (<code>mod</code>), equality (<code>=</code>) on integer operands, inequality
+(<code>!=</code>) on integer operands, less than (<code>&lt;</code>) on integer operands, less
+than or equal to (<code>&lt;=</code>) on integer operands, greater than (<code>&gt;</code>) on
+integer operands, and greater than or equal to (<code>&gt;=</code>) on integer operands.</p>
+</li>
+<li>
+<p>Only the following unary operators are supported: logical inverse (<code>not</code>),
+negation (<code>-</code>) on an integer operand, and plus (<code>+</code>) on an integer
+operand.</p>
+</li>
+<li>
+<p>Only state invariants are supported. State/event exclusion invariants are
+not supported. To allow state/event exclusion invariants to be used in the
+input, manually eliminate them first using the
+<a href="#tools-cif2cif-chapter-elim-state-event-excl-invs">Eliminate state/event exclusion invariants</a> CIF to CIF transformation.</p>
+</li>
+<li>
+<p>The controllability of events is ignored.</p>
+</li>
+<li>
+<p>The supervisory kinds of automata are ignored.</p>
+</li>
+<li>
+<p>The supervisory kinds of invariants are ignored.</p>
+</li>
+<li>
+<p>Marker predicates are ignored.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-preprocessing-5">Preprocessing</h5>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+applied as preprocessing (in the given order), to increase the subset of CIF
+specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-io-decls">Remove I/O declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-tau-event">Eliminate <code>tau</code> event</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-monitors">Eliminate monitors</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-transformation-result-2">Transformation result</h5>
+<div class="paragraph">
+<p>CIF features synchronizing events, while UPPAAL only supports channels. A
+<code>SendAut</code> automaton/template is added to the UPPAAL system to ensure proper
+event synchronization. The UPPAAL template has a single location, and self
+loops for every event in the CIF specification. The guards of the self loops
+express the conditions under which the events are globally enabled (guard wise)
+in the CIF specification. Every CIF event is a broadcast channel in UPPAAL. If
+the self loop is enabled (guard wise), the <code>SendAut</code> template broadcasts over
+the channel. All the other templates (for the CIF automata) receive the event.
+They can actually receive, as the guard of the self loop ensures that. Together
+the <code>SendAut</code> self loops and the receive edges form the synchronization.</p>
+</div>
+<div class="paragraph">
+<p>As the <code>SendAut</code> template needs to refer to locations of the other templates,
+location pointer variables are added for all the other templates. For every
+CIF automaton <code>some.aut</code>, a location pointer variable <code>LP_some_aut</code> is
+added. The location pointers are integer variables with range <code>[0,n-1]</code>, for
+an automaton with <code>n</code> locations. Updates are added to the edges to ensure the
+location pointer variables have the proper values. The location pointers are
+similar to those created by the CIF to CIF transformation that
+<a href="#tools-cif2cif-chapter-elim-locs-in-exprs">eliminates the use of locations in expressions</a>.</p>
+</div>
+<div class="paragraph">
+<p>In CIF, assignments interpret the right hand side of the assignment (the new
+value of the variable) in the source state of the transition. In UPPAAL,
+assignments have order, and the right hand sides are interpreted over the
+current state, after any preceding assignments. Furthermore, the order in which
+the assignments of the edges of different participating templates are executed
+is not defined. To ensure the proper CIF semantics, 'old' versions of all
+variables (including the location pointer variables) are added. For a variable
+<code>x</code>, <code>OLD_x</code> is added. The <code>SendAut</code> automaton assigns the current values
+of all variables to their 'old' counterparts. The assignments on the edges of
+the other automata then use the 'old' variables to compute the new values of
+the variables. As the values of the 'old' variables are only used during the
+transitions, the 'old' variables are <em>meta</em> variables in the UPPAAL system.</p>
+</div>
+<div class="paragraph">
+<p>The invariants from CIF components are added to the location of the <code>SendAut</code>
+template.</p>
+</div>
+<div class="paragraph">
+<p>For CIF variables with an <code>int</code> type, the UPPAAL type is
+<code>int[-2147483648,2147483647]</code>.</p>
+</div>
+<div class="paragraph">
+<p>The names of templates, variables, etc in UPPAAL are based on the absolute
+names of their CIF counterparts. For a variable <code>a.b.c</code> in CIF, the UPPAAL
+name is <code>a_b_c</code>. If there are conflicts between the UPPAAL names, or if one
+of the UPPAAL names conflicts with a UPPAAL keyword, renaming is performed, and
+a warning is printed to the console.</p>
+</div>
+<div class="paragraph">
+<p>No geometry is generated. When the generated UPPAAL file is opened in UPPAAL,
+UPPAAL will perform some layouting.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tools-real-time-testing-code-generation-and-implementation-tools">Real-time testing, code generation, and implementation tools</h3>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect3">
+<h4 id="tools-codegen-chapter-index">CIF code generator</h4>
+<div class="paragraph">
+<p>The CIF code generator can be used to generate implementation code for
+various languages/platforms. The generated code is complete, and can be used as
+is, without any CIF related library or runtime.</p>
+</div>
+<div class="paragraph">
+<p>The remainder of this page explains general information about the tool, that
+applies to all target languages/platforms. Specific information is available
+for each of the target languages/platforms, on separate pages:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-codegen-chapter-c89">C89</a> (if there is no <code>C99</code> compiler)</p>
+</li>
+<li>
+<p><a href="#tools-codegen-chapter-c99">C99</a></p>
+</li>
+<li>
+<p><a href="#tools-codegen-chapter-java">Java</a></p>
+</li>
+<li>
+<p><a href="#tools-codegen-chapter-simulink">Simulink</a>, with an example of
+<a href="#tools-codegen-chapter-simulink-example">controlling a tank</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-generator">Starting the generator</h5>
+<div class="paragraph">
+<p>The generator can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the <b class="menuref">Project Explorer</b>
+or <b class="menuref">Package Explorer</b> and choose
+<span class="menuseq"><b class="menu">CIF implementation tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Generate code for CIF specification&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF implementation tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Generate code for CIF specification&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifcodegen</code> tool in a ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifcodegen</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-codegen-options">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options that apply to all target languages/platforms:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output directory</em>: The absolute or relative local file system path to the
+output directory. This is the directory to which the generated code files
+will be written. If the directory does not yet exist, it is automatically
+created. By default, the current directory is used.</p>
+</li>
+<li>
+<p><em>Target language</em>: Specifies the target language/platform for which to
+generate code. By default, C99 code is generated. The following
+languages/platforms are supported:</p>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Target language/platform</th>
+<th class="tableblock halign-left valign-top">Command line value</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-codegen-chapter-c89">C89</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>c89</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-codegen-chapter-c99">C99</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>c99</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-codegen-chapter-java">Java</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-codegen-chapter-simulink">Simulink</a></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>simulink</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The first column indicates the target language/platform, and is linked to a
+page with more information for that specific language/platform. The second
+column indicates the command line value to use for the option, to select that
+target language/platform.</p>
+</div>
+</li>
+<li>
+<p><em>Code prefix</em>: The code prefix, used to prefix file names, identifiers in
+the code, etc. If no prefix is given, the prefix is derived from the input
+filename, by removing the <code>.cif</code> file extension, if present. This is also
+the default. The prefix must be a valid CIF identifier, i.e. consist of only
+letters (<code>a</code> to <code>z</code>, <code>A</code> to <code>Z</code>), numbers (<code>0</code> to <code>9</code>), and
+underscores (<code>_</code>), and not start with a number.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-codegen-supported">Supported specifications</h5>
+<div class="paragraph">
+<p>The CIF code generator supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Specifications without automata are not supported.</p>
+</li>
+<li>
+<p>Initialization predicates in components are not supported, except if it
+can be determined statically that they are trivially <code>true</code>.</p>
+</li>
+<li>
+<p>State invariants in components are not supported, except if it can be
+determined statically that they are trivially <code>true</code>.</p>
+</li>
+<li>
+<p>State/event exclusion invariants (in components as well as locations) are not
+supported. To allow state/event exclusion invariants to be used in the input,
+manually eliminate them first using the
+<a href="#tools-cif2cif-chapter-elim-state-event-excl-invs">CIF to CIF transformation</a>.</p>
+</li>
+<li>
+<p>Discrete variables with multiple initial values (including <code>any</code>) are not
+supported.</p>
+</li>
+<li>
+<p>External user-defined functions are not supported.</p>
+</li>
+<li>
+<p>Urgent locations are not supported.</p>
+</li>
+<li>
+<p>Initialization predicates in locations that can not be statically evaluated
+are not supported.</p>
+</li>
+<li>
+<p>State invariants in locations are not supported, except if it can be
+determined statically that they are trivially <code>true</code>.</p>
+</li>
+<li>
+<p>Automata that do not have exactly one initial location are not supported.</p>
+</li>
+<li>
+<p>Urgent edges are not supported.</p>
+</li>
+<li>
+<p>Data types other than <code>bool</code>, <code>int</code> (with or without range), <code>real</code>,
+<code>string</code>, enumerations, tuples, and arrays, are not supported. This applies
+to the data types of variables, parameters of functions, return types of
+functions, etc.</p>
+</li>
+<li>
+<p>Sampling of distributions is not supported.</p>
+</li>
+<li>
+<p>The use of the conjunction and disjunction binary operators on anything other
+than boolean values is not supported.</p>
+</li>
+<li>
+<p>The use of the equality and inequality binary operators on anything other
+than boolean, integer, real, string, or enumeration values is not supported.</p>
+</li>
+<li>
+<p>The use of the addition binary operators on anything other than numeric or
+string values is not supported.</p>
+</li>
+<li>
+<p>The use of the subtraction binary operators on anything other than numeric
+values is not supported.</p>
+</li>
+<li>
+<p>The use of the element test and subset binary operators is not supported.</p>
+</li>
+<li>
+<p>Projection on anything other than tuples, arrays, and strings is not
+supported. This applies to expressions as well as addressables (the left hand
+sides of assignments). For arrays, both 0-based indices (counting from the
+left) as well as negative indices (counting from the right) are supported.</p>
+</li>
+<li>
+<p>Slicing is not supported.</p>
+</li>
+<li>
+<p>Function calls on anything other than standard library functions and internal
+user-defined functions is not supported.</p>
+</li>
+<li>
+<p>The <code>del</code>, <code>pop</code>, <code>acosh</code>, <code>asinh</code>, <code>atanh</code>, <code>cosh</code>, <code>sinh</code>,
+and <code>tanh</code> standard library functions are not supported.</p>
+</li>
+<li>
+<p>The <code>empty</code> standard library function on anything other than arrays is not
+supported.</p>
+</li>
+<li>
+<p>The <code>size</code> standard library function on anything other than strings and
+arrays is not supported.</p>
+</li>
+<li>
+<p>The distribution standard library functions are not supported.</p>
+</li>
+<li>
+<p>Lists (except for arrays), sets, and dictionaries are not supported.</p>
+</li>
+<li>
+<p>The use of functions as values is not supported. That is, functions may only
+be used in function calls, and may for instance not be stored in variables,
+or passed to other functions.</p>
+</li>
+<li>
+<p>Print declarations with pre/source state text and post/target state filtering
+(<code>when</code>) are not supported.</p>
+</li>
+<li>
+<p>Print declarations with post/target state text and pre/source state filtering
+(<code>when</code>) are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-preprocessing-6">Preprocessing</h5>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+applied as preprocessing (in the given order), to increase the subset of CIF
+specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-cif-svg-decls">Remove CIF/SVG declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-values-no-refs-optimized">Simplify values (no references, optimized)</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-others">Simplify others</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>After these preprocessing steps, the generator checks whether the specification
+is supported. It then applies the following additional
+<a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-linearize-merge">Linearize (merge)</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-values-no-refs-optimized">Simplify values (no references, optimized)</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-add-default-init-values">Add default initial values</a></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-generated-code">Generated code</h5>
+<div class="paragraph">
+<p>This section explains the basics behind the generated code, as they apply to
+all target languages. The specific pages that explain the code generated for
+specific target languages provide further details.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-code-overview">Code overview</h6>
+<div class="paragraph">
+<p>The code that executes the edges of the CIF model is called the <em>event loop</em>
+code. The event loop is not the only code that is executed. Before the loop,
+the values of the input variables are obtained from the environment, the
+initial state is initialized (for the first execution only), and the values of
+the continuous variables are updated to account for the amount of time that has
+passed (for all but the first execution). Then the event loop is executed.
+Finally, output values may be supplied to the environment.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-repeated-execution">Repeated execution</h6>
+<div class="paragraph">
+<p>During the execution of the code, variable <code>time</code> from the CIF model is
+not updated. Execution of the code takes time. After the code is executed,
+potentially more time passes. Then, the code can be executed again. The time
+(in seconds) between the first execution and the current execution is the
+total time that has passed since execution started, and this becomes the new
+value of variable <code>time</code>.</p>
+</div>
+<div class="paragraph">
+<p>How often the code is executed, and whether this is done with a fixed cycle
+time (periodic task scheduling) or with a variable cycle times (non-periodic
+tasks) can be influenced by the end user. The details differ per target
+language, and can be found on their respective pages.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-event-loop">Event loop</h6>
+<div class="paragraph">
+<p>The CIF model is first <a href="#tools-cif2cif-chapter-linearize-merge">linearized</a> to
+eliminate parallel composition. The result is self loop edges with guards and
+updates. The main part of the generated code essentially consists of update
+code that is conditionally executed. This code executes edges. This is done
+repeatedly, until no more events are enabled. The loop in the generated code
+that repeatedly executes event code until no more events are possible, is
+called the <em>event loop</em>. Once no more events are enabled, the event loop
+terminates.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-event-order">Event order</h6>
+<div class="paragraph">
+<p>The order in which the code is generated for the different edges (in the
+<em>event loop</em>), is done in such a way that it matches the order in which
+transitions are chosen by the simulator. Assuming the simulator is used to
+simulate by always automatically choosing the
+<a href="#tools-cifsim-input-chapter-automatic">first transition</a> that is enabled, the
+generated code will choose that same transition. That is, for each iteration of
+the event loop, the code is executed for the first event with an enabled guard.
+Then, a new iteration of the loop is started, from the top, to ensure that the
+first enabled event is always executed, similar to simulation. If during an
+iteration of the loop none of the events is enabled, the event loop terminates.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-termination-2">Termination</h6>
+<div class="paragraph">
+<p>If in the CIF model always at least one event is enabled, the generated code
+will run forever, and will never terminate. Time will not pass. Code generation
+should be avoided for such models. It is the responsibility of the modeler to
+ensure this is taken into account.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-predictability-of-execution-time">Predictability of execution time</h6>
+<div class="paragraph">
+<p>If at least one event is enabled, the event loop is executed again. If during
+an iteration of the loop none of the edges is enabled, the loop terminates.
+This approach generally does not result in predictable execution times of the
+program body. That is, if a certain edge keeps being enabled, the loop is
+executed over an over again. In that case, the execution time of the body
+may exceed the fixed cycle time, and the controller is no longer guaranteed to
+work correctly. Even if the loop is only executed a finite number of times,
+the execution time of the body may exceed the fixed cycle time. One may
+consider monitoring the execution times to detect such issues. All
+implementations provide a way to obtain execution time statistics. The details
+differ per target language, and can be found on their respective pages.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optional-execution-feedback">Optional execution feedback</h6>
+<div class="paragraph">
+<p>Several implementations provide additional information during simulation, such as
+which events have been executed, timing information, and what new print output
+has been generated. Such information can generally be enabled and disabled in
+the implementations. The details differ per target language, and can be found
+on their respective pages.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-correct-handling-of-io">Correct handling of I/O</h6>
+<div class="paragraph">
+<p>The generated code cannot guarantee its correct behavior if the inputs from the
+external I/O change more rapidly than the generated code is executed. That is,
+if an input changes during a single execution of the code, the change is not
+noticed until the next execution. If an input changes during an execution and
+changes back during that same execution, the change is not noticed at all.
+Therefore, executing the code often enough per second, is essential. In other
+words, choosing an appropriate cycle time is essential for the correct
+functioning of the generated code.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-codegen-accuracy-over-time">Accuracy over time</h6>
+<div class="paragraph">
+<p>The generated C89, C99 and Java code maintains the running time in seconds.
+Due to the finite
+representation of numeric values, this results in numeric overflow after
+execution for a long time. Running the code continuously for longer than 100
+years should be avoided.</p>
+</div>
+<div class="paragraph">
+<p>The continuous variables from the CIF specification in the generated code
+are updated each execution
+using the <a href="http://en.wikipedia.org/wiki/Euler_method">Euler method</a> for
+integration. That is, each execution the time that has elapsed since the
+previous execution is multiplied by the derivative of the continuous variable
+in the state of the previous execution. This value is added to the value of the
+continuous variable. Essentially, a linear approximation of the derivative is
+used, calculated using the state of the previous execution.</p>
+</div>
+<div class="paragraph">
+<p>The Euler method can be
+<a href="http://en.wikipedia.org/wiki/Numerical_stability">numerically unstable</a>, it
+can suffer from rounding
+errors due to the use finite binary representations of real values, and has
+some other issues as well. The effects are likely to be limited if linear
+continuous variable (continuous variables with constant derivatives) are used.
+Especially clocks (derivative +1 or -1) generally don&#8217;t suffer too much from
+these issues. However, even clocks may suffer from loss of accuracy over time.
+As such, clocks should not be used to measure over long periods of time.
+Instead they should be reset, rendering the past loss of accuracy irrelevant
+for any future measurements.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-enumerations">Enumerations</h6>
+<div class="paragraph">
+<p>The <a href="#tools-cif2cif-chapter-linearize-merge">linearization</a> that is used as
+preprocessing, also <a href="#tools-cif2cif-chapter-merge-enums">merges all enumerations</a>
+into a single enumeration. This is done in such a way that the behavior of the
+original CIF model is left intact. However, it is up to the implementer that
+connects the inputs from the environment to the generated code, to ensure that
+only valid enumeration literals are assigned to the input variables of the
+generated code.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-codegen-chapter-c89">C89 code generation</h5>
+<div class="paragraph">
+<p>
+
+The <a href="#tools-codegen-chapter-index">CIF code generator</a> can generate C89 code from a CIF
+specification. It is assumed the reader of this page is familiar with the
+general information of the CIF code generator tool. This page describes
+specific information applicable only to C89 code generation.</p>
+</div>
+<div class="paragraph">
+<p>In general, use of the <a href="#tools-codegen-chapter-c99">C99</a> code generator is
+preferred, as the language contains a decade longer development. However, in
+the case there is no <code>c99</code> compiler available, the <code>c89</code> code generation
+might be a useful fallback option to convert a CIF program for controlling a
+real time system. The conversion uses a simple integrator
+intended for updating running clocks (derivative should not change during
+a time step for best results). Also, it does not compute length of the next
+time step, but instead assumes being called regularly to update
+internal state and perform discrete steps if possible.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-6">Supported specifications</h6>
+<div class="paragraph">
+<p>The CIF code generator supports a subset of CIF specifications. Generation
+of C89 code does not impose additional restrictions. See the
+<a href="#tools-codegen-supported">Supported specifications</a> section of the <a href="#tools-codegen-chapter-index">CIF code generator</a>
+page for more information.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-differences-in-output">Differences in output</h6>
+<div class="paragraph">
+<p>When converting a real number to text, for example when printing a real value,
+the generated C89 code does not preserve trailing zeroes of real number
+fractions while using <code>%g</code>. For example <code>fmt("%.3g", 1.0)</code> will output
+<code>1</code> rather than <code>1.000</code>.</p>
+</div>
+<div class="paragraph">
+<p>This may cause real number values to be printed with less digits precision than
+indicated in the CIF program.</p>
+</div>
+<div class="paragraph">
+<p>Strings have an upper limit in length that is set during compilation. Longer
+strings are silently truncated to this length.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-15">Options</h6>
+<div class="paragraph">
+<p>The C89 code generator only uses the <a href="#tools-codegen-options">common options</a>
+that apply to all target languages/platforms of the
+<a href="#tools-codegen-chapter-index">CIF code generator</a>, it has no options of its own.</p>
+</div>
+<div class="paragraph">
+<p>The code prefix that can be configured using a common option is used to prefix
+external names, making them unique for the generated code.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-generated-files">Generated files</h6>
+<div class="paragraph">
+<p>C89 code generation leads to creation of seven files:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 66.6667%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Generated file</th>
+<th class="tableblock halign-left valign-top">Purpose</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_library.h</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Runtime support code and library headers</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_library.c</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Runtime support code and library implementation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_engine.h</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Interface definition of the translated CIF program</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_engine.c</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Implementation of the translated CIF program</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_compile.sh</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compile script for Linux</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_test_code.c</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Example of external functions, allow compiling the generated code</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_readme.txt</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Short description of use, the interface, and compile options</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>where <code>&lt;prefix&gt;</code> is replaced by the value of the <em>Code prefix</em> option during
+code generation.</p>
+</div>
+<div class="paragraph">
+<p>The aim is to provide a complete and compilable package, to minimize the effort
+in converting a CIF specification. Most files are static text (modulo
+the <code>&lt;prefix&gt;</code> replacement). The two exceptions are both engine files that
+contain the C89 version of the CIF specification. The interface of these files
+is however fixed (modulo the <code>&lt;prefix&gt;</code> replacement), and generated data
+types and operations on them have predictable names, reducing the chance of
+failed compilation when re-generating the files.</p>
+</div>
+<div class="paragraph">
+<p>When modifying a generated file (such as the compile script or the example test
+code), keep in mind that running the code generator again will overwrite <em>all</em>
+files. Rename a file before modifying it to avoid loss of work.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-compilation-of-the-generated-code">Compilation of the generated code</h6>
+<div class="paragraph">
+<p>The generated code is C89 code that can be compiled using a C89 C compiler, like <code>gcc</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-shell" data-lang="shell">gcc -Wall -std=c89 -DPRINT_OUTPUT=1 -DCHECK_RANGES=1 \
+    &lt;prefix&gt;_engine.c &lt;prefix&gt;_library.c &lt;prefix&gt;_test_code.c -lm</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The single <code>\</code> is not part of the command, it means the next line should be appended at the end.</p>
+</div>
+<div class="paragraph">
+<p>The <code>&lt;prefix&gt;</code> should be replaced by the value of the <em>Code prefix</em> option during
+code generation. The <code>PRINT_OUTPUT</code> and <code>CHECK_RANGES</code> macros enable
+support for the CIF <code>print</code> statement and checking of integer range overlap,
+as defined by CIF. In general however, you may want to replace the test code
+file by your own code.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-c89-compile-time-options">C89 compile-time options</h6>
+<div class="paragraph">
+<p>Besides the <code>PRINT_OUTPUT</code> and <code>CHECK_RANGES</code> macros, the generated code
+has a few other compile-time options to customize its behavior. Below is the complete list.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 80%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Macro name</th>
+<th class="tableblock halign-left valign-top">Effect</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>MAX_STRING_SIZE</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CIF has variable length strings, in the generated code they are converted to strings with a fixed
+upper limit. Default is 128 (including the terminator character). Set this macro for a different limit.
+<em>Note that both the library and the engine use this macro. It is crucial that both files use the same
+value for this macro</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHECK_RANGES</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">When copying integers from one range to another, where the latter is only partially covered by the
+former, CIF checks whether the copied values do not violate the destination range. Since violating
+this property generally indicates a programming error, it is recommended to enable this macro.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>EVENT_OUTPUT</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">If set, the generated code calls <code>&lt;prefix&gt;_InfoEvent()</code> before and after performing an event to
+allow third-party code to act on it. Enable if your code needs to know when an event is performed.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>PRINT_OUTPUT</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">If set, the CIF <code>print</code> statement is performed, and the <code>&lt;prefix&gt;__PrintOutput()</code> is called with
+the resulting text and destination filename. Mainly intended for debugging, but only useful in
+systems where the text can be displayed to a user.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>MAX_NUM_EVENTS</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The CIF semantics state that execution of edges is instantaneous and time-less. The generated code
+loops to perform edges, until no edge can be executed any more. Unfortunately, such a loop is not
+time-less. To avoid requiring too much time, there is an upper limit of 1000 iterations. Set this macro
+to change the limit.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>KEEP_RUNNING</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The CIF language checks range conversions (if <code>CHECK_RANGES</code> is set) and verifies updates of
+continuous variable updates. Setting this flag disables a few checks. Most of these checks are in
+<code>assert()</code> checks and not controlled by this macro, since violating the condition generally means a
+crash is eventually inevitable. It is recommended to avoid using this macro.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect5">
+<h6 id="tools-executing-the-code">Executing the code</h6>
+<div class="paragraph">
+<p>The engine files act as a library that implements the CIF program. To run the
+program, the code must be called regularly. The code has two entry points, one
+for initializing and performing the first steps, and one for handling a time
+delay.</p>
+</div>
+<div class="paragraph">
+<p>The first entry point is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-c" data-lang="c">&lt;prefix&gt;_EngineFirstStep(void)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This entry point initializes all the data, queries the values of the input
+variables if present, and performs execution of edges until blocked on the
+first time step or until hitting the <code>MAX_NUM_EVENTS</code> limit. Since this
+resets the entire CIF program to its initial state, you should only call this
+when the system being controlled is also (re-)initialized.</p>
+</div>
+<div class="paragraph">
+<p>The second entry point is more regularly called, after a period of time has passed:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-c" data-lang="c">&lt;prefix&gt;_EngineTimeStep(double delta)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>By calling this entry point, you indicate that <code>delta</code> (&gt; 0) time units have
+passed. The code reads new values of the input variables,
+<a href="#tools-codegen-accuracy-over-time">updates the continuous variables</a>,
+and performs edges until all edges are blocked, or
+hitting the <code>MAX_NUM_EVENTS</code> limit.</p>
+</div>
+<div class="paragraph">
+<p>When the call of either entry point returns, you can query the value of the
+variables to use as input for other parts of the system.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-environment-interface">Environment interface</h6>
+<div class="paragraph">
+<p>Calling one of the above entry points causes the CIF program to be executed,
+up to the next time step (assuming the <code>MAX_NUM_EVENTS</code> limit is high
+enough). During the execution, the code performs a number of callbacks to get
+information from the environment, to provide information about its actions, or
+to deliver output. In addition, after each call, variables may be inspected by
+the environment to get information about the decisions of the CIF program.</p>
+</div>
+<div class="paragraph">
+<p>The externally provided callback functions that are being used are:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-c" data-lang="c">&lt;prefix&gt;_AssignInputVariables(void)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The CIF program requests new values for all its input variables. In your
+implementation of this function you should write values directly in the input
+variables. Input variables are assumed to be independent of other parts of the
+CIF program, in general you should not need other CIF program values to
+implement this function.</p>
+</div>
+<div class="paragraph">
+<p>If <code>EVENT_OUTPUT</code> is set during compilation, executed events are reported with:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-c" data-lang="c">&lt;prefix&gt;_InfoEvent(&lt;prefix&gt;_Event_ event, BoolType pre)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If the <code>EVENT_OUTPUT</code> macro is set during compilation, the generated code
+reports with this call that event event is about to (<code>pre</code> is <code>TRUE</code>),
+or has been (<code>pre</code> is <code>FALSE</code>) executed. In the pre-event call, the event
+can be executed, and all variables have their value before performing the
+updates of the involved edges. In the post-event call, all variables have their
+values updated as indicated in the updates of the edges.</p>
+</div>
+<div class="paragraph">
+<p>Primary use of this call is to forward the decision to other parts of the
+controlled system.</p>
+</div>
+<div class="paragraph">
+<p>Finally, if the <code>PRINT_OUTPUT</code> macro is set during compilation, the generated
+code reports lines of output to be printed with the following function call:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-c" data-lang="c">&lt;prefix&gt;_PrintOutput(const char *line, const char *fname)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It denotes that text <code>line</code> should be printed at file <code>fname</code>. The primary
+uses of this call are to enable debugging the system, or to log relevant
+events. Note that <code>fname</code> here can mean anything. It can mean a real file,
+but also a pseudo-device like <code>:stdout</code> which is commonly used to print
+output to the C <code>stdout</code> stream.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-data-access">Data access</h6>
+<div class="paragraph">
+<p>Each CIF constant is available as a variable that does not change after
+initialization. Each algebraic variable can be queried by calling a function
+with the same name as the variable. The value of continuous variables is
+available by accessing the equivalent variable in the generated code. The
+derivative of each continuous variable is available as function named by the
+variable, and the suffix <code>deriv</code>. The model time is available as
+<code>model_time</code>. There is no derivative function of time. Internal functions are
+available as well if required.</p>
+</div>
+<div class="paragraph">
+<p>The engine header file lists the translated names. It should be easy to find
+the relevant entry, as the generated code also documents the original name.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-data-types">Data types</h6>
+<div class="paragraph">
+<p>The following table defines how CIF data types are converted in the C89 generated code.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">CIF data type</th>
+<th class="tableblock halign-left valign-top">C89 data type</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bool</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>BoolType</code> which is a typedef to <code>int</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>IntType</code> which is a typedef to <code>int</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>enum e = ...</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;Enum</code> which is a typedef to <code>enum Enum&lt;prefix&gt;_</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>RealType</code> which is a typedef to <code>double</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>string</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>StringType</code> which is a typedef to a <code>struct</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>list[n] t</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>...Type</code> which is a typedef to a <code>struct</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>tuple(...)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>...Type</code> which is a typedef to a <code>struct</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>A few notes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The <code>...</code> in the C89 <code>...Type</code> name for arrays (fixed length lists) and
+tuples is the <a href="#tools-codegen-c89-systematic-type-names">systematic type name</a>
+of the array or tuple type.</p>
+</li>
+<li>
+<p>Due to <a href="#tools-cif2cif-chapter-linearize-merge">linearization</a> all enumerations
+are merged into one. The generated C89 code always has exactly one translated
+<code>enum</code>.</p>
+</li>
+<li>
+<p>The elementary data types (<code>BoolType</code>, <code>IntType</code>, <code>RealType</code>, and
+<code>StringType</code>) are defined in the library header file.</p>
+</li>
+<li>
+<p>The <code>StringType</code> structure wraps a <code>char data[MAX_STRING_SIZE]</code> array.
+The <code>struct</code> allows copying arrays by value using an assignment statement.</p>
+</li>
+<li>
+<p>The array type (list with a fixed length) structure wraps a
+<code>&lt;element-type&gt; data[&lt;size&gt;]</code> array for the same reason. Copying an array
+by assignment is allowed.</p>
+</li>
+<li>
+<p>The tuple type is a structure with fields <code>_field0</code>, <code>_field1</code>, and so
+on, where the type of each field in the structure matches with the type of
+the CIF tuple field.</p>
+</li>
+<li>
+<p>Boolean constants <code>true</code> and <code>false</code> are  named <code>TRUE</code> and <code>FALSE</code>
+respectively.</p>
+</li>
+<li>
+<p>The <code>-0.0</code> value of doubles gets replaced by <code>0.0</code> to void subtle equality
+problems.</p>
+</li>
+<li>
+<p>Strings get silently truncated to <code>MAX_STRING_SIZE - 1</code> characters. They
+are always terminated with a NUL character.</p>
+</li>
+<li>
+<p>Enumeration values get <code>_&lt;prefix&gt;_</code> added in front to make them unique.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-codegen-c89-systematic-type-names">Systematic type names</h6>
+<div class="paragraph">
+<p>For tuple and list types, the type is converted to a name in a systematic way,
+making each type unique and predictable.</p>
+</div>
+<div class="paragraph">
+<p>The conversion composes a name of a type from the type of its elements, and
+concatenates the result. The following conversion table applies:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 75%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">CIF type</th>
+<th class="tableblock halign-left valign-top">Systematic name</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bool</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>B</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>I</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>enum e = ...</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>E</code> (Due to linearization, all enumerations are merged together to a
+single enumeration. As such, always exactly one <code>enum</code> is generated for a
+CIF model.)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>R</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>list[n] t</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>A&lt;n&gt;&lt;t&gt;</code>, with <code>&lt;n&gt;</code> the length of the array, and <code>&lt;t&gt;</code> the systematic
+type name of the element type of the array.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>tuple(t1, t2, t3, ..., tn)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>T&lt;n&gt;&lt;t1&gt;&lt;t2&gt;&lt;t3&gt;...&lt;tn&gt;</code>, with <code>&lt;n&gt;</code> the number of fields in the tuple, and
+<code>&lt;t1&gt;</code> to <code>&lt;tn&gt;</code> the systematic type names of the fields.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>For example, type <code>list[5] int</code> is converted to <code>A5I</code>, and type
+<code>tuple(list[5] int x; tuple(real a, b) z)</code> is converted to <code>T2A5IT2RR</code>
+(concatenation of <code>T2</code> with the field type names <code>A5I</code> and <code>T2RR</code>).</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-runtime-errors">Runtime errors</h6>
+<div class="paragraph">
+<p>The CIF language defines strict sets of allowed values for all data types, and
+performs checking of these values at run time. The generated C89 code follows
+that idea, and checks whether operations on data are safe. Most of these
+checks are performed with an <code>assert</code>. Executed C code does not provide useful
+stack traces by default, and original line numbers of e.g. a CIF program have no
+meaning due to the linearization that is performed before code is generated. In
+addition, the generated code is quite readable and it is not too hard to
+understand what the code is doing at some C source line.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-codegen-chapter-c99">C99 code generation</h5>
+<div class="paragraph">
+<p>
+
+The <a href="#tools-codegen-chapter-index">CIF code generator</a> can generate C99 code from a CIF
+specification. It is assumed the reader of this page is familiar with the
+general information of the CIF code generator tool. This page describes
+specific information applicable only to C99 code generation.</p>
+</div>
+<div class="paragraph">
+<p>The aim of the C99 code generation tool is to provide an easy conversion from
+a CIF program to control of a real time system. It uses a simple integrator
+intended for updating running clocks (derivative should not change during
+a time step for best results). Also, it does not compute length of the next
+time step, but instead assumes being called regularly to update
+internal state and perform discrete steps if possible.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-7">Supported specifications</h6>
+<div class="paragraph">
+<p>The CIF code generator supports a subset of CIF specifications. Generation
+of C99 code does not impose additional restrictions. See the
+<a href="#tools-codegen-supported">Supported specifications</a> section of the <a href="#tools-codegen-chapter-index">CIF code generator</a>
+page for more information.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-differences-in-output-2">Differences in output</h6>
+<div class="paragraph">
+<p>When converting a real number to text, for example when printing a real value,
+the generated C99 code does not preserve trailing zeroes of real number
+fractions while using <code>%g</code>. For example <code>fmt("%.3g", 1.0)</code> will output
+<code>1</code> rather than <code>1.000</code>.</p>
+</div>
+<div class="paragraph">
+<p>This may cause real number values to be printed with less digits precision than
+indicated in the CIF program.</p>
+</div>
+<div class="paragraph">
+<p>Strings have an upper limit in length that is set during compilation. Longer
+strings are silently truncated to this length.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-16">Options</h6>
+<div class="paragraph">
+<p>The C99 code generator only uses the <a href="#tools-codegen-options">common options</a> that apply to all target languages/platforms of the
+<a href="#tools-codegen-chapter-index">CIF code generator</a>, it has no options of its own.</p>
+</div>
+<div class="paragraph">
+<p>The code prefix that can be configured using a common option is used to prefix
+external names, making them unique for the generated code.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-generated-files-2">Generated files</h6>
+<div class="paragraph">
+<p>C99 code generation leads to creation of seven files:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 66.6667%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Generated file</th>
+<th class="tableblock halign-left valign-top">Purpose</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_library.h</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Runtime support code and library headers</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_library.c</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Runtime support code and library implementation</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_engine.h</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Interface definition of the translated CIF program</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_engine.c</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Implementation of the translated CIF program</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_compile.sh</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Compile script for Linux</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_test_code.c</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Example of external functions, allow compiling the generated code</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;_readme.txt</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Short description of use, the interface, and compile options</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>where <code>&lt;prefix&gt;</code> is replaced by the value of the <em>Code prefix</em> option during
+code generation.</p>
+</div>
+<div class="paragraph">
+<p>The aim is to provide a complete and compilable package, to minimize the effort
+in converting a CIF specification. Most files are static text (modulo
+the <code>&lt;prefix&gt;</code> replacement). The two exceptions are both engine files that
+contain the C99 version of the CIF specification. The interface of these files
+is however fixed (modulo the <code>&lt;prefix&gt;</code> replacement), and generated data
+types and operations on them have predictable names, reducing the chance of
+failed compilation when re-generating the files.</p>
+</div>
+<div class="paragraph">
+<p>When modifying a generated file (such as the compile script or the example test
+code), keep in mind that running the code generator again will overwrite <em>all</em>
+files. Rename a file before modifying it to avoid loss of work.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-compilation-of-the-generated-code-2">Compilation of the generated code</h6>
+<div class="paragraph">
+<p>The generated code is C99 code that can be compiled using a C99 C compiler, like <code>gcc</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-shell" data-lang="shell">gcc -Wall -std=c99 -DPRINT_OUTPUT=1 -DCHECK_RANGES=1 \
+    &lt;prefix&gt;_engine.c &lt;prefix&gt;_library.c &lt;prefix&gt;_test_code.c -lm</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The single <code>\</code> is not part of the command, it means the next line should be appended at the end.</p>
+</div>
+<div class="paragraph">
+<p>The <code>&lt;prefix&gt;</code> should be replaced by the value of the <em>Code prefix</em> option during
+code generation. The <code>PRINT_OUTPUT</code> and <code>CHECK_RANGES</code> macros enable
+support for the CIF <code>print</code> statement and checking of integer range overlap,
+as defined by CIF. In general however, you may want to replace the test code
+file by your own code.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-c99-compile-time-options">C99 compile-time options</h6>
+<div class="paragraph">
+<p>Besides the <code>PRINT_OUTPUT</code> and <code>CHECK_RANGES</code> macros, the generated code
+has a few other compile-time options to customize its behavior. Below is the complete list.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 80%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Macro name</th>
+<th class="tableblock halign-left valign-top">Effect</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>MAX_STRING_SIZE</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">CIF has variable length strings, in the generated code they are converted to strings with a fixed
+upper limit. Default is 128 (including the terminator character). Set this macro for a different limit.
+<em>Note that both the library and the engine use this macro. It is crucial that both files use the same
+value for this macro</em>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHECK_RANGES</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">When copying integers from one range to another, where the latter is only partially covered by the
+former, CIF checks whether the copied values do not violate the destination range. Since violating
+this property generally indicates a programming error, it is recommended to enable this macro.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>EVENT_OUTPUT</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">If set, the generated code calls <code>&lt;prefix&gt;_InfoEvent()</code> before and after performing an event to
+allow third-party code to act on it. Enable if your code needs to know when an event is performed.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>PRINT_OUTPUT</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">If set, the CIF <code>print</code> statement is performed, and the <code>&lt;prefix&gt;__PrintOutput()</code> is called with
+the resulting text and destination filename. Mainly intended for debugging, but only useful in
+systems where the text can be displayed to a user.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>MAX_NUM_EVENTS</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The CIF semantics state that execution of edges is instantaneous and time-less. The generated code
+loops to perform edges, until no edge can be executed any more. Unfortunately, such a loop is not
+time-less. To avoid requiring too much time, there is an upper limit of 1000 iterations. Set this macro
+to change the limit.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>KEEP_RUNNING</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The CIF language checks range conversions (if <code>CHECK_RANGES</code> is set) and verifies updates of
+continuous variable updates. Setting this flag disables a few checks. Most of these checks are in
+<code>assert()</code> checks and not controlled by this macro, since violating the condition generally means a
+crash is eventually inevitable. It is recommended to avoid using this macro.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect5">
+<h6 id="tools-executing-the-code-2">Executing the code</h6>
+<div class="paragraph">
+<p>The engine files act as a library that implements the CIF program. To run the
+program, the code must be called regularly. The code has two entry points, one
+for initializing and performing the first steps, and one for handling a time
+delay.</p>
+</div>
+<div class="paragraph">
+<p>The first entry point is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-c" data-lang="c">&lt;prefix&gt;_EngineFirstStep(void)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This entry point initializes all the data, queries the values of the input
+variables if present, and performs execution of edges until blocked on the
+first time step or until hitting the <code>MAX_NUM_EVENTS</code> limit. Since this
+resets the entire CIF program to its initial state, you should only call this
+when the system being controlled is also (re-)initialized.</p>
+</div>
+<div class="paragraph">
+<p>The second entry point is more regularly called, after a period of time has passed:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-c" data-lang="c">&lt;prefix&gt;_EngineTimeStep(double delta)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>By calling this entry point, you indicate that <code>delta</code> (&gt; 0) time units have
+passed. The code reads new values of the input variables,
+<a href="#tools-codegen-accuracy-over-time">updates the continuous variables</a>,
+and performs edges until all edges are blocked, or
+hitting the <code>MAX_NUM_EVENTS</code> limit.</p>
+</div>
+<div class="paragraph">
+<p>When the call of either entry point returns, you can query the value of the
+variables to use as input for other parts of the system.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-environment-interface-2">Environment interface</h6>
+<div class="paragraph">
+<p>Calling one of the above entry points causes the CIF program to be executed,
+up to the next time step (assuming the <code>MAX_NUM_EVENTS</code> limit is high
+enough). During the execution, the code performs a number of callbacks to get
+information from the environment, to provide information about its actions, or
+to deliver output. In addition, after each call, variables may be inspected by
+the environment to get information about the decisions of the CIF program.</p>
+</div>
+<div class="paragraph">
+<p>The externally provided callback functions that are being used are:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-c" data-lang="c">&lt;prefix&gt;_AssignInputVariables(void)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The CIF program requests new values for all its input variables. In your
+implementation of this function you should write values directly in the input
+variables. Input variables are assumed to be independent of other parts of the
+CIF program, in general you should not need other CIF program values to
+implement this function.</p>
+</div>
+<div class="paragraph">
+<p>If <code>EVENT_OUTPUT</code> is set during compilation, executed events are reported with:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-c" data-lang="c">&lt;prefix&gt;_InfoEvent(&lt;prefix&gt;_Event_ event, BoolType pre)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If the <code>EVENT_OUTPUT</code> macro is set during compilation, the generated code
+reports with this call that event event is about to (<code>pre</code> is <code>TRUE</code>),
+or has been (<code>pre</code> is <code>FALSE</code>) executed. In the pre-event call, the event
+can be executed, and all variables have their value before performing the
+updates of the involved edges. In the post-event call, all variables have their
+values updated as indicated in the updates of the edges.</p>
+</div>
+<div class="paragraph">
+<p>Primary use of this call is to forward the decision to other parts of the
+controlled system.</p>
+</div>
+<div class="paragraph">
+<p>Finally, if the <code>PRINT_OUTPUT</code> macro is set during compilation, the generated
+code reports lines of output to be printed with the following function call:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-c" data-lang="c">&lt;prefix&gt;_PrintOutput(const char *line, const char *fname)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It denotes that text <code>line</code> should be printed at file <code>fname</code>. The primary
+uses of this call are to enable debugging the system, or to log relevant
+events. Note that <code>fname</code> here can mean anything. It can mean a real file,
+but also a pseudo-device like <code>:stdout</code> which is commonly used to print
+output to the C <code>stdout</code> stream.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-data-access-2">Data access</h6>
+<div class="paragraph">
+<p>Each CIF constant is available as a variable that does not change after
+initialization. Each algebraic variable can be queried by calling a function
+with the same name as the variable. The value of continuous variables is
+available by accessing the equivalent variable in the generated code. The
+derivative of each continuous variable is available as function named by the
+variable, and the suffix <code>deriv</code>. The model time is available as
+<code>model_time</code>. There is no derivative function of time. Internal functions are
+available as well if required.</p>
+</div>
+<div class="paragraph">
+<p>The engine header file lists the translated names. It should be easy to find
+the relevant entry, as the generated code also documents the original name.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-data-types-2">Data types</h6>
+<div class="paragraph">
+<p>The following table defines how CIF data types are converted in the C99 generated code.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">CIF data type</th>
+<th class="tableblock halign-left valign-top">C99 data type</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bool</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>BoolType</code> which is a typedef to <code>int</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>IntType</code> which is a typedef to <code>int</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>enum e = ...</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;Enum</code> which is a typedef to <code>enum Enum&lt;prefix&gt;_</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>RealType</code> which is a typedef to <code>double</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>string</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>StringType</code> which is a typedef to a <code>struct</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>list[n] t</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>...Type</code> which is a typedef to a <code>struct</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>tuple(...)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>...Type</code> which is a typedef to a <code>struct</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>A few notes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The <code>...</code> in the C99 <code>...Type</code> name for arrays (fixed length lists) and
+tuples is the <a href="#tools-codegen-c99-systematic-type-names">systematic type name</a>
+of the array or tuple type.</p>
+</li>
+<li>
+<p>Due to <a href="#tools-cif2cif-chapter-linearize-merge">linearization</a> all enumerations
+are merged into one. The generated C99 code always has exactly one translated
+<code>enum</code>.</p>
+</li>
+<li>
+<p>The elementary data types (<code>BoolType</code>, <code>IntType</code>, <code>RealType</code>, and
+<code>StringType</code>) are defined in the library header file.</p>
+</li>
+<li>
+<p>The <code>StringType</code> structure wraps a <code>char data[MAX_STRING_SIZE]</code> array.
+The <code>struct</code> allows copying arrays by value using an assignment statement.</p>
+</li>
+<li>
+<p>The array type (list with a fixed length) structure wraps a
+<code>&lt;element-type&gt; data[&lt;size&gt;]</code> array for the same reason. Copying an array
+by assignment is allowed.</p>
+</li>
+<li>
+<p>The tuple type is a structure with fields <code>_field0</code>, <code>_field1</code>, and so
+on, where the type of each field in the structure matches with the type of
+the CIF tuple field.</p>
+</li>
+<li>
+<p>Boolean constants <code>true</code> and <code>false</code> are  named <code>TRUE</code> and <code>FALSE</code>
+respectively.</p>
+</li>
+<li>
+<p>The <code>-0.0</code> value of doubles gets replaced by <code>0.0</code> to void subtle equality
+problems.</p>
+</li>
+<li>
+<p>Strings get silently truncated to <code>MAX_STRING_SIZE - 1</code> characters. They
+are always terminated with a NUL character.</p>
+</li>
+<li>
+<p>Enumeration values get <code>_&lt;prefix&gt;_</code> added in front to make them unique.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-codegen-c99-systematic-type-names">Systematic type names</h6>
+<div class="paragraph">
+<p>For tuple and list types, the type is converted to a name in a systematic way,
+making each type unique and predictable.</p>
+</div>
+<div class="paragraph">
+<p>The conversion composes a name of a type from the type of its elements, and
+concatenates the result. The following conversion table applies:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 75%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">CIF type</th>
+<th class="tableblock halign-left valign-top">Systematic name</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bool</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>B</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>I</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>enum e = ...</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>E</code> (Due to linearization, all enumerations are merged together to a
+single enumeration. As such, always exactly one <code>enum</code> is generated for a
+CIF model.)</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>R</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>list[n] t</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>A&lt;n&gt;&lt;t&gt;</code>, with <code>&lt;n&gt;</code> the length of the array, and <code>&lt;t&gt;</code> the systematic
+type name of the element type of the array.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>tuple(t1, t2, t3, ..., tn)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>T&lt;n&gt;&lt;t1&gt;&lt;t2&gt;&lt;t3&gt;...&lt;tn&gt;</code>, with <code>&lt;n&gt;</code> the number of fields in the tuple, and
+<code>&lt;t1&gt;</code> to <code>&lt;tn&gt;</code> the systematic type names of the fields.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>For example, type <code>list[5] int</code> is converted to <code>A5I</code>, and type
+<code>tuple(list[5] int x; tuple(real a, b) z)</code> is converted to <code>T2A5IT2RR</code>
+(concatenation of <code>T2</code> with the field type names <code>A5I</code> and <code>T2RR</code>).</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-runtime-errors-2">Runtime errors</h6>
+<div class="paragraph">
+<p>The CIF language defines strict sets of allowed values for all data types, and
+performs checking of these values at run time. The generated C99 code follows
+that idea, and checks whether operations on data are safe. Most of these
+checks are performed with an <code>assert</code>. Executed C code does not provide useful
+stack traces by default, and original line numbers of e.g. a CIF program have no
+meaning due to the linearization that is performed before code is generated. In
+addition, the generated code is quite readable and it is not too hard to
+understand what the code is doing at some C source line.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-codegen-chapter-java">Java code generation</h5>
+<div class="paragraph">
+<p>
+
+The <a href="#tools-codegen-chapter-index">CIF code generator</a> can generate Java code from a CIF
+specification. It is assumed the reader of this page is familiar with the
+general information of the CIF code generator tool. This page describes
+specific information applicable only to Java code generation.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-8">Supported specifications</h6>
+<div class="paragraph">
+<p>The CIF code generator supports a subset of CIF specifications. Generation
+of Java code does not impose additional restrictions. See the
+<a href="#tools-codegen-supported">Supported specifications</a> section of the <a href="#tools-codegen-chapter-index">CIF code generator</a>
+page for more information.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-17">Options</h6>
+<div class="paragraph">
+<p>Besides the <a href="#tools-codegen-options">common options</a> that apply to all
+target languages/platforms of the <a href="#tools-codegen-chapter-index">CIF code generator</a>, the Java code
+generation can be influenced by the following additional options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Java package</em>: The Java package in which to generate Java code. If not
+specified, the code prefix is used. The specified package should be a valid
+Java package name, and must not be empty.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The code prefix that can be configured using a common option, is used in the
+generated Java code as prefix for class names.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-compilation">Compilation</h6>
+<div class="paragraph">
+<p>The generated Java code can be compiled with a Java 7 compiler or newer.</p>
+</div>
+<div class="paragraph">
+<p>The generated code is complete, and can be used as is, without any CIF related
+library or runtime. No additional dependencies or libraries are required.
+Only the standard Java libraries, part of any Java installation, are needed.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-generated-files-3">Generated files</h6>
+<div class="paragraph">
+<p>Java code generation leads to two Java files being generated:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>&lt;prefix&gt;.java</code></p>
+</li>
+<li>
+<p><code>&lt;prefix&gt;Test.java</code></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>where <code>&lt;prefix&gt;</code> is replaced by the code prefix configured using the
+<em>Code prefix</em> option.</p>
+</div>
+<div class="paragraph">
+<p>The first file contains the code for all the features of the CIF model in an
+abstract class named <code>&lt;prefix&gt;</code>. The second file contains a class named
+<code>&lt;prefix&gt;Test</code>, which inherits from the <code>&lt;prefix&gt;</code> class, and implements
+various abstract methods. This test class can be used to test the code, and
+can serve as a starting point for actually implementing the coupling between
+the code generated for the CIF model, and the environment in which it runs.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-executing-the-code-3">Executing the code</h6>
+<div class="paragraph">
+<p>The code can be executed in multiple ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>execOnce</code> method</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">public void execOnce(double newTime)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Invoke this method to execute the code once. Inputs are read, transitions are
+executed until none are possible, output is written, etc.</p>
+</div>
+<div class="paragraph">
+<p>The <code>newTime</code> is the time in seconds, since the start of the first
+execution of this method. For each invocation, the time that has elapsed
+so far should be provided. This becomes the new value of variable <code>time</code>.</p>
+</div>
+<div class="paragraph">
+<p>Using this method, you decide when you invoke this method, and with what
+values to use for variable <code>time</code>. This approach allows full control.</p>
+</div>
+</li>
+<li>
+<p><code>exec</code> method</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">public void exec(long frequency)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Invoke this method to execute the code repeatedly, without ever stopping.
+This repeatedly invokes the <code>execOnce</code> method.</p>
+</div>
+<div class="paragraph">
+<p>The <code>frequency</code> can be used to configure how often, in number of times per
+second, the code should be executed. By given a frequency of <code>100</code>, the
+method attempts to execute the code every 10 milliseconds. If a single
+execution takes less than 10 milliseconds, the method will sleep for the
+remainder of what is left of the 10 milliseconds. However, if a single
+execution takes more than 10 milliseconds, the next execution is immediately
+started.</p>
+</div>
+<div class="paragraph">
+<p>It is also possible to execute the code repeatedly, as fast as possible,
+without any delays. As soon as a single execution has finished, another
+execution is started. This kind of behavior can be obtained by providing a
+negative or zero value for <code>frequency</code>.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-environment-interface-3">Environment interface</h6>
+<div class="paragraph">
+<p>The code generated for the CIF model does not do anything useful by itself.
+Only once it is coupled to the environment, can the CIF model become useful.
+The following methods are provided in the interface of the generated class as
+abstract methods, and need to be implemented in a derived class:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>updateInputs</code> method</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">protected void updateInputs()</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In this method, you should update the values of the input variables of the
+CIF model. Note that you should obtain these from the environment. You should
+not access the state of the CIF model from this method, as it may not be
+initialized or up-to-date yet.</p>
+</div>
+<div class="paragraph">
+<p>An example of how to update the input variables, can be found in the
+generated <code>&lt;prefix&gt;Test</code> class. There, each input variable is assigned the
+default value for its data type.</p>
+</div>
+<div class="paragraph">
+<p>If you want to update the variable, you should always assign completely new
+fresh values. Don&#8217;t modify arrays and tuples in-place, as that may lead to
+other variables being changed as well.</p>
+</div>
+</li>
+<li>
+<p><code>preExec</code> method</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">protected void preExec()</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This method is invoked each time, just before the code for the CIF model is
+executed. This method is invoked before the <code>updateInputs</code> method is
+invoked.</p>
+</div>
+<div class="paragraph">
+<p>You should not access the state of the CIF model from this method, as it may
+not be initialized or up-to-date yet.</p>
+</div>
+</li>
+<li>
+<p><code>postExec</code> method</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">protected void postExec()</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This method is invoked each time, just after the code for the CIF model is
+executed.
+In this method, you should write the output variables of the CIF model to
+the environment. Since the code for the CIF model was just executed, these
+variables may have new values.</p>
+</div>
+<div class="paragraph">
+<p>All discrete and continuous variables of the CIF model are available, as are
+variable <code>time</code> and the current locations of all of the automata of the
+CIF model.</p>
+</div>
+<div class="paragraph">
+<p>The code to write the output values to the environment is the dual to reading
+the inputs from the environment, as is done in the <code>updateInputs</code> method.</p>
+</div>
+</li>
+<li>
+<p><code>infoExec</code> method</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">protected void infoExec(long duration, long cycleTime)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This method informs about the duration of a single execution of the code
+generated for the CIF model.
+The <code>duration</code> is the total number of nanoseconds spent executing the code.
+The <code>cycleTime</code> is the desired maximum duration of the execution, in
+nanoseconds, or <code>-1</code> if not available.</p>
+</div>
+<div class="paragraph">
+<p>You can use this method to detect when the code runs longer than the desired
+maximum duration, and thus the desired execution frequency can not be
+achieved. You can also use this method to figure out the variability of the
+duration of execution.</p>
+</div>
+<div class="paragraph">
+<p>The <code>doInfoExec</code> field of the class can be used to configure whether this
+method is invoked during execution by the <code>exec</code> method. This is enabled
+(<code>true</code>) by default.</p>
+</div>
+</li>
+<li>
+<p><code>infoEvent</code> method</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">protected void infoEvent(int idx, boolean pre)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This method informs about events that are about to be executed or have just
+been executed.
+The <code>idx</code> is the 0-based index of the event. You can feed this index to the
+<code>getEventName</code> method to obtain the absolute name of the event. The <code>pre</code>
+is <code>true</code> if the event is about to be executed, and <code>false</code> if the event
+has just been executed.</p>
+</div>
+<div class="paragraph">
+<p>You can use this method to be informed about what the code does during
+execution. You could for instance log that for debugging.</p>
+</div>
+<div class="paragraph">
+<p>The <code>doInfoEvent</code> field of the class can be used to configure whether this
+method is invoked during execution. This is disabled (<code>false</code>) by default.</p>
+</div>
+</li>
+<li>
+<p><code>infoPrintOutput</code> method</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">protected void infoPrintOutput(String text, String target)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This method informs that new print output has been generated during
+execution.
+The <code>text</code> is the text that is to be printed. The <code>target</code> indicates the
+file or special target to which text is to be printed. If printed to a file,
+an absolute or relative local file system path is given. Paths may contain
+both <code>/</code> and <code>\</code> as path separators. Supply the path to the
+<code>&lt;prefix&gt;Utils.normalizePrintTarget</code> method to normalize the path to use
+path separators for the current platform on which the Java code is executed.</p>
+</div>
+<div class="paragraph">
+<p>There are two special targets: <code>:stdout</code> to print to the standard output
+stream, and <code>:stderr</code> to print to the standard error stream.</p>
+</div>
+<div class="paragraph">
+<p>You should use this method to actually print the text to standard output,
+standard error, or files. An example of how to do this, can be found in the
+generated <code>&lt;prefix&gt;Test</code> class.</p>
+</div>
+<div class="paragraph">
+<p>The <code>doInfoPrintOutput</code> field of the class can be used to configure whether
+this method is invoked during execution. This is enabled (<code>true</code>) by default.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-data-access-and-manipulation">Data access and manipulation</h6>
+<div class="paragraph">
+<p>For each CIF constant, a field is generated in the Java class. Similar fields
+are generated for the state variables (discrete and continuous variables), and
+the input variables. A <code>time</code> field is always present and contains the
+current model time.</p>
+</div>
+<div class="paragraph">
+<p>For each internal user-defined function of the CIF model, a method is generated
+in the Java class. Similarly, a method is generated for each algebraic variable
+of the CIF model, as well as for the derivative of each continuous variable
+(except variable <code>time</code>).</p>
+</div>
+<div class="paragraph">
+<p>The standard library functions and operators that are supported by the code
+generation, are also available, in the <code>&lt;prefix&gt;Utils</code> inner class. Not all
+operators and standard library functions are available. Only those that have
+no corresponding Java operator or method, or behave differently with respect to
+runtime errors, are available in this inner class.</p>
+</div>
+<div class="paragraph">
+<p>For more information on the names of the generated field and methods, see the
+section on <a href="#tools-codegen-java-naming">naming</a> below.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-codegen-java-datatypes">Data types</h6>
+<div class="paragraph">
+<p>The following table lists CIF types supported by the code generator, and their
+equivalent in the generated Java code:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 40%;">
+<col style="width: 40%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">CIF type</th>
+<th class="tableblock halign-left valign-top">Java type</th>
+<th class="tableblock halign-left valign-top">Tuple postfix</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bool</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>boolean</code> / <code>java.lang.Boolean</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>B</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code> (with or without range)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>int</code> / <code>java.lang.Integer</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>I</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>real</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>double</code> / <code>java.lang.Double</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>R</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>string</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.lang.String</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>S</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>list[...] t</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>java.util.List&lt;t&gt;</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Lt</code>, with <code>t</code> a postfix for the element type</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>enum e = ...</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;Enum</code> inner enumeration (class)</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>E</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>tuple(...)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CifTuple_T...</code> inner class</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>TnFFF</code>, with <code>n</code> the number of fields, and <code>FFF</code> a postfix for
+the type of each field.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Notes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>For each unique tuple type (ignoring integer and array ranges
+of the types of the fields, as well as field names) an inner
+Java class is generated. Their names all start with
+<code>CifTuple_</code>, and end in a postfix that describes the type.
+The <em>Tuple postfix</em> column in the table lists the texts used for each
+type in the postfix. For instance, for a
+<code>tuple(tuple(int x; real y; string z) a, list[3] int b)</code>
+type, the tuple class would be named <code>CifTuple_T2T3IRSLI</code>.</p>
+</li>
+<li>
+<p>For <code>boolean</code>, <code>int</code>, and <code>double</code>, the primitive type is preferred. It&#8217;s boxed
+variant is used when needed, for instance for element types of a
+<code>java.util.List&lt;...&gt;</code> class.</p>
+</li>
+<li>
+<p>Generic lists are not supported, only CIF arrays can be used.</p>
+</li>
+<li>
+<p>As linearization is applied on the CIF model prior to generating Java code,
+all enumerations are merged together to a single enumeration. As such, always
+exactly one Java <code>enum</code> is generated for a CIF model.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-runtime-errors-3">Runtime errors</h6>
+<div class="paragraph">
+<p>Some CIF models that are syntactically valid, may lead to runtime errors when
+simulated or executed. For instance, there may be a division by zero, an out
+of bounds projection, or an assignment may lead to the range of the assigned
+variable being violated. The generated Java code detects all such problems and
+throws a <code>&lt;prefix&gt;Exception</code> in such cases. This exception class is an inner
+class of the <code>&lt;prefix&gt;</code> class. The exception indicates what caused the
+runtime error, using an informative end-user readable message.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-codegen-java-naming">Naming</h6>
+<div class="paragraph">
+<p>The generated code will contain names for variables, functions, etc. The names
+in the generated code are based on the absolute names of the objects in the
+original CIF model. The names are further influenced by the
+<a href="#tools-cif2cif-chapter-linearize-merge">linearization</a> algorithm. Essentially,
+the absolute names are used, where each <code>.</code> is replaced by a <code>_</code>.
+Furthermore, a <code>_</code> is added at the end, to avoid conflicts with other
+non-generated names, Java keywords, etc. For instance, for an automaton <code>a</code>
+with a discrete variable <code>b</code> in it, the absolute name is <code>a.b</code>. In the
+Java code, the variable will be named <code>a_b_</code>.</p>
+</div>
+<div class="paragraph">
+<p>The code generator ensures unique names in the generated Java code. If the
+same Java name results from two different CIF objects, one of them is renamed,
+by adding a <code>2</code>, or <code>3</code>, or <code>4</code>, etc to make it unique. For instance,
+if the CIF model has a constant named <code>a_b</code> in the top level scope, and a
+constant named <code>b</code> in the <code>a</code> automaton, both would be named <code>a_b_</code>. One
+of them is renamed to <code>a_b_2</code>. If such renaming takes place, a warning is
+printed to the console.</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 40%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">CIF model</th>
+<th class="tableblock halign-left valign-top">Java code</th>
+<th class="tableblock halign-left valign-top">Example CIF name</th>
+<th class="tableblock halign-left valign-top">Example Java name</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Constant</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Field</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a_b_</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Discrete variable</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Field</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a_b_</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Continuous variable</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Field</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a_b_</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Derivative of a continuous variable</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Method</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b'</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a_b_deriv()</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Algebraic variable</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Method</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a_b_()</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Input variable</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Field</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a_b_</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User-defined function</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Method</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a_b_()</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Parameter of a user-defined function</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Method parameter</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a_b_</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Local variable of an internal user-defined function</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Local variable of a method</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a_b_</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enumeration</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enumeration</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;Enum</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enumeration literal</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Enumeration constant</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>a.b.c</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;Enum._c</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Tuple type</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Inner class</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">n/a</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CifTuple_T...</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Notes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>As linearization is applied on the CIF model prior to generating Java code,
+all enumerations are merged together to a single enumeration. As such, always
+exactly one Java <code>enum</code> is generated for a CIF model.</p>
+</li>
+<li>
+<p>For details on tuple types and the classes that are generated for them,
+see the <a href="#tools-codegen-java-datatypes">data types</a> section above.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-codegen-chapter-simulink">Simulink C S-Function code generation</h5>
+<div class="paragraph">
+<p>Everywhere at this page, the terms <em>Matlab</em>, <em>Simulink</em>, <em>S-Function</em>, and
+<em>Mex</em> refer to products and programs developed and owned by <em>MathWorks</em>. For
+more information, please visit <a href="http://mathworks.com/" class="bare">http://mathworks.com/</a>.</p>
+</div>
+<div class="paragraph">
+<p>The <a href="#tools-codegen-chapter-index">CIF code generator</a> can generate Matlab Simulink S-Function C code
+from a CIF specification. It is assumed the reader of this page is familiar with the
+general information of the CIF code generator tool. This page describes
+specific information applicable only to Simulink code generation.</p>
+</div>
+<div class="paragraph">
+<p>The aim of the the conversion from CIF to Simulink is to provide a smooth path
+from a CIF specification to a controlled real-time system.</p>
+</div>
+<div class="paragraph">
+<p>At this page, all the details about the Simulink code generation are discussed.
+For an example of how to use this code generation in practice, read
+<a href="#tools-codegen-chapter-simulink-example">the example</a>.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-9">Supported specifications</h6>
+<div class="paragraph">
+<p>The CIF code generator supports a subset of CIF specifications.  See the
+<a href="#tools-codegen-supported">Supported specifications</a> section of the <a href="#tools-codegen-chapter-index">CIF code generator</a> page
+for more information. Generation of Simulink S-Function C code adds
+a restriction to the type of CIF input variables caused by limitations in
+Simulink input ports.</p>
+</div>
+<div class="paragraph">
+<p>Simulink input ports can only handle real and complex signals. The latter
+cannot be expressed in CIF, while the former creates the need for CIF input
+variables with data types that can be relatively easily converted to real
+number values. For this reason, CIF input variables must have a boolean,
+enumeration, integer, or real elementary type. Arrays (fixed length CIF lists)
+of these elementary types are also supported, they are converted to a vector
+of real numbers at a Simulink input port. Finally, arrays of arrays of the
+elementary types are converted to a matrix of real numbers at a Simulink input
+port.</p>
+</div>
+<div class="paragraph">
+<p>Data types of all other CIF variables have no additional constraints. However,
+Simulink poses similar restrictions to its other data vectors, in particular
+the output ports. The CIF to Simulink code generator toool only makes
+variables available for output that are compatible with real number, vectors
+of real numbers, or matrices of real numbers.
+That means that use of the CIF string type, the tuple type, or arrays with
+a deeper nesting than two levels will not be available at the output.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-differences-in-output-3">Differences in output</h6>
+<div class="paragraph">
+<p>When converting a real number to text, for example when printing a real value,
+the generated Simulink code does not preserve trailing zeroes of real number
+fractions while using <code>%g</code>. For example <code>fmt("%.3g", 1.0)</code> will output
+<code>1</code> rather than <code>1.000</code>.
+This may cause real number values to be printed with less digits precision than
+indicated in the CIF program.</p>
+</div>
+<div class="paragraph">
+<p>Strings have an upper limit in length that is set during compilation. Longer
+strings are silently truncated to this length.</p>
+</div>
+<div class="paragraph">
+<p>The CIF print statement is supported, but only for the <code>:stdout</code> file. It
+is translated to the <code>ssPrintf</code> C function. This is also the only way to get
+a string to appear outside the Simulink S-Function block. Note that Simulink
+may drop the output function for platforms that have no output possibilities.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-options-18">Options</h6>
+<div class="paragraph">
+<p>The CIF to Simulink code generator uses the <a href="#tools-codegen-options">common options</a>
+that apply to all target languages/platforms of the
+<a href="#tools-codegen-chapter-index">CIF code generator</a>. It also has the additional options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Simulink Outputs</em>: This option takes a list of CIF variables that should be
+made available as output of the generated S-Function. Only location
+varaiables (automata), discrete variables, continuous variables, and
+algebraic variables can be selected. The option also allows to use the
+wildcard character <code>*</code>, which represents zero or more characters from the
+name. You can use it to match several variables at once, for example
+<code>*out</code> matches all variables that end with <code>out</code>. The special name
+<code>nothing</code> means that no output should be produced at all.</p>
+</li>
+<li>
+<p><em>Simulink sample time</em>: This option controls how Simulink samples the
+generated block. Allowed values are <code>continuous</code>, <code>inherited</code>,
+<code>variable</code>, or a sample period. Check the Mathworks <code>ssSetSampleTime</code>
+function documentation for details which to use. By default, sample time is
+set to <code>continuous</code>.</p>
+</li>
+<li>
+<p><em>Simulink sample offset</em>: This option controls the offset of sampling. Its
+allowed values depend on the value of the <em>Simulink sample time</em> option.
+Possible values are <code>fixed</code>, <code>0.0</code>, or a positive non-zero value. Check
+the Mathworks <code>ssSetSampleOffset</code> function documentation for details which
+to use. By default, this options is set to <code>0.0</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The code prefix that can be configured using a common option is used as name
+for the generated S-Function.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-generated-files-4">Generated files</h6>
+<div class="paragraph">
+<p>Running the Simulink code generator produces two output files:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 75%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Generated file</th>
+<th class="tableblock halign-left valign-top">Contents</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;prefix&gt;.c</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The generated Simulink S-Function C code.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Report file</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Links CIF variables to Simulink entries.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>where <code>&lt;prefix&gt;</code> is replaced by the value of the <em>Code prefix</em> option during
+code generation.</p>
+</div>
+<div class="paragraph">
+<p>The <code>&lt;prefix&gt;.c</code> file contains the source code of the actual S-Function. The
+file can be compiled using the Matlab Mex C compiler. The resulting mex file
+can be used in Simulink (Open the <b class="menuref">Simulink Library</b>, select
+<b class="menuref">User-defined functions</b>, and then the <b class="menuref">S-Function</b> block,
+drag it into the Simulink canvas, open the block , and type the <code>&lt;prefix&gt;</code>
+name into the <b class="menuref">Name</b> field.)</p>
+</div>
+<div class="paragraph">
+<p>The report file lists how CIF variables got mapped onto
+the input, mode, contstate, and output Simulink vectors. You can use this
+information to connect your CIF program with the other parts of the Simulink model.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-codegen-chapter-simulink-example">Simulink code generation and simulation example</h5>
+<div class="paragraph">
+<p>The <a href="#tools-codegen-chapter-simulink">Simulink C S-Function code generation</a> can generate Simulink C code from a
+CIF specification. Here an example is given to demonstrate how the code
+generator can be used to control a model in Simulink.</p>
+</div>
+<div class="paragraph">
+<p><em>Matlab</em> and <em>Simulink</em> are products owned by <a href="http://mathworks.com">Mathworks</a>.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-system-to-control">System to control</h6>
+<div class="paragraph">
+<p>The system to control is a simple water tank, as shown below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/codegen/simulink-example/tank.svg" alt="tank">
+</div>
+</div>
+<div class="paragraph">
+<p>The water in the tank has volume <code>V</code>. At the bottom of the tank is a pipe
+where water flows away with speed <code>Qo</code>. At the top is a pipe with valve
+<code>n</code> that can be open or closed. The <code>Qi</code> variable denotes the speed of
+water flowing into the tank. The equations that hold in this system are:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">Qi = n * 5
+Qo = sqrt(V)
+V' = Qi - Qo</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>By switching <code>n</code> on or off, a controller can control the amount of water
+flowing into the tank, and with that, control the volume <code>V</code>. The objective
+is to keep the volume between 2 and 10.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-controller-in-cif">Controller in CIF</h6>
+<div class="paragraph">
+<p>A switching controller will be sufficient to control this system. In CIF that
+results in a <code>tank_ctrl.cif</code> file containing:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event open_valve;
+
+automaton controller:
+    disc int n = 0;
+    input real V;
+
+    location closed:
+        initial;
+        edge open_valve when V &lt;= 2 do n := 1 goto opened;
+
+    location opened:
+        edge when V &gt;= 10 do n := 0 goto closed;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The controller has the control variable <code>n</code>, and input variable <code>V</code>. When
+the volume of the tank is below 2, <code>n</code> is set to <code>1</code>, which turns on the
+inflow. When the volume of the tank is high enough, <code>n</code> is set to <code>0</code>
+which turns the inflow off.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-generating-simulink-c-code">Generating Simulink C code</h6>
+<div class="paragraph">
+<p>To simulate the controlled system in Simulink, the code generator tool can
+produce C code for Simulink that can be used in a Simulink <em>System SFunction</em> block.
+Convert the CIF model to C for Simulink with the code generation tool, by
+selecting the code generation tool from the menu under the right mouse button:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/codegen/simulink-example/rmb-generate-code.png" alt="rmb generate code">
+</div>
+</div>
+<div class="paragraph">
+<p>By default, you will get all internal variables at the output of the
+SFunction, which is often too much. The <em>Simulink Generation</em> tab allows
+precise definition of what output variables should be added, in this case all
+variables in the <code>controller</code> automaton. (Input variables are never made
+available from the CIF SFunction block, as they are already available in Simulink.)</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/codegen/simulink-example/set-output-variables.png" alt="set output variables">
+</div>
+</div>
+<div class="paragraph">
+<p>After selecting <em>OK</em>, the CIF model is translated to C code. Code generation
+from the <code>tank_ctrl.cif</code> files results in two output files. The
+<code>tank_ctrl.c</code> file contains the generated C source code. The
+<code>tank_ctrl_report.txt</code> is a text file describing the data of the generated
+SFunction code:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>Input/output report of the tank_ctrl.cif SFunction.
+
+During code generation, CIF variables are made available in the Simulink vectors.
+This report lists the variables in each vector, along with their index number.
+
+Modes
+-----
+controller 1
+
+Continuous states
+-----------------
+time 1
+
+Inputs
+------
+controller.V 1
+
+Outputs
+-------
+controller.n 1</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The report shows which CIF variables are available at each vector. The
+<em>Inputs</em> and <em>Outputs</em> are the most interesting. Here it shows that <code>V</code> is
+the only input variable, <code>n</code> is the only output variable, and they are both
+the first value in their vector. This is what you would expect for such
+a small system. With bigger systems, the index numbers are much more useful
+for making proper connections in Simulink.</p>
+</div>
+<div class="paragraph">
+<p>And this concludes the CIF part of this example, next step is setting things
+up in Matlab/Simulink.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-simulation-in-simulink">Simulation in Simulink</h6>
+<div class="paragraph">
+<p>After starting <em>Matlab</em>, and moving to the correct directory, you get
+a display like:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/codegen/simulink-example/matlab-mex.png" alt="matlab mex">
+</div>
+</div>
+<div class="paragraph">
+<p>You can see the files present in the directory, as you would expect. In
+Matlab, the generated C code is compiled with the Matlab <em>Mex</em>
+compiler:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-shell" data-lang="shell">mex tank_ctrl.c</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, the compiler prints a warning about the wrong compiler version, this may
+be different at your system.</p>
+</div>
+<div class="paragraph">
+<p>The result of the compilation is a <code>tank_ctrl.mexa64</code> file at a 64 bit
+system. If you use a 32 bit system, the filename extension is different.</p>
+</div>
+<div class="paragraph">
+<p>The compiled CIF controller can be used in a Simulink <em>System SFunction</em>
+block, as shown below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/codegen/simulink-example/simulink-controlled-system.png" alt="simulink controlled system">
+</div>
+</div>
+<div class="paragraph">
+<p>In the middle the equations are modeled. The output of the equations is <code>V</code>,
+which is fed into the <code>S-Function</code> block with the CIF controller at the top.
+The controller computes <code>n</code> which is an input for the equations.</p>
+</div>
+<div class="paragraph">
+<p>At the bottom, a scope is attached that produces the following picture.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/codegen/simulink-example/simulation-graph.png" alt="simulation graph">
+</div>
+</div>
+<div class="paragraph">
+<p>The volume fluctuates between 2 and 10, at the bottom is the control signal
+<code>n</code>.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-cif2plc-chapter-index">CIF PLC code generator</h4>
+<div class="paragraph">
+<p>
+
+
+The CIF PLC code generator can be used to generate <strong>P</strong>rogrammable
+<strong>L</strong>ogic <strong>C</strong>ontroller (PLC) code, for the implementation of CIF
+controllers on PLCs. The generated PLC code adheres to the IEC 61131-3
+standard, a widely used international standard for PLC programming languages.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-generator-2">Starting the generator</h5>
+<div class="paragraph">
+<p>The generator can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF implementation tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Generate PLC code for CIF specification&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF implementation tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Generate PLC code for CIF specification&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cif2plc</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cif2plc</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2plc-options">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file</em>: The absolute or relative local file system path to the
+output file. Depending on the <a href="#tools-cif2plc-output-type">output type</a>,
+this is either a file or a directory. The default depends on the output type
+as well.</p>
+</li>
+<li>
+<p><em>PLC code output type</em>: The PLC code <a href="#tools-cif2plc-output-type">output type</a>
+specifies the type of output (essentially the file format) that should be generated.</p>
+</li>
+<li>
+<p><em>PLC task name</em>: The name of the PLC task to generate. If not specified,
+defaults to <code>PlcTask</code>.</p>
+</li>
+<li>
+<p><em>PLC task cycle time</em>: If periodic task scheduling is to be used, use this
+option to enable it, by setting the cycle time in milliseconds for the task
+to generate. The cycle time must be a positive integer number. Cycle times of
+over a minute may not work as expected. However, since such large cycle times
+are of little practical use, that should not be a problem. Disable this
+option to disable periodic task scheduling. This option defaults to periodic
+task scheduling with a cycle time of 10 milliseconds. Disabling periodic task
+scheduling is not supported for the TwinCAT <a href="#tools-cif2plc-output-type">output type</a>.</p>
+</li>
+<li>
+<p><em>PLC task priority</em>: The scheduling priority of the task to generate. The
+priority must be in the range [0 .. 65535], where priority 0 is the highest
+priority, and priority 65535 is the lowest priority. The priority can be used
+for preemptive or non-preemptive scheduling. If not specified, the priority
+defaults to 20.</p>
+</li>
+<li>
+<p><em>PLC project name</em>: The name of the PLC project to generate. If not
+specified, defaults to <code>Untitled1</code>.</p>
+</li>
+<li>
+<p><em>PLC configuration name</em>: The name of the PLC configuration to generate. If
+not specified, defaults to <code>Untitled1</code>.</p>
+</li>
+<li>
+<p><em>PLC resource name</em>: The name of the PLC resource to generate. If not
+specified, defaults to <code>Untitled1</code>.</p>
+</li>
+<li>
+<p><em>PLC number bits</em>: The maximum number of bits supported by the PLC for
+representing numeric values. Use 64-bit if supported by the PLC, for full CIF
+compatibility, and the highest <a href="#tools-cif2plc-accuracy">accuracy</a>. If
+the PLC does not supported 64-bit integer and floating point numbers, set
+this option to 32-bit.</p>
+</li>
+<li>
+<p><em>PLC maximum iterations</em>: The maximum number of iterations of the main loop
+of the main program body, per execution of the main program body. Must be
+a positive number. May be set to infinite, to not impose a restriction. The
+default is set to at most 100 iterations. See the section on the
+<a href="#tools-cif2plc-progbody">program body</a> for more information.</p>
+</li>
+<li>
+<p><em>Formal function invocation (arguments based)</em>: Specifies for which functions
+to use formal invocation syntax in the generated PLC code. By default the
+formal syntax is used for none of the functions. For PLC implementations that
+don&#8217;t support the non-formal syntax, the formal syntax can be used for all
+functions, or only for functions with more than one argument.</p>
+</li>
+<li>
+<p><em>Formal function invocation (function kind based)</em>: Specifies for which
+functions to use formal invocation syntax in the generated PLC code. By
+default the formal syntax is used only for all but the standard
+library/conversion functions. This can be changed to only the standard
+library/conversion functions, or to all functions.</p>
+</li>
+<li>
+<p><em>Eliminate enumerations</em>: Enable this option to eliminate enumerations (by
+converting them to integers) before generating the actual PLC code, in case
+the PLC doesn&#8217;t support enumerations. Disable this option to keep enumerations
+in the generated PLC code. By default this option is disabled. This option is
+deprecated. Use the <em>Convert enumerations</em> option instead.</p>
+</li>
+<li>
+<p><em>Convert enumerations</em>: Specifies whether enumerations should be converted
+before generating the actual PLC code, in case the PLC doesn&#8217;t support
+enumerations. Enumerations can be converted to integers or constants. By
+default enumerations are not converted. This option has no effect if the
+<em>Eliminate enumerations</em> option is enabled.</p>
+</li>
+<li>
+<p><em>Simplify values</em>: Enable this option to simplify values and inline constants
+during generation of the PLC code. The benefit is that static computations
+are evaluated, and for the result simpler PLC code is generated. This applies
+to both the original model as well as anything generated during the code
+generation, for instance as the result of
+<a href="#tools-cif2cif-chapter-linearize-merge">linearization</a>. Constants created by
+<em>Convert enumerations</em> are not inlined. Enabling the option may thus lead to
+simpler PLC code. However, the simplification itself may take quite some time.
+Furthermore, as constants are inlined, they are duplicated for each use. If a
+constant with a large value (such as a large literal array) is used multiple
+times, this can lead to significantly larger PLC code. By default this option
+is enabled.</p>
+</li>
+<li>
+<p><em>Rename warnings</em>: Enable this option to print warnings to the console when
+a PLC name is renamed due to a conflict with another PLC name, or disable it
+to omit the warnings. The option is disabled by default. See the section on
+<a href="#tools-cif2plc-names">names</a> for more information.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Formal function invocation syntax (e.g. <code>MIN(IN1:3, IN2:5)</code>) is used in the
+generated PLC code only for those functions that are included by both the
+<b class="menuref">Formal function invocation (arguments based)</b>
+option and the
+<b class="menuref">Formal function invocation (function kind based)</b>
+option. If either
+of the options excludes the function, the non-formal function invocation syntax
+(e.g. <code>MIN(3, 5)</code>) is used for that function. Note that for invocations of
+function blocks, the generated PLC code always uses the formal syntax.
+Furthermore, for certain standard library functions, only the non-formal syntax
+is defined by the standard, and thus used in the generated PLC code.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-supported-specifications-10">Supported specifications</h5>
+<div class="paragraph">
+<p>The CIF PLC code generator supports a subset of CIF specifications. The
+following restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Unrestricted events are not supported, as they can always be executed (are
+always enabled), and would lead to infinitely running PLC code. Detection of
+unrestricted events however, is incomplete. That is, for some unrestricted
+the code generation results in an error, while for other unrestricted events
+code is generated without any warnings or errors. See the
+<a href="#tools-cif2plc-progbody">Program body</a> section for more information.</p>
+</li>
+<li>
+<p>Specifications without automata are not supported.</p>
+</li>
+<li>
+<p>Initialization predicates outside locations are not supported, except if it
+can be determined statically that they are trivially <code>true</code>.</p>
+</li>
+<li>
+<p>State invariants in components are not supported, except if it can be
+determined statically that they are trivially <code>true</code>.</p>
+</li>
+<li>
+<p>State/event exclusion invariants (in components as well as locations) are not
+supported. To allow state/event exclusion invariants to be used in the input,
+manually eliminate them first using the
+<a href="#tools-cif2cif-chapter-elim-state-event-excl-invs">Eliminate state/event exclusion invariants</a> CIF to CIF transformation.</p>
+</li>
+<li>
+<p>Discrete variables with multiple initial values (including <code>any</code>) are not
+supported.</p>
+</li>
+<li>
+<p>External user-defined functions are not supported.</p>
+</li>
+<li>
+<p>Urgent locations are not supported.</p>
+</li>
+<li>
+<p>Initialization predicates in locations that can not be statically evaluated
+are not supported.</p>
+</li>
+<li>
+<p>State invariants in locations are not supported, except if it can be
+determined statically that they are trivially <code>true</code>.</p>
+</li>
+<li>
+<p>Automata that do not have exactly one initial location are not supported.</p>
+</li>
+<li>
+<p>Urgent edges are not supported.</p>
+</li>
+<li>
+<p>User-defined functions without parameters are not supported.</p>
+</li>
+<li>
+<p>Internal user-defined functions that contain a multi-assignment that assigns
+multiple (non-overlapping) parts of a single variable are not supported.
+For instance, <code>a[0], a[1] := 1, 2</code> is not supported, as multiple parts
+(the first and second element) of array <code>a</code> are assigned in a single
+multi-assignment. This restriction applies only to multi-assignments in
+functions, not to multi-assignments on edges.</p>
+</li>
+<li>
+<p>Internal user-defined functions that contain a <code>continue</code> statement are
+not supported.</p>
+</li>
+<li>
+<p>Data types other than <code>bool</code>, <code>int</code> (with or without range), <code>real</code>,
+enumerations, tuples, and arrays, are not supported. This applies to the data
+types of variables, parameters of functions, return types of functions, etc.</p>
+</li>
+<li>
+<p>String values are not supported.</p>
+</li>
+<li>
+<p>Cast from <code>int</code> to <code>real</code> and casts that don&#8217;t change the type, are
+supported. All other casts are not supported.</p>
+</li>
+<li>
+<p>Sampling of distributions is not supported.</p>
+</li>
+<li>
+<p>The use of the conjunction and disjunction binary operators on anything other
+than boolean values is not supported.</p>
+</li>
+<li>
+<p>The use of the equality and inequality binary operators on anything other
+than boolean, integer, real, or enumeration values is not supported.</p>
+</li>
+<li>
+<p>The use of the addition and subtraction binary operators on anything other
+than integer or real values is not supported.</p>
+</li>
+<li>
+<p>The use of the element test and subset binary operators is not supported.</p>
+</li>
+<li>
+<p>Projection on anything other than tuples and arrays is not supported. This
+applies to expressions as well as addressables (the left hand sides of
+assignments). For arrays, both 0-based indices (counting from the left) as
+well as negative indices (counting from the right) are supported.</p>
+</li>
+<li>
+<p>Slicing is not supported.</p>
+</li>
+<li>
+<p>Function calls on anything other than standard library functions and internal
+user-defined functions is not supported.</p>
+</li>
+<li>
+<p>The <code>ceil</code>, <code>del</code>, <code>empty</code>, <code>floor</code>, <code>fmt</code>, <code>pop</code>, <code>round</code>,
+<code>scale</code>, <code>sign</code>, <code>size</code>, <code>acosh</code>, <code>asinh</code>, <code>atanh</code>, <code>cosh</code>,
+<code>sinh</code>, and <code>tanh</code> standard library functions are not supported.</p>
+</li>
+<li>
+<p>The distribution standard library functions are not supported.</p>
+</li>
+<li>
+<p>Lists (except for arrays), sets, and dictionaries are not supported.</p>
+</li>
+<li>
+<p>The use of functions as values is not supported. That is, functions may only
+be used in function calls, and may for instance not be stored in variables.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-preprocessing-7">Preprocessing</h5>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+applied as preprocessing (in the given order), to increase the subset of CIF
+specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a> (if <em>Simplify values</em> option is enabled)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-consts">Eliminate constants</a> (if <em>Simplify values</em> option is enabled)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-others">Simplify others</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-io-decls">Remove I/O declarations</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>After these preprocessing steps, the generator checks whether the specification
+is supported. It then applies the following additional
+<a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a>:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-linearize-merge">Linearize (merge)</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a> (if <em>Simplify values</em> option is enabled)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-add-default-init-values">Add default initial values</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-enums-to-ints">Convert enumerations to integers</a> (if <em>Convert enumerations</em> option is set
+to integers or if <em>Eliminate enumerations</em> is enabled)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-enums-to-consts">Convert enumerations to constants</a> (if <em>Convert enumerations</em> option is
+set to constants)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-standard-compliance">Standard compliance</h5>
+<div class="paragraph">
+<p>The PLC code that is generated complies with the second edition (from 2003) of
+the IEC 61131-3 standard. The code does not use any vendor specific extensions,
+functions, etc.</p>
+</div>
+<div class="paragraph">
+<p>For the TwinCAT <a href="#tools-cif2plc-output-type">output type</a>, <code>STRUCT</code>
+data type declarations have no <code>;</code> character after the <code>STRUCT</code> data types,
+to work around a bug in the TwinCAT parser. In that case the output is not
+compliant with the IEC 61131-3 standard.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-generated-plc-code">Generated PLC code</h5>
+<div class="paragraph">
+<p>The bodies of the programs and functions in the generated PLC code use
+Structured Text as programming language. Structured Text is one of the
+programming languages that is part of the IEC 61131-1 standard.</p>
+</div>
+<div class="paragraph">
+<p>The generated code contains a single program called <code>MAIN</code>. This program is
+instantiated in a task, which is part of a resource, which in turn is part of
+a configuration. The configuration is put in a project, but that is outside
+the range of the IEC 61131-3 standard. Most implementations however, work with
+projects. The effect of the project, configuration, resource, and task is
+dependent on the <a href="#tools-cif2plc-output-type">output type</a>. Besides a
+program, the code generator also generates data types, functions, and global
+variables.</p>
+</div>
+<div class="paragraph">
+<p>For algebraic variables, functions are generated that are parametrized over the
+state of the system. Similarly, functions are generated for the derivatives of
+the continuous variables. For the discrete and continuous variables (including
+variable <code>time</code>), a <code>STRUCT</code> data type named <code>STATE</code> is generated that
+holds the entire state of the system (or more precisely, the
+<a href="#tools-cifsim-traces-state">state</a> of the CIF specification). For input variables,
+an <code>INPUTS</code> global variables list/file is generated. For constants (if
+<em>Simplify values</em> option is disabled), a <code>CONSTS</code> global variables list/file
+is generated.</p>
+</div>
+<div class="paragraph">
+<p>For invalid CIF specifications, the resulting code may not always behave as the
+original CIF code. For instance, the ranges of integer types are ignored by the
+code generator. Furthermore, <code>mod</code> by zero in CIF results in a runtime error,
+while in the generated code it results in zero. Out of bound projection indices
+of arrays may for instance have the effect that the closest existing element is
+used instead, and the result may even be implementation dependent. There are
+other such differences as well.</p>
+</div>
+<div class="paragraph">
+<p>Little to no effort is put into generating readable code. That is, the
+generated is not meant to be inspected. The generated code is also not intended
+to be modified directly. Instead, the original CIF models should be modified,
+and from them new PLC code should be generated. Examples of non-readable code
+include the generated <a href="#tools-cif2plc-names">names</a>, and code generated
+for expressions (which has way more parentheses than strictly necessary).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2plc-names">Names</h5>
+<div class="paragraph">
+<p>The generated PLC code will contain names for functions, variables, locations
+of automata, etc. The absolute names of all objects are used. The names are
+influenced by the <a href="#tools-cif2cif-chapter-linearize-merge">linearization</a>
+algorithm. They are further influenced by the PLC code generator.</p>
+</div>
+<div class="paragraph">
+<p>The code generator ensures unique names in the generated PLC code, taking into
+account the reserved names (keywords, standard functions, etc) of the IEC
+61131-3 standard and some of the common implementations of that standard. To
+avoid reserved names, names are prefixed with prefixes that depend on the type
+of object (for instance, <code>dvar_</code> for discrete variables). Furthermore, it
+takes into account that names in CIF are case sensitive, while they are case
+insensitive in IEC 61131-3. The code generator computes a candidate name based
+on these criteria.</p>
+</div>
+<div class="paragraph">
+<p>If this results in duplicate names, renaming is performed. A common reason for
+renaming is different locations (of the same automaton or of different
+automata) that have the same name, but in different casing. For instance,
+consider one location named <code>WaitForTimeout</code> and another named
+<code>WaitForTimeOut</code>. After linearization, there is an enumeration with a literal
+for each unique location name. The enumeration thus has at least two literals,
+named <code>WaitForTimeout</code> and <code>WaitForTimeOut</code>. The candidate names for these
+enumeration literals are <code>elit_WaitForTimeout</code> and <code>elit_WaitForTimeOut</code>.
+However, they are identical except for casing. Thus, the first one that is
+encountered during code generation gets the candidate name, and the second one
+is renamed. This results in a warning like this:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-console" data-lang="console">WARNING: PLC variable "elit_WaitForTimeout" is renamed to "elit_WaitForTimeout2".</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Renaming may be needed to ensure valid functioning output. However, it may make
+it slightly more difficult to trace names in the generated PLC code back to the
+original CIF model. Also, in the PLC environment, when debugging the current
+values of variables may be shown. If enumeration literals are renamed, the
+renamed names may then be shown in the debugger. By default, the PLC code
+generator does not inform the user when renaming takes place. By enabling the
+<em>Rename Warnings</em> option, a warning will be printed to the console, each time
+a PLC name is renamed.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2plc-progbody">Program body</h5>
+<div class="paragraph">
+<p>The body of the <code>MAIN</code> program consists of several parts. The <code>MAIN</code>
+program is executed exactly once per cycle, by the PLC. The following parts are
+present, and are executed in order:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Time and cycle time handling.</p>
+</li>
+<li>
+<p>Initialization of the initial state, for the first cycle only.</p>
+</li>
+<li>
+<p>Updating of the continuous variables for the time that has passed since the
+previous cycle, for all but the first cycle.</p>
+</li>
+<li>
+<p>A loop that executes events for as long as they are possible.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The code automatically determines the cycle time that is used, in a manner that
+does not require any vendor specific extensions, functions, or data types.
+The generated code works for fixed cycle times (periodic task scheduling) as
+well as variable cycle times (non-periodic tasks).</p>
+</div>
+<div class="paragraph">
+<p>During the first cycle, the variables of the state are initialized to their
+proper values. For subsequent cycles, the state resulting from the previous
+cycle is reused, where the values of the continuous variables are updated to
+account for the time that has passed since the beginning of the previous cycle.
+For details on the method used to update the values of the continuous
+variables, see the <a href="#tools-cif2plc-accuracy">Accuracy over time</a> section.</p>
+</div>
+<div class="paragraph">
+<p>The loop at the end of the body evaluates the guard of each of the events of
+the CIF specification. If a guard holds, the corresponding update is performed.
+Code is generated for the events, or rather the edges, in the order that they
+occur in the <a href="#tools-cif2cif-chapter-linearize-merge">linearized</a> CIF
+specification. Linearization is performed in such a way, that the PLC code that
+is generated from it, has a correspondence to the simulator. Assuming the
+simulator is used to simulate by always automatically choosing the
+<a href="#tools-cifsim-input-chapter-automatic">first transition</a> that is enabled, the
+PLC code will choose that same transition. That is, for each iteration of the
+event loop, the code is executed for the first event with an enabled guard.
+Then, a new iteration of the loop is started, from the top, to ensure that the
+first enabled event is always executed, similar to simulation. If during an
+iteration of the loop none of the events is enabled, the loop terminates.</p>
+</div>
+<div class="paragraph">
+<p>If at least one event was enabled, the loop is executed again. If during an
+iteration of the loop none of the edges was enabled, the loop terminates. This
+approach generally does not result in predictable execution times of the
+program body. That is, if a certain edge keeps being enabled, the loop is
+executed over an over again. In that case, the execution time of the body
+exceeds the fixed cycle time, and the controller is no longer guaranteed to
+work correctly. Even if the loop is only executed a finite number of times,
+the execution time of the body may exceed the fixed cycle time. One may
+consider monitoring the execution times to detect such issues.</p>
+</div>
+<div class="paragraph">
+<p>
+Within the 'event loop', a counter is used to detect how often the loop is
+repeated. After the loop is executed a 100 times, the loop is terminated, to
+ensure that the body terminates in the case of events that are always possible.
+In such a cases, variable <code>loopsKilled</code> is incremented by one, for debugging.
+While by default the loop is terminated after 100 iterations, this maximum
+number of iterations can be configured using the
+<b class="menuref">PLC maximum iterations</b>
+option (<b class="menuref">Generator</b>
+category). The
+option can also be set to infinite, to not impose a restriction, and never
+terminate the loop due to too many iterations. See also the
+<a href="#tools-cif2plc-options">Options</a> section above.</p>
+</div>
+<div class="paragraph">
+<p>Obviously, similar to the fact that the controller cannot guarantee its correct
+behavior if the execution time of a cycle exceeds the cycle time, the
+controller also cannot guarantee its correct behavior if the inputs from the
+external I/O change more rapidly than the cycle time. That is, if an input
+changes during a cycle, the change is not noticed until the next cycle. If an
+input changes during a cycle and changes back during that same cycle, the
+change is not noticed at all. Therefore, choosing an appropriate cycle time is
+essential for the correct functioning of the controller.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2plc-accuracy">Accuracy over time</h5>
+<div class="paragraph">
+<p>The generated code maintains the running time in seconds, by adding the cycle
+time to current running time, on each cycle. Due to the finite binary
+representation of real values, this results in loss of a accuracy over
+prolonged periods of execution time. As such, the use of variable <code>time</code> in
+CIF models is highly discouraged.</p>
+</div>
+<div class="paragraph">
+<p>However, for a cycle time of one millisecond, while there may be loss of
+accuracy, time should keep increasing for at least several thousand years.
+After that, adding the cycle time may no longer increase the value of the
+variable, potentially resulting in unexpected execution behavior.</p>
+</div>
+<div class="paragraph">
+<p>The continuous variables from the CIF specification are updated each cycle
+using the
+<a href="http://en.wikipedia.org/wiki/Euler_method">Euler method</a>
+for
+integration. That is, each cycle the cycle time is multiplied by the derivative
+of the continuous variable in the state of the previous cycle. This value is
+added to the value of the continuous variable. Essentially, a linear
+approximation of the derivative is used, calculated using the state of the
+previous cycle.</p>
+</div>
+<div class="paragraph">
+<p>The Euler method can be
+<a href="http://en.wikipedia.org/wiki/Numerical_stability">numerically unstable</a>,
+can suffer from rounding
+errors due to the use finite binary representations of real values, and has
+some other issues as well. The effects are likely to be limited if linear
+continuous variable (continuous variables with constant derivatives) are used.
+Especially clocks (derivative +1 or -1) generally don&#8217;t suffer too much from
+these issues. However, even clocks may suffer from loss of accuracy over time.
+As such, clocks should not be used to measure over long periods of time.
+Instead they should be reset, rendering the past loss of accuracy irrelevant
+for any future measurements.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-io-coupling">I/O coupling</h5>
+<div class="paragraph">
+<p>For all variables in the state of the CIF specification, except for variable
+<code>time</code>, PLC variables are generated with a <code>%Q*</code> address, to ensure they
+can be used as output variables, and can potentially be coupled to output
+ports. The state is maintained in a variable <code>state0</code>, a persistent local
+variable of the <code>MAIN</code> program.</p>
+</div>
+<div class="paragraph">
+<p>For all input variables of the CIF specification, a PLC variable is generated
+with a <code>%I*</code> addresses, to ensure they can be used as input variables, and
+can potentially be coupled to input ports. These variables are generated in a
+global variables list/file named <code>INPUTS</code>.</p>
+</div>
+<div class="paragraph">
+<p>The actual coupling to hardware addresses is something that is left to the
+implementation of the PLC programming environment.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2plc-output-type">PLC output type</h5>
+<div class="paragraph">
+<p>The PLC code generator can generate its output in multiple forms (file formats)
+depending on the output type. The output type can be configured using the
+<b class="menuref">PLC code output type</b>
+option (
+<b class="menuref">Generator</b>
+category). The
+following output types are currently available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>PLCopen XML (default)</p>
+</li>
+<li>
+<p>IEC 61131-3</p>
+</li>
+<li>
+<p><a href="#tools-cif2plc-chapter-twincat">TwinCAT</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>PLCopen XML is an
+<a href="http://en.wikipedia.org/wiki/XML">XML</a>-based file format
+standardized by the PLCopen organization, intended for the exchange of complete
+projects of PLC code, even across different tools and vendors. The PLCopen
+XML files generated by the PLC code generator are compliant with version 2.01
+of the PLCopen XML standard. By default, if no output file is specified, it
+defaults to the input file path, where the <code>.cif</code> file extension is removed
+(if present), and a <code>.plcopen.xml</code> file extension is added.</p>
+</div>
+<div class="paragraph">
+<p>Output in IEC 61131-3 syntax generates multiple files. By default, if no output
+directory is specified, it defaults to the input file path, where the <code>.cif</code>
+file extension is removed (if present), and a <code>_plc</code> directory extension is
+added. The <code>MAIN</code> program gets a <code>.plcprog</code> file extension, functions get
+a <code>.plcfunc</code> file extension, type declarations get a <code>.plctype</code> file
+extension, and the configuration gets a <code>.plccfg</code> file extension. The
+<em>PLC project name</em> and <em>PLC resource name</em> options have no effect for this
+output type.</p>
+</div>
+<div class="paragraph">
+<p>TwinCAT is a complete
+<a href="http://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a>
+for the
+development and testing of PLC controllers. Using the TwinCAT PLC output type,
+the generated PLC code can be written to the native file formats of the TwinCAT
+IDE. By default, if no output directory is specified, it defaults to the input
+file path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>_twincat</code> directory extension is added. See the
+<a href="#tools-cif2plc-chapter-twincat">TwinCAT PLC output</a> page for further details.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2plc-chapter-twincat">TwinCAT PLC output</h5>
+<div class="paragraph">
+<p>
+
+<a href="http://www.beckhoff.com/english/twincat">TwinCAT</a>
+is a complete
+<a href="http://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a>
+for the
+development and testing of PLC controllers. Using the TwinCAT <a href="#tools-cif2plc-output-type">PLC output
+type</a>, the generated PLC code can be written to the
+native file formats of the TwinCAT IDE. This allows for more tight integration
+and smoother development cycles than using the PLCopen XML output type.</p>
+</div>
+<div class="paragraph">
+<p>We currently only provide official support for version 3.1 of TwinCAT.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2plc-twincat-modes">TwinCAT system modes</h6>
+<div class="paragraph">
+<p>The TwinCAT software IDE is built on Microsoft Visual Studio. TwinCAT also
+supplies a utility to monitor and control the TwinCAT System Service, via an
+icon in the system tray, part in the Windows taskbar. The icon shows the mode
+(or status) of the TwinCAT system:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><span class="image"><img src="./tools/cif2plc/mode_inactive.png" alt="mode inactive"></span>
+Inactive Mode</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2plc/mode_stop.png" alt="mode stop"></span>
+Stop Mode</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2plc/mode_config.png" alt="mode config"></span>
+Config Mode</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2plc/mode_run.png" alt="mode run"></span>
+Run Mode</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2plc/mode_ex.png" alt="mode ex"></span>
+Exception Mode</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In the <em>Inactive Mode</em>, the TwinCAT System Service is not running. Restart
+Windows or manually activate the TwinCAT System Service and related services.</p>
+</div>
+<div class="paragraph">
+<p>The <em>Stop Mode</em> is of little use, so
+<a href="#tools-cif2plc-twincat-modes-change">switch</a> to the <em>Config Mode</em>
+instead. In the <em>Config Mode</em>, the system (the PLC) can be configured. In the
+<em>Run Mode</em>, the system (the PLC) can be used to control the hardware. If a
+runtime exception occurs in <em>Run Mode</em>, the <em>Exception Mode</em> becomes active.</p>
+</div>
+<div class="paragraph">
+<p>Within Visual Studio, the mode is also shown as an icon in the bottom right
+corner of the IDE:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><span class="image"><img src="./tools/cif2plc/mode_stop.png" alt="mode stop"></span>
+Stop Mode</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2plc/mode_config.png" alt="mode config"></span>
+Config Mode</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2plc/mode_run.png" alt="mode run"></span>
+Run Mode</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2plc/mode_run.png" alt="mode run"></span> / <span class="image"><img src="./tools/cif2plc/mode_free_run.png" alt="mode free run"></span>
+Free Run Mode (alternating icons)</p>
+</li>
+<li>
+<p><span class="image"><img src="./tools/cif2plc/mode_ex.png" alt="mode ex"></span>
+Exception Mode</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If the system is only equipped with a <em>soft PLC</em>, and the TwinCAT environment
+is set up to target the local system, both icons should indicate a consistent
+status. This page assumes this situation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2plc-twincat-modes-change">Changing modes</h6>
+<div class="paragraph">
+<p>To change to <em>Config Mode</em> or restart <em>Config Mode</em> from the system tray:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Right click the system tray icon and choose
+<span class="menuseq"><b class="menu">System</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Config</b></span>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>To change to <em>Config Mode</em> or restart <em>Config Mode</em> from Visual Studio:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Click <span class="menuseq"><b class="menu">TwinCAT</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Restart TwinCAT (Config Mode)</b></span>.
+Alternatively, click the appropriate toolbar item
+(<span class="image"><img src="./tools/cif2plc/restart_config.png" alt="restart config"></span>).</p>
+</li>
+<li>
+<p>A dialog pops up with the question
+<em>Restart TwinCAT System in Config Mode</em>.
+Click
+<b class="button">OK</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>A dialog pops up with the question <em>Load I/O Devices</em>.
+Click
+<b class="button">Yes</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>A dialog pops up with the question <em>Activate Free Run</em>.
+Click
+<b class="button">Yes</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>To change to <em>Run Mode</em> or restart <em>Run Mode</em> from the system tray:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Make sure the hardware is powered up.</p>
+</li>
+<li>
+<p>Right click the system tray icon and choose
+<span class="menuseq"><b class="menu">System</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Start/Restart</b></span>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>To change to <em>Run Mode</em> or restart <em>Run Mode</em> from Visual Studio:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Make sure the hardware is powered up.</p>
+</li>
+<li>
+<p>Click <span class="menuseq"><b class="menu">TwinCAT</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Restart TwinCAT System</b></span>. Alternatively,
+click the appropriate toolbar item (<span class="image"><img src="./tools/cif2plc/restart_run.png" alt="restart run"></span>).</p>
+</li>
+<li>
+<p>A dialog pops up with the question <em>Restart TwinCAT System in Run Mode</em>.
+Click
+<b class="button">OK</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In general it is recommended to switch modes via Visual Studio instead of via
+the system tray icon.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-generated-output">Generated output</h6>
+<div class="paragraph">
+<p>The CIF PLC code generator can generate code into an existing TwinCAT Visual
+Studio solution, with a TwinCAT XAE project that contains a TwinCAT Standard
+PLC project. The directory that contains the solution must have the same name
+(except for the file extension) as the solution file (<code>.sln</code> file). The
+TwinCAT XAE project (both the directory and the <code>.tsproj</code> file) in the
+solution should have the same name as well. The TwinCAT XAE project should
+contain a TwinCAT Standard PLC project. This project may be given any name,
+and this name can be configured using the
+<b class="menuref">PLC project name</b>
+option
+(<b class="menuref">Generator</b>
+category). However, in order to be able to import I/O
+mappings it is highly recommended to always use the default name suggested by
+TwinCAT (<code>Untitled1</code>) for TwinCAT Default PLC projects.</p>
+</div>
+<div class="paragraph">
+<p>The project should already contain a task. This task can be given any name,
+and this name can be configured using the
+<b class="menuref">PLC task name</b>
+option
+(<b class="menuref">Generator</b>
+category). By default, TwinCAT Default PLC projects have
+a task named <code>PlcTask</code>. This name is the default for the
+<b class="menuref">PLC task name</b>
+option as well. The cycle time and priority of the
+task are automatically updated by the PLC code generator, depending on the
+values provided for the options of the generator. The code generator also
+ensures that the <code>MAIN</code> program is instantiated/scheduled on the task.</p>
+</div>
+<div class="paragraph">
+<p>All <code>POU</code> (functions, programs, etc), <code>DUT</code> (data types), and <code>GVL</code>
+(global variable lists) code files that are present in the TwinCAT Default PLC
+project are removed, from both the project and from disk, by the PLC code
+generator. The newly generated code files are (over)written, and the project is
+updated to include and compile only the newly generated files.</p>
+</div>
+<div class="paragraph">
+<p>The
+<b class="menuref">PLC configuration name</b>
+and
+<b class="menuref">PLC resource name</b>
+options have no effect on the TwinCAT output.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2plc-twincat-usage">TwinCAT usage</h6>
+<div class="paragraph">
+<p>Follow these steps to create a solution and project in TwinCAT, generate PLC
+code in it, and use the PLC code to control the hardware:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Start TwinCAT (Visual Studio) by right clicking on the TwinCAT system tray
+icon and choosing
+<b class="menuref">TwinCAT XAE (VS 2010)</b>.</p>
+</li>
+<li>
+<p>Create a new TwinCAT XAE project:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Click <span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">New</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Project&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In the
+<b class="menuref">New Project</b>
+window,
+<b class="menuref">TwinCAT XAE Project (XML format)</b>
+should already be selected. If not, first select
+<b class="menuref">TwinCAT Project</b>
+on the left (from the list of
+<b class="menuref">Installed Templates</b>),
+and then select
+<b class="menuref">TwinCAT XAE Project (XML format)</b>.</p>
+</li>
+<li>
+<p>Choose a project name and enter it in the
+<b class="menuref">Name</b>
+box at the
+bottom of the dialog.</p>
+</li>
+<li>
+<p>Make sure the
+<b class="menuref">Solution name</b>
+is exactly the same, and that the
+<b class="menuref">Create directory for solution</b>
+option is enabled.</p>
+</li>
+<li>
+<p>For
+<b class="menuref">Location</b>,
+select the directory in which the directory for
+the solution should be created. This is usually the directory that contains
+the script and/or source files you will be using to generate the PLC code.</p>
+<div class="ulist">
+<ul>
+<li>
+<p>To figure out the directory that contains the ToolDef script, make sure
+that the <b class="menuref">Properties</b> view is visible in Eclipse. Select the ToolDef
+script in the 'Project Explorer' tab or 'Package Explorer' tab, and look
+for the <b class="menuref">location</b> property.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Click
+<b class="button">OK</b>
+to create the project.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Scan the available hardware:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Make sure the hardware is powered up.</p>
+</li>
+<li>
+<p>Make sure the <a href="#tools-cif2plc-twincat-modes">Config Mode</a> is enabled,
+by <a href="#tools-cif2plc-twincat-modes-change">switching</a> to it if it is not
+the current mode.</p>
+</li>
+<li>
+<p>In the project, under
+<b class="menuref">I/O</b>,
+right click the
+<b class="menuref">Devices</b>
+item and choose
+<b class="menuref">Scan</b>.
+Alternatively, select the
+<b class="menuref">I/O</b>
+item and click the appropriate toolbar item (<span class="image"><img src="./tools/cif2plc/scan_devices.png" alt="scan devices"></span>).</p>
+</li>
+<li>
+<p>A dialog pops up with the warning
+<em>HINT: Not all types of devices can be found automatically</em>.
+Click
+<b class="button">OK</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>A dialog pops up where you have to choose the I/O device to scan. Normally,
+if you have only one I/O device, it should already be selected. Click
+<b class="button">OK</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>A dialog pops up with the question <em>Scan for boxes</em>.
+Click
+<b class="button">Yes</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>A dialog pops up with the question <em>Activate Free Run</em>.
+Click
+<b class="button">Yes</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Create a new TwinCAT PLC project:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Right click the
+<b class="menuref">PLC</b>
+item in the project, and choose
+<b class="menuref">Add New Item&#8230;&#8203;</b>.</p>
+</li>
+<li>
+<p>In the
+<b class="menuref">Add New Item</b>
+dialog,
+<b class="menuref">Standard PLC project</b>
+should already be selected.</p>
+</li>
+<li>
+<p>Keep the name
+<code>Untitled1</code>
+in the
+<b class="menuref">Name</b>
+box at the
+bottom of the dialog.</p>
+</li>
+<li>
+<p>Also don&#8217;t change the
+<b class="menuref">Location</b>
+of the project.</p>
+</li>
+<li>
+<p>Click
+<b class="menuref">Add</b>
+to add the PLC project.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Save the entire solution by clicking <span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Save All</b></span>.</p>
+</li>
+<li>
+<p>Generate PLC code. If using a script, wait for the execution of the script to
+finish (the status indicated
+as part of the title of the console should change from <code>running</code> to
+<code>FINISHED</code>).</p>
+</li>
+<li>
+<p>Switch back to TwinCAT (Microsoft Visual Studio).</p>
+</li>
+<li>
+<p>When a
+<em>File Modification Detected</em>
+window pops up for the project,
+click
+<b class="button">Reload</b>
+to reload the updated project that was written by
+the CIF tooling.</p>
+</li>
+<li>
+<p>Build the project by clicking <span class="menuseq"><b class="menu">Build</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Rebuild Solution</b></span>.</p>
+</li>
+<li>
+<p>Load the I/O mappings:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>In the project, under
+<b class="menuref">I/O</b>,
+right click
+<b class="menuref">Mappings</b>,
+and choose
+<b class="menuref">Import Mapping Infos&#8230;&#8203;</b>.</p>
+</li>
+<li>
+<p>Select the mappings file for your hardware, and click
+<b class="menuref">Open</b>.</p>
+</li>
+<li>
+<p>If the import succeeds, you should see an
+<em>Untitled1 Instance - &#8230;&#8203;</em>
+item under the
+<b class="menuref">Mappings</b>
+item.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Activate the configuration:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Click <span class="menuseq"><b class="menu">TwinCAT</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Activate Configuration</b></span>. Alternatively,
+click the appropriate toolbar item (<span class="image"><img src="./tools/cif2plc/activate_cfg.png" alt="activate cfg"></span>).</p>
+</li>
+<li>
+<p>A dialog pops up with the question
+<em>Activate Configuration (Old Configurations will be overwritten!)</em>.
+Click
+<b class="button">OK</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>A dialog pops up with the question
+<em>Restart TwinCAT System in Run Mode</em>. Click
+<b class="button">OK</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Start the PLC:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Click <span class="menuseq"><b class="menu">PLC</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Login</b></span>. Alternatively, click the appropriate
+toolbar item (<span class="image"><img src="./tools/cif2plc/login.png" alt="login"></span>).</p>
+</li>
+<li>
+<p>A dialog pops up with the question
+<em>Application Port_851 does not
+exist on the device. Do you want to create it and proceed with download?</em>.
+Click
+<b class="button">Yes</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>Click <span class="menuseq"><b class="menu">PLC</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Start</b></span>. Alternatively, click the appropriate
+toolbar item (<span class="image"><img src="./tools/cif2plc/start.png" alt="start"></span>).</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>The PLC is now running, and you can use the system.</p>
+</li>
+</ul>
+</div>
+<div id="tools-cif2plc-twincat-usage-stop" class="paragraph">
+<p>To stop the PLC:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Click <span class="menuseq"><b class="menu">PLC</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Stop</b></span>. Alternatively, click the appropriate
+toolbar item (<span class="image"><img src="./tools/cif2plc/stop.png" alt="stop"></span>).</p>
+</li>
+<li>
+<p>Click <span class="menuseq"><b class="menu">PLC</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Logout</b></span>. Alternatively, click the appropriate
+toolbar item (<span class="image"><img src="./tools/cif2plc/logout.png" alt="logout"></span>). This step is optional, and can usually be
+skipped.</p>
+</li>
+</ul>
+</div>
+<div id="tools-cif2plc-twincat-usage-reset" class="paragraph">
+<p>To reset the PLC and start the 'simulation' from the beginning, with the same
+code and the same configuration:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Make sure the hardware is powered up.</p>
+</li>
+<li>
+<p>Load the I/O mappings, if the
+<em>Untitled1 Instance - &#8230;&#8203;</em>
+item under the
+<b class="menuref">Mappings</b>
+item is no longer present:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>In the project, under
+<b class="menuref">I/O</b>,
+right click
+<b class="menuref">Mappings</b>,
+and choose
+<b class="menuref">Import Mapping Infos&#8230;&#8203;</b>.</p>
+</li>
+<li>
+<p>Select the mappings file for your hardware, and click
+<b class="menuref">Open</b>.</p>
+</li>
+<li>
+<p>If the import succeeds, you should see an
+<em>Untitled1 Instance - &#8230;&#8203;</em>
+item under the
+<b class="menuref">Mappings</b>
+item.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Reactivate the configuration:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Click <span class="menuseq"><b class="menu">TwinCAT</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Activate Configuration</b></span>. Alternatively,
+click the appropriate toolbar item (<span class="image"><img src="./tools/cif2plc/activate_cfg.png" alt="activate cfg"></span>).</p>
+</li>
+<li>
+<p>A dialog pops up with the question
+<em>Activate Configuration (Old Configurations will be overwritten!)</em>.
+Click
+<b class="button">OK</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>A dialog pops up with the question
+<em>Restart TwinCAT System in Run Mode</em>.
+Click
+<b class="button">OK</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Start the PLC:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Click <span class="menuseq"><b class="menu">PLC</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Login</b></span>. Alternatively, click the appropriate
+toolbar item (<span class="image"><img src="./tools/cif2plc/login.png" alt="login"></span>).</p>
+</li>
+<li>
+<p>A dialog pops up with the question
+<em>Application Port_851 does not
+exist on the device. Do you want to create it and proceed with download?</em>.
+Click
+<b class="button">Yes</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>Click <span class="menuseq"><b class="menu">PLC</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Start</b></span>. Alternatively, click the appropriate
+toolbar item (<span class="image"><img src="./tools/cif2plc/start.png" alt="start"></span>).</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>The PLC is now running, and you can use the system.</p>
+</li>
+</ul>
+</div>
+<div id="tools-cif2plc-twincat-usage-regen" class="paragraph">
+<p>Whenever you change a CIF source file, regenerate a supervisor, change a
+hardware mapping, etc, you need to regenerate the PLC code as well. Follow
+these steps:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Make sure the <a href="#tools-cif2plc-twincat-modes">Config Mode</a> is enabled,
+by <a href="#tools-cif2plc-twincat-modes-change">switching</a> to it if it is not
+the current mode.</p>
+</li>
+<li>
+<p>Save the entire solution in TwinCAT by clicking
+<span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Save All</b></span>.</p>
+</li>
+<li>
+<p>Regenerate PLC code from Eclipse.
+If using a script, wait for the execution of the script to finish (the status indicated
+as part of the title of the console should change from <code>running</code> to
+<code>FINISHED</code>).</p>
+</li>
+<li>
+<p>Switch back to TwinCAT (Microsoft Visual Studio).</p>
+</li>
+<li>
+<p>For all
+<em>File has been changed outside the environment. Reload the new file?</em>
+questions, click
+<b class="button">Yes</b>
+or press
+<kbd>ENTER</kbd>.
+See the
+<a href="#tools-cif2plc-twincat-faq">Frequently Asked Questions (FAQ)</a> for instructions on how to disable some of
+these questions.</p>
+</li>
+<li>
+<p>When a
+<em>File Modification Detected</em>
+window pops up for the project,
+click
+<b class="button">Reload</b>
+to reload the updated project that was written by
+the CIF tooling.</p>
+</li>
+<li>
+<p>Clean the project by clicking <span class="menuseq"><b class="menu">Build</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Clean Solution</b></span>.</p>
+</li>
+<li>
+<p>Rebuild the project by clicking <span class="menuseq"><b class="menu">Build</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Rebuild Solution</b></span>.</p>
+</li>
+<li>
+<p>Make sure the hardware is powered up.</p>
+</li>
+<li>
+<p>Reload the I/O mappings:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>In the project, under
+<b class="menuref">I/O</b>, right click
+<b class="menuref">Mappings</b>,
+and choose
+<b class="menuref">Import Mapping Infos&#8230;&#8203;</b>.</p>
+</li>
+<li>
+<p>Select the mappings file for your hardware, and click
+<b class="menuref">Open</b>.</p>
+</li>
+<li>
+<p>If the import succeeds, you should see an
+<em>Untitled1 Instance - &#8230;&#8203;</em>
+item under the
+<b class="menuref">Mappings</b>
+item.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Activate the configuration:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Click <span class="menuseq"><b class="menu">TwinCAT</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Activate Configuration</b></span>. Alternatively,
+click the appropriate toolbar item (<span class="image"><img src="./tools/cif2plc/activate_cfg.png" alt="activate cfg"></span>).</p>
+</li>
+<li>
+<p>A dialog pops up with the question
+<em>Activate Configuration (Old Configurations will be overwritten!)</em>. Click
+<b class="button">OK</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>A dialog pops up with the question
+<b class="menuref">Restart TwinCAT System in Run Mode</b>.
+Click
+<b class="button">OK</b>
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Start the PLC:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Click <span class="menuseq"><b class="menu">PLC</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Login</b></span>. Alternatively, click the appropriate
+toolbar item (<span class="image"><img src="./tools/cif2plc/login.png" alt="login"></span>).</p>
+</li>
+<li>
+<p>A dialog pops up with the question
+<em>Application Port_851 does not
+exist on the device. Do you want to create it and proceed with download?</em>.
+Click
+btn:Yes[]
+or press
+<kbd>ENTER</kbd>.</p>
+</li>
+<li>
+<p>Click <span class="menuseq"><b class="menu">PLC</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Start</b></span>. Alternatively, click the appropriate
+toolbar item (<span class="image"><img src="./tools/cif2plc/start.png" alt="start"></span>).</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>The PLC is now running, and you can use the system.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2plc-twincat-faq">Frequently Asked Questions (FAQ)</h6>
+<div class="ulist">
+<ul>
+<li>
+<p><strong>Question</strong>: Is there something that can be done about the large number of
+<em>File has been changed outside the environment&#8230;&#8203;</em> prompts?</p>
+<div class="paragraph">
+<p><strong>Answer</strong>: Yes. Click <span class="menuseq"><b class="menu">Tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Options&#8230;&#8203;</b></span> to show the
+<b class="menuref">Options</b> dialog. On the left, select
+<span class="menuseq"><b class="menu">Environment</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Documents</b></span>. Then, on the right, enable the
+<b class="menuref">Detect when file is changed outside the environment</b> and
+<b class="menuref">Auto-load changes, if saved</b> options.</p>
+</div>
+</li>
+<li>
+<p><strong>Question</strong>: Why doesn&#8217;t importing the I/O mappings have any effect?</p>
+<div class="paragraph">
+<p><strong>Answer</strong>: Make sure the TwinCAT Standard PLC project is named
+<code>Untitled1</code>, and try again. Also, make sure you&#8217;ve built the
+solution before you try to import the I/O mappings.</p>
+</div>
+</li>
+<li>
+<p><strong>Question</strong>: I get a dialog with the warning
+<em>Device '&#8230;&#8203;' needs a sync master (at least one variable linked to a task variable)</em>.
+What should I do?</p>
+<div class="paragraph">
+<p><strong>Answer</strong>: You probably forgot to load an I/O mapping.</p>
+</div>
+</li>
+</ul>
+</div>
+<div id="tools-cif2plc-twincat-faq-inlinemon" class="ulist">
+<ul>
+<li>
+<p><strong>Question</strong>: Why does opening the MAIN program take so long in
+Run Mode?</p>
+<div class="paragraph">
+<p><strong>Answer</strong>: As the generated code becomes larger, it can take a long time for
+TwinCAT to set up the environment for inline monitoring of the MAIN
+program. To disable inline monitoring, click
+<span class="menuseq"><b class="menu">Tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Options&#8230;&#8203;</b></span> to show the <b class="menuref">Options</b> dialog.
+On the left, select
+<span class="menuseq"><b class="menu">TwinCAT</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">PLC Environment</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Text Editor</b></span>. Then, on the
+right, switch to the <b class="menuref">Monitoring</b> tab. Disable the
+<b class="menuref">Enable inline monitoring option</b>.</p>
+</div>
+</li>
+<li>
+<p><strong>Question</strong>: TwinCAT hangs for long periods of time, before crashing and
+automatically being restarted by Windows. What should I do?</p>
+<div class="paragraph">
+<p><strong>Answer</strong>: If the generated code is too large, TwinCAT may not be able to
+handle it. In such cases, reduce the size of the generated code, by reducing
+the size of the CIF model for which you are generating the code.</p>
+</div>
+</li>
+<li>
+<p><strong>Question</strong>: I get an error stating 'Reading file failed. [&#8230;&#8203;]'.
+What should I do?</p>
+<div class="paragraph">
+<p><strong>Answer</strong>: The generated code is too large for TwinCAT to handle. See also
+the answer to the previous question.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tools-miscellaneous-tools">Miscellaneous tools</h3>
+<div class="sect3">
+<h4 id="tools-cif2cif-chapter-index">CIF to CIF transformer</h4>
+<div class="paragraph">
+<p>
+
+The CIF to CIF transformer can be used to syntactically transform CIF
+specifications to similar CIF specifications, which behave in the same
+manner (are semantically equivalent), but are expressed using different
+language constructs. For example, the CIF to CIF transformation that
+eliminates constants, replaces all uses of constants by their values,
+and removes the constants from the specification.</p>
+</div>
+<div class="paragraph">
+<p>These reusable transformations are primarily used to increase the subset
+of CIF specifications that can be transformed or processed.
+Usually, there is no need to apply the CIF to CIF transformations manually.
+Transformations that work on subsets of the CIF language, automatically
+apply the necessary CIF to CIF transformations as a preprocessing step, to
+increase the translatable subset.</p>
+</div>
+<div class="paragraph">
+<p>The CIF to CIF transformer can also be used as a <a href="#tools-cif2cif-pprinter">pretty printer</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-transformation-6">Starting the transformation</h5>
+<div class="paragraph">
+<p>The transformation can be started from Eclipse in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Right click a <code>.cif</code> file in the 'Project Explorer' tab or
+'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF miscellaneous tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply CIF to CIF transformations&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF miscellaneous tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Apply CIF to CIF transformations&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cif2cif</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cif2cif</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-options-19">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file path</em>: The absolute or relative local file system path to the
+input CIF specification.</p>
+</li>
+<li>
+<p><em>Output file path</em>: The absolute or relative local file system path to the
+output CIF specification. If not specified, the output file path defaults to
+the input file path, where the <code>.cif</code> file extension is removed (if
+present), and a <code>.transformed.cif</code> file extension is added.</p>
+</li>
+<li>
+<p><em>Transformations</em>: The CIF to CIF transformations to apply. The
+transformations are applied in the chosen order. Transformations may be
+applied multiple times. By default, no transformations are applied,
+essentially making the CIF to CIF transformer a <a href="#tools-cif2cif-pprinter">pretty printer</a>.</p>
+<div class="paragraph">
+<p>In the option dialog, the available transformations are shown. To add a
+transformation, double click it, or select it and click the <em>Add</em>
+button below the list of available transformations. To remove a
+transformation, double click on it in the list of chosen transformations, or
+select it in that list and click the <em>Remove</em> button.</p>
+</div>
+<div class="paragraph">
+<p>At the command line, specify comma separated transformation names, in the
+order they should be applied. The names to use are listed below, in the
+<a href="#tools-cif2cif-available">Available transformations</a> section.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-transformation-descriptions">Transformation descriptions</h5>
+<div class="paragraph">
+<p>The pages describing the <a href="#tools-cif2cif-available">available transformations</a> all use the same format. They have the following
+sections:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Introduction</em>: describes the transformation in a few sentences.</p>
+</li>
+<li>
+<p><em>Supported specifications</em>: describes the subset of CIF specifications to which
+the transformation can be applied.</p>
+</li>
+<li>
+<p><em>Preprocessing</em>: specifies the CIF to CIF transformations that are
+automatically applied as preprocessing, or the CIF to CIF transformations
+that can be manually applied as preprocessing, to increase the subset of
+CIF specifications that can be transformed by the transformation.</p>
+</li>
+<li>
+<p><em>Implementation details</em>: further specifies what the transformation does, how
+it does it, and what the result of the transformation is. Most
+transformations also show one or more examples.</p>
+</li>
+<li>
+<p><em>Renaming</em>: explains if and when renaming may be performed by the
+transformation.</p>
+</li>
+<li>
+<p><em>Size considerations</em>: describes whether the transformation reduces or
+increases the size of the specification. If the specification may increase
+in size, an estimate of the order of increase is given (linear, exponential,
+etc). Note that the size is not the file size, but rather the number of
+objects used to represent the specification (the number of automata,
+locations, edges, guards, binary operators, etc).</p>
+</li>
+<li>
+<p><em>Optimality</em>: describes why the transformation result may not be optimal, if
+applicable. May also explain how to eliminate certain concepts that may be
+introduced as the result of the transformation.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-available">Available transformations</h5>
+<div class="paragraph">
+<p>A whole collection of CIF to CIF transformations is available. The available
+transformations are listed below, with a link to the information about the
+transformation, and the name to use for that transformation on the command
+line.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-add-default-init-values">Add default initial values</a> (<code>add-default-init-values</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-alg-vars">Eliminate algebraic variables</a> (<code>elim-alg-vars</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-aut-casts">Eliminate automata to string casts</a> (<code>elim-aut-casts</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a> (<code>elim-comp-def-inst</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-consts">Eliminate constants</a> (<code>elim-consts</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-equations">Eliminate equations</a> (<code>elim-equations</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-groups">Eliminate groups</a> (<code>elim-groups</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-if-updates">Eliminate <code>if</code> updates</a> (<code>elim-if-updates</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-locs-in-exprs">Eliminate the use of locations in expressions</a> (<code>elim-locs-in-exprs</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-monitors">Eliminate monitors</a> (<code>elim-monitors</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-self">Eliminate automaton <code>self</code> references</a> (<code>elim-self</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-state-event-excl-invs">Eliminate state/event exclusion invariants</a> (<code>elim-state-event-excl-invs</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-tau-event">Eliminate <code>tau</code> event</a> (<code>elim-tau-event</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-tuple-field-projs">Eliminate tuple field projections</a> (<code>elim-tuple-field-projs</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-type-decls">Eliminate type declarations</a> (<code>elim-type-decls</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-enums-to-consts">Convert enumerations to constants</a> (<code>enums-to-consts</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-enums-to-ints">Convert enumerations to integers</a> (<code>enums-to-ints</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-lift-events">Lift events</a> (<code>lift-events</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-linearize-merge">Linearize (merge)</a> (<code>linearize-merge</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-linearize-product">Linearize (product)</a> (<code>linearize-product</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-merge-enums">Merge enumerations</a> (<code>merge-enums</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-print-file-into-decls">Push print file declarations into print declarations</a> (<code>print-file-into-decls</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-cif-svg-decls">Remove CIF/SVG declarations</a> (<code>remove-cif-svg-decls</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-io-decls">Remove I/O declarations</a> (<code>remove-io-decls</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-print-decls">Remove print declarations</a> (<code>remove-print-decls</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-pos-info">Remove position information</a> (<code>remove-pos-info</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-reqs">Remove requirements</a> (<code>remove-reqs</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-others">Simplify others</a> (<code>simplify-others</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a> (<code>simplify-values</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-values-optimized">Simplify values (optimized)</a> (<code>simplify-values-optimized</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-values-no-refs">Simplify values (no references)</a> (<code>simplify-values-no-refs</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-simplify-values-no-refs-optimized">Simplify values (no references, optimized)</a> (<code>simplify-values-no-refs-optimized</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-svg-file-into-decls">Push SVG file declarations into other CIF/SVG declarations</a> (<code>svg-file-into-decls</code>)</p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-switches-to-ifs">Convert <code>switch</code> expressions to <code>if</code> expressions</a> (<code>switches-to-ifs</code>)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-pprinter">Pretty printer</h5>
+<div class="paragraph">
+<p>If no transformations are applied by the CIF to CIF transformer, the input CIF
+specification is just read from the input file, validated, and written to the
+output file. This can be useful, as it essentially turns the CIF to CIF
+transformer into a CIF <em>pretty printer</em>.</p>
+</div>
+<div class="paragraph">
+<p>As a side effect of reading the input file and validating it, the model may
+change slightly. In fact, this occurs not only for the CIF to CIF transformer
+but for all tools, as they all read input files and validate them, before
+continuing with their actual task. Examples of such changes include the
+elimination of imports, the loss of comments, and the evaluation of tuple
+projection indices.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-add-default-init-values">Add default initial values</h5>
+<div class="paragraph">
+<p>
+
+This CIF to CIF transformation adds the default initial values to variables
+that are not given an explicit initial value. This includes discrete and
+continuous variables, as well as local variables of functions.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-11">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-8">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details">Implementation details</h6>
+<div class="paragraph">
+<p>The default values for all types are simple values. The only exception are
+function types, for which a new function is introduced. This new functions
+returns the default value for the return type of the function. If multiple
+default values for the same function type are needed, the newly introduced
+function is reused. The functions are named <code>_f</code>, <code>_f2</code>, <code>_f3</code>, etc.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton x:
+  disc int x, y = 5;
+  disc func bool (int) f;
+  location;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">func bool _f(int p0):
+  return false;
+end
+
+automaton x:
+  disc int x = 0, y = 5;
+  disc func bool (int) f = _f;
+  location;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming">Renaming</h6>
+<div class="paragraph">
+<p>If the names of the functions that are introduced, conflict with already
+existing declarations, they are renamed. For instance, if <code>_f2</code> is already in
+use, <code>_f22</code>, <code>_f23</code>, etc, are used instead. If renaming takes place, a
+warning is printed to the console.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations">Size considerations</h6>
+<div class="paragraph">
+<p>Since values are added, this transformation increases the size of the
+specification. For an array of 400 elements, with an array of 300 integers
+each, the default initial value consists of 1,200 integers. Add such an initial
+value can significantly increase the size of the model.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality">Optimality</h6>
+<div class="paragraph">
+<p>The default values for all types are as primitive as they can be, and can
+usually not be simplified any further. It may however be possible that
+functions are introduced for the default values of function types, while such
+a function already existed in the original specification.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-switches-to-ifs">Convert <code>switch</code> expressions to <code>if</code> expressions</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation converts <code>switch</code> expressions to <code>if</code>
+expressions.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-12">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports all CIF specifications.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-9">Preprocessing</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-2">Implementation details</h6>
+<div class="paragraph">
+<p>All <code>switch</code> expressions are replaced by <code>if</code> expressions. For instance,
+consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg int y = ...
+alg real x = switch y:
+               case 1: 1.0
+               case 2: 4.0
+               case 3: 9.0
+               else    0.0
+             end;
+alg real z = switch y:
+               else 1.0
+             end;
+
+automaton a:
+  alg string v = switch self:
+                   case l1: "first"
+                   case l2: "second"
+                 end;
+
+  location l1:
+    initial;
+    edge tau goto l2;
+
+  location l2;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This is transformed to the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg int y = ...
+alg real x = if   y = 1: 1.0
+             elif y = 2: 4.0
+             elif y = 3: 9.0
+             else        0.0
+             end;
+alg real z = 1.0;
+
+automaton a:
+  alg string v = if l1: "first"
+                 else   "second"
+                 end;
+
+  location l1:
+    initial;
+    edge tau goto l2;
+
+  location l2;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For algebraic variable <code>z</code>, there is only one case (the <code>else</code>), so no
+<code>if</code> expression is generated. This optimization means that the control value
+(<code>y</code> in this case) is lost.</p>
+</div>
+<div class="paragraph">
+<p>For algebraic variable <code>v</code> in automaton <code>a</code>, the <code>switch</code> expression uses
+an automaton self reference. The cases list the possible locations of the
+automaton, and the <code>switch</code> expression maps them to string values. Since for
+<code>if</code> expressions the <code>else</code> part is mandatory, the last <code>case</code> of the
+<code>switch</code> is converted to the <code>else</code> of the <code>if</code> expression.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-2">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-2">Size considerations</h6>
+<div class="paragraph">
+<p>The created <code>if</code> expression is usually larger than the original <code>switch</code>
+expression, as the control value is duplicated for each <code>if</code> and <code>elif</code>
+part, where it is compared to the <code>case</code> values. For <code>switch</code> expressions
+with only one <code>case</code> or <code>else</code>, no <code>if</code> expression is generated, and the
+expression becomes smaller.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-2">Optimality</h6>
+<div class="paragraph">
+<p>This transformation transforms <code>switch</code> expressions to <code>if</code> expressions,
+leading to <code>if</code> expressions with <code>if</code> and <code>elif</code> guards that may not be
+optimal. To simplify the result, apply additional CIF to CIF transformations,
+such as <a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a>.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-alg-vars">Eliminate algebraic variables</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation eliminates algebraic variables and their
+equations.</p>
+</div>
+<div class="paragraph">
+<p>See also: <a href="#tools-cif2cif-chapter-equations">Eliminate equations</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-13">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+<li>
+<p>Automaton <code>self</code> references are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-10">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-self">Eliminate automaton <code>self</code> references</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-3">Implementation details</h6>
+<div class="paragraph">
+<p>For each algebraic variable with a single equation in a component or automaton,
+all uses of the variable (for instance in guards, invariants, etc) are
+replaced by the value of the variable (the right hand side of its equation).
+For algebraic variables with equations specified in the locations of an
+automaton, an 'if' expression is created. This 'if' expression uses the
+locations of the automaton as guards, and the right hand sides of the equations
+as values for each of the alternatives. The last alternative is an 'else', and
+thus has no guard. If the automaton has only one location, generation of the
+'if' expression is suppressed.</p>
+</div>
+<div class="paragraph">
+<p>The algebraic variables and their equations are removed.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg bool b1 = true;
+alg bool b2;
+equation b2 = false;
+
+automaton aut:
+  alg int a;
+  location l1:
+    equation a = 1;
+  location l2:
+    equation a = 2;
+end
+
+invariant b1 or b2 or p.a &gt; 0;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton aut:
+  location l1;
+  location l2;
+end
+
+invariant true or false or if p.l1: 1 else 2 end &gt; 0;</code></pre>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-3">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-3">Size considerations</h6>
+<div class="paragraph">
+<p>Since algebraic variables are shortcuts for expressions, eliminating them
+could result in an increase of the size of the specification. Algebraic
+variables may be defined in terms of other algebraic variables. Therefore, in
+the worst case, the increase is exponential.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-3">Optimality</h6>
+<div class="paragraph">
+<p>For an assignment <code>x := 1 + y</code>, where <code>y</code> is an algebraic variable that is
+eliminated, and where <code>y</code> has value <code>5</code>, the resulting assignment is
+<code>x := 1 + 5</code>. The result is not simplified any further. To further simplify
+the result, apply additional CIF to CIF transformations, such as
+<a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a>.</p>
+</div>
+<div class="paragraph">
+<p>This transformation introduces 'if' expressions for algebraic variables
+that have an equation per location, for automata with at least two locations.
+The guards of such 'if' expressions refer to the locations of the automata.
+To eliminate such location references, apply the
+<a href="#tools-cif2cif-chapter-elim-locs-in-exprs">Eliminate the use of locations in expressions</a> CIF to CIF transformation.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-aut-casts">Eliminate automata to string casts</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation eliminates casts of automata to strings.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-14">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-11">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-4">Implementation details</h6>
+<div class="paragraph">
+<p>All casts of automata to strings, using either implicit automaton <code>self</code>
+references or explicit automata references, are eliminated. If the referred
+automaton has only a single location, the cast is replaced by a string literal
+with the name of that location. If the automaton has multiple locations, the
+cast is replaced by an <code>if</code> expression, using the locations of the automaton
+as guards, and string literals containing the location names as values. For
+nameless locations the string literal <code>"*"</code> is used.</p>
+</div>
+<div class="paragraph">
+<p>For instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  alg string x = &lt;string&gt;self;
+
+  location:
+    initial;
+end
+
+automaton b:
+  alg string x = &lt;string&gt;self;
+
+  location l1:
+    initial;
+  location l2:
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This is transformed to the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  alg string x = "*";
+
+  location:
+    initial;
+end
+
+automaton b:
+  alg string x = if   l1: "l1"
+                 elif l2: "l2"
+                 else     "l3"
+                 end;
+
+  location l1:
+    initial;
+  location l2;
+  location l3;
+end</code></pre>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-4">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-4">Size considerations</h6>
+<div class="paragraph">
+<p>The created <code>if</code> expressions are usually larger than the original cast
+expressions. The increase is linear in terms of the number of locations times
+the number of casts.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-4">Optimality</h6>
+<div class="paragraph">
+<p>This transformation introduces 'if' expressions for automaton to string casts,
+for automata with at least two locations. The guards of such 'if' expressions
+refer to the locations of the automata. To eliminate such location references,
+apply the <a href="#tools-cif2cif-chapter-elim-locs-in-exprs">Eliminate the use of locations in expressions</a> CIF to CIF transformation.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</h5>
+<div class="paragraph">
+<p>
+
+
+
+This CIF to CIF transformation eliminates all component definitions and
+instantiations, by actually instantiating the component definitions.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-15">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports all CIF specifications.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-12">Preprocessing</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-5">Implementation details</h6>
+<div class="paragraph">
+<p>This transformation operates in three phases:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Phase 1: Find the component definitions without any component definitions
+and/or component instantiations in them.</p>
+</li>
+<li>
+<p>Phase 2: Instantiate the component definitions found in phase 1, by putting
+the body of the definition in the place of the instantiation, in a component
+named after the component instantiation. Also removes the component
+definitions that were just instantiated, and introduces new local algebraic
+variables for the algebraic parameters.</p>
+</li>
+<li>
+<p>Phase 3: Replace uses of component, event, and location parameters by the
+actual arguments provided for the instantiation.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group def P(alg int x):
+  invariant x &gt; 0;
+end
+
+p1: P(1);
+
+alg int y = 2;
+p2: P(y);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group p1:
+  alg int x = 1;
+  invariant x &gt; 0;
+end
+
+alg int y = 2;
+group p2:
+  alg int x = y;
+  invariant x &gt; 0;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Absolute references may be needed to express the results of this
+transformation. For instance:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const int x = 5;
+
+group def X():
+  invariant x = 5;
+end
+
+group a:
+  x: X();
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const int x = 5;
+
+group a:
+  group x:
+    invariant .x = 5;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Note how the invariant in component <code>a.x</code> can not refer to constant <code>x</code>
+directly, as <code>x</code> refers to component <code>a.x</code> in that context. Therefore, the
+scope absolute reference <code>.x</code> is used instead.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-5">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-5">Size considerations</h6>
+<div class="paragraph">
+<p>Since component definitions are shortcuts for components, eliminating
+them could result in an increase of the size of the specification.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-5">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-consts">Eliminate constants</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation eliminates constants.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-16">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-13">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-6">Implementation details</h6>
+<div class="paragraph">
+<p>All uses of constants (for instance in guards, invariants, etc), are replaced
+by their values. The constants themselves are removed. For instance, the
+following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const int x = 1;
+const int z = y;
+const int y = x + 1;
+invariant x + y + z &gt; 0;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">invariant 1 + 2 + 2 &gt; 0;</code></pre>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-6">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-6">Size considerations</h6>
+<div class="paragraph">
+<p>Since constants are shortcuts for values, eliminating them could result in an
+increase of the size of the specification. Constants may be defined in terms of
+other constants. Therefore, in the worst case, the increase is exponential.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-6">Optimality</h6>
+<div class="paragraph">
+<p>For an assignment <code>x := 1 + y</code>, where <code>y</code> is a constant that is eliminated,
+and where <code>y</code> has value <code>5</code>, the resulting assignment is <code>x := 1 + 5</code>.
+The result is not simplified any further. To further simplify the result, apply
+additional CIF to CIF transformations, such as
+<a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a>.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-equations">Eliminate equations</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation eliminates equations for algebraic variables
+and derivatives of continuous variables. Note that it does not eliminate the
+variables themselves.</p>
+</div>
+<div class="paragraph">
+<p>See also: <a href="#tools-cif2cif-chapter-elim-alg-vars">Eliminate algebraic variables</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-17">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+<li>
+<p>Automaton <code>self</code> references are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-14">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-self">Eliminate automaton <code>self</code> references</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-7">Implementation details</h6>
+<div class="paragraph">
+<p>For algebraic variables with a single equation in a component or automaton,
+the value of the variable (the right hand side of the equation) is moved to
+the declaration of the algebraic variable. For algebraic variables with
+equations specified in the locations of an automaton, an 'if' expression is
+created. This 'if' expression uses the locations of the automaton as guards,
+and the right hand sides of the equations as values for each of the
+alternatives. The last alternative is an 'else', and thus has no guard. The
+single right hand side, or the 'if' expression, is put directly in the
+declaration of the algebraic variable. If the automaton has only one location,
+generation of the 'if' expression is suppressed.</p>
+</div>
+<div class="paragraph">
+<p>The derivatives of continuous variables are transformed in a similar way. The
+derivative ends up in the declaration of the continuous variable.</p>
+</div>
+<div class="paragraph">
+<p>All equations are removed from components (including automata) and locations.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg bool b1 = true;
+cont x;
+equation x' = 1.0;
+
+automaton p:
+  alg int a;
+  location l1:
+    equation a = 1;
+  location l2:
+    equation a = 2;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg bool b1 = true;
+cont x der 1.0;
+
+automaton p:
+  alg int a = if l1: 1
+              else   2
+              end;
+  location l1;
+  location l2;
+end</code></pre>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-7">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-7">Size considerations</h6>
+<div class="paragraph">
+<p>The right hand sides of the equations are simply moved. This does not influence
+the size of the specification. For equations specified in the locations of an
+automaton, an 'if' expression is created. This increases the size of the
+specification. The increase however, is linear in the number of equations.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-7">Optimality</h6>
+<div class="paragraph">
+<p>This transformation introduces 'if' expressions for algebraic variables and
+derivatives of continuous variables that have an equation per location of an
+automaton, for automata with at least two locations. The guards of such 'if'
+expressions refer to the locations of the automata. To eliminate such location
+references, apply the <a href="#tools-cif2cif-chapter-elim-locs-in-exprs">Eliminate the use of locations in expressions</a> CIF to CIF
+transformation.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-groups">Eliminate groups</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation flattens the component structure of a
+specification, by eliminating all groups. That is, after this transformation,
+all automata will be at the top level, directly in the specification.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-18">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Furthermore, this transformation does not guarantee the correct result for
+specification with enumerations. See also the
+<a href="#tools-cif2cif-elim-groups-renaming">Renaming</a> section below.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-15">Preprocessing</h6>
+<div class="paragraph">
+<p>To increase the subset of specifications that can be transformed, apply
+the following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order) prior to using this transformation:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-enums-to-ints">Convert enumerations to integers</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+automatically applied as preprocessing (in the given order), to increase the
+subset of CIF specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-svg-file-into-decls">Push SVG file declarations into other CIF/SVG declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-print-file-into-decls">Push print file declarations into print declarations</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-8">Implementation details</h6>
+<div class="paragraph">
+<p>All declarations, invariants, initialization predicates, marker predicates, and
+equations from the groups are lifted to the top level of the specification.
+The automata are lifted to the top level of the specification as well.
+Subsequently, the groups are removed.</p>
+</div>
+<div class="paragraph">
+<p>In order to be able to track the origin of automata and declarations, they are
+named after their absolute names. For a group <code>x</code>, with a group
+<code>y</code>, with a constant <code>z</code>, the absolute name of the constant is <code>x.y.z</code>.
+The constant is lifted to the top level of the specification, and named
+<code>x_y_z</code>.</p>
+</div>
+<div class="paragraph">
+<p>For instance, this specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group a:
+  const int x = 5;
+  invariant x &gt; 4;
+end
+
+group p:
+  automaton q:
+    event e;
+    location;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const int a_x = 5;
+invariant a_x &gt; 4;
+
+automaton p_q:
+  event e;
+  location;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2cif-elim-groups-renaming">Renaming</h6>
+<div class="paragraph">
+<p>Since declarations of the specification are merged with the declarations of the
+groups and with automata, renaming may be necessary to ensure uniquely
+named declarations. For instance, for a group <code>x</code>, with a group
+<code>y</code>, with a constant <code>z</code>, the absolute name of the constant is <code>x.y.z</code>.
+The constant is lifted to the top level of the specification, and renamed to
+<code>x_y_z</code>. However, if the specification already contains a declaration of
+another constant, automaton, etc named <code>x_y_z</code>, then the lifted constant is
+renamed to <code>x_y_z2</code> instead. If that name is also already in use, it is
+renamed to <code>x_y_z3</code>, etc.</p>
+</div>
+<div class="paragraph">
+<p>Whenever renaming takes place, a warning will be printed to the console.</p>
+</div>
+<div class="sect6">
+<h7 id="tools-renaming-of-enumeration-literals">Renaming of enumeration literals</h7>
+<div class="paragraph">
+<p>Enumeration literals that are part of lifted enumeration declarations, are not
+renamed to their absolute names. To understand why this is necessary, consider:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group x:
+  enum E = A, B;
+end
+
+automaton y:
+  enum E = A, B;
+  location:
+    initial;
+end
+
+invariant x.A = y.A;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, group <code>x</code> and automaton <code>y</code> both have an enumeration <code>E</code> with
+enumeration literals <code>A</code> and <code>B</code>. The invariant of the specification
+compares the literals of the two different enumerations. This is allowed, since
+the enumerations are <em>compatible</em> (they have the same enumeration literals,
+with the same names, in the same order). If we were to rename the enumeration
+literals to absolute names as we lift them to the top level of the
+specification, the result would be:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum x_E = x_A, x_B;
+
+automaton y:
+  enum E = A, B;
+  location:
+    initial;
+end
+
+invariant x_A = y.A;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Which would no longer be a valid specification, as enumerations <code>x_E</code> and
+<code>y.E</code> are no longer compatible (they have enumeration literals with different
+names). Since we leave the names of the enumeration literals as they are, the
+result of the transformation is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum x_E = A, B;
+
+automaton y:
+  enum E = A, B;
+  location:
+    initial;
+end
+
+invariant A = y.A;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>which is still a correct specification, and has the same meaning as the
+original specification.</p>
+</div>
+<div class="paragraph">
+<p>Now assume the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group x:
+  enum E = A, B;
+end
+
+group y:
+  enum E = A, B;
+end
+
+invariant x.A = y.A;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, the two enumerations are both in groups. If we lift them, we have
+two enumerations, with the same literals, which is not a valid CIF
+specification. As such, renaming can not be avoided, and the result of the
+transformation will be:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum x_E = A, B;
+enum y_E = A2, B2;
+
+invariant A = A2;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This result is an invalid CIF specification. Whenever an enumeration literal
+is renamed, a warning is printed to the console, informing of the possibility
+that the resulting specification is invalid. As such, it is highly recommended
+to avoid such situations, and eliminate the enumerations prior to the
+elimination of the groups.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-8">Size considerations</h6>
+<div class="paragraph">
+<p>The groups are removed. Other objects are lifted, which essentially means
+they are moved. The size of the specification does not increase.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-8">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-if-updates">Eliminate <code>if</code> updates</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation eliminates 'if' updates on edges.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-19">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Multi-assignments and partial variable assignments are not supported. That
+is, the left hand sides of the assignments on edges (the addressables) must
+be single variables without projections.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-16">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing, to increase the subset of CIF specifications that can be
+transformed, is currently performed by this CIF to CIF transformation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2cif-elim-if-updates-impl">Implementation details</h6>
+<div class="paragraph">
+<p>This transformation ensures that each variable that is assigned, gets
+a single explicit assignment. Simply put, the 'if' update structure is
+replicated by an 'if' expression. For instance, the following edge updates:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">if g:
+  if g2:
+    x := 5
+  else
+    y := 6
+  end
+end,
+z := 7</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>are transformed to the following edge updates:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">x := if g:
+       if g2:
+         5
+       else
+         x
+       end
+     else
+       x
+     end,
+y := if g:
+       if g2:
+         y
+       else
+         6
+       end
+     else
+       y
+     end,
+z := 7</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Observe how variables <code>x</code> and <code>y</code> are assigned inside two <code>if</code> updates.
+These <code>if</code> updates are replicated by two <code>if</code> expressions.</p>
+</div>
+<div class="paragraph">
+<p>Since for <code>if</code> expressions the <code>else</code> part is not optional, dummy
+<code>x := x</code> assignments are sometimes performed in cases where the original
+specification would not have assigned variable <code>x</code> at all. That is, variables
+may be assigned their old values, resulting in superfluous assignments.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-8">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-9">Size considerations</h6>
+<div class="paragraph">
+<p>The 'if' structure may be replicated for multiple variables, which may result
+in an increase of the specification size. The increase amount is influenced
+by the size of the guard expressions, and the number of levels of nesting 'if'
+updates.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-9">Optimality</h6>
+<div class="paragraph">
+<p>The superfluous assignments (see the <a href="#tools-cif2cif-elim-if-updates-impl">Implementation details</a>
+section above), are obviously not optimal. The language however requires them.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-locs-in-exprs">Eliminate the use of locations in expressions</h5>
+<div class="paragraph">
+<p>
+
+This CIF to CIF transformation eliminates the use of locations in expressions
+(such as guards, invariants, and equations), by introducing location pointer
+variables for automata, and using them instead.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-20">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-17">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-9">Implementation details</h6>
+<div class="paragraph">
+<p>For each automaton for which a location is used (referred to) in an expression
+(such as a guard, invariant, or equation), a location pointer variable is
+introduced, with as value the current location of the automaton. The values
+for such a new variables are part of a newly created enumeration that has a
+value (an enumeration literal) for each location of the automaton.</p>
+</div>
+<div class="paragraph">
+<p>To initialize the new location pointer variable, the variable itself is
+initialized to <code>any</code> (meaning any value in its domain), and initialization
+predicates are added to all locations that could potentially be initial
+locations. For automata with exactly one initial state, the initial value
+of the location pointer variable is set directly, instead of using
+initialization predicates.</p>
+</div>
+<div class="paragraph">
+<p>All edges in the automaton that change the current location of that automaton,
+get an additional assignment to update the location pointer variable.</p>
+</div>
+<div class="paragraph">
+<p>All uses of the locations of the automaton in expressions (that is, all
+location reference expressions) are changed to equality binary expressions for
+the location pointer variable and the enumeration literal corresponding to the
+location.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton x:
+  event e;
+  alg bool a = l1;
+
+  location l1:
+    initial;
+    edge e goto l2;
+
+  location l2:
+    edge e;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton x:
+  event e;
+  alg bool a = LP_x = LOC_l1;
+  disc LOCS_x LP_x = LOC_l1;
+  enum LOCS_x = LOC_l1, LOC_l2;
+
+  location l1:
+    initial;
+    edge e do LP_x := LOC_l2 goto l2;
+
+  location l2:
+    edge e;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Location pointer variable <code>LP_x</code> is added. It is initialized directly in the
+declaration, since there is exactly one initial location in this automaton.
+Enumeration <code>LOCS_x</code> is created to represent the possible values of the
+location pointer variable. Enumerations literals <code>LOC_l1</code> and <code>LOC_l2</code>
+represent locations <code>l1</code> and <code>l2</code>, respectively.</p>
+</div>
+<div class="paragraph">
+<p>The edge from location <code>l1</code> to location <code>l2</code> is extended with an update
+to the location pointer. The self loop in location <code>l2</code> is not extended, as
+the location does not change.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-9">Renaming</h6>
+<div class="paragraph">
+<p>If the names of the location pointer variables that are introduced, conflict
+with already existing declarations, they are renamed. For instance, if <code>LP_x</code>
+is already in use, <code>LP_x2</code>, <code>LP_x3</code>, etc, are used instead. Similarly,
+renaming is performed for enumerations, and enumeration literals that conflict
+with already existing declarations. If renaming takes place, a warning is
+printed to the console.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-10">Size considerations</h6>
+<div class="paragraph">
+<p>The number of added location pointer variables is linear in the number of
+automata. The number of added initialization predicates for the location
+pointer variables is linear in the number of possible initial locations. The
+number of added enumerations is linear in the number of automata. The number of
+added enumeration literals is linear in the number of locations. The number of
+added updates is linear in the number of edges. The number of added equality
+binary expressions is linear in the number of location references.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-10">Optimality</h6>
+<div class="paragraph">
+<p>This transformation introduces enumerations for the possible values of the
+location pointer variables. To eliminate the enumerations, apply the
+<a href="#tools-cif2cif-chapter-enums-to-ints">Convert enumerations to integers</a> or
+<a href="#tools-cif2cif-chapter-enums-to-consts">Convert enumerations to constants</a> CIF to CIF transformation.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-monitors">Eliminate monitors</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation eliminates monitor events.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-21">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-18">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-10">Implementation details</h6>
+<div class="paragraph">
+<p>For each monitor event in an automaton, additional self loops are added as
+needed, to make sure the automaton doesn&#8217;t disable the monitor event.
+Furthermore, all monitors are removed from all automata.</p>
+</div>
+<div class="paragraph">
+<p>The self loop edges created by this transformation have no communication
+(no <code>!...</code>, no <code>?...</code>), no urgency (no <code>now</code>), and no updates
+(no <code>do ...</code>).</p>
+</div>
+<div class="paragraph">
+<p>For instance, for the following locations and edges, for monitor event <code>e</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">location l1:
+  edge e goto l2;
+  edge f when x = 2 goto l3;
+
+location l2:
+  edge e when x = 1 goto l3;
+  edge e when x = 2 goto l1;
+
+location l3;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>the result after this transformation is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">location l1:
+  edge e goto l2;
+  edge f when x = 2 goto l3;
+
+location l2:
+  edge e when x = 1 goto l3;
+  edge e when x = 2 goto l1;
+  edge e when not(x = 1 or x = 2);
+
+location l3:
+  edge e;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In location <code>l1</code>, monitor event <code>e</code> is always enabled (no guard implies
+a <code>true</code> guard), and thus no additional self loop is needed. In location
+<code>l2</code>, event <code>e</code> is only enabled if <code>x</code> has either value <code>1</code> or value
+<code>2</code>. A self loop is added for all other cases, to ensure the event is always
+enabled. In location <code>l3</code>, the event is never enabled (no edges, which
+essentially means guard <code>false</code>). A self loop is added, to ensure the event
+is always enabled.</p>
+</div>
+<div class="paragraph">
+<p>Event <code>f</code> is not a monitor event, and is thus not affected by this
+transformation.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-10">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-11">Size considerations</h6>
+<div class="paragraph">
+<p>Since self loop edges may be added by this transformation, the size of the
+specification may increase.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-11">Optimality</h6>
+<div class="paragraph">
+<p>For an edge with guard <code>x = 1</code>, a self loop with guard <code>not (x = 1)</code> may
+be generated by this transformation. The guard could be simplified to
+<code>x != 1</code>. However, this transformation does not simplify guards. To further
+simplify the result, apply additional CIF to CIF transformations, such as
+<a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a>.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-self">Eliminate automaton <code>self</code> references</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation replaces implicit automaton <code>self</code> references
+by explicit automaton references.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-22">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-19">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-11">Implementation details</h6>
+<div class="paragraph">
+<p>All implicit automaton <code>self</code> references are replaced by explicit automaton
+references. For instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  alg string x = &lt;string&gt;self;
+
+  location:
+    initial;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This is transformed to the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton a:
+  alg string x = &lt;string&gt;a;
+
+  location:
+    initial;
+end</code></pre>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-11">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-12">Size considerations</h6>
+<div class="paragraph">
+<p>Since both references are single expression nodes, this transformation does not
+increase the size of the specification.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-12">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-state-event-excl-invs">Eliminate state/event exclusion invariants</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation eliminates state/event exclusion invariants. It
+replaces them with automata with self loops.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-23">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-20">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-12">Implementation details</h6>
+<div class="paragraph">
+<p>All state/event exclusion invariants are removed from the specification.</p>
+</div>
+<div class="paragraph">
+<p>They are replaced with automata with self loops. Per component, the state/event
+exclusion invariants of the component (the top level scope of the
+specification, groups, automata), as well as those of its locations (only for
+automata), are partitioned per
+<a href="#lang-tut-extensions-synthesis-invkind">supervisory kind</a>. Per such
+partition, an automaton is created.</p>
+</div>
+<div class="paragraph">
+<p>The automaton is put along side the component (for groups and automata), as
+sibling. For invariants in the top level scope of the specification, the new
+automaton is put in the top level scope of the specification. The new automaton
+gets the same name as the component that contained the invariants as prefix,
+with some postfixes. For invariants at the top level scope of the
+specification, an empty prefix is used. The first postfix is indicates the
+supervisory kind of the invariants of the partition: <code>Plant</code>,
+<code>Requirement</code>, <code>Supervisor</code>, or empty for regular/kindless invariants.
+The second postfix is <code>StateEvtExcls</code>. So, for an automaton <code>Abc</code> with
+some plant invariants, an automaton <code>AbcPlantStateEvtExcls</code> is created. The
+name may conflict with existing automata or other declarations, in which case
+it is <a href="#tools-cif2cif-elim-state-event-excl-invs-renaming">renamed</a>.</p>
+</div>
+<div class="paragraph">
+<p>The automata that are created inherit the supervisory kind of the state/event
+exclusion invariants in the partition for which the automaton is created. The
+automata have a single nameless location, that is both initial and marked.</p>
+</div>
+<div class="paragraph">
+<p>For each state/event exclusion invariant in the partition, and self loop edge
+is created per event. The condition predicates of the invariants are used as
+guard, possible after some manipulation.</p>
+</div>
+<div class="paragraph">
+<p>For state/event exclusion invariants of the locations of automata, the
+condition predicate is made conditional on the location. However, this is only
+done for automata with at least two locations, as conditioning on an always
+active location is of little use. For a location <code>loc</code>, and a state/event
+exclusion invariant <code>invariant evt needs x = 1</code>, predicate <code>x = 1</code> is
+changed to <code>loc =&gt; x = 1</code>.</p>
+</div>
+<div class="paragraph">
+<p>For state/event exclusion invariants that indicate when an event is to be
+disallowed/disabled, the condition predicate is inverted. The inversion is
+performed after the condition predicate is made condition on the location, if
+applicable. For instance, for a state/event exclusion invariant
+<code>invariant x != 1 disables evt</code> in a location <code>loc</code>, the condition
+predicate <code>x != 1</code> is first made conditional on the location. This results in
+<code>loc =&gt; x != 1</code>. The condition predicate is then inverted to
+<code>not(loc =&gt; x != 1)</code>, which is then used as guard.</p>
+</div>
+<div class="paragraph">
+<p>The alphabets of the automata are left implicit.</p>
+</div>
+<div class="paragraph">
+<p>Consider the following example CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant automaton aut:
+  controllable e1, e2, e3;
+  disc int[0..10] x;
+
+  requirement invariant e1    needs    x &lt; 10;
+  requirement invariant x = 0 disables {e1, e2};
+
+  location:
+    initial;
+
+    requirement invariant x = 0 disables e3;
+
+    edge e1 do x := x + 1;
+    edge e2 do x := x - 1;
+    edge e3 do x := 0;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It is transformed to the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant automaton aut:
+  controllable e1, e2, e3;
+  disc int[0..10] x;
+
+  location:
+    initial;
+
+    edge e1 do x := x + 1;
+    edge e2 do x := x - 1;
+    edge e3 do x := 0;
+end
+
+requirement automaton autRequirementStateEvtExcls:
+  location:
+    initial;
+    marked;
+
+    edge aut.e1 when aut.x &lt; 10, not(aut.x = 0);
+    edge aut.e2 when not(aut.x = 0);
+    edge aut.e3 when not(aut.x = 0);
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2cif-elim-state-event-excl-invs-renaming">Renaming</h6>
+<div class="paragraph">
+<p>New automata are created. If the desired name for an automaton is already in
+use for some other automaton or declaration, the new automaton is given a
+different name. For instance, if an automaton is to be named
+<code>ControllerStateEvtExcls</code> and that name is already in use, it will be named
+<code>ControllerStateEvtExcls2</code>. If that name is also already in use, it will be
+named <code>ControllerStateEvtExcls3</code>, etc.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-13">Size considerations</h6>
+<div class="paragraph">
+<p>The constant amount of additional objects are created (e.g. an automaton, a
+location, a <code>true</code> initialization predicate, etc). At most one automaton is
+created per state/event exclusion invariant. As such, the size increase is
+linear in the number of state/event exclusion invariants.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-13">Optimality</h6>
+<div class="paragraph">
+<p>For state/event exclusion invariants that are defined in locations of automata
+with more than one location, this transformation makes their predicates
+conditional on those locations. To eliminate such location references, apply
+the <a href="#tools-cif2cif-chapter-elim-locs-in-exprs">Eliminate the use of locations in expressions</a> CIF to CIF transformation.</p>
+</div>
+<div class="paragraph">
+<p>This transformation generate boolean implication and inversion predicates.
+These are not simplified. To simply them, apply the
+the <a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a> CIF to CIF transformation.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-tau-event">Eliminate <code>tau</code> event</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation eliminates the <code>tau</code> event.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-24">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports all CIF specifications.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-21">Preprocessing</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-13">Implementation details</h6>
+<div class="paragraph">
+<p>This transformation introduces new events for the <code>tau</code> event, one per
+automaton where a <code>tau</code> event is used. The new events are named <code>tau_</code> (if
+that name is not already in use).</p>
+</div>
+<div class="paragraph">
+<p>If the alphabet is explicit specified, it is extended as well.</p>
+</div>
+<div class="paragraph">
+<p>The new events are neither controllable nor uncontrollable, and don&#8217;t have a
+data type.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton p:
+  event e;
+
+  location l1:
+    initial;
+    edge when true goto l2;
+
+  location l2:
+    edge e, tau goto l1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton p:
+  event e;
+  event tau_;
+
+  location l1:
+    initial;
+    edge tau_ when true goto l2;
+
+  location l2:
+    edge e, tau_ goto l1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-12">Renaming</h6>
+<div class="paragraph">
+<p>The newly introduced <code>tau_</code> events are renamed to <code>tau_2</code>, <code>tau_3</code>, etc,
+if they conflict with other declarations with the same name, that already
+exist in the automata. If renaming is needed, a warning is printed to the
+console.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-14">Size considerations</h6>
+<div class="paragraph">
+<p>New events may be added, the alphabet may be extended, and an explicit event
+may be added to edges. Therefore, the size of the specification may increase.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-14">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-tuple-field-projs">Eliminate tuple field projections</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation eliminates tuple field projections by replacing
+them with tuple index projections.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-25">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports all CIF specifications.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-22">Preprocessing</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-14">Implementation details</h6>
+<div class="paragraph">
+<p>Obtaining the value of a field of a tuple is called tuple projection.
+There are two ways to project a tuple. That is, there are two ways to indicate
+from which field to obtain the value. The first way is to use the name of the
+field, the second way is to use the 0-based index of the field into the fields
+of the tuple&#8217;s type. For instance:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const tuple(int a; real b) t = (1, 2.0);
+const int x = t[a];
+const int y = t[0];</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, both constants <code>x</code> and <code>y</code> have value <code>1</code>, obtained from field
+<code>a</code> of the tuple value of constant <code>t</code>.</p>
+</div>
+<div class="paragraph">
+<p>This transformation replaces tuple field projections (using the name of the
+field), by tuple index projections (using the 0-based index of the field). For
+instance, for the example above, the result of this transformation is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const tuple(int a; real b) t = (1, 2.0);
+const int x = t[0];
+const int y = t[0];</code></pre>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-13">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-15">Size considerations</h6>
+<div class="paragraph">
+<p>Since both field references and integer values are single expression nodes,
+this transformation does not increase the size of the specification.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-15">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-elim-type-decls">Eliminate type declarations</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation eliminates type declarations.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-26">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-23">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-15">Implementation details</h6>
+<div class="paragraph">
+<p>All uses of type declarations (in types of variables, types of other type
+declarations, etc), are replaced by the types of those type declarations. The
+type declarations themselves are removed. For instance, the following
+specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">type t = int;
+type u = v;
+type v = tuple(t a, b);
+
+const t x = 1;
+const u y = (2, 3);
+const v z = (4, 5);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const int x = 1;
+const tuple(int a, b) y = (2, 3);
+const tuple(int a, b) z = (4, 5);</code></pre>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-14">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-16">Size considerations</h6>
+<div class="paragraph">
+<p>Since type declarations are shortcuts for types, eliminating them could result
+in an increase of the size of the specification. Type declarations may be
+defined in terms of other type declarations. Therefore, in the worst case, the
+increase is exponential.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-16">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-enums-to-consts">Convert enumerations to constants</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation converts enumerations to integer constants.</p>
+</div>
+<div class="paragraph">
+<p>See also: <a href="#tools-cif2cif-chapter-merge-enums">Merge enumerations</a> and
+<a href="#tools-cif2cif-chapter-enums-to-ints">Convert enumerations to integers</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-27">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-24">Preprocessing</h6>
+<div class="paragraph">
+<p>To increase the subset of specifications that can be transformed, apply
+the following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order) prior to using this transformation:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-16">Implementation details</h6>
+<div class="paragraph">
+<p>Enumerations, which are used as types, are replaced by integer types, with
+range <code>[0 .. n-1]</code>, where <code>n</code> is the number of literals of the enumeration.</p>
+</div>
+<div class="paragraph">
+<p>Enumeration literals, which are used as values, are replaced by constants.
+If the used enumeration literal is the <code>n</code><sup>th</sup> literal in the corresponding
+enumeration (declaration), then a constant with value <code>n - 1</code> is used. That is,
+the integer value is the 0-based index of the enumeration literal into the
+literals of the enumeration declaration.</p>
+</div>
+<div class="paragraph">
+<p>All enumeration declarations are replaced by constant integer declarations, one
+for each literal in the enumeration declaration.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group x:
+  enum EX = A, B;
+
+  alg EX x = A;
+end
+
+group y:
+  enum EY = B, A;
+
+  alg EY y = A;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group x:
+  alg int[0..1] x = A;
+  const int A = 0;
+  const int B = 1;
+end
+
+group y:
+  alg int[0..1] y = A;
+  const int B = 0;
+  const int A = 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-15">Renaming</h6>
+<div class="paragraph">
+<p>This transformation itself does not perform any renaming.</p>
+</div>
+<div class="paragraph">
+<p>If enumeration literals are renamed, this may influence value equality for
+<em>compatible</em> enumerations (enumerations with the same number of literals,
+with the same names, in the same order). Therefore, either apply this
+transformation before applying other transformations that perform renaming on
+enumeration literals (such as the <a href="#tools-cif2cif-chapter-groups">Eliminate groups</a> CIF to CIF
+transformation), or otherwise ensure that renaming does not result in an
+invalid specification.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-17">Size considerations</h6>
+<div class="paragraph">
+<p>The number of added constants is linear in the number of enumeration literals
+of the specification. Integer types are slightly larger than enumeration types,
+but the increase is linear. Constant references in expressions are not larger
+than enumeration literal references.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-17">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-enums-to-ints">Convert enumerations to integers</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation converts enumerations to integers.</p>
+</div>
+<div class="paragraph">
+<p>See also: <a href="#tools-cif2cif-chapter-merge-enums">Merge enumerations</a> and
+<a href="#tools-cif2cif-chapter-enums-to-consts">Convert enumerations to constants</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-28">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-25">Preprocessing</h6>
+<div class="paragraph">
+<p>To increase the subset of specifications that can be transformed, apply
+the following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order) prior to using this transformation:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-17">Implementation details</h6>
+<div class="paragraph">
+<p>Enumerations, which are used as types, are replaced by integer types, with
+range <code>[0 .. n-1]</code>, where <code>n</code> is the number of literals of the enumeration.</p>
+</div>
+<div class="paragraph">
+<p>Enumeration literals, which are used as values, are replaced by integer values.
+If the used enumeration literal is the <code>n</code><sup>th</sup> literal in the corresponding
+enumeration (declaration), then the integer value is <code>n - 1</code>. That is, the
+integer value is the 0-based index of the enumeration literal into the literals
+of the enumeration declaration.</p>
+</div>
+<div class="paragraph">
+<p>All enumeration declarations are removed.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group x:
+  enum EX = A, B;
+
+  const EX x = A;
+end
+
+group y:
+  enum EY = B, A;
+
+  const EY y = A;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group x:
+  const int[0..1] x = 0;
+end
+
+group y:
+  const int[0..1] y = 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-16">Renaming</h6>
+<div class="paragraph">
+<p>This transformation itself does not perform any renaming.</p>
+</div>
+<div class="paragraph">
+<p>If enumeration literals are renamed, this may influence value equality for
+<em>compatible</em> enumerations (enumerations with the same number of literals,
+with the same names, in the same order). Therefore, either apply this
+transformation before applying other transformations that perform renaming on
+enumeration literals (such as the <a href="#tools-cif2cif-chapter-groups">Eliminate groups</a> CIF to CIF
+transformation), or otherwise ensure that renaming does not result in an
+invalid specification.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-18">Size considerations</h6>
+<div class="paragraph">
+<p>Integer types and integer values are not larger than enumerations and their
+literals. Therefore, this transformation does not increase the size of the
+specification. In fact, it may even be smaller.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-18">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-lift-events">Lift events</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation lifts event declarations to the top level of the
+specification.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-29">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+<li>
+<p>Groups are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-26">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-groups">Eliminate groups</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-18">Implementation details</h6>
+<div class="paragraph">
+<p>All events declared in the automata, are lifted to the top level of the
+specification.</p>
+</div>
+<div class="paragraph">
+<p>In order to be able to track the origin of the events, they are named after
+their absolute names. For a group <code>x</code>, with a group <code>y</code>, with an
+event <code>e</code>, the absolute name of the event is <code>x.y.e</code>. The event is lifted
+to the top level of the specification, and named <code>x_y_e</code>.</p>
+</div>
+<div class="paragraph">
+<p>For instance, this specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event e;
+
+automaton a:
+  event e;
+  location;
+end
+
+group b:
+  automaton c:
+    event e;
+    location;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event e;
+event a_e;
+event b_c_e;
+
+automaton a:
+  location;
+end
+
+group b:
+  automaton c:
+    location;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-17">Renaming</h6>
+<div class="paragraph">
+<p>Since events of the automata are merged with the declarations of the
+specification, renaming may be necessary to ensure uniquely named declarations.
+For instance, for a group <code>x</code>, with a group <code>y</code>, with an event
+<code>e</code>, the absolute name of the event is <code>x.y.e</code>. The event is lifted to the
+top level of the specification, and renamed to <code>x_y_e</code>. However, if the
+specification already contains a declaration of a constant, automaton, other
+event, etc, named <code>x_y_e</code>, then the lifted event is renamed to <code>x_y_e2</code>
+instead. If that name is also already in use, it is renamed to <code>x_y_e3</code>, etc.</p>
+</div>
+<div class="paragraph">
+<p>Whenever renaming takes place, a warning is be printed to the console.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-19">Size considerations</h6>
+<div class="paragraph">
+<p>Events are lifted, which essentially means they are moved. The size of the
+specification does not increase.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-19">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-linearize-merge">Linearize (merge)</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation performs process-algebraic linearization,
+thereby eliminating parallel composition and event synchronization.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-30">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Specifications without automata are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-27">Preprocessing</h6>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+applied as preprocessing (in the given order), to increase the subset of CIF
+specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-pos-info">Remove position information</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-groups">Eliminate groups</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-self">Eliminate automaton <code>self</code> references</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-switches-to-ifs">Convert <code>switch</code> expressions to <code>if</code> expressions</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-equations">Eliminate equations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-aut-casts">Eliminate automata to string casts</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-19">Implementation details</h6>
+<div class="paragraph">
+<p>A location pointer variable is introduced for each original automaton, and the
+use of locations in expressions is eliminated. This is mostly similar to what
+the <a href="#tools-cif2cif-chapter-elim-locs-in-exprs">Eliminate the use of locations in expressions</a> CIF to CIF transformation does,
+except that for instance location pointer variables are added for all automata.
+For nameless locations, name <code>X</code> is used.</p>
+</div>
+<div class="paragraph">
+<p>One new automaton, named <code>M</code>, is created. If all original automata have
+the same supervisory kind, the new automaton gets this kind as well. Otherwise,
+it gets no supervisory kind. The alphabet of this new automaton is the union of
+alphabets of the original automata, including the events that are used to
+send or receive in any of the automata.</p>
+</div>
+<div class="paragraph">
+<p>All declarations from the original automata are moved to the new automaton.
+They are renamed based on their absolute names. That is, for an automaton <code>a</code>
+with a constant <code>c</code>, the absolute name of the constant is <code>a.c</code> and the
+moved constant will be named <code>a_c</code>. Enumeration literals are not given
+absolute names, and keep their original names
+<a href="#tools-cif2cif-linearize-merge-renaming">if possible</a>.</p>
+</div>
+<div class="paragraph">
+<p>One location, named <code>L</code>, is added. This location is both initial and marked.
+All initialization and marker predicates from all the original automata
+(including ones from locations) are merged together. They are put in the new
+automaton, and restrict the initialization and marker predicates of location
+<code>L</code>.</p>
+</div>
+<div class="paragraph">
+<p>The invariants of the original automata (including ones from locations) are
+merged together in a similar way as the initialization and marker predicates.
+The supervisory kinds of the invariants are made explicit, to ensure that the
+original supervisory kinds inherited from automata are preserved.</p>
+</div>
+<div class="paragraph">
+<p>For the <code>tau</code> event, a self loop is created per original <code>tau</code> edge. For
+all other events, the edges are merged, resulting in a single self loop for
+each non-<code>tau</code> event. By creating single edges per non-<code>tau</code> event,
+<a href="#tools-cif2cif-linearize-merge-nondet">non-deterministic choice</a> may be
+eliminated, ensuring that the model size of the resulting specification is
+near-linear <a href="#tools-cif2cif-linearize-merge-size">compared to</a> the model
+size of the original specification.</p>
+</div>
+<div class="paragraph">
+<p>Monitors are taken into account when merging the guards of the edges, resulting
+in simpler guard predicates. Communication is eliminated altogether, and events
+no longer have data types after linearization. For edges with receives, the
+'received value' is replaced (in the updates) by the 'send value'.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event e;
+
+plant automaton p:
+  disc int x = 1;
+
+  location l1:
+    initial;
+    edge e when x = 1 do x := 2 goto l2;
+
+  location l2:
+    edge e when x = 2 do x := 1 goto l1;
+end
+
+plant automaton q:
+  location l1:
+    initial;
+    edge tau goto l2;
+
+  location l2:
+    edge e goto l1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event e;
+enum E = l1, l2;
+
+plant automaton M:
+  alphabet e;
+
+  disc int p_x = 1;
+  disc E p = l1;
+  disc E q = l1;
+
+  initial p = l1 and true or p = l2 and false,
+          q = l1 and true or q = l2 and false;
+
+  marked p = l1 and false or p = l2 and false,
+         q = l1 and false or q = l2 and false;
+
+  location L:
+    initial;
+    marked;
+
+    edge e when (p = l1 and p_x = 1 or p = l2 and p_x = 2) and
+                (q = l1 and false or q = l2 and true)
+           do if   p = l1 and p_x = 1: p_x := 2, p := l2
+              elif p = l2 and p_x = 2: p_x := 1, p := l1
+              end,
+              q := l1;
+    edge tau when q = l1 do q := l2;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>We see that an enumeration <code>E</code> is added, with literals for all the locations
+of the original automata. We also see that plant automata <code>p</code> and <code>q</code> are
+linearized to plant automaton <code>M</code>. Two location pointers, <code>p</code> and <code>q</code>,
+named after the original automata, are added. The variables are moved. The
+initialization and marker predicates are linearized. We have one location
+<code>L</code>, which is initial and marked. For event <code>e</code>, the guards and updates are
+linearized into a single self loop. Location pointer updates are incorporated
+as well. For event <code>tau</code>, the single original edge is simply included as a
+self loop.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect6">
+<h7 id="tools-cif2cif-linearize-merge-nondet">Non-determinism</h7>
+<div class="paragraph">
+<p>If the original automata have non-determinism, this choice is eliminated as
+part of this transformation. Non-determinism can be present due to multiple
+outgoing edges for a single location, for the same event (excluding the
+<code>tau</code> event), with overlapping guards. Another cause of non-determinism is
+multiple senders or receivers that are enabled at the same time, for the same
+channel. In the resulting specification, the first possible transition is
+always taken, similar to how the simulator chooses, assuming the simulator is
+configured to always automatically choose the
+<a href="#tools-cifsim-input-chapter-automatic">first transition</a>. Linearization eliminates some of the
+non-determinism in this case, essentially choosing a specific trace through
+the state space. To ensure the same choices are made, events and automata are
+sorted in the same order for linearization and simulation.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton p:
+  event e;
+  disc int x = 0;
+
+  location:
+    edge e when x &lt; 5 do x := x + 1;
+    edge e when x &gt; 3 do x := x - 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum E = X;
+
+automaton M:
+  alphabet p_e;
+
+  event p_e;
+
+  disc int p_x = 0;
+  disc E p in any;
+
+  initial p = X and false;
+  marked p = X and false;
+
+  location L:
+    initial;
+    marked;
+
+    edge p_e when p = X and (p_x &lt; 5 or p_x &gt; 3)
+             do if   p = X and p_x &lt; 5: p_x := p_x + 1
+                elif p = X and p_x &gt; 3: p_x := p_x - 1
+                end;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, we see that the edge for event <code>e</code> with guard <code>x &lt; 5</code> and update
+<code>x := x + 1</code> is chosen to take precedence over the edge with guard <code>x &gt; 3</code>
+with update <code>x := x - 1</code>. This choice is based on the original specification,
+where the edge with guard <code>x &lt; 5</code> is listed before the edge with guard
+<code>x &gt; 3</code>.</p>
+</div>
+<div class="paragraph">
+<p>Related to this, are dummy updates, which are added to ensure that the correct
+updates are taken. For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton p:
+  event e;
+  disc int x = 0;
+  location:
+    edge e when x &gt;= 3;
+    edge e when x &lt; 3 do x := x + 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum E = X;
+
+automaton M:
+  alphabet p_e;
+  event p_e;
+
+  disc int p_x = 0;
+  disc E p in any;
+
+  initial p = X and false;
+  marked p = X and false;
+
+  location L:
+    initial;
+    marked;
+
+    edge p_e when p = X and (p_x &gt;= 3 or p_x &lt; 3)
+             do if   p = X and p_x &gt;= 3: p := X
+                elif p = X and p_x &lt; 3:  p_x := p_x + 1
+                end;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, the edge with guard <code>x &gt;= 3</code> takes precedence over the edge with guard
+<code>x &lt; 3</code>. To ensure that no updates are performed when the edge with guard
+<code>x &gt;= 3</code> is chosen, a dummy update is added (reassigning the location pointer
+variable the value it already has). If this update were to be omitted, the
+update of the other edge would instead be executed, which is undesirable.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-order">Order</h7>
+<div class="paragraph">
+<p>If code generation is performed on a linearized version of the specification,
+it may be a good idea to ensure the same order is used and the same choices
+are made, both in the generated code and in simulation. Assuming simulation
+was performed by always automatically choosing the
+<a href="#tools-cifsim-input-chapter-automatic">first transition</a>, this should correspond to the output of
+linearization. The linearized edges are in the same order as the transitions
+are calculated by the simulator. This is ensured by sorting events and automata
+in the same order for linearization and simulation. Also, as the
+<a href="#tools-cif2cif-linearize-merge-nondet">Non-determinism</a> section above explains, if
+non-determinism is eliminated, it is done in a way that preserves that order.</p>
+</div>
+<div class="paragraph">
+<p>Code should thus be generated in the order of the linearized edges resulting
+from linearization. Each time the code for an edge is executed, the code should
+start from the top, to ensure always the first enabled transition is chosen.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-urgency">Urgency</h7>
+<div class="paragraph">
+<p>If the original automata contain urgent locations and/or urgent edges, a
+discrete boolean variable <code>u</code> is added to the linearized automaton.
+Initially, it&#8217;s value is <code>true</code>, and it must always remain so
+(<code>plant invariant u;</code>). We add self loops (event <code>tau</code>), with as guard the
+urgent locations and guards of urgent edges, such that the edge can be taken if
+the system is in an urgent location, or an urgent edge is enabled (guard wise).
+However, these edges update <code>u</code> to <code>false</code>, which violates the target
+location invariant, meaning we can never take these edges in a transition.
+Since the edge is also urgent, it means that if the edge is enabled guard wise,
+time may not progress, thus ensuring the urgency behavior of the original
+urgent locations and edges.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton p:
+  event e;
+
+  location l1:
+    initial;
+    urgent;
+    edge e when true goto l2;
+
+  location l2:
+    edge e when 1 = 1 now goto l1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum E = l1, l2;
+
+automaton M:
+  alphabet p_e;
+  event p_e;
+
+  disc E p = l1;
+  disc bool u = true;
+
+  initial p = l1 and true or p = l2 and false;
+  marked p = l1 and false or p = l2 and false;
+
+  plant invariant u;
+
+  location L:
+    initial;
+    marked;
+
+    edge p_e when p = l1 and true or p = l2 and 1 = 1
+             do if   p = l1 and true:  p := l2
+                elif p = l2 and 1 = 1: p := l1
+                end;
+
+    edge when p = l1 or p = l2 and 1 = 1 now do u := false;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>So, if <code>p</code> (the location pointer variable for original automaton <code>p</code>) is
+equal to <code>l1</code> (the enumeration literal for original location <code>l1</code>), then
+the guard of the new urgent edge is enabled, and time may not progress.
+Similarly, if <code>p</code> is equal to <code>l2</code> and the guard <code>1 = 1</code> of the original
+urgent edge is enabled, the guard of the new urgent edge is enabled, and time
+may not progress. This correctly reflects the urgency conditions of the
+original specification.</p>
+</div>
+<div class="paragraph">
+<p>To ensure that no additional event transitions are possible, the new urgent
+edge can never be taken, as it would update <code>u</code> to <code>false</code>, which violates
+<code>plant invariant u</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-received-values-and-tuple-field-projections">Received values and tuple field projections</h7>
+<div class="paragraph">
+<p>The following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event tuple(int a, b) e;
+
+automaton s:
+  location:
+    edge e!(1, 2);
+end
+
+automaton r:
+  disc int x;
+  location:
+    edge e? do x := ?[a];
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event e;
+enum E = X;
+
+automaton M:
+  alphabet e;
+
+  disc E s in any;
+  disc int r_x;
+  disc E r in any;
+
+  initial s = X and false,
+          r = X and false;
+  marked s = X and false,
+         r = X and false;
+
+  location L:
+    initial;
+    marked;
+
+    edge e when s = X and true and (r = X and true) do r_x := (1, 2)[0];
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Observe how event <code>e</code> no longer has a data type, and the communication (send
+and receive) have been eliminated. In the assignment <code>x := ?[a]</code>, received
+value <code>?</code> has been replaced by send value <code>(1, 2)</code>. Since tuple values
+don&#8217;t have field names, the right hand side <code>(1, 2)[a]</code> has been replaced
+by <code>(1, 2)[0]</code>, using the <a href="#tools-cif2cif-chapter-elim-tuple-field-projs">Eliminate tuple field projections</a> CIF to
+CIF transformation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-elimination-of-communication">Elimination of communication</h7>
+<div class="paragraph">
+<p>Since channel communication is completely eliminated, and channels become
+regular events after this transformation, it is no longer possible to
+<a href="#tools-chapter-mergecif">merge</a> additional senders/receivers with the linearized
+specification. If you wish to merge another specification with additional
+communication partners, first perform the merging, and then the linearization.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2cif-linearize-merge-renaming">Renaming</h6>
+<div class="paragraph">
+<p>Since declarations are moved/merged, and new names are introduced, renaming may
+be necessary to ensure unique names within a single scope. In order to reduce
+the amount of renaming for the enumeration literals introduced for the
+locations of the original automata, all enumerations are merged together into a
+single enumeration in the specification, with name <code>E</code>.</p>
+</div>
+<div class="paragraph">
+<p>If renaming is performed, a warning is printed to the console.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2cif-linearize-merge-size">Size considerations</h6>
+<div class="paragraph">
+<p>Declarations are moved, so they don&#8217;t increase the size of the specification.</p>
+</div>
+<div class="paragraph">
+<p>The addition of location variables increases the size of the specification, but
+this is linear in the number of automata and the number of locations.</p>
+</div>
+<div class="paragraph">
+<p>Assignment are added for the updates to the location pointers. The increase is
+linear in the number of edges. The additional dummy updates that are added are
+linear in the number of edges as well.</p>
+</div>
+<div class="paragraph">
+<p>A single self loop is added for each non-<code>tau</code> event. This does increase the
+size of the specification. The guards are simply combined using boolean
+operators, and the increase is therefore linear in the number of guards.
+Similarly, updates are combined using 'if' updates, and the increase is also
+linear.</p>
+</div>
+<div class="paragraph">
+<p>For original edges with multiple events however, the guards and updates are
+duplicated for each event. The duplication is linear in the number of events
+on those edges.</p>
+</div>
+<div class="paragraph">
+<p>Since <code>tau</code> edges are essentially just moved, they don&#8217;t increase the size
+of the specification. That is, their size is linear in the number of original
+<code>tau</code> edges.</p>
+</div>
+<div class="paragraph">
+<p>The initialization and marker predicates, as well as the invariants are moved.
+They remain linear in size related to the number of original predicates. The
+predicates for the locations are also made conditional on the values of the
+location pointer variable. This size increase is linear in the number of
+original locations. Predicates are combined using boolean operators, leading
+to a size increase that is linear in the number of original predicates.</p>
+</div>
+<div class="paragraph">
+<p>If a single received value is used multiple times in the updates of a single
+edge, the send value is duplicated for each of those uses. As such, the size
+increase is linear in the number of uses of the received value.</p>
+</div>
+<div class="paragraph">
+<p>If multiple senders and multiple receivers (individual send/receive edges, not
+whole automata) are present for a certain event, then the received value is
+expanded to all the potential send values, with the conditions under which they
+are used as send value (using an 'if' expression). As such, the received
+value are expanded into expressions that are linear in the number of senders.
+If we have only a single sender or a single receiver, this is linear. If we
+have multiple of both, this becomes quadratic (number of senders times number
+of receivers).</p>
+</div>
+<div class="paragraph">
+<p>For urgency, an additional variable and invariant are added. This is a constant
+increase in size. A self loop is added as well. This self loop duplicates
+the guards of urgent edges. It also includes predicates for the urgent
+locations. The size of this edge is linear in the number of urgent locations,
+and the guards of the urgent edges.</p>
+</div>
+<div class="paragraph">
+<p>From the above, it should be clear that while the specification may increase
+in size, it is mostly linear. Practically, the size of the linearized
+specification is usually linear compared to the size of the input
+specification.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-20">Optimality</h6>
+<div class="paragraph">
+<p>As should be clear from the examples above, this transformation does not try
+to generate optimized expressions. In fact, often almost all generated
+expressions can easily be simplified. To further simplify the result, apply
+additional CIF to CIF transformations, such as
+<a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a>.</p>
+</div>
+<div class="paragraph">
+<p>Currently, no effort is made by this transformation to reduce for instance the
+number of dummy assignments, or the number of replacements of tuple field
+projections by tuple index projections.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-linearize-product">Linearize (product)</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation performs process-algebraic linearization,
+thereby eliminating parallel composition and event synchronization.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-31">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Specifications without automata are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-28">Preprocessing</h6>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+applied as preprocessing (in the given order), to increase the subset of CIF
+specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-pos-info">Remove position information</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-groups">Eliminate groups</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-self">Eliminate automaton <code>self</code> references</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-switches-to-ifs">Convert <code>switch</code> expressions to <code>if</code> expressions</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-equations">Eliminate equations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-aut-casts">Eliminate automata to string casts</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-20">Implementation details</h6>
+<div class="paragraph">
+<p>A location pointer variable is introduced for each original automaton, and the
+use of locations in expressions is eliminated. This is mostly similar to what
+the <a href="#tools-cif2cif-chapter-elim-locs-in-exprs">Eliminate the use of locations in expressions</a> CIF to CIF transformation does,
+except that for instance location pointer variables are added for all automata.
+For nameless locations, name <code>X</code> is used.</p>
+</div>
+<div class="paragraph">
+<p>One new automaton, named <code>M</code>, is created. If all original automata have
+the same supervisory kind, the new automaton gets this kind as well. Otherwise,
+it gets no supervisory kind. The alphabet of this new automaton is the union of
+alphabets of the original automata, including the events that are used to
+send or receive in any of the automata.</p>
+</div>
+<div class="paragraph">
+<p>All declarations from the original automata are moved to the new automaton.
+They are renamed based on their absolute names. That is, for an automaton <code>a</code>
+with a constant <code>c</code>, the absolute name of the constant is <code>a.c</code> and the
+moved constant will be named <code>a_c</code>. Enumeration literals are not given
+absolute names, and keep their original names
+<a href="#tools-cif2cif-linearize-product-renaming">if possible</a>.</p>
+</div>
+<div class="paragraph">
+<p>One location, named <code>L</code>, is added. This location is both initial and marked.
+All initialization and marker predicates from all the original automata
+(including ones from locations) are merged together. They are put in the new
+automaton, and restrict the initialization and marker predicates of location
+<code>L</code>.</p>
+</div>
+<div class="paragraph">
+<p>The invariants of the original automata (including ones from locations) are
+merged together in a similar way as the initialization and marker predicates.
+The supervisory kinds of the invariants are made explicit, to ensure that the
+original supervisory kinds inherited from automata are preserved.</p>
+</div>
+<div class="paragraph">
+<p>For the <code>tau</code> event, a self loop is created per original <code>tau</code> edge. For
+all other events, the
+<a href="http://en.wikipedia.org/wiki/Cartesian_product">Cartesian product</a>
+of all
+edges is created, combining the edges in all possible combinations. This
+results in self loops for all non-<code>tau</code> events, where the combination of all
+self loops maintains all non-deterministic choices of the original
+specification. Worst case, the model size of the resulting specification
+compared to the model size of the original specification
+<a href="#tools-cif2cif-linearize-product-size">could blow up</a> exponentially.</p>
+</div>
+<div class="paragraph">
+<p>Monitors are taken into account when merging the guards of the edges, resulting
+in simpler guard predicates. Communication is eliminated altogether, and events
+no longer have data types after linearization. For edges with receives, the
+'received value' is replaced (in the updates) by the 'send value'.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event e;
+
+plant automaton p:
+  disc int x = 1;
+
+  location l1:
+    initial;
+    edge e when x = 1 do x := 2 goto l2;
+
+  location l2:
+    edge e when x = 2 do x := 1 goto l1;
+end
+
+plant automaton q:
+  location l1:
+    initial;
+    edge tau goto l2;
+
+  location l2:
+    edge e goto l1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event e;
+enum E = l1, l2;
+
+plant automaton M:
+  alphabet e;
+
+  disc int p_x = 1;
+  disc E p = l1;
+  disc E q = l1;
+
+  initial p = l1 and true or p = l2 and false,
+          q = l1 and true or q = l2 and false;
+
+  marked p = l1 and false or p = l2 and false,
+         q = l1 and false or q = l2 and false;
+
+  location L:
+    initial;
+    marked;
+
+    edge e when p = l1 and p_x = 1 and q = l2
+           do p_x := 2, p := l2, q := l1;
+    edge e when p = l2 and p_x = 2 and q = l2
+           do p_x := 1, p := l1, q := l1;
+    edge tau when q = l1 do q := l2;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>We see that an enumeration <code>E</code> is added, with literals for all the locations
+of the original automata. We also see that plant automata <code>p</code> and <code>q</code> are
+linearized to plant automaton <code>M</code>. Two location pointers, <code>p</code> and <code>q</code>,
+named after the original automata, are added. The variables are moved. The
+initialization and marker predicates are linearized. We have one location
+<code>L</code>, which is initial and marked. For event <code>e</code>, two self loop edges are
+added, as automaton <code>p</code> has two edges for <code>e</code> and automaton <code>q</code> has one
+edge for <code>e</code> and <code>2 * 1</code> is <code>2</code>. For the self loop edges, the guards and
+updates are combined. Location pointer updates are incorporated as well. For
+event <code>tau</code>, the single original edge is simply included as a self loop.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect6">
+<h7 id="tools-non-determinism">Non-determinism</h7>
+<div class="paragraph">
+<p>If the original automata have non-determinism, this choice is maintained as
+part of this transformation. Non-determinism can be present due to multiple
+outgoing edges for a single location, for the same event (excluding the
+<code>tau</code> event), with overlapping guards. Another cause of non-determinism is
+multiple senders or receivers that are enabled at the same time, for the same
+channel. In the resulting specification, all possible combinations are
+included as self loops. For a specification with 4 sender automata with two
+send edges each (8 send edges in total) and 5 receiver automata with two
+receive edges each (10 receive edges in total) for event <code>e</code>, and also 6
+automata with two edges each that synchronize over that event (12
+synchronization edges in total), the number of possible combinations for
+communication with synchronization is <code>8 * 10 * 12</code>, which is <code>960</code>
+possible combinations.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event e;
+
+automaton p:
+  disc int x = 0;
+
+  location:
+    edge e when x &lt; 5 do x := x + 1;
+    edge e when x &gt; 3 do x := x - 1;
+end
+
+automaton q:
+  disc int y = 0;
+
+  location:
+    edge e when y &lt; 5 do y := y + 1;
+    edge e when y &gt; 3 do y := y - 1;
+    edge e when y = 4 do y := y - 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event e;
+
+enum E = X;
+
+automaton M:
+  alphabet e;
+
+  disc int p_x = 0;
+  disc E p in any;
+  disc int q_y = 0;
+  disc E q in any;
+
+  initial p = X and false,
+          q = X and false;
+
+  marked p = X and false,
+         q = X and false;
+
+  location L:
+    initial;
+    marked;
+
+    edge e when p = X and p_x &lt; 5 and q = X and q_y &lt; 5
+           do p_x := p_x + 1, q_y := q_y + 1;
+    edge e when p = X and p_x &lt; 5 and q = X and q_y &gt; 3
+           do p_x := p_x + 1, q_y := q_y - 1;
+    edge e when p = X and p_x &lt; 5 and q = X and q_y = 4
+           do p_x := p_x + 1, q_y := q_y - 1;
+    edge e when p = X and p_x &gt; 3 and q = X and q_y &lt; 5
+           do p_x := p_x - 1, q_y := q_y + 1;
+    edge e when p = X and p_x &gt; 3 and q = X and q_y &gt; 3
+           do p_x := p_x - 1, q_y := q_y - 1;
+    edge e when p = X and p_x &gt; 3 and q = X and q_y = 4
+           do p_x := p_x - 1, q_y := q_y - 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here, we see that for event <code>e</code>, automaton <code>p</code> has two edges and automaton
+<code>q</code> has three edges. The linearization result has six edges.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-order-2">Order</h7>
+<div class="paragraph">
+<p>If code generation is performed on a linearized version of the specification,
+it may be a good idea to ensure the same order is used and the same choices
+are made, both in the generated code and in simulation. Assuming simulation
+was performed by always automatically choosing the
+<a href="#tools-cifsim-input-chapter-automatic">first transition</a>, this should correspond to the output of
+linearization. The linearized edges are in the same order as the transitions
+are calculated by the simulator. This is ensured by sorting events and automata
+in the same order for linearization and simulation.</p>
+</div>
+<div class="paragraph">
+<p>Code should thus be generated in the order of the linearized edges resulting
+from linearization. Each time the code for an edge is executed, the code should
+start from the top, to ensure always the first enabled transition is chosen.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-urgency-2">Urgency</h7>
+<div class="paragraph">
+<p>If the original automata contain urgent locations and/or urgent edges, a
+discrete boolean variable <code>u</code> is added to the linearized automaton.
+Initially, it&#8217;s value is <code>true</code>, and it must always remain so
+(<code>plant invariant u;</code>). We add self loops (event <code>tau</code>), with as guard the
+urgent locations and guards of urgent edges, such that the edge can be taken if
+the system is in an urgent location, or an urgent edge is enabled (guard wise).
+However, these edges update <code>u</code> to <code>false</code>, which violates the target
+location invariant, meaning we can never take these edges in a transition.
+Since the edge is also urgent, it means that if the edge is enabled guard wise,
+time may not progress, thus ensuring the urgency behavior of the original
+urgent locations and edges.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">automaton p:
+  event e;
+
+  location l1:
+    initial;
+    urgent;
+    edge e when true goto l2;
+
+  location l2:
+    edge e when 1 = 1 now goto l1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum E = l1, l2;
+
+automaton M:
+  alphabet p_e;
+  event p_e;
+
+  disc E p = l1;
+  disc bool u = true;
+
+  initial p = l1 and true or p = l2 and false;
+  marked p = l1 and false or p = l2 and false;
+
+  plant invariant u;
+
+  location L:
+    initial;
+    marked;
+
+    edge p_e when p = l1 and true do p := l2;
+    edge p_e when p = l2 and 1 = 1 do p := l1;
+
+    edge when p = l1 or p = l2 and 1 = 1 now do u := false;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>So, if <code>p</code> (the location pointer variable for original automaton <code>p</code>) is
+equal to <code>l1</code> (the enumeration literal for original location <code>l1</code>), then
+the guard of the new urgent edge is enabled, and time may not progress.
+Similarly, if <code>p</code> is equal to <code>l2</code> and the guard <code>1 = 1</code> of the original
+urgent edge is enabled, the guard of the new urgent edge is enabled, and time
+may not progress. This correctly reflects the urgency conditions of the
+original specification.</p>
+</div>
+<div class="paragraph">
+<p>To ensure that no additional event transitions are possible, the new urgent
+edge can never be taken, as it would update <code>u</code> to <code>false</code>, which violates
+<code>plant invariant u</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-received-values-and-tuple-field-projections-2">Received values and tuple field projections</h7>
+<div class="paragraph">
+<p>The following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event tuple(int a, b) e;
+
+automaton s:
+  location:
+    edge e!(1, 2);
+end
+
+automaton r:
+  disc int x;
+  location:
+    edge e? do x := ?[a];
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">event e;
+enum E = X;
+
+automaton M:
+  alphabet e;
+
+  disc E s in any;
+  disc int r_x;
+  disc E r in any;
+
+  initial s = X and false,
+          r = X and false;
+  marked s = X and false,
+         r = X and false;
+
+  location L:
+    initial;
+    marked;
+
+    edge e when s = X and r = X do r_x := (1, 2)[0];
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Observe how event <code>e</code> no longer has a data type, and the communication (send
+and receive) have been eliminated. In the assignment <code>x := ?[a]</code>, received
+value <code>?</code> has been replaced by send value <code>(1, 2)</code>. Since tuple values
+don&#8217;t have field names, the right hand side <code>(1, 2)[a]</code> has been replaced
+by <code>(1, 2)[0]</code>, using the <a href="#tools-cif2cif-chapter-elim-tuple-field-projs">Eliminate tuple field projections</a> CIF to
+CIF transformation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect6">
+<h7 id="tools-elimination-of-communication-2">Elimination of communication</h7>
+<div class="paragraph">
+<p>Since channel communication is completely eliminated, and channels become
+regular events after this transformation, it is no longer possible to
+<a href="#tools-chapter-mergecif">merge</a> additional senders/receivers with the linearized
+specification. If you wish to merge another specification with additional
+communication partners, first perform the merging, and then the linearization.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2cif-linearize-product-renaming">Renaming</h6>
+<div class="paragraph">
+<p>Since declarations are moved/merged, and new names are introduced, renaming may
+be necessary to ensure unique names within a single scope. In order to reduce
+the amount of renaming for the enumeration literals introduced for the
+locations of the original automata, all enumerations are merged together into a
+single enumeration in the specification, with name <code>E</code>.</p>
+</div>
+<div class="paragraph">
+<p>If renaming is performed, a warning is printed to the console.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-cif2cif-linearize-product-size">Size considerations</h6>
+<div class="paragraph">
+<p>Declarations are moved, so they don&#8217;t increase the size of the specification.</p>
+</div>
+<div class="paragraph">
+<p>The addition of location variables increases the size of the specification, but
+this is linear in the number of automata and the number of locations.</p>
+</div>
+<div class="paragraph">
+<p>Assignment are added for the updates to the location pointers. The increase is
+linear in the number of edges.</p>
+</div>
+<div class="paragraph">
+<p>Since <code>tau</code> edges are essentially just moved, they don&#8217;t increase the size
+of the specification. That is, their size is linear in the number of original
+<code>tau</code> edges.</p>
+</div>
+<div class="paragraph">
+<p>Multiple self loops may be added for non-<code>tau</code> event, and thus may result in
+an exponential blow up of the number of edges.</p>
+</div>
+<div class="paragraph">
+<p>The initialization and marker predicates, as well as the invariants are moved.
+They remain linear in size related to the number of original predicates. The
+predicates for the locations are also made conditional on the values of the
+location pointer variable. This size increase is linear in the number of
+original locations. Predicates are combined using boolean operators, leading
+to a size increase that is linear in the number of original predicates.</p>
+</div>
+<div class="paragraph">
+<p>If a single received value is used multiple times in the updates of a single
+edge, the send value is duplicated for each of those uses. As such, the size
+increase is linear in the number of uses of the received value.</p>
+</div>
+<div class="paragraph">
+<p>For urgency, an additional variable and invariant are added. This is a constant
+increase in size. A self loop is added as well. This self loop duplicates
+the guards of urgent edges. It also includes predicates for the urgent
+locations. The size of this edge is linear in the number of urgent locations,
+and the guards of the urgent edges.</p>
+</div>
+<div class="paragraph">
+<p>From the above, it should be clear that due to the exponential blow up of the
+edges, linearization results can be significantly larger than the original
+specifications.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-21">Optimality</h6>
+<div class="paragraph">
+<p>As should be clear from the examples above, this transformation does not try
+to generate optimized expressions. In fact, often almost all generated
+expressions can easily be simplified. To further simplify the result, apply
+additional CIF to CIF transformations, such as
+<a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a>.</p>
+</div>
+<div class="paragraph">
+<p>Currently, no effort is made by this transformation to reduce for instance the
+number of replacements of tuple field projections by tuple index projections.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-merge-enums">Merge enumerations</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation merges all enumerations together to a single
+enumeration.</p>
+</div>
+<div class="paragraph">
+<p>See also: <a href="#tools-cif2cif-chapter-enums-to-ints">Convert enumerations to integers</a> and
+<a href="#tools-cif2cif-chapter-enums-to-consts">Convert enumerations to constants</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-32">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-29">Preprocessing</h6>
+<div class="paragraph">
+<p>To increase the subset of specifications that can be transformed, apply
+the following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order) prior to using this transformation:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+automatically applied as preprocessing (in the given order), to increase the
+subset of CIF specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-add-default-init-values">Add default initial values</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-21">Implementation details</h6>
+<div class="paragraph">
+<p>If there are any enumerations in the specification, a single new enumeration
+is created. This enumeration is named <code>E</code>. All literals of the original
+enumerations are added to this new enumeration. Obviously, duplicate literals
+are only included once. The literals are added in sorted order.</p>
+</div>
+<div class="paragraph">
+<p>The original enumerations are removed.</p>
+</div>
+<div class="paragraph">
+<p>For instance, the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum A = B, C;
+
+automaton p:
+  enum A = C, B;
+  enum X = D, C;
+  disc A a = C;
+  disc X x = D;
+  location:
+    initial;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum E = B, C, D;
+
+automaton p:
+  disc E a = C;
+  disc E x = D;
+  location:
+    initial;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-18">Renaming</h6>
+<div class="paragraph">
+<p>The newly created enumeration <code>E</code> and its literals, may conflict with
+declarations already present in the specification. If this is the case, they
+are renamed. For instance, if <code>E</code> is already in use, <code>E2</code>, or <code>E3</code>, etc,
+is used instead. If renaming is performed, a warning is printed to the console.</p>
+</div>
+<div class="paragraph">
+<p>In general, renaming of enumeration literals may influence value equality for
+<em>compatible</em> enumerations (enumerations with the same number of literals, with
+the same names, in the same order). However, since the resulting specification
+has at most one enumeration, there are no multiple enumerations, and thus
+compatibility is not an issue (since the enumeration is always compatible with
+itself).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-default-initial-values">Default initial values</h6>
+<div class="paragraph">
+<p>Consider the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group g1:
+  enum e1 = A, B;
+end
+
+group g2:
+  enum e2 = B, A;
+end
+
+automaton p:
+  disc g1.e1 v1;
+  disc g2.e2 v2;
+
+  location:
+    initial;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If we apply merging of enumerations directly, we get the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">enum E = A, B;
+
+group g1:
+end
+
+group g2:
+end
+
+automaton p:
+  disc E v1;
+  disc E v2;
+
+  location:
+    initial;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In the original specification, <code>v1</code> had value <code>A</code>, and <code>v2</code> had value
+<code>B</code>. After the merging of the enumerations, both <code>v1</code> and <code>v2</code> have
+implicit initial value <code>A</code>. Thus, they had different initial values
+beforehand, and the same initial values afterward. To solve this problem, the
+<a href="#tools-cif2cif-chapter-add-default-init-values">Add default initial values</a> CIF to CIF transformation is
+automatically applied as preprocessing before the actual elimination of the
+enumerations, to ensure that the explicit initial values are properly
+transformed.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-20">Size considerations</h6>
+<div class="paragraph">
+<p>Since enumerations are merged, duplicate literals become a single new literal.
+Therefore, this transformation may decrease the size of the specification.</p>
+</div>
+<div class="paragraph">
+<p>The added default initial values may significantly increase the size of the
+specification.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-22">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-print-file-into-decls">Push print file declarations into print declarations</h5>
+<div class="paragraph">
+<p>
+
+
+
+This CIF to CIF transformation pushes
+<a href="#tools-cifsim-output-print-chapter-ref-printfile">print file declarations</a>
+inwards into the
+<a href="#tools-cifsim-output-print-chapter-ref-printdecl">print declarations</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-33">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-30">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-22">Implementation details</h6>
+<div class="paragraph">
+<p>All <a href="#tools-cifsim-output-print-chapter-ref-printfile">print file declarations</a>
+specified in the top level scope of the specification, in groups, and in
+automata, are removed. The
+<a href="#tools-cifsim-output-print-chapter-ref-printdecl">print declarations</a> to which
+they applied, each get a local print file declaration instead. If they already
+had a local print file declaration, the print declaration is not changed.
+Print declarations to which no print file declaration applies, get the default
+target <code>":stdout"</code>.</p>
+</div>
+<div class="paragraph">
+<p>For instance, this specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">printfile "out1.txt";
+
+print 5;
+print 6 file "out2.txt";
+
+group g:
+  printfile "out3.txt";
+
+  print 7;
+  print 8;
+  print 9 file "out4.txt";
+
+  group h:
+    printfile "out5.txt";
+  end
+
+  group i:
+    print 10;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">print 5 file "out1.txt";
+print 6 file "out2.txt";
+
+group g:
+  print 7 file "out3.txt";
+  print 8 file "out3.txt";
+  print 9 file "out4.txt";
+
+  group h:
+  end
+
+  group i:
+    print 10 file "out3.txt";
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The print declaration that prints <code>5</code> is declared in the top level scope of
+the specification, and does not have a local print file declaration. As such,
+the print file declaration from the top level scope (<code>out1.txt</code>) is pushed
+inwards into the print declaration. The print declaration that prints <code>6</code> is
+declared in the same scope, but already has a local print file declaration
+(<code>out2.txt</code>), and is thus not changed.</p>
+</div>
+<div class="paragraph">
+<p>Group <code>g</code> also has an print file declaration (<code>out3.txt</code>). This is pushed
+inwards to the print declarations that print <code>7</code> and <code>8</code>, as they are
+declared in the same scope, and don&#8217;t have local print file declarations. The
+print declaration that prints <code>9</code> is not changed, as it already has a local
+print file declaration (<code>out4.txt</code>).</p>
+</div>
+<div class="paragraph">
+<p>The print file declaration (<code>out5.txt</code>) from group <code>g.h</code> does not apply to
+any print declarations, and thus gets lost.</p>
+</div>
+<div class="paragraph">
+<p>Group <code>g.i</code> does not have an print file declaration, so the print declaration
+that prints <code>10</code>, which is declared in that group, gets the print file
+declaration from group <code>g</code> (the parent scope of group <code>g.i</code>) instead.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-19">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-21">Size considerations</h6>
+<div class="paragraph">
+<p>As print file declarations may apply to multiple print declarations, this
+transformation may increase the number of (local) print file declarations in
+the specification. The number of print file declarations after the
+transformation is at most the number of print declarations, and as such the
+increase is at most linear in the number of print declarations as well.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-23">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-svg-file-into-decls">Push SVG file declarations into other CIF/SVG declarations</h5>
+<div class="paragraph">
+<p>
+
+
+
+This CIF to CIF transformation pushes
+<a href="#tools-cifsim-output-svgviz-chapter-svgfile">SVG file declarations</a> inwards into
+the other <a href="#tools-cifsim-output-svgviz-chapter-cifsvg">CIF/SVG declarations</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-34">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-31">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-23">Implementation details</h6>
+<div class="paragraph">
+<p>All <a href="#tools-cifsim-output-svgviz-chapter-svgfile">SVG file declarations</a>
+specified in the top level scope of the specification, in groups, and in
+automata, are removed. The other
+<a href="#tools-cifsim-output-svgviz-chapter-cifsvg">CIF/SVG declarations</a> to which they
+apply, each get a local SVG file declaration instead. If they already had a
+local SVG file declaration, the CIF/SVG declaration is not changed.</p>
+</div>
+<div class="paragraph">
+<p>For instance, this specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgfile "file1.svg";
+
+svgout id "a" attr "b" value 5;
+
+svgout id "c" attr "d" value 6 file "file2.svg";
+
+group g:
+  svgfile "file3.svg";
+
+  svgout id "e" attr "f" value 7;
+
+  svgout id "g" attr "h" value 8;
+
+  svgout id "i" attr "j" value 9 file "file4.svg";
+
+  group h:
+    svgfile "file5.svg";
+  end
+
+  group i:
+    svgout id "k" attr "l" value 10;
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>is transformed to the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">svgout id "a" attr "b" value 5 file "file1.svg";
+
+svgout id "c" attr "d" value 6 file "file2.svg";
+
+group g:
+  svgout id "e" attr "f" value 7 file "file3.svg";
+
+  svgout id "g" attr "h" value 8 file "file3.svg";
+
+  svgout id "i" attr "j" value 9 file "file4.svg";
+
+  group h:
+  end
+
+  group i:
+    svgout id "k" attr "l" value 10 file "file3.svg";
+  end
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The mapping for the SVG element with id <code>a</code> is declared in the top level
+scope of the specification, and does not have a local SVG file declaration.
+As such, the SVG file declaration from the top level scope (<code>file1.svg</code>) is
+pushed inwards into the mapping. The mapping for the SVG element with id <code>b</code>
+is declared in the same scope, but already has a local SVG file declaration
+(<code>file2.svg</code>), and is thus not changed.</p>
+</div>
+<div class="paragraph">
+<p>Group <code>g</code> also has an SVG file declaration (<code>file3.svg</code>). This is pushed
+inwards to the mappings for ids <code>e</code> and <code>g</code>, as they are declared in the
+same scope, and don&#8217;t have local SVG file declarations. The mapping for SVG
+element id <code>i</code> is not changed, as it already has a local SVG file declaration
+(<code>file4.svg</code>).</p>
+</div>
+<div class="paragraph">
+<p>The SVG file declaration (<code>file5.svg</code>) from group <code>g.h</code> does not apply to
+any mappings, and thus gets lost.</p>
+</div>
+<div class="paragraph">
+<p>Group <code>g.i</code> does not have an SVG file declaration, so the mapping for SVG
+element id <code>k</code>, which is declared in that group, gets the SVG file
+declaration from group <code>g</code> (the parent scope of group <code>g.i</code>) instead.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-20">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-22">Size considerations</h6>
+<div class="paragraph">
+<p>As SVG file declarations may apply to multiple other CIF/SVG declarations, this
+transformation may increase the number of SVG file declarations in the
+specification. The number of SVG file declarations after the transformation is
+at most the number of 'other' CIF/SVG declarations, and as such the increase is
+at most linear in the number of 'other' CIF/SVG declarations as well.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-24">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-remove-cif-svg-decls">Remove CIF/SVG declarations</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation removes
+<a href="#tools-cifsim-output-svgviz-chapter-cifsvg">CIF/SVG</a> declarations from the
+specification. This may reduce the size of the specification. It may also lead
+to the specification being supported by more tools, as the CIF/SVG declarations
+may use features of the CIF language that certain tools don&#8217;t support.</p>
+</div>
+<div class="paragraph">
+<p>This CIF to CIF transformation removes only CIF/SVG declarations. The
+<a href="#tools-cif2cif-chapter-remove-io-decls">Remove I/O declarations</a> CIF to CIF transformation removes them
+as well, but additionally also removes the other I/O declarations.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-35">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports all CIF specifications.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-32">Preprocessing</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-24">Implementation details</h6>
+<div class="paragraph">
+<p>All CIF/SVG declarations are removed from the specification.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-21">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-23">Size considerations</h6>
+<div class="paragraph">
+<p>Since information is removed from the specification, the specification can only
+become smaller as a result of this transformation.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-25">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-remove-io-decls">Remove I/O declarations</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation removes I/O declarations from the specification.
+This may reduce the size of the specification. It may also lead to the
+specification being supported by more tools, as the I/O declarations may use
+features of the CIF language that certain tools don&#8217;t support.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-36">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports all CIF specifications.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-33">Preprocessing</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-25">Implementation details</h6>
+<div class="paragraph">
+<p>All I/O declarations are removed from the specification. I/O declarations
+include:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cifsim-output-print-chapter-ref-printdecl">Print declaration</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-print-chapter-ref-printfile">Print file declaration</a></p>
+</li>
+<li>
+<p><a href="#tools-cifsim-output-svgviz-chapter-cifsvg">CIF/SVG declarations</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>This transformation removes all I/O declarations. To only remove certain kinds
+of I/O declarations, see the following CIF to CIF transformations:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-print-decls">Remove print declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-cif-svg-decls">Remove CIF/SVG declarations</a></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-22">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-24">Size considerations</h6>
+<div class="paragraph">
+<p>Since information is removed from the specification, the specification can only
+become smaller as a result of this transformation.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-26">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-remove-print-decls">Remove print declarations</h5>
+<div class="paragraph">
+<p>
+
+
+
+This CIF to CIF transformation removes
+<a href="#tools-cifsim-output-print-chapter-ref-printdecl">print</a> and
+<a href="#tools-cifsim-output-print-chapter-ref-printfile">print file</a> declarations
+from the specification. This may reduce the size of the specification. It may
+also lead to the specification being supported by more tools, as the print and
+print file declarations may use features of the CIF language that certain tools
+don&#8217;t support.</p>
+</div>
+<div class="paragraph">
+<p>This CIF to CIF transformation removes only print and print file declarations.
+The <a href="#tools-cif2cif-chapter-remove-io-decls">Remove I/O declarations</a> CIF to CIF transformation removes
+them as well, but additionally also removes the other I/O declarations.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-37">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports all CIF specifications.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-34">Preprocessing</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-26">Implementation details</h6>
+<div class="paragraph">
+<p>All print and print file declarations are removed from the specification.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-23">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-25">Size considerations</h6>
+<div class="paragraph">
+<p>Since information is removed from the specification, the specification can only
+become smaller as a result of this transformation.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-27">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-remove-pos-info">Remove position information</h5>
+<div class="paragraph">
+<p>
+
+This CIF to CIF transformation removes position information from the internal
+representation of the specification.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-38">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports all CIF specifications.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-35">Preprocessing</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-27">Implementation details</h6>
+<div class="paragraph">
+<p>When performing operations on CIF specifications, the specification is first
+read from disk, and stored into memory. The internal representation
+stores position information with all objects (such as declarations,
+types, expression nodes, automata, locations, etc). The position information of
+an object includes information about the location of the object in the original
+textual source. This information is used during validation of the specification
+(i.e. type checking), when reporting errors, to indicate where in the original
+specification the error is found.</p>
+</div>
+<div class="paragraph">
+<p>
+After type checking, this information is no longer used. To make sure that
+subsequent operations, such as CIF to CIF transformations, don&#8217;t have to
+process the position information, this transformation can be applied to rid
+the specification of all position information. Applying this transformation
+may increase the performance of subsequent transformations.</p>
+</div>
+<div class="paragraph">
+<p>Applying this transformation has no effect on the actual contents of the
+specification, and does not change the effect of subsequent transformation.
+That is, it may affect the performance of subsequent transformations, but has
+no effect on the result of the subsequent transformations, as they are written
+to disk.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-24">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-26">Size considerations</h6>
+<div class="paragraph">
+<p>Since position information is removed from the specification, this
+transformation has an effect on the size of the specification as it is
+represented in memory. However, this transformation has no effect on the size
+of the specification, as far as actual content (which affects the meaning of
+the specification) is concerned.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-28">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-remove-reqs">Remove requirements</h5>
+<div class="paragraph">
+<p>
+
+
+This CIF to CIF transformation removes
+<a href="#lang-tut-extensions-synthesis-plant-req-sup">requirements</a> from the
+specification. By removing all requirements from a CIF specification with both
+<a href="#lang-tut-extensions-synthesis-plant-req-sup">plants</a> and requirements, only the
+plants remain. The resulting plants can then be <a href="#tools-chapter-mergecif">merged</a>
+with a <a href="#lang-tut-extensions-synthesis-plant-req-sup">supervisor</a> or other
+controller.</p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-39">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+<li>
+<p>Using (referring to) requirement automata or declarations from requirement
+automata from outside requirement automata.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Specifications where requirement automata or declarations declared in
+requirement automata are used (referred to) from outside requirement automata
+are not supported. By removing the requirement automata, those uses
+(references) become invalid, as the automata or declarations that are
+referenced no longer exist. For instance, consider:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg int x = switch req: case l1: 1 else 2 end;
+
+requirement automaton req:
+  location l1:
+    initial;
+    edge tau goto l2;
+
+  location l2;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>When requirement automaton <code>req</code> is removed, the <code>switch</code> expression can no
+longer refer to that automaton, or to its locations. Removing the requirements
+from this CIF specification is not supported.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-36">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-28">Implementation details</h6>
+<div class="paragraph">
+<p>Both <a href="#lang-tut-extensions-synthesis-autkind">requirement automata</a> and
+<a href="#lang-tut-extensions-synthesis-invkind">requirement invariants</a> are
+removed. Requirement invariants are removed from the top level scope of the
+specification, all groups and automata, and all locations of automata. For
+instance, consider the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">controllable add;
+
+plant automaton buffer:
+  disc int x;
+
+  plant invariant 0 &lt;= x and x &lt;= 5;
+  requirement invariant x &lt; 5;
+
+  location:
+    initial;
+    plant invariant x &gt;= 0;
+    edge add do x := x + 1;
+end
+
+requirement automaton not2:
+  location:
+    initial;
+    requirement invariant buffer.x &gt;= 0;
+    edge add when buffer.x != 2;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The result after this transformation is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">controllable add;
+
+plant automaton buffer:
+  disc int x;
+
+  plant invariant 0 &lt;= x and x &lt;= 5;
+
+  location:
+    initial;
+    plant invariant x &gt;= 0;
+    edge add do x := x + 1;
+end</code></pre>
+</div>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-25">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-27">Size considerations</h6>
+<div class="paragraph">
+<p>Since information is removed from the specification, the specification can only
+become smaller as a result of this transformation.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-29">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-simplify-others">Simplify others</h5>
+<div class="paragraph">
+<p>
+
+This CIF to CIF transformation simplifies CIF specifications, by applying
+the following non-value related simplifications:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Duplicate monitor events of automata are removed.</p>
+</li>
+<li>
+<p>Duplicate events in the alphabet are removed.</p>
+</li>
+<li>
+<p>Duplicate events on edges are removed, with the exception of duplicate sends
+for the same event, as they may send different values.</p>
+</li>
+<li>
+<p>Self-loops with a target location are simplified by removing the target
+location.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-40">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-37">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-29">Implementation details</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-26">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-28">Size considerations</h6>
+<div class="paragraph">
+<p>This transformation tries to simplify the specification, possibly reducing its
+size.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-30">Optimality</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-simplify-values">Simplify values</h5>
+<div class="paragraph">
+<p>
+
+This CIF to CIF transformation simplifies CIF specifications, by applying
+the following value-related simplifications:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Evaluation of constant (sub-)expressions. For instance, <code>1 + 1</code> is
+simplified to <code>2</code>.</p>
+</li>
+<li>
+<p>Simplification of short-circuit boolean binary operators. For instance,
+<code>true and x</code> is simplified to <code>x</code>.</p>
+</li>
+<li>
+<p>Simplification of boolean unary operators. For instance, <code>not not x</code> is
+simplified to <code>x</code>.</p>
+</li>
+<li>
+<p>Removal of default values. For instance, <code>true</code> state invariants are
+removed.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-41">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-38">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-30">Implementation details</h6>
+<div class="paragraph">
+<p>The following is a complete list of the short-circuit boolean binary operators
+that are simplified (with <code>x</code> an arbitrary boolean expression):</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Original</th>
+<th class="tableblock halign-left valign-top">Simplified</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true  and x</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x     and true</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false and x</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x     and false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true  or  x</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x     or  true</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false or  x</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x     or  false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true  =&gt;  x</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x     =&gt;  true</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false =&gt;  x</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x     =&gt;  false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not x</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true  &lt;=&gt; x</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x     &lt;=&gt; true</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false &lt;=&gt; x</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not x</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x     &lt;=&gt; false</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not x</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>The following is a complete list of the boolean unary operators that are
+simplified (with <code>x</code> and <code>y</code> two arbitrary expressions):</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Original</th>
+<th class="tableblock halign-left valign-top">Simplified</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not not x</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not(x &lt; y)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x &gt;= y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not(x &lt;= y)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x &gt;  y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not(x = y)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x != y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not(x != y)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x =  y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not(x &gt; y)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x &#8656; y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not(x &gt;= y)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x &lt;  y</code></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>not(x =&gt; y)</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>x and not y</code></p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Default values are removed in the following places:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Initialization predicates of components (including automata) and locations.</p>
+</li>
+<li>
+<p>Marker predicates of components (including automata) and locations.</p>
+</li>
+<li>
+<p>Invariants of components (including automata) and locations.</p>
+</li>
+<li>
+<p>Guards of edges.</p>
+</li>
+<li>
+<p>Guards of 'if' and 'elif' updates on edges.</p>
+</li>
+<li>
+<p>Guards of 'if' and 'elif' expressions.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Predicates that are trivially equal to the default value are removed. If a
+trivial value is found that is equal to the negation of the default value, the
+entire feature gets the non-default value. For instance, for guards on edges,
+<code>true</code>, <code>1 = 1</code>, etc, are removed as they are all trivially <code>true</code>
+(the default for guards). If however, <code>false</code>, <code>1 = 2</code>, <code>1 != 1</code>, or any
+other trivially <code>false</code> guards is found, all guards on that edge are removed,
+and a single <code>false</code> guard is added.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-27">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-29">Size considerations</h6>
+<div class="paragraph">
+<p>This transformation tries to simplify the specification, possibly reducing its
+size.</p>
+</div>
+<div class="paragraph">
+<p>All uses of constants lead to constant (sub-)expressions, and they are
+evaluated. This leads to constants being inlined. For constants with large
+literal values, this may significantly increase the size of the specification,
+especially if the constant is used more than once. For information on how to
+prevent this, see the <a href="#tools-cif2cif-chapter-simplify-values-no-refs">Simplify values (no references)</a> CIF to CIF
+transformation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-31">Optimality</h6>
+<div class="paragraph">
+<p>Not all simplifications that could potentially be performed are implemented in
+this transformation.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-simplify-values-optimized">Simplify values (optimized)</h5>
+<div class="paragraph">
+<p>
+
+This CIF to CIF transformation simplifies CIF specifications, by applying
+same value-related simplifications as the <a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a>
+CIF to CIF transformation, but with optimizations for literal expressions.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-42">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-39">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-31">Implementation details</h6>
+<div class="paragraph">
+<p>One of the simplifications that the CIF to CIF transformation to
+<a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a> performs, is the evaluation of constant
+(sub-)expressions. For large literal expressions, such as arrays with thousands
+or even millions of elements, this is expensive, without having any effect.
+For instance, consider list/array literal <code>[1, 2, 3]</code>. Evaluating the
+list/array and the integer elements, and then reconstructing the literal
+list/array expression and literal integer expressions, has no effect. The
+result is the same list/array literal as the original.</p>
+</div>
+<div class="paragraph">
+<p>This transformation detects literal expressions, and doesn&#8217;t further simplify
+them, thus greatly improving performance for large literal expressions.
+Literal expressions are detected using a static analysis. Due to using static
+analysis, some literals may not be simplified, while they would have been
+simplified if this literal detection optimization was not used. For instance,
+a set literal <code>{1, 2, 1}</code> is simplified to <code>{1, 2}</code> without optimizations,
+and is not simplified with optimizations. In this case, static analysis does
+not account for duplicate elements of the set.</p>
+</div>
+<div class="paragraph">
+<p>The following differences can be observed for literal optimization, with
+respect to not using literal optimization:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Negations of integer literals are not normalized, although this only affects
+the internal representation of negative integer values, and may not be
+externally visible to end users.</p>
+</li>
+<li>
+<p>Real literals are not normalized. For instance, <code>1e3</code> is not normalized
+to <code>1000.0</code>.</p>
+</li>
+<li>
+<p>For set literals, duplicate elements are not removed.</p>
+</li>
+<li>
+<p>For dictionary literals, duplicate keys are not removed, and the dictionary
+literal is not further simplified. Without literal optimization, duplicate
+keys would lead to an error during simplification.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-28">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-30">Size considerations</h6>
+<div class="paragraph">
+<p>This transformation tries to simplify the specification, possibly reducing its
+size.</p>
+</div>
+<div class="paragraph">
+<p>All uses of constants lead to constant (sub-)expressions, and they are
+evaluated. This leads to constants being inlined. For constants with large
+literal values, this may significantly increase the size of the specification,
+especially if the constant is used more than once. For information on how to
+prevent this, see the <a href="#tools-cif2cif-chapter-simplify-values-no-refs-optimized">Simplify values (no references, optimized)</a>
+CIF to CIF transformation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-32">Optimality</h6>
+<div class="paragraph">
+<p>Not all simplifications that could potentially be performed are implemented in
+this transformation.</p>
+</div>
+<div class="paragraph">
+<p>The optimizations for literals that are performed influence the optimality of
+the simplification, as described above.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-simplify-values-no-refs">Simplify values (no references)</h5>
+<div class="paragraph">
+<p>
+
+This CIF to CIF transformation simplifies CIF specifications, by applying
+same value-related simplifications as the <a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a>
+CIF to CIF transformation, but without simplifying reference expressions.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-43">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-40">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-32">Implementation details</h6>
+<div class="paragraph">
+<p>The CIF to CIF transformation to <a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a>,
+transforms the following specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const int x = 3;
+invariant x - 5 + 1 &gt; 0;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>into the following simplified specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const int x = 3;
+invariant false;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This transformation however, does not take the values of declarations into
+account, and thus for instance does not fill in the values of constants,
+algebraic variables, etc. Therefore, this transformation transforms that same
+specification into the following simplified specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">const int x = 3;
+invariant x - 4 &gt; 0;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This variant can be useful, as it prevents the use of constants from being
+eliminated. This makes it possible to change the value of the constant in one
+place (the one place being the declaration of the constant), and have all uses
+of that constant automatically change with it (as they still refer to the
+constant). If the value of the constant would be filled in as well, changing
+the value of the constant would be more work, as all those places where it was
+filled in, need to be replaced as well. In the above example, the issue is
+even bigger, as the result is simplified even further, eliminating the entire
+comparison to a single boolean value.</p>
+</div>
+<div class="paragraph">
+<p>Another issue related to simplification of constants, is that inlining them
+can be very expensive. If a constant has a large literal as its value, the
+large literal is inlined wherever the constant is used. This may lead to
+significantly larger specifications. Also, tools that use the resulting model
+may handle constants in a special way to ensure they are evaluated only once,
+but may not do so for large literals that occur in the middle of other
+expressions. As such, simplification/inlining of constants may significantly
+reduce performance.</p>
+</div>
+<div class="paragraph">
+<p>The reference expressions that are not simplified (filled in) include among
+others the following:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Values of constants.</p>
+</li>
+<li>
+<p>Values of discrete variables.</p>
+</li>
+<li>
+<p>Values of algebraic variables.</p>
+</li>
+<li>
+<p>Values of continuous variables.</p>
+</li>
+<li>
+<p>Values of input variables.</p>
+</li>
+<li>
+<p>Derivatives of continuous variables.</p>
+</li>
+<li>
+<p>Values of local variables of functions.</p>
+</li>
+<li>
+<p>Values of parameters of functions.</p>
+</li>
+<li>
+<p>User-defined functions.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-29">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-31">Size considerations</h6>
+<div class="paragraph">
+<p>This transformation tries to simplify the specification, possibly reducing its
+size.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-33">Optimality</h6>
+<div class="paragraph">
+<p>Not all simplifications that could potentially be performed are implemented in
+this transformation.</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-cif2cif-chapter-simplify-values-no-refs-optimized">Simplify values (no references, optimized)</h5>
+<div class="paragraph">
+<p>
+
+This CIF to CIF transformation simplifies CIF specifications, by applying
+same value-related simplifications as the <a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a>
+CIF to CIF transformation, but without simplifying reference expressions, and
+with optimizations for literal expressions.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect5">
+<h6 id="tools-supported-specifications-44">Supported specifications</h6>
+<div class="paragraph">
+<p>This transformation supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-preprocessing-41">Preprocessing</h6>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-implementation-details-33">Implementation details</h6>
+<div class="paragraph">
+<p>This CIF to CIF transformation simplifies CIF specifications, by applying
+same value-related simplifications as the
+<a href="#tools-cif2cif-chapter-simplify-values">Simplify values</a> CIF to CIF transformation.</p>
+</div>
+<div class="paragraph">
+<p>However, it does not simplifying reference expressions. For details, see the
+<a href="#tools-cif2cif-chapter-simplify-values-no-refs">Simplify values (no references)</a> CIF to CIF transformation.
+Furthermore, it simplifies with optimizations for literal expressions. For
+details, see the <a href="#tools-cif2cif-chapter-simplify-values-optimized">Simplify values (optimized)</a> CIF to CIF
+transformation.</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-renaming-30">Renaming</h6>
+<div class="paragraph">
+<p>n/a</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-size-considerations-32">Size considerations</h6>
+<div class="paragraph">
+<p>This transformation tries to simplify the specification, possibly reducing its
+size.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="tools-optimality-34">Optimality</h6>
+<div class="paragraph">
+<p>Not all simplifications that could potentially be performed are implemented in
+this transformation.</p>
+</div>
+<div class="paragraph">
+<p>The optimizations for literals that are performed influence the optimality of
+the simplification, as described above.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-chapter-mergecif">CIF merger</h4>
+<div class="paragraph">
+<p>
+
+The CIF merger can be used to merge two or more CIF specifications into a
+single CIF specification. The result of the merger is essentially the parallel
+composition of the input specifications. Unlike the
+<a href="#tools-chapter-cif-explorer">CIF explorer</a> and <a href="#tools-eventbased-chapter-product">Event-based synchronous product</a> tools
+however, the parallel composition is not unfolded into a
+<a href="#tools-cifsim-traces-state-space">state space</a>.</p>
+</div>
+<div class="paragraph">
+<p>It can for instance be useful to merge a synthesized supervisor with a timed or
+hybrid plant, to validate the supervisor against that more detailed plant,
+using interactive simulation and visualization on the merged specification.</p>
+</div>
+<div class="paragraph">
+<p>The specifications that are being merged can <a href="#tools-mergecif-shared">share</a>
+events and variables, making it possible to have
+interaction between the merged specifications.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-transformation-7">Starting the transformation</h5>
+<div class="paragraph">
+<p>The merger can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Use the Eclipse IDE to merge multiple files:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Select a <code>.cif</code> file in the 'Project Explorer' tab or
+'Package Explorer' tab by left clicking on it.</p>
+</li>
+<li>
+<p>Select additional <code>.cif</code> files by left clicking on them while pressing
+the
+<kbd>Ctrl</kbd>
+or
+<kbd>Control</kbd>
+key.</p>
+</li>
+<li>
+<p>Make sure at least two <code>.cif</code> files are selected.</p>
+</li>
+<li>
+<p>Right click one of the <code>.cif</code> files and choose
+<b class="menuref">Merge CIF specifications&#8230;&#8203;</b>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Use the Eclipse IDE to merge a single file with itself (allowed, but
+practically not that useful):</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Right click a <code>.cif</code> file in the 'Project Explorer' tab or
+'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF miscellaneous tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Merge CIF specifications&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF miscellaneous tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Merge CIF specifications&#8230;&#8203;</b></span>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Use the <code>cifmerge</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifmerge</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-options-20">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input files</em>: The absolute or relative local file system path to the
+input CIF specifications. These are the files to merge.</p>
+</li>
+<li>
+<p><em>Output file</em>: The absolute or relative local file system path to the
+merged/output CIF specification. If not specified, the output file defaults
+to <code>merged.cif</code>. If the merger is executed via the Eclipse GUI, the output
+file, if specified as a relative path (or just a file name), is resolved
+relative to the directory that contains the first input file.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-preprocessing-42">Preprocessing</h5>
+<div class="paragraph">
+<p>The following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are
+applied as preprocessing (in the given order), to increase the subset of CIF
+specifications that can be transformed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-svg-file-into-decls">Push SVG file declarations into other CIF/SVG declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-print-file-into-decls">Push print file declarations into print declarations</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If only one input file is provided to the CIF merger, essentially that single
+input file is preprocessed and written as output, without any merging taking
+place.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-example-4">Example</h5>
+<div class="paragraph">
+<p>Consider the following supervisor:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group button:
+  uncontrollable u_pushed, u_released;
+end
+
+group lamp:
+  controllable c_on, c_off;
+end
+
+group timer:
+  controllable c_start;
+  uncontrollable u_timeout;
+end
+
+supervisor automaton timed_lamp:
+  location s0:
+    initial;
+    edge button.u_pushed goto s1;
+    edge button.u_released;
+
+  location s1:
+    edge lamp.c_on goto s2;
+    edge button.u_pushed, button.u_released;
+
+  location s2:
+    edge timer.c_start goto s3;
+    edge button.u_pushed, button.u_released;
+
+  location s3:
+    edge timer.u_timeout goto s4;
+    edge button.u_pushed, button.u_released;
+
+  location s4:
+    edge lamp.c_off goto s0;
+    edge button.u_pushed, button.u_released;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>and the following timed plant:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant automaton button:
+  uncontrollable u_pushed, u_released;
+
+  location released:
+    initial;
+    edge u_pushed goto pushed;
+
+  location pushed:
+    edge u_released goto released;
+end
+
+plant automaton lamp:
+  controllable c_on, c_off;
+
+  location off:
+    initial;
+    edge c_on goto on;
+
+  location on:
+    edge c_off goto off;
+end
+
+plant automaton timer:
+  controllable c_start;
+  uncontrollable u_timeout;
+
+  cont t der 1.0;
+
+  location idle:
+    initial;
+    edge c_start do t := 0.0 goto running;
+
+  location running:
+    edge u_timeout when t &gt;= 2.0 goto idle;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Merging these two specifications results in the following merged specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant automaton button:
+  uncontrollable u_pushed;
+  uncontrollable u_released;
+  location released:
+    initial;
+    edge u_pushed goto pushed;
+  location pushed:
+    edge u_released goto released;
+end
+plant automaton lamp:
+  controllable c_on;
+  controllable c_off;
+  location off:
+    initial;
+    edge c_on goto on;
+  location on:
+    edge c_off goto off;
+end
+plant automaton timer:
+  controllable c_start;
+  uncontrollable u_timeout;
+  cont t der 1.0;
+  location idle:
+    initial;
+    edge c_start do t := 0.0 goto running;
+  location running:
+    edge u_timeout when t &gt;= 2.0 goto idle;
+end
+supervisor automaton timed_lamp:
+  location s0:
+    initial;
+    edge button.u_pushed goto s1;
+    edge button.u_released;
+  location s1:
+    edge lamp.c_on goto s2;
+    edge button.u_pushed, button.u_released;
+  location s2:
+    edge timer.c_start goto s3;
+    edge button.u_pushed, button.u_released;
+  location s3:
+    edge timer.u_timeout goto s4;
+    edge button.u_pushed, button.u_released;
+  location s4:
+    edge lamp.c_off goto s0;
+    edge button.u_pushed, button.u_released;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The supervisor specification contains three <em>skeletons</em>: groups that only
+contain event declarations, and have no behavior. The skeletons represent the
+plants of the system, which are controlled by the supervisor. The supervisor
+specification also contains a supervisor automaton, which waits for the button
+to be pushed, then turns on the lamp and start the timer, waits for the timer
+to time out, turns the lamp back off, and keeps repeating this behavior.
+Pushing or releasing the button during the cycle has no effect.</p>
+</div>
+<div class="paragraph">
+<p>The timed specification contains the same plants, with the same events, but
+here the plants are actual automata with behavior, instead of just skeleton
+groups. For the button and lamp, the events occur in alternating sequences.
+The timer has a clock that ensures that the timeout happens two time units
+after the timer is started.</p>
+</div>
+<div class="paragraph">
+<p>Since both specifications contain the same events (based on their absolute
+names), these events are merged together. This ensures that uses of those
+events become linked (or coupled), and all refer to the single merged event in
+the merged specification. This means that the events used in the supervisor are
+the same events as used the timed plant. This also means that they synchronize,
+and the supervisor thus controls the timed plants.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-mergecif-shared">Shared events and variables</h5>
+<div class="paragraph">
+<p>The example above shows how shared events can be used to link (or couple)
+multiple specifications through merging.</p>
+</div>
+<div class="paragraph">
+<p>Similarly to the way events can be merged, it is possible to merge input
+variables with other variables, as long as the types are compatible. That is,
+an input variable can be merged with another input variable, a discrete
+variable, a continuous variable, an algebraic variable, a constant, or a
+location. The input variable is then a sort of <em>skeleton</em> definition that is
+merged with an actual definition (for instance an algebraic variable), which
+defines the value.</p>
+</div>
+<div class="paragraph">
+<p>There are thus two ways for merged specifications to become linked (or
+coupled): by means of shared events and by means of shared variables (including
+constants).</p>
+</div>
+<div class="paragraph">
+<p>For further details and restrictions, see the
+<a href="#tools-mergecif-compatibility">Merge compatibility</a> section.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-mergecif-compatibility">Merge compatibility</h5>
+<div class="paragraph">
+<p>In general, objects (components, declarations, etc) that only occur in one
+of the specifications being merged, are simply copied to the merged
+specification. If in two (or more) specifications objects with the same
+absolute name are present, they need to be merged. Not all objects can be
+merged with all other objects, i.e. not all objects are <em>merge compatible</em>.
+The following table gives an overview of what can be merged:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6923%;">
+<col style="width: 7.6924%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Merge with</th>
+<th class="tableblock halign-left valign-top">Group</th>
+<th class="tableblock halign-left valign-top">Automaton</th>
+<th class="tableblock halign-left valign-top">Event</th>
+<th class="tableblock halign-left valign-top">Input var</th>
+<th class="tableblock halign-left valign-top">Discrete var</th>
+<th class="tableblock halign-left valign-top">Continuous var</th>
+<th class="tableblock halign-left valign-top">Algebraic var</th>
+<th class="tableblock halign-left valign-top">Constant</th>
+<th class="tableblock halign-left valign-top">Location</th>
+<th class="tableblock halign-left valign-top">Type declaration</th>
+<th class="tableblock halign-left valign-top">Enumeration</th>
+<th class="tableblock halign-left valign-top">Enumeration literal</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Group</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Automaton</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Event</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Input var</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Discrete var</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Continuous var</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Algebraic var</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Constant</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Location</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Type declaration</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Enumeration</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Enumeration literal</strong></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>For components (i.e. groups and automata) that are present in more than one
+specification, the contents are recursively merged into a single component.
+The contents of components consists not only of their declarations (such as
+events) and their sub-components (for groups), but also of their invariants,
+initialization predicates, marker predicates, equations, locations
+(for automata), etc.</p>
+</div>
+<div class="paragraph">
+<p>As the button/lamp example above shows, automata can be merged with groups
+(often acting as skeletons), resulting in an automaton with the contents of
+the group merged into it. Since automata can&#8217;t contain sub-components and
+user-defined functions, groups with sub-components and/or user-defined
+functions can not be merged with automata.</p>
+</div>
+<div class="paragraph">
+<p>Groups can also be merged with other groups. Automata however can not be merged
+with other automata, as that may lead to the merge of conflicting behavioral
+specifications.</p>
+</div>
+<div class="paragraph">
+<p>Events can be merged with other events. Each event must then either be a
+channel in all of the specifications in which it occurs, or in none of them.
+If it is a channel, the data type must be exactly the same in all
+specifications in which it is declared. Events that have different
+controllability in different specifications, can also not be merged.</p>
+</div>
+<div class="paragraph">
+<p>Constants can be merged with other constants. However, the constants must then
+have the exact same type and value in all the specifications in which they
+occur. This restriction prevents the merge of conflicting values. Due to this
+restriction, constants that have a type of which the values can not be compared
+for equality (e.g. function types), are not supported (can not be merged).</p>
+</div>
+<div class="paragraph">
+<p>As mentioned in the <a href="#tools-mergecif-shared">Shared events and variables</a> section, an input variable can
+be merged with another input variable, discrete variable, continuous variable,
+algebraic variable, constant, or location. Input variables can only be merged
+with other objects that have the exact same type.</p>
+</div>
+<div class="paragraph">
+<p>A location can be merged with an input variable that has a boolean type. The
+input variable is then a placeholder for the location, indicating whether the
+location is the current location of its automaton.</p>
+</div>
+<div class="paragraph">
+<p>It is not allowed to merge two algebraic variables, two discrete variables, or
+two continuous variables, as that may lead to the merge of conflicting values.</p>
+</div>
+<div class="paragraph">
+<p>In general, only one of the specifications defines the variable as a concrete
+variable that defines a value (e.g. as a discrete, continuous, or algebraic
+variable). All the other specifications that have that same variable must
+declare it as an input variable (essentially a <em>placeholder</em>). It is however
+allowed to merge two or more constants with the same type and the same value.</p>
+</div>
+<div class="paragraph">
+<p>Type declarations can be merged with other type declarations, as long as they
+have the exact same type.</p>
+</div>
+<div class="paragraph">
+<p>Enumerations can be merged with other enumerations, as long as they are
+compatible. Two enumerations are compatible if they have the same number of
+literals, with the exact same names, in the same order.</p>
+</div>
+<div class="paragraph">
+<p>Enumeration literals can only be merged as the result of the enumerations of
+which they are a part being merged. Merging two literals from different
+enumerations (which then have different names) is not supported.</p>
+</div>
+<div class="paragraph">
+<p>Type declarations and enumerations can be merged, as long as the type of the
+type declaration is compatible with the enumeration.</p>
+</div>
+<div class="paragraph">
+<p>User-defined functions can never be merged with other objects of the same name.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-invariants-2">Invariants</h5>
+<div class="paragraph">
+<p>Merging a group with an automaton, may change the supervisory kinds of the
+invariants of the group. For instance, consider the following CIF
+specifications:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">group x:
+  input int y;
+  invariant y = 1;
+end</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant automaton x:
+  disc int y;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>When merged, this leads to the following CIF specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">plant automaton x:
+  disc int y;
+  invariant y = 1;
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In the original group <code>x</code>, the invariant did not have a supervisory kind.
+After merging, the invariant still does not specify a supervisory kind.
+However, since it is now specified in an automaton <code>x</code> of kind <code>plant</code>, the
+invariant <a href="#lang-tut-extensions-synthesis-invkind-implicit">implicitly</a>
+becomes a plant invariant as well.</p>
+</div>
+<div class="paragraph">
+<p>When an invariant gets an implicit supervisory kind as a result of merging,
+the merge tool prints a warning to the console.</p>
+</div>
+<div class="paragraph">
+<p>To get rid of the warning, the invariant in group <code>x</code> can be declared
+explicitly as being a <code>plant</code> invariant. The supervisory kind then matches
+the supervisory kind of automaton <code>x</code>. When the group and automaton are
+merged, the invariant keeps its explicit supervisory <code>plant</code> kind. The merge
+result is thus the same as the earlier merge result, as in both cases the
+invariant in the merged specification is interpreted as a print invariant.
+However, in this last case, no warning is printed to the console.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-merge-problems">Merge problems</h5>
+<div class="paragraph">
+<p>Even when two or more CIF specifications are merge compatible, as described
+above, the resulting merged CIF specification can still be invalid. In such
+cases, merging fails. For instance, consider the following two CIF
+specifications:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">input int x;
+alg int y = x;</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg int x = y;
+input int y;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Merging them would result in:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-cif" data-lang="cif">alg int x = y;
+alg int y = x;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>But this merged specification is invalid, as <code>x</code> is defined in terms of
+<code>y</code>, which is defined in terms of <code>x</code>, leading to a loop (definition/use
+cycle).</p>
+</div>
+<div class="paragraph">
+<p>Another example of merge problems is two CIF specifications that have SVG
+output mappings for the same SVG element id and attribute, for the same SVG
+image file. In the individual CIF specifications there are no duplicate output
+mappings, but in the merged specification there are.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-chapter-event-disabler">CIF event disabler</h4>
+<div class="paragraph">
+<p>
+
+The CIF event disabler tool can be used to disable certain events of a CIF
+specification, or even to disable events not currently present in a CIF
+specification. The tool has various <a href="#tools-event-disabler-options">options</a> that can be used to control the working of the
+tool, and influence its output.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-event-disabler-usage-scenario">Usage scenario</h5>
+<div class="paragraph">
+<p>Assume a system with some sensors and actuators. From the view of the
+supervisor (or controller in general), the sensors are uncontrollable, and the
+actuators are controllable. Now assume a controller is being designed for this
+system, and it is to be merged with a simulation model of the uncontrolled
+system, that is being designed as well.</p>
+</div>
+<div class="paragraph">
+<p>The situation may arise that the controller only controls a part of the
+uncontrolled system. This may for instance be the case if the designer of the
+controller starts with a small controller and incrementally extends it to cover
+more and more functionality of the system. The designer may have already made
+a full simulation model of the uncontrolled system beforehand. Alternatively,
+if one designer develops the controller and another develops the simulation
+model of the uncontrolled system, the simulation model may be finished well
+before the controller for the entire system is finished.</p>
+</div>
+<div class="paragraph">
+<p>A problem arises when a controller that controls only part of the system, is
+merged with a simulation model of the entire uncontrolled system. In the
+uncontrolled system, the actuators can usually be turned on and off
+arbitrarily, as they are not yet controlled in any way. If the controller
+doesn&#8217;t control certain actuators, the behavior of those actuators is not
+restricted, and during simulation the events to turn the actuators on and off
+can happen at any time. Events are urgent, that is, they take precedence over
+passage of time, and thus happen 'immediately'. Events that are always enabled
+thus prevent passage of time. The simulation will turn the actuators on, off,
+on again, off again, etc.</p>
+</div>
+<div class="paragraph">
+<p>To solve this problem, the controllable events of the uncontrolled system that
+are not restricted in any way by the controller need to be disabled. The CIF
+event disabler tool makes this possible.</p>
+</div>
+<div class="paragraph">
+<p>This is however not the only usage scenario. The same controller may be used
+for implementation. For the implementation, a mapping from events to variables
+that represent the I/O ports may be needed. This mapping could be a CIF
+specification, with an automaton that performs the mapping. Similar to having
+a complete simulation model, a complete mapping specification for the
+implementation may be available. If in such mappings the actuator events are
+always enabled, this may lead to similar problems as for the simulation, if
+the controller only controls part of the system. Here too, the event disabler
+can be used to restrict such actuator events from causing trouble.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-tool">Starting the tool</h5>
+<div class="paragraph">
+<p>The tool can be started in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In Eclipse, right click a <code>.cif</code> file in the 'Project Explorer' tab
+or 'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF miscellaneous tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Disable events of CIF specification&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>In Eclipse, right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF miscellaneous tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Disable events of CIF specification&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifevtdis</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifevtdis</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-supported-specifications-45">Supported specifications</h5>
+<div class="paragraph">
+<p>The event disabler supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Component definitions and component instantiations are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-preprocessing-43">Preprocessing</h5>
+<div class="paragraph">
+<p>No preprocessing is currently performed by this CIF to CIF transformation. To
+increase the subset of specifications that can be transformed, apply the
+following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> (in the
+given order):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-event-disabler-options">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, this application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file</em>: The absolute or relative local file system path to the
+input CIF specification. If we relate this to the above
+<a href="#tools-event-disabler-usage-scenario">usage scenario</a>, the input file should be the
+controller that only controls part of the system.</p>
+</li>
+<li>
+<p><em>Output file</em>: The absolute or relative local file system path to the
+output CIF specification. If not specified, defaults to the input file
+path, where the <code>.cif</code> file extension is removed (if present), and a
+<code>.disabled.cif</code> file extension is added.</p>
+</li>
+<li>
+<p><em>Event names</em>: The absolute names of the events. How these supplied events
+are used depends on the <em>Event usage</em> option. Multiple events may be
+specified, separated by commas and/or spaces.</p>
+</li>
+<li>
+<p><em>Event names file</em>: The absolute or relative local file system path of a file
+with the absolute names of the events. How these supplied events are used
+depends on the <em>Event usage</em> option. Multiple events may be specified in the
+file, on separate lines. Empty lines are ignored. Lines starting with a <code>#</code>
+character are ignored as well, and can thus be used to add comments.</p>
+</li>
+<li>
+<p><em>SVG input events</em>: Enable this option to use the SVG input events. How the
+events are used depends on the <em>Event usage</em> option.</p>
+</li>
+<li>
+<p><em>Event usage</em>: This option can be used to specify how the supplied events are
+to be used. That is, it specifies which events to disable. See the
+<a href="#tools-event-disabler-spec-evts-to-disable">Specifying the events to disable</a> section for more
+information.</p>
+</li>
+<li>
+<p><em>Include input specification</em>: Should the output file contain only the new
+automaton that is created to disable the events, or should it include the
+input specification as well? See the
+<a href="#tools-event-disabler-output">Output</a> section for more information.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>At least one of the <em>Event names</em>, <em>Event names file</em>, or <em>SVG input events</em>
+options must be used to supply events to the tool. It is allowed to use
+multiple of these options, to combine events from multiple sources, and supply
+all of them to the tool.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-event-disabler-spec-evts-to-disable">Specifying the events to disable</h5>
+<div class="paragraph">
+<p>The <em>Event names</em>, <em>Event names file</em>, and <em>SVG input events</em> options can be
+used to supply events to the tool. How these events are used (or interpreted)
+depends on the <em>Event usage</em> option. Several alternatives are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Disable the supplied events, regardless of the alphabet of the input
+specification (<code>disable</code>)</p>
+</li>
+<li>
+<p>Disable all supplied events, that are not in the alphabet of the input
+specification (<code>alphabet</code>)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The texts between parentheses at the end of the alternatives indicate the
+command line option values that correspond with the alternatives. The default
+is <code>alphabet</code>.</p>
+</div>
+<div class="paragraph">
+<p>The most straightforward alternative is to manually specify the events to
+<code>disable</code> (the first alternative in the above list). The supplied events are
+then disabled.</p>
+</div>
+<div class="paragraph">
+<p>Manually specifying the events to disable can be cumbersome. Especially if the
+controller is developed incrementally, this can be a burden. The more events
+the controller does restrict, the less events should be disabled using the
+event disabler. In this case it may be easier to list the controllable events
+of the uncontrolled system that the controller may or may not restrict. That
+is, the <code>alphabet</code> (the second alternative in the above list) of controllable
+events of the uncontrolled system is specified. Supplied events that are not
+in the alphabet of any of the automata of the input specification, are
+disabled.</p>
+</div>
+<div class="paragraph">
+<p>The following table summarizes which events get disabled by the tool:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+<col style="width: 25%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Event usage</th>
+<th class="tableblock halign-left valign-top">Event supplied</th>
+<th class="tableblock halign-left valign-top">Event in alphabet</th>
+<th class="tableblock halign-left valign-top">Event is disabled by tool</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">disable</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes/no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">disable</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes/no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">alphabet</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">alphabet</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">alphabet</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">yes/no</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">no</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-event-disabler-output">Output</h5>
+<div class="paragraph">
+<p>If the <em>Include input specification</em> option is enabled, the output
+specification is a copy of the input specification, which is then modified to
+disable certain events. For events that are disabled by the tool, but did not
+exist in the input specification, an event declaration is added. If the option
+is disabled, the output specification starts empty. For all events are
+disabled, an event declaration is added. Event declarations are added in
+their proper scopes, based on their absolute names, by adding groups around
+them as needed.</p>
+</div>
+<div class="paragraph">
+<p>
+
+By default, the <em>Include input specification</em> option is disabled. This ensures
+that the output specification is small. The typical scenario is to merge the
+input specification, event disabler output specification, and simulation model
+together using the <a href="#tools-chapter-mergecif">CIF merger</a> tool. Disabling the <em>Include input
+specification</em> specification option then gives the best performance for the
+tool chain.</p>
+</div>
+<div class="paragraph">
+<p>If any events are disabled by the tool, a new automaton is created, and this
+automaton is added to the output specification. The automaton is named
+<code>event_disabler</code>, but may be renamed if it conflicts with an already existing
+object with the same name. The automaton has no supervisory kind, and has the
+disabled events as alphabet. It has a single nameless location, with a single
+self loop for all of the events that are disabled. The guard of the self
+loop is <code>false</code>, which results in the events being globally disabled.</p>
+</div>
+<div class="paragraph">
+<p>If the <em>Include input specification</em> option is enabled, and events are disabled
+that did not exist in the input specification, event declarations are added to
+the output specification for those events. If the <em>Include input specification</em>
+option is disabled, event declarations are added for all events that are
+disabled. Event declarations that are added and existed in the input
+specification (in case the <em>Include input specification</em> option is disabled),
+inherit their controllability from the input specification. All other events
+that are added are declared as controllable events if their name starts with
+<code>c_</code>, are declared as uncontrollable events if their name starts with <code>u_</code>,
+and are declared as neither controllable nor uncontrollable otherwise.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-chapter-cif-explorer">CIF explorer</h4>
+<div class="paragraph">
+<p>
+
+
+
+
+The CIF explorer unfolds the state space expressed by a CIF specification, in
+an untimed setting. It takes a CIF model and iteratively explores the states
+using event transitions, unfolding the state space. Available output forms
+include a CIF automaton of the state space, and a report with details of the
+found states. Time transitions are never taken. The explorer will return a
+deadlock state when forced into a time step. Continuous variables are allowed,
+but behave much like discrete variables due to lack of time steps.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="tools-starting-the-program">Starting the program</h5>
+<div class="paragraph">
+<p>The explorer can be started in Eclipse in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Right click a <code>.cif</code> file in the 'Project Explorer' tab or
+'Package Explorer' tab and choose
+<span class="menuseq"><b class="menu">CIF miscellaneous tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Explore untimed state space&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Right click an open text editor for a <code>.cif</code> file and choose
+<span class="menuseq"><b class="menu">CIF miscellaneous tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Explore untimed state space&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Use the <code>cifexplorer</code> tool in a
+ToolDef script. See the
+<a href="#tools-scripting-chapter-intro">scripting documentation</a> and
+<a href="#tools-scripting-chapter-tools">tools overview</a> page for details.</p>
+</li>
+<li>
+<p>Use the <code>cifexplorer</code> command line tool.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-options-21">Options</h5>
+<div class="paragraph">
+<p>Besides the general application options, the application has the following
+options:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Input file path</em>: The absolute or relative file system path to the input
+CIF specification.</p>
+</li>
+<li>
+<p><em>Enable edge minimization</em>: Enable edge minimization to remove duplicate
+edges of the state space, before printing statistics, and writing output
+files. Two edges are duplicates if they have the same source and target
+states, and the same event. The communication value, if any, is ignored.
+Enabled by default.</p>
+</li>
+<li>
+<p><em>Enable statistics</em>: Enable printing of statistics of the resulting state
+space to the console. Statistics include the number of states and the number
+of edges of the resulting state space. It is recommended to enable the
+edge minimization option when printing statistics. Enabled by default.</p>
+</li>
+<li>
+<p><em>Enable CIF output</em>: Enable output of states and edges as a CIF automaton.
+Enabled by default.</p>
+</li>
+<li>
+<p><em>Output file path</em>: The absolute or relative file system path of the output
+CIF specification with the generated state space as a CIF automaton.</p>
+</li>
+<li>
+<p><em>Name</em>: The name of the resulting statespace automaton. If not specified, it
+defaults to <code>statespace</code>. If the resulting statespace automaton has a name
+that conflicts with an existing declaration, it is automatically renamed to
+have a non-conflicting name.</p>
+</li>
+<li>
+<p><em>Enable report</em>: Enable writing a detailed report on the found states.
+Disabled by default.</p>
+</li>
+<li>
+<p><em>Report file path</em>: The absolute or relative file system path of the report
+file. If specified, option <em>Enable report</em> is implied.</p>
+</li>
+<li>
+<p><em>Print progress</em>: The number of states to process before printing progress
+information. Must be a non-negative integer number. May be <code>off</code> to disable
+progress information. The default is to print progress information after
+processing 1000 states.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The CIF output file is written if the <em>Enable CIF output</em> option is set, or if
+a path is supplied with the <em>Output file path</em> option. If the latter is given,
+its value is used as the path for writing the report file. If only the
+<em>Enable CIF output</em> option is set, the value of the <em>Input file path</em> option is
+used, where the <code>.cif</code> extension is removed (if present), and
+a <code>_statespace.cif</code> suffix is added.</p>
+</div>
+<div class="paragraph">
+<p>The report file is written if the <em>Enable report</em> option is set, or if a path
+is supplied with the <em>Report file path</em> option. If the latter is given, its
+value is used as the path for writing the report file. If only the
+<em>Enable report</em> option is set, the value of the <em>Input file path</em> option is
+used, where the <code>.cif</code> extension is removed (if present), and
+a <code>_report.txt</code> suffix is added.</p>
+</div>
+<div class="paragraph">
+<p>If both the CIF output and the report file output are disabled, the resulting
+state space is not outputted at all. In such cases, the state space explorer
+acts as a verifier for runtime errors, which can make the exploration fail.
+If exploration completes without errors, the explorer has verified that no
+runtime errors occur. Runtime errors include failures to compute values, such
+as division by zero, as well as assignments that assign values to variables
+that are outside the allowed bounds/ranges of the variables.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-supported-specifications-46">Supported specifications</h5>
+<div class="paragraph">
+<p>The explorer supports a subset of CIF specifications. The following
+restrictions apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Usage of distribution types and distribution standard library functions is
+not supported.</p>
+</li>
+<li>
+<p>Usage of derivatives is not supported.</p>
+</li>
+<li>
+<p>External user-defined functions are not supported.</p>
+</li>
+<li>
+<p>Input variables are not supported.</p>
+</li>
+<li>
+<p>Specifications with more than 2<sup>31</sup> - 1 = 2,147,483,647 potential
+initial states are not supported.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following information from the specification is ignored:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Automaton and invariant supervisory kinds.</p>
+</li>
+<li>
+<p>Controllability of events.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-preprocessing-44">Preprocessing</h5>
+<div class="paragraph">
+<p>Prior to exploration, the following <a href="#tools-cif2cif-chapter-index">CIF to CIF transformations</a> are applied as preprocessing (in the given order), to
+increase the subset of CIF specifications that can be explored:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#tools-cif2cif-chapter-remove-io-decls">Remove I/O declarations</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-comp-def-inst">Eliminate component definition/instantiation</a></p>
+</li>
+<li>
+<p><a href="#tools-cif2cif-chapter-elim-self">Eliminate automaton <code>self</code> references</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In addition it applies the
+<a href="#tools-cif2cif-chapter-simplify-values-no-refs-optimized">Simplify values (no references, optimized)</a> CIF to CIF
+transformation to speed up processing.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tools-scripting">Scripting</h3>
+<div class="sect3">
+<h4 id="tools-scripting-chapter-intro">Introduction to scripting</h4>
+<div class="paragraph">
+<p>All CIF <a href="#tools-chapter-index">tools</a> can be used in
+ToolDef scripts. ToolDef is a
+cross-platform and machine-independent scripting language that supports command
+line execution, but is also available as plug-in for
+<a href="https://eclipse.org">Eclipse</a>, providing an integrated development
+experience. See the <a href="https://eclipse.org/escet/tooldef">ToolDef website</a> for
+more information on ToolDef.</p>
+</div>
+<div class="sect4">
+<h5 id="tools-scenarios">Scenarios</h5>
+<div class="paragraph">
+<p>Using CIF tools in a ToolDef script can be useful for various reasons.</p>
+</div>
+<div class="paragraph">
+<p>Scripts allow executing multiple tools, one after the other, for instance to
+perform <a href="#tools-chapter-datasynth">data-based synthesis</a> on some sub-systems,
+<a href="#tools-chapter-mergecif">merge</a> the resulting supervisors, and
+<a href="#tools-cif2plc-chapter-index">generate PLC code</a> from it. Once a script is made,
+these steps can be easily repeated whenever the models for the sub-systems
+change. This is much easier than starting each of the tools manually, and saves
+valuable time. Furthermore, it is possible to share your script with others,
+who can then perform the same steps, and get the same results.</p>
+</div>
+<div class="paragraph">
+<p>A script can also be used to execute a single tool, specifying the parameters
+used when executing it. For instance, a script could execute the simulator,
+specifying not only which model (file) to simulate, but also the simulation
+options. If various <a href="#tools-cifsim-output-chapter-index">visualizations</a> are
+enabled, variables are <a href="#tools-cifsim-output-plotviz-filtering">filtered</a>,
+etc, manually configuring the options for each simulation can become tiresome.
+By specifying them in a script, simulating again with the same options becomes
+as simple as executing the script again. By sharing such a script with others,
+they can simulate the same model with the same options.</p>
+</div>
+<div class="paragraph">
+<p>Another use of scripts is to repeatedly execute the same tool, but with
+different parameters. A good example is
+<a href="#tools-cifsim-chapter-repeated-simulation">repeatedly simulating</a> a model.
+Instead of manually simulating a model with
+<a href="#tut-stochastics-chapter-intro">stochastics</a> hundreds or even thousands of
+times, which can be very time consuming, a script can be used to automate this
+task. The script can then also be used to automatically collect the results,
+and process them. Others can use the same script to repeat the experiments and
+verify the results, or to perform similar experiments.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-library-import">Library import</h5>
+<div class="paragraph">
+<p>In order to use CIF tools in a ToolDef script, the library with all CIF
+tools needs to be imported. The import statement to use is:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">from "lib:cif" import *;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This statement imports all tools from the <code>cif</code> library, a library
+registered by the CIF tooling. You&#8217;ll want to include this import statement
+in all your own scripts that use CIF tools.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-execution-a-tool">Execution a tool</h5>
+<div class="paragraph">
+<p>Here is a simple example of a ToolDef script that simulates a model using the
+<a href="#tools-cifsim-chapter-index">CIF simulator</a>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">from "lib:cif" import *;
+
+cifsim("some_model.cif -i auto -t 10");</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The second statement executes the <code>cifsim</code> tool (the CIF simulator). This
+is just one of the tools that is available, but there are
+<a href="#tools-scripting-chapter-tools">many more</a>.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-command-line-arguments">Command line arguments</h5>
+<div class="paragraph">
+<p>Command line arguments can be used to let a tool know on which files it should
+operate, and what options it should use. The example above uses
+<code>"some_model.cif -i auto -t 10"</code> as arguments, consisting of the model to
+simulate (the <code>some_model.cif</code> file) and some simulation options
+(<a href="#tools-cifsim-input-chapter-automatic">automatic simulation</a> due to
+<code>-i auto</code>, and a simulation
+<a href="#tools-cifsim-termination-endtime">end time</a> of 10 time units due to
+<code>-t 10</code>).</p>
+</div>
+<div class="paragraph">
+<p>The command line options to use in ToolDef, are identical to the command line
+options to use for command line scripts, in a
+shell or command window. The CIF documentation generally refers to command line
+arguments or command line options, which can thus be used on the actual command
+line, as well as in ToolDef scripts.</p>
+</div>
+<div class="paragraph">
+<p>The command line arguments that are available are different for each tool. All
+CIF tools have <code>-h</code> and <code>--help</code> command line arguments that can be used
+to print the application help text to the console. The help text contains
+detailed information on all the command line arguments supported by the tool.
+Here is an example of how to show the help text for the simulator:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">from "lib:cif" import *;
+
+cifsim("-h");</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This information can also be seen in the option dialog:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/scripting/option_dialog_cmdline_help.png" alt="option dialog cmdline help">
+</div>
+</div>
+<div class="paragraph">
+<p>The option dialog shows the same help text as the command line <code>--help</code> and
+<code>-h</code> options. In this screenshot, you can see the help text of the
+<code>--end-time</code> or <code>-t</code> option. This particular option can also be configured
+using the option dialog. It is part of the
+<b class="menuref">Simulator</b>
+category:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./tools/scripting/option_dialog_cmdline_link.png" alt="option dialog cmdline link">
+</div>
+</div>
+<div class="paragraph">
+<p>There, it is listed as
+<b class="menuref">Simulator end time</b>
+option. After that name,
+the command line names of the option (<code>--end-time</code> and <code>-t</code>) are also
+listed. This makes it easier to link options in the option dialog with command
+line options.</p>
+</div>
+<div class="paragraph">
+<p>In the example ToolDef scripts so far, all command line arguments are provided
+as a single string of text. However, it is also possible to provide each
+command line argument as a separate string. In fact, you may provide as many
+strings as you like, and each string may contain as many command line arguments
+as you like. For instance, the following statements each execute the simulator,
+and all have the same command line arguments, but provided in a different way:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">cifsim("some_model.cif -i auto -t 10");       // Single string, all arguments.
+cifsim("some_model.cif", "-i auto", "-t 10"); // Multiple strings, multiple arguments each.
+cifsim("some_model.cif", "-i", "auto", "-t", "10"); // Multiple strings, one argument each.</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For simulations, disabling a certain simulation option is a common task. By
+listing each simulation option on a separate line of the script, disabling or
+enabling a simulation option becomes as easy as commenting or uncommenting a
+line of the script. For instance, consider the following script:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">from "lib:cif" import *;
+
+cifsim(
+    "some_model.cif",
+    "-i auto",
+    "-t 10",
+);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The model to simulate, the enabling of the automatic input mode, and the
+simulation end time, are each specified on a separate line. This makes it very
+easy to disable the simulation end time:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">from "lib:cif" import *;
+
+cifsim(
+    "some_model.cif",
+    "-i auto",
+    // "-t 10",
+);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>To comment a line or multiple selected lines in a ToolDef text editor, use
+keyboard shortcut <span class="keyseq"><kbd>Ctrl</kbd>+<kbd>/</kbd></span> or the corresponding toolbar button
+(<span class="image"><img src="./tools/scripting/comment.png" alt="comment"></span>). For uncommenting, use keyboard shortcut
+<span class="keyseq"><kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>/</kbd></span> or the corresponding toolbar button
+(<span class="image"><img src="./tools/scripting/uncomment.png" alt="uncomment"></span>).</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-output-redirection-and-other-options">Output redirection and other options</h5>
+<div class="paragraph">
+<p>Besides the application specific options that can be configured using the
+command line arguments, all tools such as the <code>cifsim</code> tool, have some
+additional options. This includes the possibility to write the output of the
+tool to a file instead of the console:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">from "lib:cif" import *;
+
+cifsim("some_model.cif -i auto -t 10", stdout="output.txt");</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <code>stdout</code> parameter of the <code>cifsim</code> tool is used to specify the
+filename of the file to which to write the output. A complete list of the
+available parameters and their meaning, is available on the
+<a href="#tools-scripting-chapter-tools">Overview of scriptable tools</a> page.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="tools-scripting-chapter-tools">Overview of scriptable tools</h4>
+<div class="paragraph">
+<p>This page provides an overview of the CIF tools that are available in the
+<code>cif</code> library that is registered with ToolDef by CIF.</p>
+</div>
+<div class="sect4">
+<h5 id="tools-tools">Tools</h5>
+<div class="paragraph">
+<p>The following table shows the relation between the names of the ToolDef tools
+in the library and the tools of the CIF tool set:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">ToolDef tool name</th>
+<th class="tableblock halign-left valign-top">CIF tool</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cif2yed</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-chapter-cif2yed">CIF to yEd transformer</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifdatasynth</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-chapter-datasynth">Data-based supervisory controller synthesis</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cif2supremica</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-chapter-cif2supremica">CIF to Supremica transformer</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifsim</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cifsim-chapter-index">CIF simulator</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cif2mcrl2</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-chapter-cif2mcrl2">CIF to mCRL2 transformer</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cif2uppaal</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-chapter-cif2uppaal">CIF to UPPAAL transformer</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifcodegen</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-codegen-chapter-index">CIF code generator</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cif2plc</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cif2plc-chapter-index">CIF PLC code generator</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cif2cif</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-cif2cif-chapter-index">CIF to CIF transformer</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifmerge</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-chapter-mergecif">CIF merger</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifevtdis</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-chapter-event-disabler">CIF event disabler</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifexplorer</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-chapter-cif-explorer">CIF explorer</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifprod</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-product">Event-based synchronous product</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifsupsynth</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-supervisorsynthesis">Event-based supervisor synthesis</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifsynthanalys</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-synthesis-analysis">Event-based synthesis analysis</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifncchk</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-nonconflicting-check">Event-based nonconflicting check</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifctrlchk</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-controllability-check">Event-based controllability check</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>ciflngeqv</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-language-equivalence-check">Event-based language equivalence check</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifnfadfa</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-nfa-to-dfa">Event-based NFA to DFA automaton conversion</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifdfamin</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-dfa-minimization">Event-based DFA minimization</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifproj</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-projection">Event-based automaton projection</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifobschk</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-observer-check">Event-based observer check</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cifabstr</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-automaton-abstraction">Event-based automaton abstraction</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>ciftrimchk</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-trim-check">Event-based trim check</a></p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>ciftrim</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#tools-eventbased-chapter-trim">Event-based trim</a></p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect4">
+<h5 id="tools-parameters">Parameters</h5>
+<div class="paragraph">
+<p>For every CIF tool, two ToolDef tool variants are available in the <code>cif</code>
+ToolDef library. All the CIF tools in the <code>cif</code> ToolDef library have
+the same tool signatures, including the same parameters. Only their names
+differ. Below the tool signatures for the two variants are listed, with
+<code>toolname</code> instead of the actual tool name (e.g. <code>cifsim</code>):</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int toolname(
+            string... args,
+            string stdin = "-",
+            string stdout = "-",
+            string stderr = "-",
+            bool appendOut = false,
+            bool appendErr = false,
+            bool errToOut = false,
+            bool ignoreNonZeroExitCode = false
+)
+
+tool int toolname(
+            list string args = [],
+            string stdin = "-",
+            string stdout = "-",
+            string stderr = "-",
+            bool appendOut = false,
+            bool appendErr = false,
+            bool errToOut = false,
+            bool ignoreNonZeroExitCode = false
+)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The meaning of each of the parameters is as follows:</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1">args</dt>
+<dd>
+<p>The command line arguments of the application. Each argument string is parsed
+to zero or more actual arguments. It is possible to use a single string with
+all arguments (where the arguments themselves are separated by spaces), comma
+separated strings for each of the arguments (each string has one argument),
+or a mix of those.</p>
+<div class="paragraph">
+<p>In argument strings, individual arguments are separated by whitespace
+(spaces, tabs, new lines, etc). The whitespace itself is ignored, and only
+serves as separation. To include whitespace in an argument, the argument (or
+a part of it), may be quoted, by putting it between double quotes (<code>"</code>) or
+single quotes (<code>'</code>). Characters may be escaped by prefixing them with a
+backslash (<code>\</code>). This is particularly useful for single/double quotes, and
+escape characters, and can also be used to escape spaces. Escapes work the
+same inside of quoted parts as they do outside of quoted parts.</p>
+</div>
+</dd>
+<dt class="hdlist1">stdin</dt>
+<dd>
+<p>Specify whether to have a standard input (stdin) stream and where the input
+comes from. Use <code>""</code> to not have a stdin stream, "-" to use the stdin
+stream of the ToolDef interpreter, or otherwise an absolute or relative local
+file system path of the file from which to read the standard input. May
+contain both <code>\</code> and <code>/</code> as path separators</p>
+</dd>
+<dt class="hdlist1">stdout</dt>
+<dd>
+<p>Specify whether to have a standard output (stdout) stream and where to write
+the standard output. Use <code>""</code> to not have a stdout stream, <code>"-"</code> to use
+the stdout stream of the ToolDef interpreter, or otherwise an absolute or
+relative local file system path of the file to which to write the standard
+output. May contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1">stderr</dt>
+<dd>
+<p>Specify whether to have a standard error (stderr) stream and where to write
+the standard error output. Use <code>""</code> to not have a stderr stream, <code>"-"</code>
+to use the stderr stream of the ToolDef interpreter, or otherwise an absolute
+or relative local file system path of the file to which to write the standard
+error output. May contain both <code>\</code> and <code>/</code> as path separators. Is ignored
+when the standard error stream is redirected to the standard output stream.</p>
+</dd>
+<dt class="hdlist1">appendOut</dt>
+<dd>
+<p>Whether to append to the stdout file (<code>true</code>) or overwrite it (<code>false</code>).
+Is ignored when standard output is not written to a file.</p>
+</dd>
+<dt class="hdlist1">appendErr</dt>
+<dd>
+<p>Whether to append to the stderr file (<code>true</code>) or overwrite it (<code>false</code>).
+Is ignored if standard error output is not written to a file. Is also ignored
+when standard error stream is redirected to the standard output stream.</p>
+</dd>
+<dt class="hdlist1">errToOut</dt>
+<dd>
+<p>Whether to redirect the standard error stream to the standard output stream
+(<code>true</code>) or use separate streams (<code>false</code>).</p>
+</dd>
+<dt class="hdlist1">ignoreNonZeroExitCode</dt>
+<dd>
+<p>Whether to ignore non-zero exit codes (<code>true</code>) or consider them as errors
+(<code>false</code>).</p>
+</dd>
+</dl>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-return-value">Return value</h5>
+<div class="paragraph">
+<p>All the tools return an integer value. This value is the exit code of the
+application. A zero (<code>0</code>) exit code means the application terminated without
+any errors. A non-zero exit code means the application terminated with an
+error.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="tools-implementation">Implementation</h5>
+<div class="paragraph">
+<p>All the tools are internally implemented using the ToolDef <code>app</code> tool.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="examples-chapter-index">CIF examples</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>CIF ships with several examples. To obtain these examples, follow these steps:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Start the Eclipse ESCET IDE.</p>
+</li>
+<li>
+<p>Click <span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">New</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Example&#8230;&#8203;</b></span>.</p>
+</li>
+<li>
+<p>Select <em>CIF Examples</em> and click <b class="button">Next</b>.</p>
+</li>
+<li>
+<p>Choose the name of the new project that will be created.</p>
+</li>
+<li>
+<p>Choose a location for the new project, on your hard disk. If you leave the
+<em>Use default location</em> option enabled, the new project will be created in
+workspace directory. See the Eclipse ESCET documentation for more
+information on workspaces.</p>
+</li>
+<li>
+<p>Click <b class="button">Finish</b> to create the new project, and fill it with the
+examples.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For new releases of CIF, the examples may change. The examples project that you
+previously created won&#8217;t be automatically updated. You can however go
+through the steps again, and get a second project, with the new examples. The
+version of the release is included in the suggested project name, allowing
+multiple example projects for different releases.</p>
+</div>
+<div class="paragraph">
+<p>Most examples also include a ToolDef <a href="#tools-scripting-chapter-intro">script</a>
+(<code>.tooldef</code> file) that can be used to perform various tasks, such as
+simulation. To execute such a script, right click a <code>.tooldef</code> file an choose
+<b class="menuref">Execute ToolDef</b>. Alternatively, select the file and press
+<kbd>F10</kbd>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="release-notes-chapter-index">CIF release notes</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The release notes for the releases of CIF and the associated tools, as
+part of the Eclipse ESCET project, are listed below in reverse chronological
+order.</p>
+</div>
+<div class="paragraph">
+<p>The release notes may refer to issues, the details for which can be found
+at the Eclipse ESCET
+<a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/issues">GitLab issues page</a>.</p>
+</div>
+<div class="paragraph">
+<p>See also the Eclipse ESCET
+<a href="https://www.eclipse.org/escet/escet/#release-notes-chapter-index">toolkit release notes</a>
+covering those aspects that are common to the various Eclipse ESCET tools.</p>
+</div>
+<div class="sect2">
+<h3 id="version-0-2">Version 0.2</h3>
+<div class="paragraph">
+<p>TBD</p>
+</div>
+<div class="paragraph">
+<p>Deprecations and removals:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CIF deprecated enumeration declaration syntax (with curly brackets) now
+leads to deprecation warnings. The documentation now properly reflects
+the deprecation as well (issue #45).</p>
+</li>
+<li>
+<p>CIF to CIF transformation to eliminate enumerations (<code>elim-enums</code>) is now
+deprecated. Use the transformation to convert enumerations to integers
+instead, as it has the same functionality (issue #78).</p>
+</li>
+<li>
+<p>CIF PLC code generator noption to either eliminate enumerations (to
+integers) or not is now deprecated. Use the new option to choose whether
+to convert enumerations to constants or integers, or not at all. See the
+documentation of the PLC code generator for further details (issue #78).</p>
+</li>
+<li>
+<p>CIF simulator deprecated 'interactive input mode' (<code>interactive</code> value)
+has been removed. Use the 'interactive console input mode' instead
+(issue #81).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>New features:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>CIF to CIF transformation to convert enumerations to constants
+(<code>enums-to-consts</code>) and enumerations to integers (<code>enums-to-ints</code>) has been
+added (issue #78).</p>
+</li>
+<li>
+<p>CIF explorer now has an option to specify the name of the resulting
+statespace automaton (issue #55).</p>
+</li>
+<li>
+<p>CIF PLC code generator now has an option to choose whether to convert
+enumerations to constants or integers, or not at all. This replaces the old
+option to either eliminate enumerations (to integers) or not, which is now
+deprecated. See the documentation of the PLC code generator for further
+details (issue #78).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Improvements and fixes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Various fixes for handling component definition/instantiation as well as
+references via component instantiations and component parameters
+(issues #25, #39 and #66).</p>
+</li>
+<li>
+<p>CIF to CIF linearize merge transformation no longer crashes for channels
+without a sender (issue #56).</p>
+</li>
+<li>
+<p>CIF simulator now correctly determines initial value for locations without
+initialization predicates, when those locations are used in initial values
+of variables (issue #37).</p>
+</li>
+<li>
+<p>CIF simulator no longer crashes on assignments to dictionaries with non-int
+keys (issue #47).</p>
+</li>
+<li>
+<p>CIF simulator is now more robust for larger numbers of state invariants in
+components (issue #49).</p>
+</li>
+<li>
+<p>CIF data-based synthesis documentation, debug output and warnings
+improved/fixed regarding invariants vs requirement invariants and controlled
+vs uncontrolled system (issue #83).</p>
+</li>
+<li>
+<p>CIF PLC code generator now creates output folder if it does not yet exist,
+rather than giving an error, if IEC 61131-3 output is requested (issue #74).</p>
+</li>
+<li>
+<p>CIF PLC code generator documentation now correctly indicates the order in
+which CIF to CIF transformations are applied (issue #78).</p>
+</li>
+<li>
+<p>CIF PLC code generator PLCOpen XML output fixes for PLC tasks (issue #75).</p>
+</li>
+<li>
+<p>CIF to mCRL2 transformation precondition check messages improved to avoid
+duplicates for multiple initial locations (issue #60).</p>
+</li>
+<li>
+<p>CIF to mCRL2 documentation updated to reflect that input variables are not
+supported (issue #59).</p>
+</li>
+<li>
+<p>CIF to Supremica and CIF to UPPAAL precondition check message wording for
+discrete variables with multiple potential initial values has been fixed
+(issue #58).</p>
+</li>
+<li>
+<p>CIF tutorial updated to remove explanation of list subtraction operator
+that doesn&#8217;t exist in the language and implementation (issue #77).</p>
+</li>
+<li>
+<p>CIF documentation updated to fix two broken links (issue #80).</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="version-0-1">Version 0.1</h3>
+<div class="paragraph">
+<p>The first release of CIF as part of the Eclipse ESCET project.
+This release is based on the initial contribution by the Eindhoven University
+of Technology (TU/e).</p>
+</div>
+<div class="paragraph">
+<p>Most notable changes compared to the last TU/e release:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The names of the CIF command line tools and tools available in ToolDef
+scripts have changed. For more information, check the list of
+<a href="#tools-scripting-chapter-tools">currently available tools</a>.</p>
+</li>
+<li>
+<p>The CIF simulator no longer crashes on code generation.</p>
+</li>
+<li>
+<p>The CIF simulator plot visualizer has been re-implemented using different
+third party libraries.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="dev-chapter-index">Developers</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The CIF developers manual is intended only for those who develop or extend
+the CIF language or tools. It is not intended for end users.</p>
+</div>
+<div class="paragraph">
+<p>This manual only contains CIF specific information. For general developers
+information, see the Eclipse ESCET developers manual.</p>
+</div>
+<div class="paragraph">
+<p>The following information is available for developers:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#dev-lang-modify">CIF language modification</a></p>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="dev-lang-modify">CIF language modification</h3>
+<div class="paragraph">
+<p>For each change to the CIF language, follow these steps:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Update <code>cif.setext</code> syntax.</p>
+</li>
+<li>
+<p>Update <code>cif.bnf</code> syntax in documentation.</p>
+</li>
+<li>
+<p>Update example models for changed syntax.</p>
+</li>
+<li>
+<p>Update Ecore metamodel. Update Ecore diagram images.</p>
+</li>
+<li>
+<p>Update Ecore genmodel. Remove and re-generate model code.</p>
+</li>
+<li>
+<p>Update generated Java constructors and walker code.</p>
+</li>
+<li>
+<p>Update LaTeX documentation skeleton files.</p>
+</li>
+<li>
+<p>Update LaTeX documentation, including constraints. Generate new PDF.</p>
+</li>
+<li>
+<p>Update example models for changed constraints.</p>
+</li>
+<li>
+<p>Update parser implementation, including AST classes.</p>
+</li>
+<li>
+<p>Update text editor, including keywords and syntax highlighting.</p>
+</li>
+<li>
+<p>Update type checker, including error message enumeration.</p>
+</li>
+<li>
+<p>Update pretty printer, including set of keywords.</p>
+</li>
+<li>
+<p>Update CIF to CIF transformations and other tools.</p>
+</li>
+<li>
+<p>Update CIF documentation, including language reference manual with lexical
+syntax and grammar.</p>
+</li>
+<li>
+<p>Update CIF syntax highlighting definition for LaTeX.</p>
+</li>
+<li>
+<p>Update CIF syntax highlighting definition for AsciiDoctor.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="legal-chapter-index">Legal</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The material in this documentation is
+Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation.</p>
+</div>
+<div class="paragraph">
+<p>Eclipse ESCET and ESCET are trademarks of the Eclipse Foundation.
+Eclipse, and the Eclipse Logo are registered trademarks of the
+Eclipse Foundation. Other names may be trademarks of their
+respective owners.</p>
+</div>
+<div class="paragraph">
+<p><strong>License</strong></p>
+</div>
+<div class="paragraph">
+<p>The Eclipse Foundation makes available all content in this document
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the MIT License. A copy of the MIT License
+is available at <a href="https://opensource.org/licenses/MIT" class="bare">https://opensource.org/licenses/MIT</a>. For purposes of the
+MIT License, "Software" will mean the Content.</p>
+</div>
+<div class="paragraph">
+<p>If you did not receive this Content directly from the Eclipse Foundation,
+the Content is being redistributed by another party ("Redistributor") and
+different terms and conditions may apply to your use of any object code in
+the Content. Check the Redistributor&#8217;s license that was provided with the
+Content. If no such license exists, contact the Redistributor. Unless
+otherwise indicated below, the terms and conditions of the MIT License
+still apply to any source code in the Content and such source code may be
+obtained at <a href="http://www.eclipse.org" class="bare">http://www.eclipse.org</a>.</p>
+</div>
+</div>
+</div>
+</div>
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+  messageStyle: "none",
+  tex2jax: {
+    inlineMath: [["\\(", "\\)"]],
+    displayMath: [["\\[", "\\]"]],
+    ignoreClass: "nostem|nolatexmath"
+  },
+  asciimath2jax: {
+    delimiters: [["\\$", "\\$"]],
+    ignoreClass: "nostem|noasciimath"
+  },
+  TeX: { equationNumbers: { autoNumber: "none" } }
+})
+MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
+  MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) {
+    if ((node = data.script.parentNode) && (node = node.parentNode) && node.classList.contains("stemblock")) {
+      data.math.root.display = "block"
+    }
+    return data
+  })
+})
+</script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+
+<div id="footer">
+<div id="footer-text">
+<a href="https://www.eclipse.org">Eclipse Home</a>
+|
+<a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a>
+|
+<a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a>
+|
+<a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a>
+|
+<a href="https://www.eclipse.org/legal">Eclipse Legal</a>
+</div>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/v0.2-M1/cif/lang-ref/syntax/cif.bnf b/v0.2-M1/cif/lang-ref/syntax/cif.bnf
new file mode 100644
index 0000000..ee42334
--- /dev/null
+++ b/v0.2-M1/cif/lang-ref/syntax/cif.bnf
@@ -0,0 +1,617 @@
+Specification : GroupBody
+              ;
+
+GroupBody : OptGroupDecls
+          ;
+
+AutomatonBody : OptAutDecls Locations OptIoDecls
+              ;
+
+OptGroupDecls : /* empty */
+              | OptGroupDecls GroupDecl
+              ;
+
+GroupDecl : Decl
+          | "import" Imports ";"
+          | "namespace" IDENTIFIERTK ";"
+          | "namespace" RELATIVENAMETK ";"
+          | "func" Types Identifier FuncParams ":" FuncBody
+          | Identifier ":" Name ActualParms ";"
+          | "group"                "def" Identifier FormalParms ":" GroupBody     "end"
+          | OptSupKind "automaton" "def" Identifier FormalParms ":" AutomatonBody "end"
+          |    SupKind             "def" Identifier FormalParms ":" AutomatonBody "end"
+          | "group"                      Identifier             ":" GroupBody     "end"
+          | OptSupKind "automaton"       Identifier             ":" AutomatonBody "end"
+          |    SupKind                   Identifier             ":" AutomatonBody "end"
+          ;
+
+OptAutDecls : /* empty */
+            | OptAutDecls AutDecl
+            ;
+
+AutDecl : Decl
+        | "alphabet" Events ";"
+        | "alphabet" ";"
+        | "monitor" Events ";"
+        | "monitor" ";"
+        | "disc" Type DiscDecls ";"
+        ;
+
+Decl : "type" TypeDefs ";"
+     | "enum" Identifier "=" "{" Identifiers "}" ";" // Deprecated
+     | "enum" Identifier "=" Identifiers ";"
+     | OptControllability "event"           Identifiers ";"
+     | OptControllability "event" EventType Identifiers ";"
+     |    Controllability                   Identifiers ";"
+     |    Controllability         EventType Identifiers ";"
+     | "const" Type ConstantDefs ";"
+     | "alg" Type AlgVarsDefs ";"
+     | "input" Type Identifiers ";"
+     | "cont" ContDecls ";"
+     | "equation" Equations ";"
+     | "initial" Expressions ";"
+     | InvariantDecls
+     | "marked" Expressions ";"
+     | IoDecl
+     ;
+
+Identifier : IDENTIFIERTK
+           ;
+
+Imports : StringToken
+        | Imports "," StringToken
+        ;
+
+StringToken : STRINGTK
+            ;
+
+TypeDefs : Identifier "=" Type
+         | TypeDefs "," Identifier "=" Type
+         ;
+
+ConstantDefs : Identifier "=" Expression
+             | ConstantDefs "," Identifier "=" Expression
+             ;
+
+AlgVarsDefs : Identifier
+            | Identifier "=" Expression
+            | AlgVarsDefs "," Identifier
+            | AlgVarsDefs "," Identifier "=" Expression
+            ;
+
+FuncParams : "(" ")"
+           | "(" FuncParamDecls ")"
+           ;
+
+FuncParamDecls : Type Identifiers
+               | FuncParamDecls ";" Type Identifiers
+               ;
+
+FuncBody : FuncVarDecls FuncStatements "end"
+         | StringToken ";"
+         ;
+
+FuncVarDecls : /* empty */
+             | FuncVarDecls Type FuncVarDecl ";"
+             ;
+
+FuncVarDecl : Identifier
+            | Identifier "=" Expression
+            | FuncVarDecl "," Identifier
+            | FuncVarDecl "," Identifier "=" Expression
+            ;
+
+FuncStatements : FuncStatement
+               | FuncStatements FuncStatement
+               ;
+
+FuncStatement : Addressables ":=" Expressions ";"
+              | "if" Expressions ":" FuncStatements
+                OptElifFuncStats OptElseFuncStat "end"
+              | "while" Expressions ":" FuncStatements "end"
+              | "break" ";"
+              | "continue" ";"
+              | "return" Expressions ";"
+              ;
+
+OptElifFuncStats : /* empty */
+                 | OptElifFuncStats "elif" Expressions ":" FuncStatements
+                 ;
+
+OptElseFuncStat : /* empty */
+                | "else" FuncStatements
+                ;
+
+Events : Name
+       | Events "," Name
+       ;
+
+CoreEdge : EdgeEvents         OptEdgeGuard OptEdgeUrgent OptEdgeUpdate
+         | "when" Expressions              OptEdgeUrgent OptEdgeUpdate
+         | "now"                                         OptEdgeUpdate
+         | "do" Updates
+         ;
+
+OptEdgeGuard : /* empty */
+             | "when" Expressions
+             ;
+
+OptEdgeUrgent : /* empty */
+              | "now"
+              ;
+
+OptEdgeUpdate : /* empty */
+              | "do" Updates
+              ;
+
+EdgeEvents : EdgeEvent
+           | EdgeEvents "," EdgeEvent
+           ;
+
+EdgeEvent : "tau"
+          | Name
+          | Name "!"
+          | Name "!" Expression
+          | Name "?"
+          ;
+
+Locations : Location
+          | Locations Location
+          ;
+
+Location : "location" ";"
+         | "location" Identifier ";"
+         | "location" ":" LocationElements
+         | "location" Identifier ":" LocationElements
+         ;
+
+LocationElements : LocationElement
+                 | LocationElements LocationElement
+                 ;
+
+LocationElement : "initial" ";"
+                | "initial" Expressions ";"
+                | InvariantDecls
+                | "equation" Equations ";"
+                | "marked" ";"
+                | "marked" Expressions ";"
+                | "urgent" ";"
+                | "edge" CoreEdge ";"
+                | "edge" CoreEdge "goto" Identifier ";"
+                ;
+
+ActualParms : "(" ")"
+            | "(" Expressions ")"
+            ;
+
+FormalParms : "(" ")"
+            | "(" FormalDecls ")"
+            ;
+
+FormalDecls : FormalDeclaration
+            | FormalDecls ";" FormalDeclaration
+            ;
+
+FormalDeclaration : OptControllability "event"           EventParamIds
+                  | OptControllability "event" EventType EventParamIds
+                  |    Controllability                   EventParamIds
+                  |    Controllability         EventType EventParamIds
+                  | Name Identifiers
+                  | "location" Identifiers
+                  | "alg" Type Identifiers
+                  ;
+
+EventParamIds : EventParamId
+              | EventParamIds "," EventParamId
+              ;
+
+EventParamId : Identifier OptEventParamFlags
+             ;
+
+OptEventParamFlags : /* empty */
+                   | OptEventParamFlags EventParamFlag
+                   ;
+
+EventParamFlag : "!"
+               | "?"
+               | "~"
+               ;
+
+DiscDecls : DiscDecl
+          | DiscDecls "," DiscDecl
+          ;
+
+DiscDecl : Identifier
+         | Identifier "in" "any"
+         | Identifier "=" Expression
+         | Identifier "in" "{" Expressions "}"
+         ;
+
+ContDecls : ContDecl
+          | ContDecls "," ContDecl
+          ;
+
+ContDecl : Identifier OptDerivative
+         | Identifier "=" Expression OptDerivative
+         ;
+
+OptDerivative : /* empty */
+              | "der" Expression
+              ;
+
+Equations : Equation
+          | Equations "," Equation
+          ;
+
+Equation : Identifier "'" "=" Expression
+         | Identifier "=" Expression
+         ;
+
+InvariantDecls : OptSupKind "invariant" Invariants ";"
+               |    SupKind             Invariants ";"
+               ;
+
+Invariants : Invariant
+           | Invariants "," Invariant
+           ;
+
+Invariant : Expression
+          | Name                  "needs"    Expression
+          | NonEmptySetExpression "needs"    Expression
+          | Expression            "disables" Name
+          | Expression            "disables" NamesSet
+          ;
+
+NamesSet : "{" Names "}"
+         ;
+
+Names : Name
+      | Names "," Name
+      ;
+
+Updates : Update
+        | Updates "," Update
+        ;
+
+Update : Addressable ":=" Expression
+       | "if" Expressions ":" Updates
+         OptElifUpdates OptElseUpdate "end"
+       ;
+
+Addressables : Addressable
+             | Addressables "," Addressable
+             ;
+
+Addressable : Identifier
+            | Identifier Projections
+            | "(" Addressable "," Addressables ")"
+            ;
+
+Projections : Projection
+            | Projections Projection
+            ;
+
+Projection : "[" Expression "]"
+           ;
+
+OptElifUpdates : /* empty */
+               | OptElifUpdates "elif" Expressions ":" Updates
+               ;
+
+OptElseUpdate : /* empty */
+              | "else" Updates
+              ;
+
+Identifiers : Identifier
+            | Identifiers "," Identifier
+            ;
+
+OptSupKind : /* empty */
+           | SupKind
+           ;
+
+OptControllability : /* empty */
+                   | Controllability
+                   ;
+
+Controllability : "controllable"
+                | "uncontrollable"
+                ;
+
+///////////////////////////////////////////////////////////////////////////////
+
+OptIoDecls : /* empty */
+           | OptIoDecls IoDecl
+           ;
+
+IoDecl : SvgFile
+       | SvgCopy
+       | SvgMove
+       | SvgOut
+       | SvgIn
+       | PrintFile
+       | Print
+       ;
+
+SvgFile : "svgfile" StringToken ";"
+        ;
+
+OptSvgFile : /* empty */
+           | "file" StringToken
+           ;
+
+SvgCopy : "svgcopy" "id" Expression OptSvgCopyPre OptSvgCopyPost OptSvgFile ";"
+        ;
+
+OptSvgCopyPre : /* empty */
+              | "pre" Expression
+              ;
+
+OptSvgCopyPost : /* empty */
+               | "post" Expression
+               ;
+
+SvgMove : "svgmove" "id" Expression "to" Expression "," Expression
+          OptSvgFile ";"
+        ;
+
+SvgOut : "svgout" "id" Expression SvgAttr "value" Expression OptSvgFile
+         ";"
+       ;
+
+SvgAttr : "attr" StringToken
+        | "text"
+        ;
+
+SvgIn : "svgin" "id" Expression "event" SvgInEvent OptSvgFile ";"
+      ;
+
+SvgInEvent : Name
+           | "if" Expression ":" Name OptSvgInEventElifs "else" Name "end"
+           | "if" Expression ":" Name SvgInEventElifs "end"
+           ;
+
+OptSvgInEventElifs : /* empty */
+                   | SvgInEventElifs
+                   ;
+
+SvgInEventElifs : "elif" Expression ":" Name
+                | SvgInEventElifs "elif" Expression ":" Name
+                ;
+
+PrintFile : "printfile" StringToken ";"
+          ;
+
+Print : "print" PrintTxt OptPrintFors OptPrintWhen OptPrintFile ";"
+      ;
+
+PrintTxt : Expression
+         | "pre" Expression
+         | "post" Expression
+         | "pre" Expression "post" Expression
+         ;
+
+OptPrintFors : /* empty */
+             | "for" PrintFors
+             ;
+
+PrintFors : PrintFor
+          | PrintFors "," PrintFor
+          ;
+
+PrintFor : "event"
+         | "time"
+         | Name
+         | "initial"
+         | "final"
+         ;
+
+OptPrintWhen : /* empty */
+             | "when" Expression
+             | "when" "pre" Expression
+             | "when" "post" Expression
+             | "when" "pre" Expression "post" Expression
+             ;
+
+OptPrintFile : /* empty */
+             | "file" StringToken
+             ;
+
+///////////////////////////////////////////////////////////////////////////////
+
+Types : Type
+      | Types "," Type
+      ;
+
+EventType : "void"
+          | Type
+          ;
+
+Type : "bool"
+     | "int"
+     | "int" "[" Expression ".." Expression "]"
+     | "real"
+     | "string"
+     | "list" Type
+     | "list" "[" Expression "]" Type
+     | "list" "[" Expression ".." Expression "]" Type
+     | "set" Type
+     | "dict" "(" Type ":" Type ")"
+     | "tuple" "(" Fields ")"
+     | "func" Type "(" ")"
+     | "func" Type "(" Types ")"
+     | "dist" Type
+     | Name
+     ;
+
+Fields : Field
+       | Fields ";" Field
+       ;
+
+Field : Type Identifiers
+      ;
+
+///////////////////////////////////////////////////////////////////////////////
+
+Expressions : Expression
+            | Expressions "," Expression
+            ;
+
+OptExpression : /* empty */
+              | Expression
+              ;
+
+Expression : OrExpression
+           | OrExpression "=>" OrExpression
+           | OrExpression "<=>" OrExpression
+           ;
+
+OrExpression : AndExpression
+             | OrExpression "or" AndExpression
+             ;
+
+AndExpression : CompareExpression
+              | AndExpression "and" CompareExpression
+              ;
+
+CompareExpression : AddExpression
+                  | CompareExpression "<"  AddExpression
+                  | CompareExpression "<=" AddExpression
+                  | CompareExpression "="  AddExpression
+                  | CompareExpression "!=" AddExpression
+                  | CompareExpression ">=" AddExpression
+                  | CompareExpression ">"  AddExpression
+                  | CompareExpression "in" AddExpression
+                  | CompareExpression "sub" AddExpression
+                  ;
+
+AddExpression : MulExpression
+              | AddExpression "+" MulExpression
+              | AddExpression "-" MulExpression
+              ;
+
+MulExpression : UnaryExpression
+              | MulExpression "*" UnaryExpression
+              | MulExpression "/" UnaryExpression
+              | MulExpression "div" UnaryExpression
+              | MulExpression "mod" UnaryExpression
+              ;
+
+UnaryExpression : FuncExpression
+                | "-" UnaryExpression
+                | "+" UnaryExpression
+                | "not" UnaryExpression
+                | "sample" FuncExpression
+                ;
+
+FuncExpression : ExpressionFactor
+               | FuncExpression "[" Expression "]"
+               | FuncExpression
+                 "[" OptExpression ":" OptExpression "]"
+               | FuncExpression "(" ")"
+               | FuncExpression "(" Expressions ")"
+               | StdLibFunction "(" ")"
+               | StdLibFunction "(" Expressions ")"
+               ;
+
+ExpressionFactor : "true"
+                 | "false"
+                 | NUMBERTK
+                 | REALTK
+                 | StringToken
+                 | "time"
+                 | "[" "]"
+                 | "[" Expressions "]"
+                 | "{" "}"
+                 | NonEmptySetExpression
+                 | "{" DictPairs "}"
+                 | "(" Expression "," Expressions ")"
+                 | "<" Type ">" ExpressionFactor
+                 | "if" Expressions ":" Expression
+                   OptElifExprs "else" Expression "end"
+                 | "switch" Expression ":" SwitchBody "end"
+                 | "(" Expression ")"
+                 | Name
+                 | Name "'"
+                 | "?"
+                 | "self"
+                 ;
+
+NonEmptySetExpression : "{" Expressions "}"
+                      ;
+
+DictPairs : Expression ":" Expression
+          | DictPairs "," Expression ":" Expression
+          ;
+
+OptElifExprs : /* empty */
+             | OptElifExprs "elif" Expressions ":" Expression
+             ;
+
+SwitchBody : SwitchCases
+           | SwitchCases "else" Expression
+           |             "else" Expression
+           ;
+
+SwitchCases : "case" Expression ":" Expression
+            | SwitchCases "case" Expression ":" Expression
+            ;
+
+Name : Identifier
+     | RELATIVENAMETK
+     | ABSOLUTENAMETK
+     | ROOTNAMETK
+     ;
+
+SupKind : "plant"
+        | "requirement"
+        | "supervisor"
+        ;
+
+StdLibFunction : "acosh"
+               | "acos"
+               | "asinh"
+               | "asin"
+               | "atanh"
+               | "atan"
+               | "cosh"
+               | "cos"
+               | "sinh"
+               | "sin"
+               | "tanh"
+               | "tan"
+               | "abs"
+               | "cbrt"
+               | "ceil"
+               | "del"
+               | "empty"
+               | "exp"
+               | "floor"
+               | "fmt"
+               | "ln"
+               | "log"
+               | "max"
+               | "min"
+               | "pop"
+               | "pow"
+               | "round"
+               | "scale"
+               | "sign"
+               | "size"
+               | "sqrt"
+               | "bernoulli"
+               | "beta"
+               | "binomial"
+               | "constant"
+               | "erlang"
+               | "exponential"
+               | "gamma"
+               | "geometric"
+               | "lognormal"
+               | "normal"
+               | "poisson"
+               | "random"
+               | "triangle"
+               | "uniform"
+               | "weibull"
+               ;
diff --git a/v0.2-M1/cif/screenshot_ide.png b/v0.2-M1/cif/screenshot_ide.png
new file mode 100644
index 0000000..80e0490
--- /dev/null
+++ b/v0.2-M1/cif/screenshot_ide.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/activate_cfg.png b/v0.2-M1/cif/tools/cif2plc/activate_cfg.png
new file mode 100644
index 0000000..1471c0b
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/activate_cfg.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/login.png b/v0.2-M1/cif/tools/cif2plc/login.png
new file mode 100644
index 0000000..1086911
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/login.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/logout.png b/v0.2-M1/cif/tools/cif2plc/logout.png
new file mode 100644
index 0000000..96641bb
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/logout.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/mode_config.png b/v0.2-M1/cif/tools/cif2plc/mode_config.png
new file mode 100644
index 0000000..303bcfd
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/mode_config.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/mode_ex.png b/v0.2-M1/cif/tools/cif2plc/mode_ex.png
new file mode 100644
index 0000000..1633823
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/mode_ex.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/mode_free_run.png b/v0.2-M1/cif/tools/cif2plc/mode_free_run.png
new file mode 100644
index 0000000..6329333
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/mode_free_run.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/mode_inactive.png b/v0.2-M1/cif/tools/cif2plc/mode_inactive.png
new file mode 100644
index 0000000..65a2529
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/mode_inactive.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/mode_run.png b/v0.2-M1/cif/tools/cif2plc/mode_run.png
new file mode 100644
index 0000000..969f1b8
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/mode_run.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/mode_stop.png b/v0.2-M1/cif/tools/cif2plc/mode_stop.png
new file mode 100644
index 0000000..f9bb568
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/mode_stop.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/restart_config.png b/v0.2-M1/cif/tools/cif2plc/restart_config.png
new file mode 100644
index 0000000..95a308c
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/restart_config.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/restart_run.png b/v0.2-M1/cif/tools/cif2plc/restart_run.png
new file mode 100644
index 0000000..eb2f9a5
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/restart_run.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/scan_devices.png b/v0.2-M1/cif/tools/cif2plc/scan_devices.png
new file mode 100644
index 0000000..27f59c8
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/scan_devices.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/start.png b/v0.2-M1/cif/tools/cif2plc/start.png
new file mode 100644
index 0000000..415c12c
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/start.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2plc/stop.png b/v0.2-M1/cif/tools/cif2plc/stop.png
new file mode 100644
index 0000000..b8248cf
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2plc/stop.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_color_code_bg.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_code_bg.png
new file mode 100644
index 0000000..8ff54fe
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_code_bg.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_color_code_header.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_code_header.png
new file mode 100644
index 0000000..6eb291a
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_code_header.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_color_comp_header.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_comp_header.png
new file mode 100644
index 0000000..9633823
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_comp_header.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_color_def_header.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_def_header.png
new file mode 100644
index 0000000..b8a474b
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_def_header.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_color_inst_header.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_inst_header.png
new file mode 100644
index 0000000..2bd79e0
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_inst_header.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_color_loc_bg.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_loc_bg.png
new file mode 100644
index 0000000..c33e90c
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_loc_bg.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_color_wrap_box_header.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_wrap_box_header.png
new file mode 100644
index 0000000..72dca3c
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_color_wrap_box_header.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_data_decl.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_data_decl.png
new file mode 100644
index 0000000..f1f515a
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_data_decl.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_data_param.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_data_param.png
new file mode 100644
index 0000000..bda93e7
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_data_param.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_data_usage.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_data_usage.png
new file mode 100644
index 0000000..b30ff7d
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_data_usage.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_event_decl.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_event_decl.png
new file mode 100644
index 0000000..a92a672
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_event_decl.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_event_param.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_event_param.png
new file mode 100644
index 0000000..31e0088
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_event_param.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_event_usage_recv.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_event_usage_recv.png
new file mode 100644
index 0000000..2f601e0
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_event_usage_recv.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_event_usage_send.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_event_usage_send.png
new file mode 100644
index 0000000..0d4690f
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_event_usage_send.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/cif2yed_event_usage_sync.png b/v0.2-M1/cif/tools/cif2yed/cif2yed_event_usage_sync.png
new file mode 100644
index 0000000..1dd6d62
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/cif2yed_event_usage_sync.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/machine_buffer.events.layouted.graphml b/v0.2-M1/cif/tools/cif2yed/machine_buffer.events.layouted.graphml
new file mode 100644
index 0000000..2071cb7
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/machine_buffer.events.layouted.graphml
@@ -0,0 +1,821 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
+  <!--Created by yEd 3.14.1-->
+  <key for="port" id="d0" yfiles.type="portgraphics"/>
+  <key for="port" id="d1" yfiles.type="portgeometry"/>
+  <key for="port" id="d2" yfiles.type="portuserdata"/>
+  <key attr.name="url" attr.type="string" for="node" id="d3"/>
+  <key attr.name="description" attr.type="string" for="node" id="d4"/>
+  <key for="node" id="d5" yfiles.type="nodegraphics"/>
+  <key for="graphml" id="d6" yfiles.type="resources"/>
+  <key attr.name="url" attr.type="string" for="edge" id="d7"/>
+  <key attr.name="description" attr.type="string" for="edge" id="d8"/>
+  <key for="edge" id="d9" yfiles.type="edgegraphics"/>
+  <graph edgedefault="directed" id="G">
+    <node id="n0" yfiles.foldertype="group">
+      <data key="d4"><![CDATA[Component definitions]]></data>
+      <data key="d5">
+        <y:ProxyAutoBoundsNode>
+          <y:Realizers active="0">
+            <y:GroupNode>
+              <y:Geometry height="176.96875" width="945.375" x="-439.4375" y="-336.0"/>
+              <y:Fill color="#EEEEEE" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="1.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#80FF40" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="17.96875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="945.375" x="0.0" y="0.0">     Component definitions</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+              <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+              <y:BorderInsets bottom="0" bottomF="0.0" left="1" leftF="1.25" right="0" rightF="0.0" top="0" topF="0.0"/>
+            </y:GroupNode>
+            <y:GroupNode>
+              <y:Geometry height="30.0" width="191.0" x="-15.0" y="-15.0"/>
+              <y:Fill color="#CCCCCC" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="1.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#80FF40" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="17.96875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="191.0" x="0.0" y="0.0">     Component definitions</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+              <y:State closed="true" closedHeight="30.0" closedWidth="191.0" innerGraphDisplayEnabled="false"/>
+              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+              <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+            </y:GroupNode>
+          </y:Realizers>
+        </y:ProxyAutoBoundsNode>
+      </data>
+      <graph edgedefault="directed" id="n0:">
+        <node id="n0::n0" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[automaton def Generator()]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="129.0" width="241.375" x="-423.1875" y="-303.03125"/>
+                  <y:Fill color="#EEEEEE" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40C0FF" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="241.375" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="221.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#CCCCCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40C0FF" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="221.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="30.0" closedWidth="221.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n0::n0:">
+            <node id="n0::n0::n0">
+              <data key="d4"><![CDATA[exit !]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="80.0" x="-276.8125" y="-219.03125"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="74.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n0::n0::n1">
+              <data key="d4"><![CDATA[exit !]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="30.0" x="-251.8125" y="-269.03125"/>
+                  <y:Fill color="#FFC080" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="20" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="28.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="12.0" x="9.0" y="1.0">&lt;html&gt;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n0::n0::n2">
+              <data key="d4"><![CDATA[generated]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="30.0" x="-365.6875" y="-219.03125"/>
+                  <y:Fill color="#FFC080" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="20" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="4.0" x="13.0" y="5.5">&lt;html&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n0::n0::n3">
+              <data key="d4"><![CDATA[generated]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="115.0" x="-408.1875" y="-269.03125"/>
+                  <y:Fill color="#FFC000" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="2.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="109.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;generated&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="n0::n1" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[automaton def Buffer()]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="129.0" width="227.25" x="-169.6875" y="-303.03125"/>
+                  <y:Fill color="#EEEEEE" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40C0FF" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="227.25" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="1" leftF="1.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="194.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#CCCCCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40C0FF" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="194.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="30.0" closedWidth="194.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n0::n1:">
+            <node id="n0::n1::n0">
+              <data key="d4"><![CDATA[enter ?]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="93.0" x="-153.6875" y="-269.03125"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="87.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n0::n1::n1">
+              <data key="d4"><![CDATA[exit !]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="80.0" x="-37.4375" y="-219.03125"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="74.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n0::n1::n2">
+              <data key="d4"><![CDATA[enter ?]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="30.0" x="-122.1875" y="-219.03125"/>
+                  <y:Fill color="#FFC080" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="20" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="28.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="15.0" x="7.5" y="1.0">&lt;html&gt;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n0::n1::n3">
+              <data key="d4"><![CDATA[exit !]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="30.0" x="-12.4375" y="-269.03125"/>
+                  <y:Fill color="#FFC080" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="20" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="28.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="12.0" x="9.0" y="1.0">&lt;html&gt;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="n0::n2" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[automaton def Machine()]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="129.0" width="242.375" x="72.5625" y="-303.03125"/>
+                  <y:Fill color="#EEEEEE" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40C0FF" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="242.375" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="1" leftF="1.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="209.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#CCCCCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40C0FF" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="209.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="30.0" closedWidth="209.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n0::n2:">
+            <node id="n0::n2::n0">
+              <data key="d4"><![CDATA[enter ?]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="93.0" x="88.5625" y="-269.03125"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="87.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n0::n2::n1">
+              <data key="d4"><![CDATA[exit !]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="80.0" x="219.9375" y="-219.03125"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="74.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n0::n2::n2">
+              <data key="d4"><![CDATA[enter ?]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="30.0" x="120.0625" y="-219.03125"/>
+                  <y:Fill color="#FFC080" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="20" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="28.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="15.0" x="7.5" y="1.0">&lt;html&gt;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n0::n2::n3">
+              <data key="d4"><![CDATA[exit !]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="30.0" x="244.9375" y="-269.03125"/>
+                  <y:Fill color="#FFC080" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="20" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="28.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="12.0" x="9.0" y="1.0">&lt;html&gt;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="n0::n3" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[automaton def Exit()]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="129.0" width="162.0" x="328.9375" y="-303.03125"/>
+                  <y:Fill color="#EEEEEE" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40C0FF" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="162.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="1" leftF="1.0" right="38" rightF="38.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="179.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#CCCCCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40C0FF" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="179.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="30.0" closedWidth="179.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n0::n3:">
+            <node id="n0::n3::n0">
+              <data key="d4"><![CDATA[enter ?]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="93.0" x="344.9375" y="-269.03125"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="87.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n0::n3::n1">
+              <data key="d4"><![CDATA[enter ?]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="30.0" x="376.4375" y="-219.03125"/>
+                  <y:Fill color="#FFC080" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="20" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="28.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="15.0" x="7.5" y="1.0">&lt;html&gt;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+      </graph>
+    </node>
+    <node id="n1" yfiles.foldertype="group">
+      <data key="d4"><![CDATA[Components]]></data>
+      <data key="d5">
+        <y:ProxyAutoBoundsNode>
+          <y:Realizers active="0">
+            <y:GroupNode>
+              <y:Geometry height="220.96874999999997" width="1177.7008799999999" x="-439.4375" y="-144.03125"/>
+              <y:Fill color="#EEEEEE" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="1.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#80FF40" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="17.96875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="1177.7008799999999" x="0.0" y="0.0">     Components</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+              <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+              <y:BorderInsets bottom="0" bottomF="0.0" left="1" leftF="1.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+            </y:GroupNode>
+            <y:GroupNode>
+              <y:Geometry height="30.0" width="203.0" x="-15.0" y="-15.0"/>
+              <y:Fill color="#CCCCCC" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="1.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#80FF40" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="17.96875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="203.0" x="0.0" y="0.0">     Components and events</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+              <y:State closed="true" closedHeight="30.0" closedWidth="203.0" innerGraphDisplayEnabled="false"/>
+              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+              <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+            </y:GroupNode>
+          </y:Realizers>
+        </y:ProxyAutoBoundsNode>
+      </data>
+      <graph edgedefault="directed" id="n1:">
+        <node id="n1::n0" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[generator: Generator()]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="79.0" width="176.0" x="-423.4375" y="-71.2065"/>
+                  <y:Fill color="#EEEEEE" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF8000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="176.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="62" leftF="62.0" right="4" rightF="4.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="195.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#CCCCCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF8000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="195.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="30.0" closedWidth="195.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n1::n0:">
+            <node id="n1::n0::n0">
+              <data key="d4"><![CDATA[exit !]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="80.0" x="-346.4375" y="-37.206500000000005"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="74.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="n1::n1" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[buffer: Buffer()]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="79.0" width="227.25" x="-111.54950000000008" y="-71.2065"/>
+                  <y:Fill color="#EEEEEE" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF8000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="227.25" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="9" leftF="9.03612000000021" right="4" rightF="4.45049999999992" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="142.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#CCCCCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF8000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="142.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="30.0" closedWidth="142.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n1::n1:">
+            <node id="n1::n1::n0">
+              <data key="d4"><![CDATA[enter ?]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="93.0" x="-87.51337999999987" y="-37.206500000000005"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="87.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n1::n1::n1">
+              <data key="d4"><![CDATA[exit !]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="80.0" x="16.25" y="-37.206500000000005"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="74.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="n1::n2" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[machine1: Machine()]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="79.0" width="216.67488000000003" x="251.58849999999984" y="-111.0625"/>
+                  <y:Fill color="#EEEEEE" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF8000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="216.67488000000003" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;machine1&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="1" leftF="1.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="181.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#CCCCCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF8000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="181.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;machine1&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="30.0" closedWidth="181.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n1::n2:">
+            <node id="n1::n2::n0">
+              <data key="d4"><![CDATA[enter ?]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="93.0" x="267.58849999999984" y="-77.0625"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="87.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n1::n2::n1">
+              <data key="d4"><![CDATA[exit !]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="80.0" x="373.26337999999987" y="-77.0625"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="74.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="n1::n3" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[machine2: Machine()]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="79.0" width="216.67488000000003" x="251.58849999999984" y="-17.06250000000003"/>
+                  <y:Fill color="#EEEEEE" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF8000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="216.67488000000003" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;machine2&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="1" leftF="1.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="181.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#CCCCCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF8000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="181.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;machine2&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="30.0" closedWidth="181.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n1::n3:">
+            <node id="n1::n3::n0">
+              <data key="d4"><![CDATA[enter ?]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="93.0" x="267.58849999999984" y="16.93749999999997"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="87.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="n1::n3::n1">
+              <data key="d4"><![CDATA[exit !]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="80.0" x="373.26337999999987" y="16.93749999999997"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="74.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="n1::n4" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[exit: Exit()]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="79.0" width="125.0" x="598.2633799999999" y="-71.5625"/>
+                  <y:Fill color="#EEEEEE" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF8000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="125.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="1" leftF="1.0" right="1" rightF="1.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="112.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#CCCCCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF8000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="112.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="30.0" closedWidth="112.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n1::n4:">
+            <node id="n1::n4::n0">
+              <data key="d4"><![CDATA[enter ?]]></data>
+              <data key="d5">
+                <y:ShapeNode>
+                  <y:Geometry height="30.0" width="93.0" x="614.2633799999999" y="-37.5625"/>
+                  <y:Fill color="#FFE0C0" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
+                  <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="87.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="n1::n5">
+          <data key="d4"><![CDATA[g2b !?~]]></data>
+          <data key="d5">
+            <y:ShapeNode>
+              <y:Geometry height="30.0" width="98.0" x="-226.4375" y="-37.206500000000005"/>
+              <y:Fill color="#FFC000" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="2.0"/>
+              <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="92.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;g2b&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!?~&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+        <node id="n1::n6">
+          <data key="d4"><![CDATA[b2m !?~]]></data>
+          <data key="d5">
+            <y:ShapeNode>
+              <y:Geometry height="30.0" width="101.0" x="132.58849999999984" y="-37.206500000000005"/>
+              <y:Fill color="#FFC000" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="2.0"/>
+              <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="95.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;b2m&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!?~&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+        <node id="n1::n7">
+          <data key="d4"><![CDATA[m2e !?~]]></data>
+          <data key="d5">
+            <y:ShapeNode>
+              <y:Geometry height="30.0" width="101.0" x="483.26337999999987" y="-37.206500000000005"/>
+              <y:Fill color="#FFC000" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="2.0"/>
+              <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="95.0" x="3.0" y="5.5">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;m2e&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!?~&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+      </graph>
+    </node>
+    <edge id="n0::n0::e0" source="n0::n0::n3" target="n0::n0::n2">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="0.0" sy="15.0" tx="0.0" ty="-15.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="none"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n0::n0::e1" source="n0::n0::n1" target="n0::n0::n0">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="0.0" sy="15.0" tx="0.0" ty="-15.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n0::n1::e0" source="n0::n1::n3" target="n0::n1::n1">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="0.0" sy="15.0" tx="0.0" ty="-15.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n0::n1::e1" source="n0::n1::n0" target="n0::n1::n2">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="0.0" sy="15.0" tx="0.0" ty="-15.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n0::n2::e0" source="n0::n2::n3" target="n0::n2::n1">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="0.0" sy="15.0" tx="0.0" ty="-15.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n0::n2::e1" source="n0::n2::n0" target="n0::n2::n2">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="0.0" sy="15.0" tx="0.0" ty="-15.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n0::n3::e0" source="n0::n3::n0" target="n0::n3::n1">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="0.0" sy="15.0" tx="0.0" ty="-15.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n1::e0" source="n1::n0::n0" target="n1::n5">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="20.52197265625" sy="0.0" tx="-29.5" ty="0.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n1::e1" source="n1::n5" target="n1::n1::n0">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="29.5" sy="0.0" tx="-26.9912109375" ty="0.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n1::e2" source="n1::n1::n1" target="n1::n6">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="39.990234375" sy="0.0" tx="-50.5" ty="0.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n1::e3" source="n1::n6" target="n1::n2::n0">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="50.49329268649194" sy="-6.754311925919801" tx="-46.485595703125" ty="0.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n1::e4" source="n1::n2::n1" target="n1::n7">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="39.990234375" sy="0.0" tx="-50.497361369021974" ty="-6.384140032877241"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n1::e5" source="n1::n6" target="n1::n3::n0">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="50.5183557780407" sy="9.04004266689531" tx="-46.485595703125" ty="0.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n1::e6" source="n1::n3::n1" target="n1::n7">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="39.990234375" sy="0.0" tx="-50.51085905243883" ty="9.116771448635014"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n1::e7" source="n1::n7" target="n1::n4::n0">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="31.0" sy="0.0" tx="-26.9912109375" ty="0.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+  </graph>
+  <data key="d6">
+    <y:Resources/>
+  </data>
+</graphml>
diff --git a/v0.2-M1/cif/tools/cif2yed/machine_buffer.events.layouted.png b/v0.2-M1/cif/tools/cif2yed/machine_buffer.events.layouted.png
new file mode 100644
index 0000000..faef101
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/machine_buffer.events.layouted.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/machine_buffer.events.orig.graphml b/v0.2-M1/cif/tools/cif2yed/machine_buffer.events.orig.graphml
new file mode 100644
index 0000000..a4074ce
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/machine_buffer.events.orig.graphml
@@ -0,0 +1,696 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<graphml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd" xmlns="http://graphml.graphdrawing.org/xmlns">
+  <key for="node" id="ng" yfiles.type="nodegraphics"/>
+  <key for="edge" id="eg" yfiles.type="edgegraphics"/>
+  <key attr.name="description" attr.type="string" for="node" id="dn"/>
+  <graph edgedefault="undirected" id="cif:">
+    <node id="cif::box0" yfiles.foldertype="group">
+      <graph edgedefault="undirected" id="cif::box0:">
+        <node id="cif:Generator" yfiles.foldertype="group">
+          <data key="dn">automaton def Generator()</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40c0ff" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#eeeeee"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="221.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40c0ff" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#cccccc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="undirected" id="cif:Generator:">
+            <node id="cif:Generator:exit">
+              <data key="dn">event exit !</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="80.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:Generator::evtref1">
+              <data key="dn">exit !</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry height="30" width="30"/>
+                  <y:NodeLabel alignment="center" fontSize="20">&lt;html&gt;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#ffc080"/>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:Generator::evtref0">
+              <data key="dn">generated</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry height="30" width="30"/>
+                  <y:NodeLabel alignment="center" fontSize="20">&lt;html&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#ffc080"/>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:Generator:generated">
+              <data key="dn">event generated</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="115.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;generated&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle width="2.0"/>
+                  <y:Fill color="#ffc000"/>
+                  <y:Shape type="rectangle"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="cif:Buffer" yfiles.foldertype="group">
+          <data key="dn">automaton def Buffer()</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40c0ff" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#eeeeee"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="194.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40c0ff" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#cccccc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="undirected" id="cif:Buffer:">
+            <node id="cif:Buffer:enter">
+              <data key="dn">event enter ?</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="93.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:Buffer:exit">
+              <data key="dn">event exit !</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="80.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:Buffer::evtref3">
+              <data key="dn">enter ?</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry height="30" width="30"/>
+                  <y:NodeLabel alignment="center" fontSize="20">&lt;html&gt;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#ffc080"/>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:Buffer::evtref2">
+              <data key="dn">exit !</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry height="30" width="30"/>
+                  <y:NodeLabel alignment="center" fontSize="20">&lt;html&gt;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#ffc080"/>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="cif:Machine" yfiles.foldertype="group">
+          <data key="dn">automaton def Machine()</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40c0ff" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#eeeeee"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="209.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40c0ff" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#cccccc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="undirected" id="cif:Machine:">
+            <node id="cif:Machine:enter">
+              <data key="dn">event enter ?</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="93.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:Machine:exit">
+              <data key="dn">event exit !</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="80.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:Machine::evtref5">
+              <data key="dn">enter ?</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry height="30" width="30"/>
+                  <y:NodeLabel alignment="center" fontSize="20">&lt;html&gt;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#ffc080"/>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:Machine::evtref4">
+              <data key="dn">exit !</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry height="30" width="30"/>
+                  <y:NodeLabel alignment="center" fontSize="20">&lt;html&gt;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#ffc080"/>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="cif:Exit" yfiles.foldertype="group">
+          <data key="dn">automaton def Exit()</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40c0ff" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#eeeeee"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="179.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#40c0ff" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;def&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#cccccc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="undirected" id="cif:Exit:">
+            <node id="cif:Exit:enter">
+              <data key="dn">event enter ?</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="93.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:Exit::evtref6">
+              <data key="dn">enter ?</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry height="30" width="30"/>
+                  <y:NodeLabel alignment="center" fontSize="20">&lt;html&gt;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#ffc080"/>
+                  <y:Shape type="ellipse"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+      </graph>
+      <data key="dn">Component definitions</data>
+      <data key="ng">
+        <y:ProxyAutoBoundsNode>
+          <y:Realizers active="0">
+            <y:GroupNode>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#80ff40" modelName="internal" modelPosition="t">     Component definitions</y:NodeLabel>
+              <y:Fill color="#eeeeee"/>
+              <y:Shape type="rectangle"/>
+              <y:State closed="false"/>
+            </y:GroupNode>
+            <y:GroupNode>
+              <y:Geometry height="30.0" width="191.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#80ff40" modelName="internal" modelPosition="t">     Component definitions</y:NodeLabel>
+              <y:Fill color="#cccccc"/>
+              <y:Shape type="rectangle"/>
+              <y:State closed="true"/>
+            </y:GroupNode>
+          </y:Realizers>
+        </y:ProxyAutoBoundsNode>
+      </data>
+    </node>
+    <node id="cif::box1" yfiles.foldertype="group">
+      <graph edgedefault="undirected" id="cif::box1:">
+        <node id="cif:generator" yfiles.foldertype="group">
+          <data key="dn">generator: Generator()</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff8000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#eeeeee"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="195.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff8000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Generator&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#cccccc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="undirected" id="cif:generator:">
+            <node id="cif:generator:exit">
+              <data key="dn">event exit !</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="80.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="cif:buffer" yfiles.foldertype="group">
+          <data key="dn">buffer: Buffer()</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff8000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#eeeeee"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="142.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff8000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Buffer&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#cccccc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="undirected" id="cif:buffer:">
+            <node id="cif:buffer:enter">
+              <data key="dn">event enter ?</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="93.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:buffer:exit">
+              <data key="dn">event exit !</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="80.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="cif:machine1" yfiles.foldertype="group">
+          <data key="dn">machine1: Machine()</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff8000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;machine1&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#eeeeee"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="181.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff8000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;machine1&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#cccccc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="undirected" id="cif:machine1:">
+            <node id="cif:machine1:enter">
+              <data key="dn">event enter ?</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="93.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:machine1:exit">
+              <data key="dn">event exit !</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="80.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="cif:machine2" yfiles.foldertype="group">
+          <data key="dn">machine2: Machine()</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff8000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;machine2&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#eeeeee"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="181.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff8000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;machine2&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Machine&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#cccccc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="undirected" id="cif:machine2:">
+            <node id="cif:machine2:enter">
+              <data key="dn">event enter ?</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="93.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+            <node id="cif:machine2:exit">
+              <data key="dn">event exit !</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="80.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="cif:exit" yfiles.foldertype="group">
+          <data key="dn">exit: Exit()</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff8000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#eeeeee"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="30.0" width="112.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff8000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000000;"&gt;exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Exit&lt;/span&gt;&lt;span style="color:#402020;"&gt;()&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Fill color="#cccccc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="undirected" id="cif:exit:">
+            <node id="cif:exit:enter">
+              <data key="dn">event enter ?</data>
+              <data key="ng">
+                <y:ShapeNode>
+                  <y:Geometry width="93.0"/>
+                  <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;enter&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;?&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle type="dashed"/>
+                  <y:Fill color="#ffe0c0"/>
+                  <y:Shape type="octagon"/>
+                </y:ShapeNode>
+              </data>
+            </node>
+          </graph>
+        </node>
+        <node id="cif:g2b">
+          <data key="dn">event g2b !?~</data>
+          <data key="ng">
+            <y:ShapeNode>
+              <y:Geometry width="98.0"/>
+              <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;g2b&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!?~&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:BorderStyle width="2.0"/>
+              <y:Fill color="#ffc000"/>
+              <y:Shape type="rectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+        <node id="cif:b2m">
+          <data key="dn">event b2m !?~</data>
+          <data key="ng">
+            <y:ShapeNode>
+              <y:Geometry width="101.0"/>
+              <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;b2m&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!?~&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:BorderStyle width="2.0"/>
+              <y:Fill color="#ffc000"/>
+              <y:Shape type="rectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+        <node id="cif:m2e">
+          <data key="dn">event m2e !?~</data>
+          <data key="ng">
+            <y:ShapeNode>
+              <y:Geometry width="101.0"/>
+              <y:NodeLabel alignment="center">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;event&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;m2e&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;!?~&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:BorderStyle width="2.0"/>
+              <y:Fill color="#ffc000"/>
+              <y:Shape type="rectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+      </graph>
+      <data key="dn">Components</data>
+      <data key="ng">
+        <y:ProxyAutoBoundsNode>
+          <y:Realizers active="0">
+            <y:GroupNode>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#80ff40" modelName="internal" modelPosition="t">     Components</y:NodeLabel>
+              <y:Fill color="#eeeeee"/>
+              <y:Shape type="rectangle"/>
+              <y:State closed="false"/>
+            </y:GroupNode>
+            <y:GroupNode>
+              <y:Geometry height="30.0" width="129.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#80ff40" modelName="internal" modelPosition="t">     Components</y:NodeLabel>
+              <y:Fill color="#cccccc"/>
+              <y:Shape type="rectangle"/>
+              <y:State closed="true"/>
+            </y:GroupNode>
+          </y:Realizers>
+        </y:ProxyAutoBoundsNode>
+      </data>
+    </node>
+    <edge directed="false" source="cif:Generator:generated" target="cif:Generator::evtref0">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="none"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:Generator::evtref1" target="cif:Generator:exit">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:Buffer::evtref2" target="cif:Buffer:exit">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:Buffer:enter" target="cif:Buffer::evtref3">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:Machine::evtref4" target="cif:Machine:exit">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:Machine:enter" target="cif:Machine::evtref5">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:Exit:enter" target="cif:Exit::evtref6">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:generator:exit" target="cif:g2b">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:g2b" target="cif:buffer:enter">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:buffer:exit" target="cif:b2m">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:b2m" target="cif:machine1:enter">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:machine1:exit" target="cif:m2e">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:b2m" target="cif:machine2:enter">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:machine2:exit" target="cif:m2e">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge directed="true" source="cif:m2e" target="cif:exit:enter">
+      <data key="eg">
+        <y:PolyLineEdge>
+          <y:Arrows source="none" target="arrow"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+  </graph>
+</graphml>
diff --git a/v0.2-M1/cif/tools/cif2yed/tank.model.layouted.graphml b/v0.2-M1/cif/tools/cif2yed/tank.model.layouted.graphml
new file mode 100644
index 0000000..7f91dc1
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/tank.model.layouted.graphml
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
+  <!--Created by yEd 3.14.1-->
+  <key for="port" id="d0" yfiles.type="portgraphics"/>
+  <key for="port" id="d1" yfiles.type="portgeometry"/>
+  <key for="port" id="d2" yfiles.type="portuserdata"/>
+  <key attr.name="url" attr.type="string" for="node" id="d3"/>
+  <key attr.name="description" attr.type="string" for="node" id="d4"/>
+  <key for="node" id="d5" yfiles.type="nodegraphics"/>
+  <key for="graphml" id="d6" yfiles.type="resources"/>
+  <key attr.name="url" attr.type="string" for="edge" id="d7"/>
+  <key attr.name="description" attr.type="string" for="edge" id="d8"/>
+  <key for="edge" id="d9" yfiles.type="edgegraphics"/>
+  <graph edgedefault="directed" id="G">
+    <node id="n0" yfiles.foldertype="group">
+      <data key="d4"><![CDATA[group tank]]></data>
+      <data key="d5">
+        <y:ProxyAutoBoundsNode>
+          <y:Realizers active="0">
+            <y:GroupNode>
+              <y:Geometry height="157.84375" width="231.0" x="-283.5" y="16.578125"/>
+              <y:Fill color="#EEEEEE" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="1.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF0000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="italic" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="231.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;group&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;tank&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+              <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+              <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+            </y:GroupNode>
+            <y:GroupNode>
+              <y:Geometry height="30.0" width="119.0" x="-15.0" y="-15.0"/>
+              <y:Fill color="#CCCCCC" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="1.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF0000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="italic" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="119.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;group&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;tank&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+              <y:State closed="true" closedHeight="30.0" closedWidth="119.0" innerGraphDisplayEnabled="false"/>
+              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+              <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+            </y:GroupNode>
+          </y:Realizers>
+        </y:ProxyAutoBoundsNode>
+      </data>
+      <graph edgedefault="directed" id="n0:">
+        <node id="n0::n0" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[Declarations]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="108.84375" width="201.0" x="-268.5" y="50.578125"/>
+                  <y:Fill color="#FFFFCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#EEEE80" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="17.96875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="201.0" x="0.0" y="0.0">     Declarations</y:NodeLabel>
+                  <y:NodeLabel alignment="left" autoSizePolicy="content" borderDistance="18.0" bottomInset="3" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="81.0" leftInset="3" modelName="internal" modelPosition="t" rightInset="3" textColor="#000000" topInset="3" visible="true" width="197.0" x="2.0" y="18.0">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;cont&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;V&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;10.0&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;br&gt;&lt;span style="color:#0000ff;"&gt;alg&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;real&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Qi&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;controller.n&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;5.0&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;br&gt;&lt;span style="color:#0000ff;"&gt;alg&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;real&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Qo&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#8000ff;"&gt;sqrt&lt;/span&gt;&lt;span style="color:#402020;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;V&lt;/span&gt;&lt;span style="color:#402020;"&gt;);&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="color:#0000ff;"&gt;equation&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;V&lt;/span&gt;&lt;span style="color:#402020;"&gt;'&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Qi&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Qo&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="108.84375" closedWidth="201.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="54.0" width="109.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#FFFFCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#EEEE80" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="17.96875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="109.0" x="0.0" y="0.0">     Declarations</y:NodeLabel>
+                  <y:NodeLabel alignment="left" autoSizePolicy="content" borderDistance="18.0" bottomInset="3" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.96875" leftInset="3" modelName="internal" modelPosition="t" rightInset="3" textColor="#000000" topInset="3" visible="true" width="17.443359375" x="45.7783203125" y="18.0">...</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="54.0" closedWidth="109.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n0::n0:"/>
+        </node>
+      </graph>
+    </node>
+    <node id="n1" yfiles.foldertype="group">
+      <data key="d4"><![CDATA[automaton controller]]></data>
+      <data key="d5">
+        <y:ProxyAutoBoundsNode>
+          <y:Realizers active="0">
+            <y:GroupNode>
+              <y:Geometry height="108.84375" width="642.5999999999999" x="-37.5" y="15.171875"/>
+              <y:Fill color="#EEEEEE" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="1.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF0000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="642.5999999999999" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;controller&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+              <y:State closed="false" closedHeight="80.0" closedWidth="100.0" innerGraphDisplayEnabled="false"/>
+              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+              <y:BorderInsets bottom="4" bottomF="4.4375" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+            </y:GroupNode>
+            <y:GroupNode>
+              <y:Geometry height="30.0" width="183.0" x="-15.0" y="-15.0"/>
+              <y:Fill color="#CCCCCC" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="1.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#FF0000" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="183.0" x="0.0" y="0.0">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;controller&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Shape type="rectangle"/>
+              <y:State closed="true" closedHeight="30.0" closedWidth="183.0" innerGraphDisplayEnabled="false"/>
+              <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+              <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+            </y:GroupNode>
+          </y:Realizers>
+        </y:ProxyAutoBoundsNode>
+      </data>
+      <graph edgedefault="directed" id="n1:">
+        <node id="n1::n0" yfiles.foldertype="group">
+          <data key="d4"><![CDATA[Declarations]]></data>
+          <data key="d5">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="54.0" width="109.0" x="-22.5" y="50.578125"/>
+                  <y:Fill color="#FFFFCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#EEEE80" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="17.96875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="109.0" x="0.0" y="0.0">     Declarations</y:NodeLabel>
+                  <y:NodeLabel alignment="left" autoSizePolicy="content" borderDistance="18.0" bottomInset="3" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="21.0" leftInset="3" modelName="internal" modelPosition="t" rightInset="3" textColor="#000000" topInset="3" visible="true" width="95.0" x="7.0" y="18.0">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;alg&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#402020;"&gt;[&lt;/span&gt;&lt;span style="color:#006100;"&gt;0&lt;/span&gt;&lt;span style="color:#402020;"&gt;..&lt;/span&gt;&lt;span style="color:#006100;"&gt;1&lt;/span&gt;&lt;span style="color:#402020;"&gt;]&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;n&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false" closedHeight="54.0" closedWidth="109.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="54.0" width="109.0" x="-15.0" y="-15.0"/>
+                  <y:Fill color="#FFFFCC" transparent="false"/>
+                  <y:BorderStyle color="#000000" type="line" width="1.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#EEEE80" borderDistance="0.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="17.96875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="109.0" x="0.0" y="0.0">     Declarations</y:NodeLabel>
+                  <y:NodeLabel alignment="left" autoSizePolicy="content" borderDistance="18.0" bottomInset="3" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.96875" leftInset="3" modelName="internal" modelPosition="t" rightInset="3" textColor="#000000" topInset="3" visible="true" width="17.443359375" x="45.7783203125" y="18.0">...</y:NodeLabel>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true" closedHeight="54.0" closedWidth="109.0" innerGraphDisplayEnabled="false"/>
+                  <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
+                  <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+          <graph edgedefault="directed" id="n1::n0:"/>
+        </node>
+        <node id="n1::n1">
+          <data key="d4"><![CDATA[location closed]]></data>
+          <data key="d5">
+            <y:ShapeNode>
+              <y:Geometry height="54.90625" width="138.0" x="170.5" y="49.171875"/>
+              <y:Fill color="#CCCCFF" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="1.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="49.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="102.0" x="18.0" y="2.953125">&lt;html&gt;&lt;span style="color:#000000;"&gt;closed&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="color:#0000ff;"&gt;equation&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;n&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;0&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Shape type="roundrectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+        <node id="n1::n2">
+          <data key="d4"><![CDATA[<init>]]></data>
+          <data key="d5">
+            <y:ShapeNode>
+              <y:Geometry height="8.296875" width="17.0" x="97.0" y="73.4296875"/>
+              <y:Fill color="#CCCCFF" transparent="true"/>
+              <y:BorderStyle hasColor="false" type="line" width="1.0"/>
+              <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="4.0" x="6.5" y="2.1484375"/>
+              <y:Shape type="rectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+        <node id="n1::n3">
+          <data key="d4"><![CDATA[location opened]]></data>
+          <data key="d5">
+            <y:ShapeNode>
+              <y:Geometry height="54.90625" width="138.0" x="452.0999999999999" y="49.171875"/>
+              <y:Fill color="#CCCCFF" transparent="false"/>
+              <y:BorderStyle color="#000000" type="line" width="1.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="49.0" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="102.0" x="18.0" y="2.953125">&lt;html&gt;&lt;span style="color:#000000;"&gt;opened&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="color:#0000ff;"&gt;equation&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;n&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;1&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Shape type="roundrectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+      </graph>
+    </node>
+    <edge id="n1::e0" source="n1::n2" target="n1::n1">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="-2.2079039999999566" sy="-0.953125" tx="-69.00927734375" ty="0.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n1::e1" source="n1::n1" target="n1::n3">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="69.01775642458114" sy="-13.969902892510284" tx="-69.00079999999974" ty="-13.969902892510284"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:EdgeLabel alignment="center" backgroundColor="#EEEEEE" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="117.0" x="12.460638769531442" y="-23.465113961425786">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;when&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;tank.V&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;&amp;lt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;2&lt;/span&gt;&lt;/html&gt;<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
+          </y:EdgeLabel>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="n1::e2" source="n1::n3" target="n1::n1">
+      <data key="d9">
+        <y:PolyLineEdge>
+          <y:Path sx="-69.00079999999974" sy="13.507893662371615" tx="69.00639818065497" ty="13.507893662371615"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="standard"/>
+          <y:EdgeLabel alignment="center" backgroundColor="#EEEEEE" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasLineColor="false" height="19.0" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="125.0" x="-130.2056126464842" y="5.581887576660137">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;when&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;tank.V&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;&amp;gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;10&lt;/span&gt;&lt;/html&gt;<y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="anywhere" sideReference="relative_to_edge_flow"/>
+          </y:EdgeLabel>
+          <y:BendStyle smoothed="true"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+  </graph>
+  <data key="d6">
+    <y:Resources/>
+  </data>
+</graphml>
diff --git a/v0.2-M1/cif/tools/cif2yed/tank.model.layouted.png b/v0.2-M1/cif/tools/cif2yed/tank.model.layouted.png
new file mode 100644
index 0000000..a2825c7
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/tank.model.layouted.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cif2yed/tank.model.orig.graphml b/v0.2-M1/cif/tools/cif2yed/tank.model.orig.graphml
new file mode 100644
index 0000000..baa138d
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/tank.model.orig.graphml
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<graphml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd" xmlns="http://graphml.graphdrawing.org/xmlns">
+  <key for="node" id="ng" yfiles.type="nodegraphics"/>
+  <key for="edge" id="eg" yfiles.type="edgegraphics"/>
+  <key attr.name="description" attr.type="string" for="node" id="dn"/>
+  <graph edgedefault="directed" id="cif:">
+    <node id="cif:tank" yfiles.foldertype="group">
+      <data key="dn">group tank</data>
+      <data key="ng">
+        <y:ProxyAutoBoundsNode>
+          <y:Realizers active="0">
+            <y:GroupNode>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff0000" fontStyle="italic" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;group&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;tank&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Fill color="#eeeeee"/>
+              <y:Shape type="rectangle"/>
+              <y:State closed="false"/>
+            </y:GroupNode>
+            <y:GroupNode>
+              <y:Geometry height="30.0" width="119.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff0000" fontStyle="italic" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;group&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;tank&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Fill color="#cccccc"/>
+              <y:Shape type="rectangle"/>
+              <y:State closed="true"/>
+            </y:GroupNode>
+          </y:Realizers>
+        </y:ProxyAutoBoundsNode>
+      </data>
+      <graph edgedefault="directed" id="cif:tank:">
+        <node id="cif:tank::code" yfiles.foldertype="group">
+          <data key="dn">Declarations</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="108.84375" width="201.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#eeee80" modelName="internal" modelPosition="t">     Declarations</y:NodeLabel>
+                  <y:NodeLabel alignment="left" autoSizePolicy="content" borderDistance="18" bottomInset="3" leftInset="3" modelName="internal" modelPosition="t" rightInset="3" topInset="3">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;cont&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;V&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;10.0&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;br&gt;&lt;span style="color:#0000ff;"&gt;alg&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;real&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Qi&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;controller.n&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;5.0&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;br&gt;&lt;span style="color:#0000ff;"&gt;alg&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;real&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Qo&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#8000ff;"&gt;sqrt&lt;/span&gt;&lt;span style="color:#402020;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;V&lt;/span&gt;&lt;span style="color:#402020;"&gt;);&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="color:#0000ff;"&gt;equation&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;V&lt;/span&gt;&lt;span style="color:#402020;"&gt;'&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Qi&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;-&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;Qo&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle lineType="dashed"/>
+                  <y:Fill color="#ffffcc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="54.0" width="109.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#eeee80" modelName="internal" modelPosition="t">     Declarations</y:NodeLabel>
+                  <y:NodeLabel alignment="left" autoSizePolicy="content" borderDistance="18" bottomInset="3" leftInset="3" modelName="internal" modelPosition="t" rightInset="3" topInset="3">...</y:NodeLabel>
+                  <y:BorderStyle lineType="dashed"/>
+                  <y:Fill color="#ffffcc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+        </node>
+      </graph>
+    </node>
+    <node id="cif:controller" yfiles.foldertype="group">
+      <data key="dn">automaton controller</data>
+      <data key="ng">
+        <y:ProxyAutoBoundsNode>
+          <y:Realizers active="0">
+            <y:GroupNode>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff0000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;controller&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Fill color="#eeeeee"/>
+              <y:Shape type="rectangle"/>
+              <y:State closed="false"/>
+            </y:GroupNode>
+            <y:GroupNode>
+              <y:Geometry height="30.0" width="183.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#ff0000" fontStyle="plain" modelName="internal" modelPosition="t">&lt;html&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;automaton&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;controller&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Fill color="#cccccc"/>
+              <y:Shape type="rectangle"/>
+              <y:State closed="true"/>
+            </y:GroupNode>
+          </y:Realizers>
+        </y:ProxyAutoBoundsNode>
+      </data>
+      <graph edgedefault="directed" id="cif:controller:">
+        <node id="cif:controller::code" yfiles.foldertype="group">
+          <data key="dn">Declarations</data>
+          <data key="ng">
+            <y:ProxyAutoBoundsNode>
+              <y:Realizers active="0">
+                <y:GroupNode>
+                  <y:Geometry height="54.0" width="109.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#eeee80" modelName="internal" modelPosition="t">     Declarations</y:NodeLabel>
+                  <y:NodeLabel alignment="left" autoSizePolicy="content" borderDistance="18" bottomInset="3" leftInset="3" modelName="internal" modelPosition="t" rightInset="3" topInset="3">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;alg&lt;/span&gt;&amp;nbsp;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#402020;"&gt;[&lt;/span&gt;&lt;span style="color:#006100;"&gt;0&lt;/span&gt;&lt;span style="color:#402020;"&gt;..&lt;/span&gt;&lt;span style="color:#006100;"&gt;1&lt;/span&gt;&lt;span style="color:#402020;"&gt;]&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;n&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+                  <y:BorderStyle lineType="dashed"/>
+                  <y:Fill color="#ffffcc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="false"/>
+                </y:GroupNode>
+                <y:GroupNode>
+                  <y:Geometry height="54.0" width="109.0"/>
+                  <y:NodeLabel alignment="left" autoSizePolicy="node_width" backgroundColor="#eeee80" modelName="internal" modelPosition="t">     Declarations</y:NodeLabel>
+                  <y:NodeLabel alignment="left" autoSizePolicy="content" borderDistance="18" bottomInset="3" leftInset="3" modelName="internal" modelPosition="t" rightInset="3" topInset="3">...</y:NodeLabel>
+                  <y:BorderStyle lineType="dashed"/>
+                  <y:Fill color="#ffffcc"/>
+                  <y:Shape type="rectangle"/>
+                  <y:State closed="true"/>
+                </y:GroupNode>
+              </y:Realizers>
+            </y:ProxyAutoBoundsNode>
+          </data>
+        </node>
+        <node id="cif:controller::loc0">
+          <data key="dn">location closed</data>
+          <data key="ng">
+            <y:ShapeNode>
+              <y:Geometry height="54.90625" width="138.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="content" modelName="internal" modelPosition="c">&lt;html&gt;&lt;span style="color:#000000;"&gt;closed&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="color:#0000ff;"&gt;equation&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;n&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;0&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Fill color="#ccccff"/>
+              <y:Shape type="roundrectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+        <node id="cif:controller::loc0::init">
+          <data key="dn">&lt;init&gt;</data>
+          <data key="ng">
+            <y:ShapeNode>
+              <y:Geometry height="1" width="1"/>
+              <y:BorderStyle hasColor="false"/>
+              <y:Fill transparent="true"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+        <edge source="cif:controller::loc0::init" target="cif:controller::loc0">
+          <data key="eg">
+            <y:PolyLineEdge>
+              <y:Arrows source="none" target="arrow"/>
+              <y:BendStyle smoothed="true"/>
+            </y:PolyLineEdge>
+          </data>
+        </edge>
+        <edge source="cif:controller::loc0" target="cif:controller::loc1">
+          <data key="eg">
+            <y:PolyLineEdge>
+              <y:Arrows source="none" target="arrow"/>
+              <y:BendStyle smoothed="true"/>
+              <y:EdgeLabel alignment="center" backgroundColor="#eeeeee">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;when&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;tank.V&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;&amp;lt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;2&lt;/span&gt;&lt;/html&gt;</y:EdgeLabel>
+            </y:PolyLineEdge>
+          </data>
+        </edge>
+        <node id="cif:controller::loc1">
+          <data key="dn">location opened</data>
+          <data key="ng">
+            <y:ShapeNode>
+              <y:Geometry height="54.90625" width="138.0"/>
+              <y:NodeLabel alignment="left" autoSizePolicy="content" modelName="internal" modelPosition="c">&lt;html&gt;&lt;span style="color:#000000;"&gt;opened&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="color:#0000ff;"&gt;equation&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;n&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;1&lt;/span&gt;&lt;span style="color:#402020;"&gt;;&lt;/span&gt;&lt;/html&gt;</y:NodeLabel>
+              <y:Fill color="#ccccff"/>
+              <y:Shape type="roundrectangle"/>
+            </y:ShapeNode>
+          </data>
+        </node>
+        <edge source="cif:controller::loc1" target="cif:controller::loc0">
+          <data key="eg">
+            <y:PolyLineEdge>
+              <y:Arrows source="none" target="arrow"/>
+              <y:BendStyle smoothed="true"/>
+              <y:EdgeLabel alignment="center" backgroundColor="#eeeeee">&lt;html&gt;&lt;span style="color:#0000ff;"&gt;when&lt;/span&gt;&amp;nbsp;&lt;span style="color:#000000;"&gt;tank.V&lt;/span&gt;&amp;nbsp;&lt;span style="color:#402020;"&gt;&amp;gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color:#006100;"&gt;10&lt;/span&gt;&lt;/html&gt;</y:EdgeLabel>
+            </y:PolyLineEdge>
+          </data>
+        </edge>
+      </graph>
+    </node>
+  </graph>
+</graphml>
diff --git a/v0.2-M1/cif/tools/cif2yed/yed_structure_view.png b/v0.2-M1/cif/tools/cif2yed/yed_structure_view.png
new file mode 100644
index 0000000..3264271
--- /dev/null
+++ b/v0.2-M1/cif/tools/cif2yed/yed_structure_view.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/history_0.png b/v0.2-M1/cif/tools/cifsim/input/history_0.png
new file mode 100644
index 0000000..dabb044
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/history_0.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/history_0.png.svg b/v0.2-M1/cif/tools/cifsim/input/history_0.png.svg
new file mode 100644
index 0000000..947aca0
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/history_0.png.svg
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="400"
+   height="100"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="history_0.svg">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6"
+     inkscape:cx="60.979933"
+     inkscape:cy="60.575729"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004"
+       width="49"
+       height="29"
+       x="0.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="25.046877"
+       y="93.748047"
+       id="text3798"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800"
+         x="25.046877"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">0</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/input/history_01.png b/v0.2-M1/cif/tools/cifsim/input/history_01.png
new file mode 100644
index 0000000..1a7afc1
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/history_01.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/history_01.png.svg b/v0.2-M1/cif/tools/cifsim/input/history_01.png.svg
new file mode 100644
index 0000000..4f7a0ed
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/history_01.png.svg
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="400"
+   height="100"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="history_01.svg">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6"
+     inkscape:cx="60.979933"
+     inkscape:cy="60.575729"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004"
+       width="49"
+       height="29"
+       x="0.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="25.046877"
+       y="93.748047"
+       id="text3798"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800"
+         x="25.046877"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">0</tspan></text>
+    <rect
+       style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004-7"
+       width="49"
+       height="29"
+       x="49.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="74.046875"
+       y="93.748047"
+       id="text3798-9"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800-3"
+         x="74.046875"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">1</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/input/history_012.png b/v0.2-M1/cif/tools/cifsim/input/history_012.png
new file mode 100644
index 0000000..dc48d0f
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/history_012.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/history_012.png.svg b/v0.2-M1/cif/tools/cifsim/input/history_012.png.svg
new file mode 100644
index 0000000..035dca7
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/history_012.png.svg
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="400"
+   height="100"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="history_012.svg">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6"
+     inkscape:cx="60.979933"
+     inkscape:cy="60.575729"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004"
+       width="49"
+       height="29"
+       x="0.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="25.046877"
+       y="93.748047"
+       id="text3798"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800"
+         x="25.046877"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">0</tspan></text>
+    <rect
+       style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004-7"
+       width="49"
+       height="29"
+       x="49.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="74.046875"
+       y="93.748047"
+       id="text3798-9"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800-3"
+         x="74.046875"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">1</tspan></text>
+    <rect
+       style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004-7-3"
+       width="49"
+       height="29"
+       x="98.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="123.04688"
+       y="93.748047"
+       id="text3798-9-6"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800-3-1"
+         x="123.04688"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">2</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/input/history_0123.png b/v0.2-M1/cif/tools/cifsim/input/history_0123.png
new file mode 100644
index 0000000..173d818
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/history_0123.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/history_0123.png.svg b/v0.2-M1/cif/tools/cifsim/input/history_0123.png.svg
new file mode 100644
index 0000000..493d5bf
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/history_0123.png.svg
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="400"
+   height="100"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="history_0123.svg">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6"
+     inkscape:cx="60.979933"
+     inkscape:cy="60.575729"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004"
+       width="49"
+       height="29"
+       x="0.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="25.046877"
+       y="93.748047"
+       id="text3798"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800"
+         x="25.046877"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">0</tspan></text>
+    <rect
+       style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004-7"
+       width="49"
+       height="29"
+       x="49.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="74.046875"
+       y="93.748047"
+       id="text3798-9"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800-3"
+         x="74.046875"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">1</tspan></text>
+    <rect
+       style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004-7-3"
+       width="49"
+       height="29"
+       x="98.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="123.04688"
+       y="93.748047"
+       id="text3798-9-6"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800-3-1"
+         x="123.04688"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">2</tspan></text>
+    <rect
+       style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004-7-3-7"
+       width="49"
+       height="29"
+       x="147.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="172.04688"
+       y="93.748047"
+       id="text3798-9-6-0"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800-3-1-7"
+         x="172.04688"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">3</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/input/history_0234.png b/v0.2-M1/cif/tools/cifsim/input/history_0234.png
new file mode 100644
index 0000000..7e58676
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/history_0234.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/history_0234.png.svg b/v0.2-M1/cif/tools/cifsim/input/history_0234.png.svg
new file mode 100644
index 0000000..8e9fde1
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/history_0234.png.svg
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="400"
+   height="100"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="history_0234.svg">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6"
+     inkscape:cx="101.02419"
+     inkscape:cy="60.575729"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004"
+       width="49"
+       height="29"
+       x="0.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="25.046877"
+       y="93.748047"
+       id="text3798"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800"
+         x="25.046877"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">0</tspan></text>
+    <rect
+       style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004-7-3"
+       width="49"
+       height="29"
+       x="98.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="123.04688"
+       y="93.748047"
+       id="text3798-9-6"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800-3-1"
+         x="123.04688"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">2</tspan></text>
+    <rect
+       style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004-7-3-7"
+       width="49"
+       height="29"
+       x="147.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="172.04688"
+       y="93.748047"
+       id="text3798-9-6-0"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800-3-1-7"
+         x="172.04688"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">3</tspan></text>
+    <rect
+       style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3004-7-3-7-1"
+       width="49"
+       height="29"
+       x="196.5"
+       y="70.5" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="221.04688"
+       y="93.748047"
+       id="text3798-9-6-0-3"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3800-3-1-7-0"
+         x="221.04688"
+         y="93.748047"
+         style="font-size:24px;text-align:center;text-anchor:middle">4</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/input/interactive_gui_basic.png b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_basic.png
new file mode 100644
index 0000000..6199731
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_basic.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/interactive_gui_duration.png b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_duration.png
new file mode 100644
index 0000000..96feb7d
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_duration.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/interactive_gui_event.png b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_event.png
new file mode 100644
index 0000000..9d2ce5b
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_event.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/interactive_gui_reset.png b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_reset.png
new file mode 100644
index 0000000..94248fb
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_reset.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/interactive_gui_time.png b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_time.png
new file mode 100644
index 0000000..58e79f2
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_time.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/interactive_gui_undo12.png b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_undo12.png
new file mode 100644
index 0000000..56aeb7d
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_undo12.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/interactive_gui_undo2.png b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_undo2.png
new file mode 100644
index 0000000..de9628e
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_undo2.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/input/interactive_gui_undo_count.png b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_undo_count.png
new file mode 100644
index 0000000..8ba7aab
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/input/interactive_gui_undo_count.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/machine.cif b/v0.2-M1/cif/tools/cifsim/machine.cif
new file mode 100644
index 0000000..921bb4f
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/machine.cif
@@ -0,0 +1,22 @@
+event enter;
+event processed;
+event exit;
+
+automaton machine:
+  disc int count = 0;
+  disc real process_time;
+  disc dist real d = normal(10, 7);
+  cont t der 1.0;
+
+  location waiting:
+    initial;
+    edge enter do (process_time, d) := sample d, t := 0 goto processing;
+
+  location processing:
+    edge processed when t >= process_time goto done;
+
+  location done:
+    edge exit do count := count + 1 goto waiting;
+end
+
+print machine.count for final;
diff --git a/v0.2-M1/cif/tools/cifsim/machine.tooldef b/v0.2-M1/cif/tools/cifsim/machine.tooldef
new file mode 100644
index 0000000..3959835
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/machine.tooldef
@@ -0,0 +1,21 @@
+from "lib:cif" import *;
+
+cifsim("machine.cif --compile-only=on");
+
+rmfile("out.txt", force=true);
+
+for x in range(1000):
+    string args = "machine.cifcode -i auto -a first -t 100 -o print";
+    cifsim(args, stdout="out.txt", appendOut=true);
+end
+
+double minimum = 9999;
+double maximum = -9999;
+for line in readlines("out.txt"):
+    double value = <double>line;
+    minimum = min(minimum, value);
+    maximum = max(maximum, value);
+end
+
+outln("Minimum: %.2f", minimum);
+outln("Maximum: %.2f", maximum);
diff --git a/v0.2-M1/cif/tools/cifsim/output/plotviz_sshot.png b/v0.2-M1/cif/tools/cifsim/output/plotviz_sshot.png
new file mode 100644
index 0000000..758b184
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/plotviz_sshot.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/print/trace_extended.png b/v0.2-M1/cif/tools/cifsim/output/print/trace_extended.png
new file mode 100644
index 0000000..722076f
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/print/trace_extended.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/print/trace_extended.png.svg b/v0.2-M1/cif/tools/cifsim/output/print/trace_extended.png.svg
new file mode 100644
index 0000000..6b6538d
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/print/trace_extended.png.svg
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="850"
+   height="120"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="trace_extended.png.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend"
+       style="overflow:visible">
+      <path
+         id="path3813"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="497.52518"
+     inkscape:cy="115.33604"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-80)">
+    <path
+       sodipodi:type="arc"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873415;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:5.39240485, 5.39240485;stroke-dashoffset:0"
+       id="path2839"
+       sodipodi:cx="105.5"
+       sodipodi:cy="65.5"
+       sodipodi:rx="35.5"
+       sodipodi:ry="35.5"
+       d="M 141,65.5 C 141,85.106109 125.10611,101 105.5,101 85.893891,101 70,85.106109 70,65.5 70,45.893891 85.893891,30 105.5,30 125.10611,30 141,45.893891 141,65.5 z"
+       transform="matrix(1.1126761,0,0,1.1126761,-67.387327,77.119714)" />
+    <path
+       transform="matrix(1.1126761,0,0,1.1126761,682.61267,77.119714)"
+       d="M 141,65.5 C 141,85.106109 125.10611,101 105.5,101 85.893891,101 70,85.106109 70,65.5 70,45.893891 85.893891,30 105.5,30 125.10611,30 141,45.893891 141,65.5 z"
+       sodipodi:ry="35.5"
+       sodipodi:rx="35.5"
+       sodipodi:cy="65.5"
+       sodipodi:cx="105.5"
+       id="path3613"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873427;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:5.3924055, 5.3924055;stroke-dashoffset:0"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:type="arc"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873421;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3615"
+       sodipodi:cx="105.5"
+       sodipodi:cy="65.5"
+       sodipodi:rx="35.5"
+       sodipodi:ry="35.5"
+       d="M 141,65.5 C 141,85.106109 125.10611,101 105.5,101 85.893891,101 70,85.106109 70,65.5 70,45.893891 85.893891,30 105.5,30 125.10611,30 141,45.893891 141,65.5 z"
+       transform="matrix(1.1126761,0,0,1.1126761,382.61267,77.119714)" />
+    <path
+       transform="matrix(1.1126761,0,0,1.1126761,532.61267,77.119714)"
+       d="M 141,65.5 C 141,85.106109 125.10611,101 105.5,101 85.893891,101 70,85.106109 70,65.5 70,45.893891 85.893891,30 105.5,30 125.10611,30 141,45.893891 141,65.5 z"
+       sodipodi:ry="35.5"
+       sodipodi:rx="35.5"
+       sodipodi:cy="65.5"
+       sodipodi:cx="105.5"
+       id="path3617"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873421;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:type="arc"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873421;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3619"
+       sodipodi:cx="105.5"
+       sodipodi:cy="65.5"
+       sodipodi:rx="35.5"
+       sodipodi:ry="35.5"
+       d="M 141,65.5 C 141,85.106109 125.10611,101 105.5,101 85.893891,101 70,85.106109 70,65.5 70,45.893891 85.893891,30 105.5,30 125.10611,30 141,45.893891 141,65.5 z"
+       transform="matrix(1.1126761,0,0,1.1126761,82.612673,77.119714)" />
+    <path
+       transform="matrix(1.1126761,0,0,1.1126761,232.61267,77.119714)"
+       d="M 141,65.5 C 141,85.106109 125.10611,101 105.5,101 85.893891,101 70,85.106109 70,65.5 70,45.893891 85.893891,30 105.5,30 125.10611,30 141,45.893891 141,65.5 z"
+       sodipodi:ry="35.5"
+       sodipodi:rx="35.5"
+       sodipodi:cy="65.5"
+       sodipodi:cx="105.5"
+       id="path3621"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873421;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       sodipodi:type="arc" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:6, 6;stroke-dashoffset:0;marker-start:none;marker-end:url(#Arrow1Lend)"
+       d="m 89.500003,49.999999 70.999997,0"
+       id="path3623"
+       transform="translate(0,100)"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#path2839"
+       inkscape:connection-end="#path3619" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="102.99219"
+       y="140"
+       id="text4255"><tspan
+         sodipodi:role="line"
+         id="tspan4257"
+         x="102.99219"
+         y="140"
+         style="font-style:italic;-inkscape-font-specification:Bitstream Vera Sans Oblique">initial</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 239.5,49.999999 71,0"
+       id="path4259"
+       transform="translate(0,100)"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#path3619"
+       inkscape:connection-end="#path3621" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 389.5,49.999999 71,0"
+       id="path4261"
+       transform="translate(0,100)"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#path3621"
+       inkscape:connection-end="#path3615" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 539.5,49.999999 71,0"
+       id="path4263"
+       transform="translate(0,100)"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#path3615"
+       inkscape:connection-end="#path3617" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:6, 6;stroke-dashoffset:0;marker-end:url(#Arrow1Lend)"
+       d="m 689.5,49.999999 71,0"
+       id="path4265"
+       transform="translate(0,100)"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#path3617"
+       inkscape:connection-end="#path3613" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="20.785158"
+       y="155.71875"
+       id="text4267"><tspan
+         sodipodi:role="line"
+         id="tspan4269"
+         x="20.785158"
+         y="155.71875">cnt = 5</tspan></text>
+    <text
+       id="text4455"
+       y="155.71875"
+       x="170.78516"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="155.71875"
+         x="170.78516"
+         id="tspan4457"
+         sodipodi:role="line">cnt = 5</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="320.78516"
+       y="155.71875"
+       id="text4459"><tspan
+         sodipodi:role="line"
+         id="tspan4461"
+         x="320.78516"
+         y="155.71875">cnt = 6</tspan></text>
+    <text
+       id="text4463"
+       y="155.71875"
+       x="470.73047"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="155.71875"
+         x="470.73047"
+         id="tspan4465"
+         sodipodi:role="line">cnt = 7</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="620.78516"
+       y="155.71875"
+       id="text4467"><tspan
+         sodipodi:role="line"
+         id="tspan4469"
+         x="620.78516"
+         y="155.71875">cnt = 6</tspan></text>
+    <text
+       id="text4471"
+       y="155.71875"
+       x="770.78516"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="155.71875"
+         x="770.78516"
+         id="tspan4473"
+         sodipodi:role="line">cnt = 6</tspan></text>
+    <text
+       id="text4475"
+       y="140"
+       x="260.18359"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="140"
+         x="260.18359"
+         id="tspan4477"
+         sodipodi:role="line">add</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="410.18359"
+       y="140"
+       id="text4479"><tspan
+         sodipodi:role="line"
+         id="tspan4481"
+         x="410.18359"
+         y="140">add</tspan></text>
+    <text
+       id="text4483"
+       y="140"
+       x="544.30859"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="140"
+         x="544.30859"
+         id="tspan4485"
+         sodipodi:role="line">remove</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="708.32812"
+       y="140"
+       id="text4487"><tspan
+         sodipodi:role="line"
+         id="tspan4489"
+         x="708.32812"
+         y="140"
+         style="font-style:italic;-inkscape-font-specification:Bitstream Vera Sans Oblique">final</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="190.04297"
+       y="100"
+       id="text4491"><tspan
+         sodipodi:role="line"
+         id="tspan4493"
+         x="190.04297"
+         y="100">S1</tspan></text>
+    <text
+       id="text4495"
+       y="100"
+       x="11.773439"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="100"
+         x="11.773439"
+         id="tspan4497"
+         sodipodi:role="line"
+         style="font-style:normal;-inkscape-font-specification:Bitstream Vera Sans">S0 (= S1)</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="340.10547"
+       y="100"
+       id="text4499"><tspan
+         sodipodi:role="line"
+         id="tspan4501"
+         x="340.10547"
+         y="100">S2</tspan></text>
+    <text
+       id="text4503"
+       y="100"
+       x="489.94531"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="100"
+         x="489.94531"
+         id="tspan4505"
+         sodipodi:role="line">S3</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="639.75391"
+       y="100"
+       id="text4507"><tspan
+         sodipodi:role="line"
+         id="tspan4509"
+         x="639.75391"
+         y="100">S4</tspan></text>
+    <text
+       id="text4511"
+       y="100"
+       x="762.38281"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="100"
+         x="762.38281"
+         id="tspan4513"
+         sodipodi:role="line"
+         style="font-style:normal;-inkscape-font-specification:Bitstream Vera Sans">S5 (= S4)</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/print/trace_normal.png b/v0.2-M1/cif/tools/cifsim/output/print/trace_normal.png
new file mode 100644
index 0000000..b4666f7
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/print/trace_normal.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/print/trace_normal.png.svg b/v0.2-M1/cif/tools/cifsim/output/print/trace_normal.png.svg
new file mode 100644
index 0000000..b72867c
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/print/trace_normal.png.svg
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="850"
+   height="120"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="trace_normal.png.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend"
+       style="overflow:visible">
+      <path
+         id="path3813"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="497.52518"
+     inkscape:cy="115.33604"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-80)">
+    <path
+       sodipodi:type="arc"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873421;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3615"
+       sodipodi:cx="105.5"
+       sodipodi:cy="65.5"
+       sodipodi:rx="35.5"
+       sodipodi:ry="35.5"
+       d="M 141,65.5 C 141,85.106109 125.10611,101 105.5,101 85.893891,101 70,85.106109 70,65.5 70,45.893891 85.893891,30 105.5,30 125.10611,30 141,45.893891 141,65.5 z"
+       transform="matrix(1.1126761,0,0,1.1126761,382.61267,77.119714)" />
+    <path
+       transform="matrix(1.1126761,0,0,1.1126761,532.61267,77.119714)"
+       d="M 141,65.5 C 141,85.106109 125.10611,101 105.5,101 85.893891,101 70,85.106109 70,65.5 70,45.893891 85.893891,30 105.5,30 125.10611,30 141,45.893891 141,65.5 z"
+       sodipodi:ry="35.5"
+       sodipodi:rx="35.5"
+       sodipodi:cy="65.5"
+       sodipodi:cx="105.5"
+       id="path3617"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873421;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       sodipodi:type="arc" />
+    <path
+       sodipodi:type="arc"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873421;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3619"
+       sodipodi:cx="105.5"
+       sodipodi:cy="65.5"
+       sodipodi:rx="35.5"
+       sodipodi:ry="35.5"
+       d="M 141,65.5 C 141,85.106109 125.10611,101 105.5,101 85.893891,101 70,85.106109 70,65.5 70,45.893891 85.893891,30 105.5,30 125.10611,30 141,45.893891 141,65.5 z"
+       transform="matrix(1.1126761,0,0,1.1126761,82.612673,77.119714)" />
+    <path
+       transform="matrix(1.1126761,0,0,1.1126761,232.61267,77.119714)"
+       d="M 141,65.5 C 141,85.106109 125.10611,101 105.5,101 85.893891,101 70,85.106109 70,65.5 70,45.893891 85.893891,30 105.5,30 125.10611,30 141,45.893891 141,65.5 z"
+       sodipodi:ry="35.5"
+       sodipodi:rx="35.5"
+       sodipodi:cy="65.5"
+       sodipodi:cx="105.5"
+       id="path3621"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873421;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       sodipodi:type="arc" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 239.5,49.999999 71,0"
+       id="path4259"
+       transform="translate(0,100)"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#path3619"
+       inkscape:connection-end="#path3621" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 389.5,49.999999 71,0"
+       id="path4261"
+       transform="translate(0,100)"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#path3621"
+       inkscape:connection-end="#path3615" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 539.5,49.999999 71,0"
+       id="path4263"
+       transform="translate(0,100)"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#path3615"
+       inkscape:connection-end="#path3617" />
+    <text
+       id="text4455"
+       y="155.71875"
+       x="170.78516"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="155.71875"
+         x="170.78516"
+         id="tspan4457"
+         sodipodi:role="line">cnt = 5</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="320.55078"
+       y="155.71875"
+       id="text4459"><tspan
+         sodipodi:role="line"
+         id="tspan4461"
+         x="320.55078"
+         y="155.71875">cnt = 6</tspan></text>
+    <text
+       id="text4463"
+       y="155.71875"
+       x="470.73047"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="155.71875"
+         x="470.73047"
+         id="tspan4465"
+         sodipodi:role="line">cnt = 7</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="620.78516"
+       y="155.71875"
+       id="text4467"><tspan
+         sodipodi:role="line"
+         id="tspan4469"
+         x="620.78516"
+         y="155.71875">cnt = 6</tspan></text>
+    <text
+       id="text4475"
+       y="140"
+       x="260.18359"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="140"
+         x="260.18359"
+         id="tspan4477"
+         sodipodi:role="line">add</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="410.18359"
+       y="140"
+       id="text4479"><tspan
+         sodipodi:role="line"
+         id="tspan4481"
+         x="410.18359"
+         y="140">add</tspan></text>
+    <text
+       id="text4483"
+       y="140"
+       x="544.30859"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="140"
+         x="544.30859"
+         id="tspan4485"
+         sodipodi:role="line">remove</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="190.04297"
+       y="100"
+       id="text4491"><tspan
+         sodipodi:role="line"
+         id="tspan4493"
+         x="190.04297"
+         y="100">S1</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="340.10547"
+       y="100"
+       id="text4499"><tspan
+         sodipodi:role="line"
+         id="tspan4501"
+         x="340.10547"
+         y="100">S2</tspan></text>
+    <text
+       id="text4503"
+       y="100"
+       x="489.94531"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="100"
+         x="489.94531"
+         id="tspan4505"
+         sodipodi:role="line">S3</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="639.75391"
+       y="100"
+       id="text4507"><tspan
+         sodipodi:role="line"
+         id="tspan4509"
+         x="639.75391"
+         y="100">S4</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/print/transition.png b/v0.2-M1/cif/tools/cifsim/output/print/transition.png
new file mode 100644
index 0000000..66269f8
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/print/transition.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/print/transition.png.svg b/v0.2-M1/cif/tools/cifsim/output/print/transition.png.svg
new file mode 100644
index 0000000..c61403b
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/print/transition.png.svg
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="850"
+   height="120"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="transition.png.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend"
+       style="overflow:visible">
+      <path
+         id="path3813"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="497.52518"
+     inkscape:cy="115.33604"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-80)">
+    <path
+       sodipodi:type="arc"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873421;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="path3615"
+       sodipodi:cx="105.5"
+       sodipodi:cy="65.5"
+       sodipodi:rx="35.5"
+       sodipodi:ry="35.5"
+       d="m 141,65.5 a 35.5,35.5 0 1 1 -71,0 35.5,35.5 0 1 1 71,0 z"
+       transform="matrix(1.1126761,0,0,1.1126761,142.61267,77.119714)" />
+    <path
+       transform="matrix(1.1126761,0,0,1.1126761,-67.38733,77.119714)"
+       d="m 141,65.5 a 35.5,35.5 0 1 1 -71,0 35.5,35.5 0 1 1 71,0 z"
+       sodipodi:ry="35.5"
+       sodipodi:rx="35.5"
+       sodipodi:cy="65.5"
+       sodipodi:cx="105.5"
+       id="path3621"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:0.89873421;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       sodipodi:type="arc" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 89.5,150 131,0"
+       id="path4261"
+       inkscape:connector-type="polyline"
+       inkscape:connection-start="#path3621"
+       inkscape:connection-end="#path3615" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="117.33203"
+       y="140"
+       id="text4479"><tspan
+         sodipodi:role="line"
+         id="tspan4481"
+         x="117.33203"
+         y="140">transition</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="7.2773438"
+       y="100"
+       id="text4499"><tspan
+         sodipodi:role="line"
+         id="tspan4501"
+         x="7.2773438"
+         y="100">pre/source</tspan></text>
+    <text
+       id="text4503"
+       y="100"
+       x="215.14062"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="100"
+         x="215.14062"
+         id="tspan4505"
+         sodipodi:role="line">post/target</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/stateviz_algvar.png b/v0.2-M1/cif/tools/cifsim/output/stateviz_algvar.png
new file mode 100644
index 0000000..d286cf8
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/stateviz_algvar.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/stateviz_aut.png b/v0.2-M1/cif/tools/cifsim/output/stateviz_aut.png
new file mode 100644
index 0000000..3c9ea3f
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/stateviz_aut.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/stateviz_contvar.png b/v0.2-M1/cif/tools/cifsim/output/stateviz_contvar.png
new file mode 100644
index 0000000..858d333
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/stateviz_contvar.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/stateviz_deriv.png b/v0.2-M1/cif/tools/cifsim/output/stateviz_deriv.png
new file mode 100644
index 0000000..c0cf5d5
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/stateviz_deriv.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/stateviz_discvar.png b/v0.2-M1/cif/tools/cifsim/output/stateviz_discvar.png
new file mode 100644
index 0000000..27a585b
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/stateviz_discvar.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/stateviz_sshot.png b/v0.2-M1/cif/tools/cifsim/output/stateviz_sshot.png
new file mode 100644
index 0000000..5d8c7be
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/stateviz_sshot.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products.cif
new file mode 100644
index 0000000..62f8acd
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products.cif
@@ -0,0 +1,26 @@
+svgfile "buffers_products.svg";
+
+buffer0: Buffer(0);
+buffer1: Buffer(1);
+
+group def Buffer(alg int nr):
+  svgcopy id "buffer" post <string>nr;
+
+  svgmove id "buffer" + <string>nr to 10 + nr * 110, 10;
+
+  product0: Product(nr, 0);
+  product1: Product(nr, 1);
+  product2: Product(nr, 2);
+end
+
+group def Product(alg int bufferNr, productNr):
+  svgcopy id "product" + <string>bufferNr post "_" + <string>productNr;
+
+  svgout id fmt("product%d_%d", bufferNr, productNr)
+         attr "transform"
+         value fmt("translate(%d,0)", productNr * 20);
+
+  svgout id fmt("product%d_%d", bufferNr, productNr)
+         attr "visibility"
+         value "visible";
+end
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products.png
new file mode 100644
index 0000000..aa5e402
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products.svg
new file mode 100644
index 0000000..e72394c
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products.svg
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="220" height="70" id="root" version="1.1">
+  <g id="buffer">
+    <rect width="100" height="50" x="-120" y="10" id="background" style="fill:#ff0000"/>
+    <rect width="10"  height="30" x="-110" y="20" id="product"    style="fill:#8b0000;visibility:hidden;"/>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products_inkscape.png
new file mode 100644
index 0000000..496dc46
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/buffers_products/buffers_products_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/inkscape/inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/inkscape/inkscape.png
new file mode 100644
index 0000000..c831164
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/inkscape/inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/inkscape/inkscape_props_xml.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/inkscape/inkscape_props_xml.png
new file mode 100644
index 0000000..010161a
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/inkscape/inkscape_props_xml.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp.cif
new file mode 100644
index 0000000..81e5f71
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp.cif
@@ -0,0 +1,14 @@
+svgfile "lamp.svg";
+
+automaton lamp:
+  cont t der 1.0;
+
+  location Off:
+    initial;
+    edge when t >= 1.0 do t := 0.0 goto On;
+
+  location On:
+    edge when t >= 2.0 do t := 0.0 goto Off;
+
+  svgout id "lamp" attr "fill" value if Off: "gray" else "yellow" end;
+end
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp.svg
new file mode 100644
index 0000000..e99e4e0
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp.svg
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="75"
+   height="100"
+   id="svg2819"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="lamp.svg">
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="903"
+     inkscape:window-height="484"
+     id="namedview5"
+     showgrid="false"
+     inkscape:zoom="2.247619"
+     inkscape:cx="37"
+     inkscape:cy="52.277542"
+     inkscape:window-x="702"
+     inkscape:window-y="120"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg2819" />
+  <defs
+     id="defs2821">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 52.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="74 : 52.5 : 1"
+       inkscape:persp3d-origin="37 : 35 : 1"
+       id="perspective9" />
+  </defs>
+  <path
+     d="m 62.43731,34.999017 a 24.937405,24.938483 0 0 1 -49.87481,0 24.937405,24.938483 0 1 1 49.87481,0 z"
+     id="lamp"
+     style="fill:#ff0000;fill-rule:evenodd;stroke:#000000;stroke-width:0.09688673px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp.tooldef
new file mode 100644
index 0000000..094f362
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp.tooldef
@@ -0,0 +1,8 @@
+from "lib:cif" import *;
+
+cifsim(
+    "lamp.cif",
+    "-t 10",
+    "-i auto",
+    "--frame-rate=20",
+);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp_inkscape.png
new file mode 100644
index 0000000..7f6aebc
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp_sim_off.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp_sim_off.png
new file mode 100644
index 0000000..32a039e
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp_sim_off.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp_sim_on.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp_sim_on.png
new file mode 100644
index 0000000..a45c625
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamp/lamp_sim_on.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2.cif
new file mode 100644
index 0000000..b69d3fc
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2.cif
@@ -0,0 +1,21 @@
+// Behavior.
+automaton def Lamp():
+  event toggle;
+  disc bool on = false;
+
+  location:
+    initial;
+    edge toggle do on := not on;
+end
+
+lamp1: Lamp();
+lamp2: Lamp();
+
+// Visualization.
+svgfile "lamps2.svg";
+
+svgout id "lamp1" attr "fill" value if lamp1.on: "yellow" else "silver" end;
+svgout id "lamp2" attr "fill" value if lamp2.on: "yellow" else "silver" end;
+
+svgout id "lamp1" attr "stroke-width" value if lamp1.on: 5 else 2 end;
+svgout id "lamp2" attr "stroke-width" value if lamp2.on: 5 else 2 end;
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2.svg
new file mode 100644
index 0000000..f8319ab
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2.svg
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="700"
+   height="100"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="lamps2.svg">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="27.047"
+     inkscape:cy="-1.3649001"
+     inkscape:document-units="px"
+     inkscape:current-layer="svg2"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <path
+     sodipodi:type="arc"
+     style="fill:#c0c0c0;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+     id="lamp1"
+     sodipodi:cx="125.5"
+     sodipodi:cy="139.5"
+     sodipodi:rx="50.5"
+     sodipodi:ry="48.5"
+     d="m 176,139.5 a 50.5,48.5 0 1 1 -101,0 50.5,48.5 0 1 1 101,0 z"
+     transform="matrix(0.58415842,0,0,0.60824742,-23.311881,-34.850515)" />
+  <path
+     transform="matrix(0.58415842,0,0,0.60824742,76.688119,-34.850515)"
+     d="m 176,139.5 a 50.5,48.5 0 1 1 -101,0 50.5,48.5 0 1 1 101,0 z"
+     sodipodi:ry="48.5"
+     sodipodi:rx="50.5"
+     sodipodi:cy="139.5"
+     sodipodi:cx="125.5"
+     id="lamp2"
+     style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:4.9993185;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+     sodipodi:type="arc" />
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2.tooldef
new file mode 100644
index 0000000..f26a3cd
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2.tooldef
@@ -0,0 +1,23 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim(
+    "lamps2.cif",
+    "-i auto",
+    "-a random",
+    "--auto-time=random:1.0",
+    "--env-events=*",
+    "--frame-rate=20",
+);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2_inkscape.png
new file mode 100644
index 0000000..a7148ba
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps2_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.cif
new file mode 100644
index 0000000..35ae30c
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.cif
@@ -0,0 +1,26 @@
+svgfile "lamps3.svg";
+
+automaton def Lamp(alg int nr):
+  // Behavior.
+  event toggle;
+  disc bool on = false;
+
+  location:
+    initial;
+    edge toggle do on := not on;
+
+  // Visualization.
+  svgcopy id "lamp" post <string>nr;
+
+  svgmove id "lamp" + <string>nr to 20 + (nr - 1) * 100, 20;
+
+  svgout id "lamp" + <string>nr attr "fill"
+    value if on: "yellow" else "silver" end;
+
+  svgout id "lamp" + <string>nr attr "stroke-width"
+    value if on: 5 else 2 end;
+end
+
+lamp1: Lamp(1);
+lamp2: Lamp(2);
+lamp3: Lamp(3);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.simple.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.simple.cif
new file mode 100644
index 0000000..55a5cd9
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.simple.cif
@@ -0,0 +1,34 @@
+automaton lamp1:
+  event toggle;
+  disc bool on = false;
+  svgcopy id "lamp" post "1";
+  svgmove id "lamp1" to 20, 20;
+  svgout id "lamp1" attr "fill" value if on: "yellow" else "silver" end;
+  svgout id "lamp1" attr "stroke-width" value if on: 5 else 2 end;
+  location:
+    initial;
+    edge toggle do on := not on;
+end
+automaton lamp2:
+  event toggle;
+  disc bool on = false;
+  svgcopy id "lamp" post "2";
+  svgmove id "lamp2" to 120, 20;
+  svgout id "lamp2" attr "fill" value if on: "yellow" else "silver" end;
+  svgout id "lamp2" attr "stroke-width" value if on: 5 else 2 end;
+  location:
+    initial;
+    edge toggle do on := not on;
+end
+automaton lamp3:
+  event toggle;
+  disc bool on = false;
+  svgcopy id "lamp" post "3";
+  svgmove id "lamp3" to 220, 20;
+  svgout id "lamp3" attr "fill" value if on: "yellow" else "silver" end;
+  svgout id "lamp3" attr "stroke-width" value if on: 5 else 2 end;
+  location:
+    initial;
+    edge toggle do on := not on;
+end
+svgfile "lamps3.svg";
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.svg
new file mode 100644
index 0000000..5ecaf59
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.svg
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="700"
+   height="100"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="lamps3.svg">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="27.047"
+     inkscape:cy="-1.3649001"
+     inkscape:document-units="px"
+     inkscape:current-layer="svg2"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <path
+     sodipodi:type="arc"
+     style="fill:#c0c0c0;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+     id="lamp"
+     sodipodi:cx="125.5"
+     sodipodi:cy="139.5"
+     sodipodi:rx="50.5"
+     sodipodi:ry="48.5"
+     d="m 176,139.5 a 50.5,48.5 0 1 1 -101,0 50.5,48.5 0 1 1 101,0 z"
+     transform="matrix(0.58415842,0,0,0.60824742,-163.31188,-34.850515)" />
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.tooldef
new file mode 100644
index 0000000..7af93f1
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3.tooldef
@@ -0,0 +1,29 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cif2cif(
+    "lamps3.cif",
+    "-o lamps3.simple.cif",
+    "-t elim-comp-def-inst,elim-alg-vars,simplify-values",
+);
+
+cifsim(
+    "lamps3.cif",
+    "-i auto",
+    "-a random",
+    "--auto-time=random:1.0",
+    "--env-events=*",
+    "--frame-rate=20",
+);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3_inkscape.png
new file mode 100644
index 0000000..967bec1
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/lamps/lamps3_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate.cif
new file mode 100644
index 0000000..52f871c
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate.cif
@@ -0,0 +1,23 @@
+// Behavior.
+const real MARGIN = 0.01;
+
+automaton machine:
+  cont rate der if rate < target_rate:  1.0
+                else                   -1.0
+                end;
+  disc real target_rate = 0.5;
+  disc dist real rate_sampler = uniform(0.0, 1.0);
+
+  location:
+    initial;
+    edge when rate - MARGIN <= target_rate and target_rate <= rate + MARGIN
+         do (target_rate, rate_sampler) := sample rate_sampler;
+end
+
+// Visualization.
+svgfile "rate.svg";
+
+svgout id "circle_bg_rect" attr "height"
+  value scale(machine.rate, 0, 1, 58, 0);
+
+svgout id "circle_bg_rect" attr "fill" value "white";
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate.svg
new file mode 100644
index 0000000..f6254e8
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate.svg
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="100"
+   height="100"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="rate.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow2Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Lend"
+       style="overflow:visible">
+      <path
+         id="path3734"
+         style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(-1.1,0,0,-1.1,-1.1,0)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective3623"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3653"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3686"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3686-3"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3772"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective2860"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective2897"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="4.277996"
+     inkscape:cx="111.50559"
+     inkscape:cy="75.443202"
+     inkscape:document-units="px"
+     inkscape:current-layer="svg2"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="g_grp"
+     transform="translate(-308.07459,-900.56694)">
+    <path
+       sodipodi:type="arc"
+       style="fill:#00ff00;fill-opacity:1;stroke:none"
+       id="circle_bg"
+       sodipodi:cx="559.60779"
+       sodipodi:cy="106.03077"
+       sodipodi:rx="37.868198"
+       sodipodi:ry="37.868198"
+       d="m 597.47599,106.03077 a 37.868198,37.868198 0 1 1 -75.7364,0 37.868198,37.868198 0 1 1 75.7364,0 z"
+       transform="matrix(0.77901778,0,0,0.77901778,-79.188421,868.26599)" />
+    <rect
+       style="fill:#00ffff;fill-opacity:1;stroke:#804000;stroke-width:0;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="circle_bg_rect"
+       width="73.388466"
+       height="15"
+       x="320.83356"
+       y="921.86584" />
+    <path
+       transform="matrix(0.77901778,0,0,0.77901778,-79.188421,868.26599)"
+       d="m 597.47599,106.03077 a 37.868198,37.868198 0 1 1 -75.7364,0 37.868198,37.868198 0 1 1 75.7364,0 z"
+       sodipodi:ry="37.868198"
+       sodipodi:rx="37.868198"
+       sodipodi:cy="106.03077"
+       sodipodi:cx="559.60779"
+       id="circle"
+       style="fill:none;stroke:#000000;stroke-width:2.56733561;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:type="arc" />
+    <text
+       id="rate_txt"
+       y="956.69006"
+       x="356.96692"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         style="text-align:center;text-anchor:middle"
+         y="956.69006"
+         x="356.96692"
+         id="tspan3743-4"
+         sodipodi:role="line">rate</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate.tooldef
new file mode 100644
index 0000000..1c6ecf9
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate.tooldef
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cif2sim(
+    "rate.cif",
+    "-i auto",
+    "-a first",
+    "--frame-rate=25",
+);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate_inkscape.png
new file mode 100644
index 0000000..4c23207
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate_partial.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate_partial.png
new file mode 100644
index 0000000..865f364
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/rate/rate_partial.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon.cif
new file mode 100644
index 0000000..7d7b9a3
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon.cif
@@ -0,0 +1,21 @@
+svgfile "sun_moon.svg";
+
+automaton sun_moon:
+  cont t der 1.0;
+
+  location Day:
+    initial;
+    edge when t >= 12.0 do t := 0.0 goto Night;
+
+  location Night:
+    edge when t >= 12.0 do t := 0.0 goto Day;
+
+  svgout id "sun" attr "visibility"
+    value if Day: "visible" else "hidden" end;
+
+  svgout id "moon" attr "visibility"
+    value switch self:
+      case Day:   "hidden"
+      case Night: "visible"
+    end;
+end
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon.svg
new file mode 100644
index 0000000..466caa3
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="400"
+   height="200"
+   id="sun_moon">
+  <defs
+     id="defs4" />
+  <g
+     transform="translate(0,-852.36218)"
+     id="layer1">
+    <g
+       id="sun">
+      <path
+         d="m 106.06602,69.185242 a 43.436559,43.436559 0 1 1 -86.873118,0 43.436559,43.436559 0 1 1 86.873118,0 z"
+         transform="matrix(1.1380045,0,0,1.1380045,28.727393,873.62907)"
+         id="sun-circle"
+         style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         d="m 10.624039,951.86218 28.751922,0"
+         id="sun-ray-w"
+         style="fill:none;stroke:#ff0000;stroke-width:1.02250886px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         d="m 160.51512,951.85093 28.96975,0"
+         id="sun-ray-e"
+         style="fill:none;stroke:#ff0000;stroke-width:1.0263747px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         d="m 100.51125,862.87731 0,28.96975"
+         id="sun-ray-n"
+         style="fill:none;stroke:#ff0000;stroke-width:1.02637482px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         d="m 100.51319,1012.8754 0,28.9735"
+         id="sun-ray-s"
+         style="fill:none;stroke:#ff0000;stroke-width:1.02644193px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         d="M 36.463665,1015.2464 56.794344,994.91576"
+         id="sun-ray-sw"
+         style="fill:none;stroke:#ff0000;stroke-width:1.02250886px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         d="m 142.44471,909.24948 20.48471,-20.4847"
+         id="sun-ray-ne"
+         style="fill:none;stroke:#ff0000;stroke-width:1.0263747px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         d="m 37.101716,888.76478 20.484707,20.4847"
+         id="sun-ray-nw"
+         style="fill:none;stroke:#ff0000;stroke-width:1.02637482px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         d="m 143.16775,994.82807 20.48736,20.48733"
+         id="sun-ray-se"
+         style="fill:none;stroke:#ff0000;stroke-width:1.02644193px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <path
+       d="m 299.431,952.36218 c 0,27.29998 10.61898,40.056 30.569,49.43102 -27.29999,0 -49.431,-22.13104 -49.431,-49.43102 0,-27.29999 22.13101,-49.431 49.431,-49.431 -20.01252,9.4375 -30.569,22.13101 -30.569,49.431 z"
+       id="moon"
+       style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.13800454px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon.tooldef
new file mode 100644
index 0000000..fd809e0
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon.tooldef
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim(
+    "sun_moon.cif",
+    "-i auto",
+    "-a first",
+    "--frame-rate=10",
+);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon_inkscape.png
new file mode 100644
index 0000000..90683fc
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/sun_moon/sun_moon_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap.svg
new file mode 100644
index 0000000..0d9ce81
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap.svg
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1">
+  <g id="g">
+    <rect style="fill:green;" id="r" width="100" height="100" x="50" y="50"/>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap_out1.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap_out1.svg
new file mode 100644
index 0000000..67423d6
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap_out1.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1">
+  <g id="ga">
+    <rect style="fill:green;" id="ra" width="100" height="100" x="50" y="50"/>
+  </g>
+  <g id="g">
+    <rect style="fill:green;" id="rb" width="100" height="100" x="50" y="50"/>
+    <rect style="fill:green;" id="r" width="100" height="100" x="50" y="50"/>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap_out2.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap_out2.svg
new file mode 100644
index 0000000..7898ad0
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap_out2.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1">
+  <g id="ga">
+    <rect style="fill:green;" id="rba" width="100" height="100" x="50" y="50"/>
+    <rect style="fill:green;" id="ra" width="100" height="100" x="50" y="50"/>
+  </g>
+  <g id="g">
+    <rect style="fill:green;" id="rb" width="100" height="100" x="50" y="50"/>
+    <rect style="fill:green;" id="r" width="100" height="100" x="50" y="50"/>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap_out3.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap_out3.svg
new file mode 100644
index 0000000..eeda452
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/overlap_out3.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1">
+  <g id="ga">
+    <rect style="fill:green;" id="rab" width="100" height="100" x="50" y="50"/>
+    <rect style="fill:green;" id="ra" width="100" height="100" x="50" y="50"/>
+  </g>
+  <g id="g">
+    <rect style="fill:green;" id="r" width="100" height="100" x="50" y="50"/>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.cif
new file mode 100644
index 0000000..b2fee32
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.cif
@@ -0,0 +1,5 @@
+svgfile "svgcopy.svg";
+
+svgcopy id "rect" pre "a";
+svgcopy id "grp" post "b";
+svgcopy id "rect3" pre "_" post "x";
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.out.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.out.svg
new file mode 100644
index 0000000..2fc3bde
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.out.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1">
+  <rect style="fill:red;"   id="arect"   width="100" height="100" x="20" y="20"/>
+  <rect style="fill:red;"   id="rect"    width="100" height="100" x="20" y="20"/>
+  <g id="grpb">
+    <rect style="fill:green;" id="rect2b" width="100" height="100" x="50" y="50"/>
+  </g>
+  <g id="grp">
+    <rect style="fill:green;" id="rect2" width="100" height="100" x="50" y="50"/>
+  </g>
+  <rect style="fill:blue;"  id="_rect3x" width="100" height="100" x="80" y="80"/>
+  <rect style="fill:blue;"  id="rect3"   width="100" height="100" x="80" y="80"/>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.svg
new file mode 100644
index 0000000..281be0e
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.svg
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="250" height="250" id="root" version="1.1">
+  <rect style="fill:red;"   id="rect"  width="100" height="100" x="20" y="20"/>
+  <g id="grp">
+    <rect style="fill:green;" id="rect2" width="100" height="100" x="50" y="50"/>
+  </g>
+  <rect style="fill:blue;"  id="rect3" width="100" height="100" x="80" y="80"/>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.tooldef
new file mode 100644
index 0000000..9018b63
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgcopy/svgcopy.tooldef
@@ -0,0 +1,16 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim("svgcopy.cif");
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.cif
new file mode 100644
index 0000000..4415c53
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.cif
@@ -0,0 +1,4 @@
+svgfile "svgmove.svg";
+
+svgmove id "rect1" to 10, 10;
+svgmove id "rect2" to 10, 50;
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.out.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.out.png
new file mode 100644
index 0000000..8f71bc3
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.out.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.out.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.out.svg
new file mode 100644
index 0000000..a3b8be8
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.out.svg
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="400" height="400" id="root" version="1.1">
+  <g id="grp1">
+    <rect style="fill:green;" id="rect1" width="20" height="20" x="5" y="10"
+          transform="translate(15, 20) translate(-10.000000,-20.000000)"/>
+  </g>
+  <g id="grp2" transform="scale(5, 2)">
+    <rect style="fill:blue;" id="rect2" width="20" height="20" x="5" y="10"
+          transform="translate(15, 20) translate(-18.000000,-5.000000)"/>
+  </g>
+</svg>
+
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.png
new file mode 100644
index 0000000..5ca446d
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.svg
new file mode 100644
index 0000000..673b0f4
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.svg
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     width="400" height="400" id="root" version="1.1">
+  <g id="grp1">
+    <rect style="fill:green;" id="rect1" width="20" height="20" x="5" y="10"
+          transform="translate(15, 20)"/>
+  </g>
+  <g id="grp2" transform="scale(5, 2)">
+    <rect style="fill:blue;" id="rect2" width="20" height="20" x="5" y="10"
+          transform="translate(15, 20)"/>
+  </g>
+</svg>
+
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.tooldef
new file mode 100644
index 0000000..d987b32
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/svgmove/svgmove.tooldef
@@ -0,0 +1,16 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim("svgmove.cif");
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank.cif
new file mode 100644
index 0000000..b0b2f9c
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank.cif
@@ -0,0 +1,23 @@
+// Behavior.
+const real CAPACITY   = 10.0;
+const real MAX_LEVEL  =  8.0;
+const real INIT_LEVEL =  5.0;
+const real MIN_LEVEL  =  2.0;
+
+automaton tank:
+  cont level = INIT_LEVEL;
+
+  location open:
+    initial;
+    equation level' =  1.0;
+    edge when level >= MAX_LEVEL goto closed;
+
+  location closed:
+    equation level' = -1.0;
+    edge when level <= MIN_LEVEL goto open;
+end
+
+// Visualization.
+svgfile "tank.svg";
+
+svgout id "water" attr "height" value scale(tank.level, 0, CAPACITY, 0, 80);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank.svg
new file mode 100644
index 0000000..4f53a0b
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank.svg
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="200"
+   height="100"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="tank.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow2Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Lend"
+       style="overflow:visible">
+      <path
+         id="path3199"
+         style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(-1.1,0,0,-1.1,-1.1,0)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.62"
+     inkscape:cx="231.37409"
+     inkscape:cy="-42.489696"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1553"
+     inkscape:window-height="855"
+     inkscape:window-x="83"
+     inkscape:window-y="111"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#8080ff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+       id="water"
+       width="170"
+       height="60"
+       x="15"
+       y="30"
+       inkscape:label="#rect5026" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 15,10 0,80 170,0 0,-80"
+       id="tank"
+       sodipodi:nodetypes="cccc" />
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank.tooldef
new file mode 100644
index 0000000..07ac0d6
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank.tooldef
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim(
+    "tank.cif",
+    "-i auto",
+    "-a first",
+    "--frame-rate=20",
+);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2.cif
new file mode 100644
index 0000000..98885ee
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2.cif
@@ -0,0 +1,36 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+// Behavior.
+const real CAPACITY   = 10.0;
+const real MAX_LEVEL  =  8.0;
+const real INIT_LEVEL =  5.0;
+const real MIN_LEVEL  =  2.0;
+
+automaton tank:
+  cont level = INIT_LEVEL;
+
+  location open:
+    initial;
+    equation level' =  1.0;
+    edge when level >= MAX_LEVEL goto closed;
+
+  location closed:
+    equation level' = -1.0;
+    edge when level <= MIN_LEVEL goto open;
+end
+
+// Visualization.
+svgfile "tank2.svg";
+
+svgout id "water" attr "height" value scale(tank.level, 0, CAPACITY, 0, 80);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2.svg
new file mode 100644
index 0000000..8511305
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2.svg
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="200"
+   height="100"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   version="1.0"
+   sodipodi:docname="tank2.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow2Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Lend"
+       style="overflow:visible">
+      <path
+         id="path3199"
+         style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(-1.1,0,0,-1.1,-1.1,0)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.62"
+     inkscape:cx="231.37409"
+     inkscape:cy="-42.798338"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1553"
+     inkscape:window-height="855"
+     inkscape:window-x="83"
+     inkscape:window-y="111"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#8080ff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+       id="water"
+       width="170"
+       height="60"
+       x="15"
+       y="-90"
+       inkscape:label="#rect5026"
+       transform="scale(1,-1)" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 15,10 0,80 170,0 0,-80"
+       id="tank"
+       sodipodi:nodetypes="cccc" />
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2.tooldef
new file mode 100644
index 0000000..bfb1fa3
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2.tooldef
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim(
+    "tank2.cif",
+    "-i auto",
+    "-a first",
+    "--frame-rate=20",
+);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2_inkscape.png
new file mode 100644
index 0000000..dcf0991
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank2_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank_inkscape.png
new file mode 100644
index 0000000..7658fd3
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank_problem.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank_problem.png
new file mode 100644
index 0000000..7ada3bd
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/tank/tank_problem.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor.cif
new file mode 100644
index 0000000..e9f035b
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor.cif
@@ -0,0 +1,24 @@
+// Behavior.
+automaton person:
+  cont pos = 0.0;
+
+  location forward:
+    initial;
+    equation pos' =  1.0;
+    edge when pos >= 5.0 goto backward;
+
+  location backward:
+    equation pos' = -1.0;
+    edge when pos <= 0.0 goto forward;
+end
+
+// Visualization.
+svgfile "walk_floor.svg";
+
+// width of the floor - width of the person = movement
+// 180px              - 19px                = 161px
+svgout id "person" attr "transform"
+  value fmt("translate(%s,0)", scale(person.pos, 0, 5, 0, 161));
+
+svgout id "pos_txt" text
+  value fmt("%.1f%%", scale(person.pos, 0, 5, 0, 100));
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor.svg
new file mode 100644
index 0000000..b14f9c7
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor.svg
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="200"
+   height="100"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="walk_floor.svg">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective4213"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective4322"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2"
+     inkscape:cx="230.00944"
+     inkscape:cy="73.116919"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:showpageshadow="true"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:object-paths="false" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <g
+       id="person">
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 10.5,84.86218 9,-9"
+         id="leg_left" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 28.5,84.86218 -9,-9"
+         id="leg_right" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 19.5,76.36218 0,-21.5"
+         id="body" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 11,62.02689 16.98841,0"
+         id="arms" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.53206468;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+         id="head"
+         sodipodi:cx="293.6261"
+         sodipodi:cy="-49.42197"
+         sodipodi:rx="6.8942909"
+         sodipodi:ry="6.8942909"
+         d="m 300.52039,-49.42197 a 6.8942909,6.8942909 0 1 1 -13.78858,0 6.8942909,6.8942909 0 1 1 13.78858,0 z"
+         transform="matrix(0.65271397,0,0,0.65271397,-172.15386,82.62059)" />
+    </g>
+    <rect
+       style="fill:#808080;fill-opacity:1;stroke:none"
+       id="floor"
+       width="180"
+       height="5"
+       x="10"
+       y="84.999992" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="8.4296875"
+       y="19.773438"
+       id="pos_txt"><tspan
+         sodipodi:role="line"
+         id="tspan2823"
+         x="8.4296875"
+         y="19.773438">Position: ?%</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor.tooldef
new file mode 100644
index 0000000..f949557
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor.tooldef
@@ -0,0 +1,22 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim(
+    "walk_floor.cif",
+    "-i auto",
+    "-a first",
+    "--frame-rate=50",
+    "--speed=2",
+);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor_inkscape.png
new file mode 100644
index 0000000..ec3e116
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor_orig.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor_orig.svg
new file mode 100644
index 0000000..bf9bc8a
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor_orig.svg
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="200"
+   height="100"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="walk_floor.svg">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective4213"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective4322"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2"
+     inkscape:cx="230.00944"
+     inkscape:cy="73.116919"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:showpageshadow="true"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:object-paths="false" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <g
+       id="person"
+       transform="translate(-290,-467)">
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 300.5,551.86218 9,-9"
+         id="leg_left" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 318.5,551.86218 -9,-9"
+         id="leg_right" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 309.5,543.36218 0,-21.5"
+         id="body" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 301,529.02689 16.98841,0"
+         id="arms" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.53206468;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+         id="head"
+         sodipodi:cx="293.6261"
+         sodipodi:cy="-49.42197"
+         sodipodi:rx="6.8942909"
+         sodipodi:ry="6.8942909"
+         d="m 300.52039,-49.42197 c 0,3.807611 -3.08668,6.894291 -6.89429,6.894291 -3.80761,0 -6.89429,-3.08668 -6.89429,-6.894291 0,-3.807612 3.08668,-6.894291 6.89429,-6.894291 3.80761,0 6.89429,3.086679 6.89429,6.894291 z"
+         transform="matrix(0.65271397,0,0,0.65271397,117.84614,549.62059)" />
+    </g>
+    <rect
+       style="fill:#808080;fill-opacity:1;stroke:none"
+       id="floor"
+       width="180"
+       height="5"
+       x="10"
+       y="84.999992" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="8.4296875"
+       y="19.773438"
+       id="pos_txt"><tspan
+         sodipodi:role="line"
+         id="tspan2823"
+         x="8.4296875"
+         y="19.773438">Position: ?%</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor_orig_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor_orig_inkscape.png
new file mode 100644
index 0000000..706fc69
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_floor/walk_floor_orig_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room.cif
new file mode 100644
index 0000000..e408282
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room.cif
@@ -0,0 +1,38 @@
+// Behavior.
+automaton person:
+  cont x = 0.0;
+  cont y = 0.0;
+
+  location right:
+    initial;
+    equation x' =  1.0;
+    equation y' =  0.0;
+    edge when x >= 5.0 goto down;
+
+  location down:
+    equation x' =  0.0;
+    equation y' =  1.0;
+    edge when y >= 5.0 goto left;
+
+  location left:
+    equation x' = -1.0;
+    equation y' =  0.0;
+    edge when x <= 0.0 goto up;
+
+  location up:
+    equation x' =  0.0;
+    equation y' = -1.0;
+    edge when y <= 0.0 goto right;
+end
+
+// Visualization.
+svgfile "walk_room.svg";
+
+// width of the room - width of the person = horizontal movement
+// 180px             - 19px                = 161px
+//
+// height of the room - height of the person = vertical movement
+// 180px              - 40x                  = 140px
+svgout id "person" attr "transform"
+  value fmt("translate(%s,%s)", scale(person.x, 0, 5, 0, 161),
+                                scale(person.y, 0, 5, 0, 140));
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room.svg
new file mode 100644
index 0000000..1dbdd2e
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room.svg
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="200"
+   height="200"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="walk_room.svg">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective4213"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective4322"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2"
+     inkscape:cx="143.00944"
+     inkscape:cy="73.116919"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:showpageshadow="true"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:object-paths="false" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,100)">
+    <g
+       id="person">
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 10.5,-50.13782 9,-9"
+         id="leg-left" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 28.5,-50.13782 -9,-9"
+         id="leg-right" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 19.5,-58.63782 0,-21.5"
+         id="body" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 11,-72.97311 16.98841,0"
+         id="arms" />
+      <path
+         sodipodi:type="arc"
+         style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.53206468;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+         id="head"
+         sodipodi:cx="293.6261"
+         sodipodi:cy="-49.42197"
+         sodipodi:rx="6.8942909"
+         sodipodi:ry="6.8942909"
+         d="m 300.52039,-49.42197 a 6.8942909,6.8942909 0 1 1 -13.78858,0 6.8942909,6.8942909 0 1 1 13.78858,0 z"
+         transform="matrix(0.65271397,0,0,0.65271397,-172.15386,-52.37941)" />
+    </g>
+    <rect
+       style="fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="room"
+       width="188"
+       height="188"
+       x="6"
+       y="-94" />
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room.tooldef
new file mode 100644
index 0000000..9545f15
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room.tooldef
@@ -0,0 +1,22 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim(
+    "walk_room.cif",
+    "-i auto",
+    "-a first",
+    "--frame-rate=40",
+    "--speed=3",
+);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room_inkscape.png
new file mode 100644
index 0000000..172e25d
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/walk_room/walk_room_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation.cif b/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation.cif
new file mode 100644
index 0000000..24f2499
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation.cif
@@ -0,0 +1,26 @@
+svgfile "workstation.svg";
+
+event generate, transfer, exit;
+
+m1: Machine(1, 1.0, generate, transfer);
+m2: Machine(2, 2.5, transfer, exit);
+
+automaton def Machine(alg int nr; alg real ptime; event start, done):
+  cont t der 1.0;
+
+  location idle:
+    initial;
+    edge start do t := 0.0 goto processing;
+
+  location processing:
+    edge when t >= ptime goto completed;
+
+  location completed:
+    edge done goto idle;
+
+  svgout id "m" + <string>nr + "_bar_front" attr "width"
+    value scale(if processing: t else ptime end, 0, ptime, 0, 130);
+
+  svgout id "m" + <string>nr + "_bar_front" attr "fill"
+    value if idle : "gray" else "dodgerblue" end;
+end
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation.svg b/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation.svg
new file mode 100644
index 0000000..76ab6fd
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation.svg
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="170"
+   height="170"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="workstation.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   version="1.0">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow2Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Lend"
+       style="overflow:visible">
+      <path
+         id="path3259"
+         style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(-1.1,0,0,-1.1,-1.1,0)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2"
+     inkscape:cx="210.31123"
+     inkscape:cy="57.159092"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1728"
+     inkscape:window-height="1080"
+     inkscape:window-x="184"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-80)">
+    <g
+       id="m1"
+       transform="translate(0,40)">
+      <rect
+         y="50.387024"
+         x="10.387024"
+         height="59.225952"
+         width="149.22595"
+         id="m1_box"
+         style="fill:#eeeeee;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.77404726;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+      <text
+         sodipodi:linespacing="125%"
+         id="m1_txt"
+         y="69.773438"
+         x="19.101562"
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
+         xml:space="preserve"><tspan
+           y="69.773438"
+           x="19.101562"
+           id="tspan3205"
+           sodipodi:role="line">Machine 1</tspan></text>
+      <rect
+         style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+         id="m1_bar_back"
+         width="131"
+         height="21"
+         x="20.5"
+         y="78.5" />
+      <rect
+         y="79"
+         x="21"
+         height="20"
+         width="25"
+         id="m1_bar_front"
+         style="fill:#1e90ff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+    </g>
+    <g
+       id="m2"
+       transform="translate(0,130)">
+      <rect
+         y="50.387024"
+         x="10.387024"
+         height="59.225952"
+         width="149.22595"
+         id="m2_box"
+         style="fill:#eeeeee;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.77404726;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+      <text
+         sodipodi:linespacing="125%"
+         id="m2_txt"
+         y="69.773438"
+         x="19.101562"
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
+         xml:space="preserve"><tspan
+           y="69.773438"
+           x="19.101562"
+           id="tspan3213"
+           sodipodi:role="line">Machine 2</tspan></text>
+      <rect
+         style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+         id="m2_bar_back"
+         width="131"
+         height="21"
+         x="20.5"
+         y="78.5" />
+      <rect
+         y="79"
+         x="21"
+         height="20"
+         width="24.4"
+         id="m2_bar_front"
+         style="fill:#1e90ff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+    </g>
+    <g
+       id="c">
+      <path
+         inkscape:connector-type="polyline"
+         id="transfer_arrow"
+         d="m 85,-20.387024 0,29.3"
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
+         transform="translate(0,170)"
+         inkscape:connection-end="#m2"
+         inkscape:connection-start="#m1" />
+      <text
+         id="transfer_txt"
+         y="169.7812"
+         x="91.924561"
+         style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+         xml:space="preserve"><tspan
+           style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Sans;-inkscape-font-specification:Sans"
+           y="169.7812"
+           x="91.924561"
+           id="tspan3884"
+           sodipodi:role="line">transfer</tspan></text>
+    </g>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation.tooldef b/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation.tooldef
new file mode 100644
index 0000000..6a7393f
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation.tooldef
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim(
+    "workstation.cif",
+    "-i auto",
+    "-a first",
+    "--frame-rate=20",
+);
diff --git a/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation_inkscape.png b/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation_inkscape.png
new file mode 100644
index 0000000..3d1a792
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/svgviz/workstation/workstation_inkscape.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/output/tank.trajdata b/v0.2-M1/cif/tools/cifsim/output/tank.trajdata
new file mode 100644
index 0000000..f179bd6
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/tank.trajdata
@@ -0,0 +1,10 @@
+# time                controller.n   tank.V               tank.V'               tank.Qi   tank.Qo
+0.0                   0              10.0                 -3.1622776601683795   0.0       3.1622776601683795
+0.08763429266802605   0              9.7247959763441      -3.1184605138343664   0.0       3.1184605138343664
+0.587634292668026     0              8.228065719426915    -2.868460513834366    0.0       2.868460513834366
+1.087634292668026     0              6.8563354625097315   -2.618460513834366    0.0       2.618460513834366
+1.587634292668026     0              5.609605205592543    -2.3684605138343646   0.0       2.3684605138343646
+2.0876342926680262    0              4.487874948675351    -2.1184605138343624   0.0       2.1184605138343624
+2.5876342926680262    0              3.491144691758149    -1.8684605138343569   0.0       1.8684605138343569
+3.0876342926680262    0              2.619414434840913    -1.618460513834339    0.0       1.618460513834339
+3.496128195593086     0              1.9999999999999958   -1.4142135623730936   0.0       1.4142135623730936
diff --git a/v0.2-M1/cif/tools/cifsim/output/tank_raw.trajdata b/v0.2-M1/cif/tools/cifsim/output/tank_raw.trajdata
new file mode 100644
index 0000000..9afb1fc
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/output/tank_raw.trajdata
@@ -0,0 +1,10 @@
+# time controller.n tank.V tank.V' tank.Qi tank.Qo
+0.0 0 10.0 -3.1622776601683795 0.0 3.1622776601683795
+0.08763429266802605 0 9.7247959763441 -3.1184605138343664 0.0 3.1184605138343664
+0.587634292668026 0 8.228065719426915 -2.868460513834366 0.0 2.868460513834366
+1.087634292668026 0 6.8563354625097315 -2.618460513834366 0.0 2.618460513834366
+1.587634292668026 0 5.609605205592543 -2.3684605138343646 0.0 2.3684605138343646
+2.0876342926680262 0 4.487874948675351 -2.1184605138343624 0.0 2.1184605138343624
+2.5876342926680262 0 3.491144691758149 -1.8684605138343569 0.0 1.8684605138343569
+3.0876342926680262 0 2.619414434840913 -1.618460513834339 0.0 1.618460513834339
+3.496128195593086 0 1.9999999999999958 -1.4142135623730936 0.0 1.4142135623730936
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_discont.cif b/v0.2-M1/cif/tools/cifsim/solver/integr_discont.cif
new file mode 100644
index 0000000..e34dd3b
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_discont.cif
@@ -0,0 +1,4 @@
+cont x = 1.0;
+equation x' = if x < 2: 1.0
+              else      3.0
+              end;
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_discont.png b/v0.2-M1/cif/tools/cifsim/solver/integr_discont.png
new file mode 100644
index 0000000..c20d035
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_discont.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_discont.png.dat b/v0.2-M1/cif/tools/cifsim/solver/integr_discont.png.dat
new file mode 100644
index 0000000..bcabd91
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_discont.png.dat
@@ -0,0 +1,33 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# time                x                    x'
+0.0                   1.0                  1.0
+0.08177654339579425   1.0817765433957942   1.0
+0.8995419773537368    1.8995419773537372   1.0
+0.9701813903622956    1.970181390362296    1.0
+0.9813277600091546    1.981327760009155    1.0
+0.9885403027713907    1.988540302771391    1.0
+0.993691696922353     1.9936916969223533   1.0
+0.9981554517020158    1.9981554517020161   1.0
+0.9989981723801846    1.9989981723801848   1.0
+0.9995267508135063    1.9995267508135064   1.0
+0.9999688840311223    1.9999688840311225   1.0
+0.9999927807856158    1.999992780785616    1.0
+0.9999992904141694    1.9999992904141695   1.0
+1.0000305703935572    2.0000869366442884   3.0
+1.0000589738152084    2.0001721469092413   3.0
+1.0003430080317184    2.0010242495587716   3.0
+1.003183350196819     2.0095452760540735   3.0
+1.031586771847826     2.0947555410070944   3.0
+1.315620988357895     2.946858190537302    3.0
+2.0                   4.999995225463616    3.0
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_discont.png.plt b/v0.2-M1/cif/tools/cifsim/solver/integr_discont.png.plt
new file mode 100644
index 0000000..b68ea3f
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_discont.png.plt
@@ -0,0 +1,43 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 500,300 font 'sans'
+set output "integr_discont.png"
+
+set key top left vertical
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+#set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+#set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+#set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+#set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.05, graph 0.05
+
+plot \
+  "integr_discont.png.dat" using 1:($2) title "x(time)"  with linespoints ls 1, \
+  "integr_discont.png.dat" using 1:($3) title "x'(time)" with linespoints ls 2
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_discont.tooldef b/v0.2-M1/cif/tools/cifsim/solver/integr_discont.tooldef
new file mode 100644
index 0000000..f399528
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_discont.tooldef
@@ -0,0 +1,22 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim("integr_discont.cif",
+        "-i auto",
+        "-a first",
+        "-t 2",
+        "--trajdata=on",
+        "--trajdata-file=integr_discont.png.dat",
+        "--solver-int-maxstep=100");
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_linear.cif b/v0.2-M1/cif/tools/cifsim/solver/integr_linear.cif
new file mode 100644
index 0000000..63e4785
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_linear.cif
@@ -0,0 +1,2 @@
+cont x = 0.0;
+equation x' = 1.0;
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_linear.png b/v0.2-M1/cif/tools/cifsim/solver/integr_linear.png
new file mode 100644
index 0000000..44a7f70
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_linear.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_linear.png.dat b/v0.2-M1/cif/tools/cifsim/solver/integr_linear.png.dat
new file mode 100644
index 0000000..7773f1b
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_linear.png.dat
@@ -0,0 +1,6 @@
+# time                 x                       x'
+0.0                    0.0                     1.0
+9.999999999999999e-5   1.0000000000000003e-4   1.0
+0.0011                 0.0011000000000000005   1.0
+0.0111                 0.011100000000000006    1.0
+0.1                    0.10000000000000006     1.0
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_linear.png.plt b/v0.2-M1/cif/tools/cifsim/solver/integr_linear.png.plt
new file mode 100644
index 0000000..911dddc
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_linear.png.plt
@@ -0,0 +1,43 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 500,300 font 'sans'
+set output "integr_linear.png"
+
+set key center left vertical
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+#set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+#set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+#set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+#set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.05, graph 0.05
+
+plot \
+  "integr_linear.png.dat" using 1:($2) title "x(time)"  with linespoints ls 1, \
+  "integr_linear.png.dat" using 1:($3) title "x'(time)" with linespoints ls 2
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_linear.tooldef b/v0.2-M1/cif/tools/cifsim/solver/integr_linear.tooldef
new file mode 100644
index 0000000..962e255
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_linear.tooldef
@@ -0,0 +1,22 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim("integr_linear.cif",
+        "-i auto",
+        "-a first",
+        "-t 0.1",
+        "--trajdata=on",
+        "--trajdata-file=integr_linear.png.dat",
+        "--solver-int-maxstep=100");
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.cif b/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.cif
new file mode 100644
index 0000000..73af881
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.cif
@@ -0,0 +1,2 @@
+cont x = 0.0;
+equation x' = (x * x) - x - 2;
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.png b/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.png
new file mode 100644
index 0000000..1bb10dc
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.png.dat b/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.png.dat
new file mode 100644
index 0000000..ff04e4c
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.png.dat
@@ -0,0 +1,34 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# time                 x                        x'
+0.0                    0.0                      -2.0
+9.999999999999999e-5   -1.9998999900012492e-4   -1.9997999700050002
+0.0011                 -0.0021987886708306876   -1.9977963766575504
+0.0111                 -0.022075441401570056    -1.9774372334853558
+0.1111                 -0.2086795844500907      -1.7477732465836469
+0.4386838927076575     -0.6452785517944979      -0.9383370387994976
+0.6439541417059881     -0.7973617350111273      -0.5668525285289174
+0.8310868671681683     -0.8809586816819749      -0.342953119487182
+1.1776607860442532     -0.9568045634801028      -0.12772046382354718
+1.5729136535125967     -0.9866698783663096      -0.03981267275830236
+1.9986161511748937     -0.9962710417387206      -0.011172969654123843
+2.450244854404956      -0.9990371264449505      -0.002887693539665559
+2.9664920067400513     -0.9997953220376393      -6.139919940137961e-4
+3.5695149089806435     -0.9999664699127607      -1.0058913745103482e-4
+4.293378771047167      -0.9999961774090081      -1.1467758363359337e-5
+5.191870617724527      -0.999999741962919       -7.741111764936193e-7
+6.367212114851151      -0.9999999926766214      -2.197013571070272e-8
+8.069182604876072      -1.000000000548613       1.645839020625317e-9
+11.291817194488493     -0.9999999464834497      -1.6054964802059146e-7
+13.182122839679401     -1.0000000138788474      4.163654221400748e-8
+15.0                   -0.999999997704039       -6.887882930683986e-9
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.png.plt b/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.png.plt
new file mode 100644
index 0000000..8c5588e
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.png.plt
@@ -0,0 +1,43 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 500,300 font 'sans'
+set output "integr_nonlinear.png"
+
+set key bottom right vertical
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+#set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+#set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+#set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+#set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.05, graph 0.05
+
+plot \
+  "integr_nonlinear.png.dat" using 1:($2) title "x(time)"  with linespoints ls 1, \
+  "integr_nonlinear.png.dat" using 1:($3) title "x'(time)" with linespoints ls 2
diff --git a/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.tooldef b/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.tooldef
new file mode 100644
index 0000000..e1942f8
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/integr_nonlinear.tooldef
@@ -0,0 +1,22 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim("integr_nonlinear.cif",
+        "-i auto",
+        "-a first",
+        "-t 15",
+        "--trajdata=on",
+        "--trajdata-file=integr_nonlinear.png.dat",
+        "--solver-int-maxstep=100");
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_comma_fail.cif b/v0.2-M1/cif/tools/cifsim/solver/root_comma_fail.cif
new file mode 100644
index 0000000..4c3b5f7
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_comma_fail.cif
@@ -0,0 +1,6 @@
+automaton p:
+  cont x der 1.0;
+  location:
+    initial;
+    edge when x > 0, 1 / x < 0.5 do x := 0.0;
+end
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_problem.cif b/v0.2-M1/cif/tools/cifsim/solver/root_problem.cif
new file mode 100644
index 0000000..aaeb45d
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_problem.cif
@@ -0,0 +1,8 @@
+automaton p:
+  cont x = 0.0;
+  equation x' = 1.0;
+
+  location:
+    initial;
+    edge when x >= 2.33 and x <= 2.34 do x := 0.0;
+end
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_problem.png b/v0.2-M1/cif/tools/cifsim/solver/root_problem.png
new file mode 100644
index 0000000..c2820d3
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_problem.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_problem.png.dat b/v0.2-M1/cif/tools/cifsim/solver/root_problem.png.dat
new file mode 100644
index 0000000..a3b0b46
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_problem.png.dat
@@ -0,0 +1,28 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# time                 p.x                     p.x'
+0.0                    0.0                     1.0
+9.999999999999999e-5   1.0000000000000003e-4   1.0
+0.0011                 0.0011000000000000005   1.0
+0.0111                 0.011100000000000006    1.0
+0.1111                 0.11110000000000006     1.0
+0.6111                 0.6111000000000003      1.0
+1.1111                 1.1111000000000004      1.0
+1.6111                 1.6111000000000006      1.0
+2.1111                 2.111100000000001       1.0
+2.6111                 2.6111000000000013      1.0
+3.1111                 3.1111000000000013      1.0
+3.6111                 3.6111000000000013      1.0
+4.1111                 4.111100000000001       1.0
+4.6111                 4.611100000000001       1.0
+5.0                    5.000000000000001       1.0
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_problem.png.plt b/v0.2-M1/cif/tools/cifsim/solver/root_problem.png.plt
new file mode 100644
index 0000000..6c330ab
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_problem.png.plt
@@ -0,0 +1,46 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 500,250 font 'sans'
+set output "root_problem.png"
+
+set key top left vertical
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+#set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+#set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+#set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.05, graph 0.05
+
+set samples 2000
+
+plot \
+  "root_problem.png.dat." using 1:($2) title "x(time)"  with linespoints ls 1, \
+  "root_problem.png.dat" using 1:($3) title "x'(time)" with linespoints ls 2, \
+  (x >= 2.33 && x <= 2.34) ? +1 : -1 title "guard" with lines ls 3
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_problem.tooldef b/v0.2-M1/cif/tools/cifsim/solver/root_problem.tooldef
new file mode 100644
index 0000000..b32c0cf
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_problem.tooldef
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim("root_problem.cif",
+        "-i auto",
+        "-a first",
+        "-t 5",
+        "--trajdata=on",
+        "--trajdata-file=root_problem.png.dat");
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_problem2.cif b/v0.2-M1/cif/tools/cifsim/solver/root_problem2.cif
new file mode 100644
index 0000000..de9df92
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_problem2.cif
@@ -0,0 +1,8 @@
+automaton p:
+  cont x = 0.0;
+  equation x' = 1.0;
+
+  location:
+    initial;
+    edge when x >= 2.33, x <= 2.34 do x := 0.0;
+end
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_problem2.png b/v0.2-M1/cif/tools/cifsim/solver/root_problem2.png
new file mode 100644
index 0000000..f5d8cdd
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_problem2.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_problem2.png.dat b/v0.2-M1/cif/tools/cifsim/solver/root_problem2.png.dat
new file mode 100644
index 0000000..e473560
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_problem2.png.dat
@@ -0,0 +1,41 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# time                 p.x                     p.x'
+0.0                    0.0                     1.0
+9.999999999999999e-5   1.0000000000000003e-4   1.0
+0.0011                 0.0011000000000000005   1.0
+0.0111                 0.011100000000000006    1.0
+0.1111                 0.11110000000000006     1.0
+0.6111                 0.6111000000000003      1.0
+1.1111                 1.1111000000000004      1.0
+1.6111                 1.6111000000000006      1.0
+2.1111                 2.111100000000001       1.0
+2.330000000000001      2.3300000000000014      1.0
+# time                 p.x                     p.x'
+2.330000000000001      0.0                     1.0
+2.330100000000001      1.0000000000000003e-4   1.0
+2.331100000000001      0.0011000000000000005   1.0
+2.341100000000001      0.011100000000000006    1.0
+2.441100000000001      0.11110000000000006     1.0
+2.941100000000001      0.6111000000000003      1.0
+3.441100000000001      1.1111000000000004      1.0
+3.941100000000001      1.6111000000000006      1.0
+4.4411000000000005     2.111100000000001       1.0
+4.660000000000002      2.330000000000002       1.0
+# time                 p.x                     p.x'
+4.660000000000002      0.0                     1.0
+4.660100000000002      1.0000000000000003e-4   1.0
+4.661100000000002      0.0011000000000000005   1.0
+4.671100000000002      0.011100000000000006    1.0
+4.7711000000000015     0.11110000000000006     1.0
+5.0                    0.33999999999999875     1.0
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_problem2.png.plt b/v0.2-M1/cif/tools/cifsim/solver/root_problem2.png.plt
new file mode 100644
index 0000000..0cc6743
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_problem2.png.plt
@@ -0,0 +1,47 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 500,300 font 'sans'
+set output "root_problem2.png"
+
+set key top left vertical
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+#set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+#set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.50, graph 0.05
+
+set samples 2000
+
+plot \
+  "root_problem2.png.dat" using 1:($2) title "x(time)"  with linespoints ls 1, \
+  "root_problem2.png.dat" using 1:($3) title "x'(time)" with linespoints ls 2, \
+  (x >= 2.33) ? +1 : -1 title "first guard"             with lines       ls 3, \
+  (x <= 2.34) ? +1 : -1 title "second guard"            with lines       ls 4
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_problem2.tooldef b/v0.2-M1/cif/tools/cifsim/solver/root_problem2.tooldef
new file mode 100644
index 0000000..923d738
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_problem2.tooldef
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim("root_problem2.cif",
+        "-i auto",
+        "-a first",
+        "-t 5",
+        "--trajdata=on",
+        "--trajdata-file=root_problem2.png.dat");
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_root.png b/v0.2-M1/cif/tools/cifsim/solver/root_root.png
new file mode 100644
index 0000000..55c65dd
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_root.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_root.png.dat b/v0.2-M1/cif/tools/cifsim/solver/root_root.png.dat
new file mode 100644
index 0000000..f72c007
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_root.png.dat
@@ -0,0 +1,20 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# ix     guard   iy     ilow     ihigh
+0.75     -1       0.75  1.1111   5.0
+1.1111   -1       0.50  1.1111   3.0555
+1.5      -1       0.25  1.1111   2.0833
+1.5      +1       0.0   1.1111   1.5972
+2.0      +1      -0.25  1.3542   1.5972
+3.0      +1      -0.50  1.4757   1.5972
+5.0      +1      -0.75  1.4757   1.5364
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_root.png.plt b/v0.2-M1/cif/tools/cifsim/solver/root_root.png.plt
new file mode 100644
index 0000000..73150ce
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_root.png.plt
@@ -0,0 +1,45 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 500,200 font 'sans'
+set output "root_root.png"
+
+set key bottom right vertical
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+#set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+#set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+#set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+#set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set ytics 1.0
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.15, graph 0.15
+
+plot "root_root.png.dat" using 1:($2) title "x >= 1.5" with lines ls 1, \
+     "root_root.png.dat" using 1:($3):($4):($5) title "root finding intervals" \
+                         with xerrorbars ls 2 pointtype -1
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple.cif b/v0.2-M1/cif/tools/cifsim/solver/root_simple.cif
new file mode 100644
index 0000000..6b5c499
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple.cif
@@ -0,0 +1,8 @@
+automaton p:
+  cont x = 0.0;
+  equation x' = 0.5;
+
+  location:
+    initial;
+    edge when x >= 1.5 do x := 0.0;
+end
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple.png b/v0.2-M1/cif/tools/cifsim/solver/root_simple.png
new file mode 100644
index 0000000..08487fd
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple.png.dat b/v0.2-M1/cif/tools/cifsim/solver/root_simple.png.dat
new file mode 100644
index 0000000..5b3e07d
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple.png.dat
@@ -0,0 +1,28 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# time                 p.x                     p.x'
+0.0                    0.0                     0.5
+9.999999999999999e-5   5.0000000000000016e-5   0.5
+0.0011                 5.500000000000002e-4    0.5
+0.0111                 0.005550000000000003    0.5
+0.1111                 0.05555000000000003     0.5
+1.1111                 0.5555500000000002      0.5
+3.000000000000004      1.5000000000000002      0.5
+# time                 p.x                     p.x'
+3.000000000000004      0.0                     0.5
+3.000100000000004      5.0000000000000016e-5   0.5
+3.001100000000004      5.500000000000002e-4    0.5
+3.011100000000004      0.005550000000000003    0.5
+3.111100000000004      0.05555000000000003     0.5
+4.111100000000004      0.5555500000000002      0.5
+5.0                    0.9999999999999984      0.5
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple.png.plt b/v0.2-M1/cif/tools/cifsim/solver/root_simple.png.plt
new file mode 100644
index 0000000..d409c6d
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple.png.plt
@@ -0,0 +1,43 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 500,300 font 'sans'
+set output "root_simple.png"
+
+set key top left vertical
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+#set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+#set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+#set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+#set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.05, graph 0.05
+
+plot \
+  "root_simple.png.dat" using 1:($2) title "x(time)"  with linespoints ls 1, \
+  "root_simple.png.dat" using 1:($3) title "x'(time)" with linespoints ls 2
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple.tooldef b/v0.2-M1/cif/tools/cifsim/solver/root_simple.tooldef
new file mode 100644
index 0000000..fd5c2b3
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple.tooldef
@@ -0,0 +1,22 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim("root_simple.cif",
+        "-i auto",
+        "-a first",
+        "-t 5",
+        "--trajdata=on",
+        "--trajdata-file=root_simple.png.dat",
+        "--solver-int-maxstep=100");
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple2.cif b/v0.2-M1/cif/tools/cifsim/solver/root_simple2.cif
new file mode 100644
index 0000000..e680667
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple2.cif
@@ -0,0 +1,15 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+cont x = 0.0;
+equation x' = 0.5;
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple2.png b/v0.2-M1/cif/tools/cifsim/solver/root_simple2.png
new file mode 100644
index 0000000..94eba12
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple2.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple2.png.dat b/v0.2-M1/cif/tools/cifsim/solver/root_simple2.png.dat
new file mode 100644
index 0000000..3d7fa52
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple2.png.dat
@@ -0,0 +1,20 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# time                 x                       x'
+0.0                    0.0                     0.5
+9.999999999999999e-5   5.0000000000000016e-5   0.5
+0.0011                 5.500000000000002e-4    0.5
+0.0111                 0.005550000000000003    0.5
+0.1111                 0.05555000000000003     0.5
+1.1111                 0.5555500000000002      0.5
+5.0                    2.500000000000001       0.5
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple2.png.plt b/v0.2-M1/cif/tools/cifsim/solver/root_simple2.png.plt
new file mode 100644
index 0000000..0d6f9fa
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple2.png.plt
@@ -0,0 +1,43 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 500,300 font 'sans'
+set output "root_simple2.png"
+
+set key top left vertical
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+#set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+#set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+#set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+#set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.05, graph 0.05
+
+plot \
+  "root_simple2.png.dat" using 1:($2) title "x(time)"  with linespoints ls 1, \
+  "root_simple2.png.dat" using 1:($3) title "x'(time)" with linespoints ls 2
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple2.tooldef b/v0.2-M1/cif/tools/cifsim/solver/root_simple2.tooldef
new file mode 100644
index 0000000..5f617ea
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple2.tooldef
@@ -0,0 +1,22 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifsim("root_simple2.cif",
+        "-i auto",
+        "-a first",
+        "-t 5",
+        "--trajdata=on",
+        "--trajdata-file=root_simple2.png.dat",
+        "--solver-int-maxstep=100");
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple_guard.png b/v0.2-M1/cif/tools/cifsim/solver/root_simple_guard.png
new file mode 100644
index 0000000..c6dc707
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple_guard.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple_guard.png.dat b/v0.2-M1/cif/tools/cifsim/solver/root_simple_guard.png.dat
new file mode 100644
index 0000000..b011b5a
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple_guard.png.dat
@@ -0,0 +1,13 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Dummy .dat file, needed by the Makefile target.
diff --git a/v0.2-M1/cif/tools/cifsim/solver/root_simple_guard.png.plt b/v0.2-M1/cif/tools/cifsim/solver/root_simple_guard.png.plt
new file mode 100644
index 0000000..e558333
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/solver/root_simple_guard.png.plt
@@ -0,0 +1,57 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 500,300 font 'sans'
+set output "root_simple_guard.png"
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+#set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+#set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+#set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+#set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set ytics 1.0
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.15, graph 0.15
+
+set samples 1000
+
+set multiplot layout 2, 1
+
+set size 1, 0.60
+set origin 0, 0.40
+set key top left vertical
+
+plot \
+  "root_simple2.png.dat" using 1:($2) title "x(time)"  with linespoints ls 1, \
+  "root_simple2.png.dat" using 1:($3) title "x'(time)" with linespoints ls 2
+
+set size 1, 0.40
+set origin 0, 0
+set key bottom right vertical
+
+plot [0:5] x >= 1.5 ? +1 : -1 title "x >= 1.5" with lines ls 1
diff --git a/v0.2-M1/cif/tools/cifsim/state_space.png b/v0.2-M1/cif/tools/cifsim/state_space.png
new file mode 100644
index 0000000..84478ea
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/cifsim/state_space.png.tex b/v0.2-M1/cif/tools/cifsim/state_space.png.tex
new file mode 100644
index 0000000..813f514
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/state_space.png.tex
@@ -0,0 +1,51 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[vcentering,dvips]{geometry}
+\geometry{papersize={20in,20in}}
+
+\usetikzlibrary{arrows, automata}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,very thick,top color=white,
+                      bottom color=se-blue!75,initial text=,
+                      minimum size=1.8cm},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial] (ri)               {\state{Released}{Idle}};
+  \node[state]          (pi) [right of=ri] {\state{Pushed}{Idle}};
+  \node[state]          (pp) [below of=pi] {\state{Pushed}{Producing}};
+  \node[state]          (rp) [below of=ri] {\state{Released}{Producing}};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=-2pt}]
+    (ri) edge [bend left]  node[sloped,anchor=south] {pushed}    (pi)
+    (pi) edge [bend left]  node[sloped,anchor=north] {released}  (ri)
+         edge [bend left]  node[sloped,anchor=south] {producing} (pp)
+    (pp) edge [bend left]  node[sloped,anchor=north] {released}  (rp)
+         edge [bend left]  node[sloped,anchor=south] {produced}  (pi)
+    (rp) edge [bend left]  node[sloped,anchor=south] {pushed}    (pp)
+         edge [bend left]  node[sloped,anchor=south] {produced}  (ri)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tools/cifsim/terminate_button.png b/v0.2-M1/cif/tools/cifsim/terminate_button.png
new file mode 100644
index 0000000..f07119b
--- /dev/null
+++ b/v0.2-M1/cif/tools/cifsim/terminate_button.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/codegen/simulink-example/controlledtank.slx b/v0.2-M1/cif/tools/codegen/simulink-example/controlledtank.slx
new file mode 100644
index 0000000..d703b6f
--- /dev/null
+++ b/v0.2-M1/cif/tools/codegen/simulink-example/controlledtank.slx
Binary files differ
diff --git a/v0.2-M1/cif/tools/codegen/simulink-example/matlab-mex.png b/v0.2-M1/cif/tools/codegen/simulink-example/matlab-mex.png
new file mode 100644
index 0000000..7cf56ad
--- /dev/null
+++ b/v0.2-M1/cif/tools/codegen/simulink-example/matlab-mex.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/codegen/simulink-example/rmb-generate-code.png b/v0.2-M1/cif/tools/codegen/simulink-example/rmb-generate-code.png
new file mode 100644
index 0000000..3e4feb8
--- /dev/null
+++ b/v0.2-M1/cif/tools/codegen/simulink-example/rmb-generate-code.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/codegen/simulink-example/set-output-variables.png b/v0.2-M1/cif/tools/codegen/simulink-example/set-output-variables.png
new file mode 100644
index 0000000..51608d5
--- /dev/null
+++ b/v0.2-M1/cif/tools/codegen/simulink-example/set-output-variables.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/codegen/simulink-example/simulation-graph.png b/v0.2-M1/cif/tools/codegen/simulink-example/simulation-graph.png
new file mode 100644
index 0000000..bd3dd3f
--- /dev/null
+++ b/v0.2-M1/cif/tools/codegen/simulink-example/simulation-graph.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/codegen/simulink-example/simulink-controlled-system.png b/v0.2-M1/cif/tools/codegen/simulink-example/simulink-controlled-system.png
new file mode 100644
index 0000000..8c0a424
--- /dev/null
+++ b/v0.2-M1/cif/tools/codegen/simulink-example/simulink-controlled-system.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/codegen/simulink-example/tank.svg b/v0.2-M1/cif/tools/codegen/simulink-example/tank.svg
new file mode 100644
index 0000000..6f49fa9
--- /dev/null
+++ b/v0.2-M1/cif/tools/codegen/simulink-example/tank.svg
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="772.59546"
+   height="620.13062"
+   id="svg2985"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="tank.svg">
+  <defs
+     id="defs2987" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#ffffff"
+     borderopacity="0.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="0"
+     inkscape:zoom="0.49497475"
+     inkscape:cx="998.95015"
+     inkscape:cy="-96.871635"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:snap-global="true"
+     inkscape:snap-grids="true"
+     inkscape:window-width="1333"
+     inkscape:window-height="974"
+     inkscape:window-x="87"
+     inkscape:window-y="43"
+     inkscape:window-maximized="0"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0">
+    <sodipodi:guide
+       orientation="0,1"
+       position="-16.397321,1672.1557"
+       id="guide2993" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata2990">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-4.96875,-427.24435)">
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="-138.3909"
+       y="-93.150803"
+       id="text3824"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3826"
+         x="-138.3909"
+         y="-93.150803" /></text>
+    <rect
+       style="fill:#c1d9e8;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.73356569px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       id="rect2995"
+       width="657.4093"
+       height="165.98073"
+       x="41.312176"
+       y="698.31433" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 42.87395,527.01898 -1.42857,334.28571 657.14286,1.42857 0,-328.57143"
+       id="path3765"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 69.48454,459.82175 57.14286,32.85714 0,-31.78572 -56.78572,31.42858 z"
+       id="path3767"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="M 72.68022,476.39318 5,477.01753"
+       id="path3769"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <g
+       id="g3799"
+       style="fill:#000000;fill-opacity:1;stroke:#c1d9e8;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       transform="translate(475.73109,500.37108)">
+      <path
+         sodipodi:nodetypes="scs"
+         inkscape:connector-curvature="0"
+         id="path3789"
+         d="m -152.23191,135.74066 4.74964,28.69744 c 0,0 -9.83088,-59.39839 -4.74964,-28.69744 z"
+         style="fill:#000000;fill-opacity:1;stroke:#c1d9e8;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3791"
+         d="m -157.5838,135.14367 -2.0203,29.29443"
+         style="fill:#000000;fill-opacity:1;stroke:#c1d9e8;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path3793"
+         d="m -154.46429,135.66575 1.3393,27.67857"
+         style="fill:#000000;fill-opacity:1;stroke:#c1d9e8;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3795"
+         d="M -155.71429,136.11218 -156.25,154.50504"
+         style="fill:#000000;fill-opacity:1;stroke:#c1d9e8;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3797"
+         d="m -152.76786,136.29075 1.07143,16.07143"
+         style="fill:#000000;fill-opacity:1;stroke:#c1d9e8;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    </g>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 125.20816,475.91065 c 149.90082,-3.1878 197.46002,29.27285 195.96959,161.62441"
+       id="path3771"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 607.05092,863.80923 -0.29587,183.55297"
+       id="path3806"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="640.38593"
+       y="953.71277"
+       id="text3808"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3810"
+         x="640.38593"
+         y="953.71277">Qo</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="499.97476"
+       y="685.01221"
+       id="text3812"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3814"
+         x="499.97476"
+         y="685.01221">V</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="304.00516"
+       y="500.1543"
+       id="text3816"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3818"
+         x="304.00516"
+         y="500.1543">Qi</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="83.791908"
+       y="449.6467"
+       id="text3820"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3822"
+         x="83.791908"
+         y="449.6467">n</tspan></text>
+    <path
+       style="fill:none;stroke:#d52141;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 684.30252,828.73326 31.42857,0 0,-151 -32.14286,0"
+       id="path3828"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccc" />
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="725.73108"
+       y="839.1618"
+       id="text3830"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3832"
+         x="725.73108"
+         y="839.1618">2</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="729.30249"
+       y="689.8761"
+       id="text3834"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3836"
+         x="729.30249"
+         y="689.8761">10</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tools/eventbased/analysis_basic.png b/v0.2-M1/cif/tools/eventbased/analysis_basic.png
new file mode 100644
index 0000000..b010edb
--- /dev/null
+++ b/v0.2-M1/cif/tools/eventbased/analysis_basic.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/eventbased/analysis_chain.png b/v0.2-M1/cif/tools/eventbased/analysis_chain.png
new file mode 100644
index 0000000..279e336
--- /dev/null
+++ b/v0.2-M1/cif/tools/eventbased/analysis_chain.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/eventbased/analysis_enable_synthesis_dump.png b/v0.2-M1/cif/tools/eventbased/analysis_enable_synthesis_dump.png
new file mode 100644
index 0000000..0e38701
--- /dev/null
+++ b/v0.2-M1/cif/tools/eventbased/analysis_enable_synthesis_dump.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/eventbased/analysis_outgoing.png b/v0.2-M1/cif/tools/eventbased/analysis_outgoing.png
new file mode 100644
index 0000000..db96512
--- /dev/null
+++ b/v0.2-M1/cif/tools/eventbased/analysis_outgoing.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/eventbased/analysis_removed.png b/v0.2-M1/cif/tools/eventbased/analysis_removed.png
new file mode 100644
index 0000000..d335930
--- /dev/null
+++ b/v0.2-M1/cif/tools/eventbased/analysis_removed.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/eventbased/analysis_startup.png b/v0.2-M1/cif/tools/eventbased/analysis_startup.png
new file mode 100644
index 0000000..db96fdd
--- /dev/null
+++ b/v0.2-M1/cif/tools/eventbased/analysis_startup.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/mergecif/merge.tooldef b/v0.2-M1/cif/tools/mergecif/merge.tooldef
new file mode 100644
index 0000000..6515d73
--- /dev/null
+++ b/v0.2-M1/cif/tools/mergecif/merge.tooldef
@@ -0,0 +1,16 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+from "lib:cif" import *;
+
+cifmerge("merge_sup.cif merge_timed.cif -o merged.cif");
diff --git a/v0.2-M1/cif/tools/mergecif/merge_sup.cif b/v0.2-M1/cif/tools/mergecif/merge_sup.cif
new file mode 100644
index 0000000..ae13c4e
--- /dev/null
+++ b/v0.2-M1/cif/tools/mergecif/merge_sup.cif
@@ -0,0 +1,35 @@
+group button:
+  uncontrollable u_pushed, u_released;
+end
+
+group lamp:
+  controllable c_on, c_off;
+end
+
+group timer:
+  controllable c_start;
+  uncontrollable u_timeout;
+end
+
+supervisor automaton timed_lamp:
+  location s0:
+    initial;
+    edge button.u_pushed goto s1;
+    edge button.u_released;
+
+  location s1:
+    edge lamp.c_on goto s2;
+    edge button.u_pushed, button.u_released;
+
+  location s2:
+    edge timer.c_start goto s3;
+    edge button.u_pushed, button.u_released;
+
+  location s3:
+    edge timer.u_timeout goto s4;
+    edge button.u_pushed, button.u_released;
+
+  location s4:
+    edge lamp.c_off goto s0;
+    edge button.u_pushed, button.u_released;
+end
diff --git a/v0.2-M1/cif/tools/mergecif/merge_timed.cif b/v0.2-M1/cif/tools/mergecif/merge_timed.cif
new file mode 100644
index 0000000..4396f7d
--- /dev/null
+++ b/v0.2-M1/cif/tools/mergecif/merge_timed.cif
@@ -0,0 +1,35 @@
+plant automaton button:
+  uncontrollable u_pushed, u_released;
+
+  location released:
+    initial;
+    edge u_pushed goto pushed;
+
+  location pushed:
+    edge u_released goto released;
+end
+
+plant automaton lamp:
+  controllable c_on, c_off;
+
+  location off:
+    initial;
+    edge c_on goto on;
+
+  location on:
+    edge c_off goto off;
+end
+
+plant automaton timer:
+  controllable c_start;
+  uncontrollable u_timeout;
+
+  cont t der 1.0;
+
+  location idle:
+    initial;
+    edge c_start do t := 0.0 goto running;
+
+  location running:
+    edge u_timeout when t >= 2.0 goto idle;
+end
diff --git a/v0.2-M1/cif/tools/mergecif/merged.cif b/v0.2-M1/cif/tools/mergecif/merged.cif
new file mode 100644
index 0000000..49fa0fb
--- /dev/null
+++ b/v0.2-M1/cif/tools/mergecif/merged.cif
@@ -0,0 +1,46 @@
+plant automaton button:
+  uncontrollable u_pushed;
+  uncontrollable u_released;
+  location released:
+    initial;
+    edge u_pushed goto pushed;
+  location pushed:
+    edge u_released goto released;
+end
+plant automaton lamp:
+  controllable c_on;
+  controllable c_off;
+  location off:
+    initial;
+    edge c_on goto on;
+  location on:
+    edge c_off goto off;
+end
+plant automaton timer:
+  controllable c_start;
+  uncontrollable u_timeout;
+  cont t der 1.0;
+  location idle:
+    initial;
+    edge c_start do t := 0.0 goto running;
+  location running:
+    edge u_timeout when t >= 2.0 goto idle;
+end
+supervisor automaton timed_lamp:
+  location s0:
+    initial;
+    edge button.u_pushed goto s1;
+    edge button.u_released;
+  location s1:
+    edge lamp.c_on goto s2;
+    edge button.u_pushed, button.u_released;
+  location s2:
+    edge timer.c_start goto s3;
+    edge button.u_pushed, button.u_released;
+  location s3:
+    edge timer.u_timeout goto s4;
+    edge button.u_pushed, button.u_released;
+  location s4:
+    edge lamp.c_off goto s0;
+    edge button.u_pushed, button.u_released;
+end
diff --git a/v0.2-M1/cif/tools/scripting/comment.png b/v0.2-M1/cif/tools/scripting/comment.png
new file mode 100644
index 0000000..6e30e1e
--- /dev/null
+++ b/v0.2-M1/cif/tools/scripting/comment.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/scripting/option_dialog_cmdline_help.png b/v0.2-M1/cif/tools/scripting/option_dialog_cmdline_help.png
new file mode 100644
index 0000000..c980626
--- /dev/null
+++ b/v0.2-M1/cif/tools/scripting/option_dialog_cmdline_help.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/scripting/option_dialog_cmdline_link.png b/v0.2-M1/cif/tools/scripting/option_dialog_cmdline_link.png
new file mode 100644
index 0000000..55d2218
--- /dev/null
+++ b/v0.2-M1/cif/tools/scripting/option_dialog_cmdline_link.png
Binary files differ
diff --git a/v0.2-M1/cif/tools/scripting/uncomment.png b/v0.2-M1/cif/tools/scripting/uncomment.png
new file mode 100644
index 0000000..38f8ce0
--- /dev/null
+++ b/v0.2-M1/cif/tools/scripting/uncomment.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/basics/coin_toss_state_space.png b/v0.2-M1/cif/tutorial/basics/coin_toss_state_space.png
new file mode 100644
index 0000000..75ee98e
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/basics/coin_toss_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/basics/coin_toss_state_space.png.tex b/v0.2-M1/cif/tutorial/basics/coin_toss_state_space.png.tex
new file mode 100644
index 0000000..a26ff84
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/basics/coin_toss_state_space.png.tex
@@ -0,0 +1,48 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=2.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (hu)                                {h/u};
+  \node[state]            (au) [                 right of=hu] {a/u};
+  \node[state]            (gh) [above =1cm of au,right of=au] {g/h};
+  \node[state]            (gt) [below =1cm of au,right of=au] {g/t};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=0pt}]
+    (hu) edge[]           node[]                    {toss}     (au)
+    (au) edge[]           node[sloped,anchor=south] {land}     (gh)
+    (au) edge[]           node[sloped,anchor=north] {land}     (gt)
+    (gh) edge[bend right] node[sloped,anchor=north] {pick\_up} (hu)
+    (gt) edge[bend left]  node[sloped,anchor=south] {pick\_up} (hu)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_finite.png b/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_finite.png
new file mode 100644
index 0000000..d1ce435
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_finite.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_finite.png.tex b/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_finite.png.tex
new file mode 100644
index 0000000..96e1089
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_finite.png.tex
@@ -0,0 +1,62 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=2.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s00)                      {p/i};
+  \node[state]            (s01) [      right of=s00] {i/i};
+  \node[state]            (s02) [      right of=s01] {p/c};
+  \node[state]            (s03) [above right of=s02] {i/c};
+  \node[state]            (s04) [below right of=s02] {p/i};
+  \node[state]            (s05) [below right of=s03] {i/i};
+  \node[state]            (s06) [      right of=s05] {p/c};
+  \node[state]            (s07) [above right of=s06] {i/c};
+  \node[state]            (s08) [below right of=s06] {p/i};
+  \node[state]            (s09) [below right of=s07] {i/i};
+  \node[state, accepting] (s10) [      right of=s09] {p/c};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=0pt}]
+    (s00) edge[] node[]                    {produce} (s01)
+    (s01) edge[] node[]                    {provide} (s02)
+    (s02) edge[] node[sloped,anchor=south] {produce} (s03)
+    (s02) edge[] node[sloped,anchor=north] {consume} (s04)
+    (s03) edge[] node[sloped,anchor=south] {consume} (s05)
+    (s04) edge[] node[sloped,anchor=north] {produce} (s05)
+    (s05) edge[] node[]                    {provide} (s06)
+    (s06) edge[] node[sloped,anchor=south] {produce} (s07)
+    (s06) edge[] node[sloped,anchor=north] {consume} (s08)
+    (s07) edge[] node[sloped,anchor=south] {consume} (s09)
+    (s08) edge[] node[sloped,anchor=north] {produce} (s09)
+    (s09) edge[] node[]                    {provide} (s10)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_infinite.png b/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_infinite.png
new file mode 100644
index 0000000..34c9800
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_infinite.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_infinite.png.tex b/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_infinite.png.tex
new file mode 100644
index 0000000..b4ef063
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/basics/producer_consumer_state_space_infinite.png.tex
@@ -0,0 +1,48 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=2.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s0)                    {p/i};
+  \node[state]            (s1) [right of=s0]      {i/i};
+  \node[state]            (s2) [below =1cm of s0] {p/c};
+  \node[state]            (s3) [below =1cm of s1] {i/c};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=0pt}]
+    (s0) edge[] node[]                    {produce} (s1)
+    (s1) edge[] node[sloped,anchor=south] {provide} (s2)
+    (s2) edge[] node[swap]                {produce} (s3)
+    (s3) edge[] node[swap]                {consume} (s1)
+    (s2) edge[] node[]                    {consume} (s0)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/channels/producer_consumer.png b/v0.2-M1/cif/tutorial/channels/producer_consumer.png
new file mode 100644
index 0000000..4061a2c
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/channels/producer_consumer.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/channels/producer_consumer.png.svg b/v0.2-M1/cif/tutorial/channels/producer_consumer.png.svg
new file mode 100644
index 0000000..f73c1d4
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/channels/producer_consumer.png.svg
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="620"
+   height="180"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="producer_consumer.png.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Lend"
+       style="overflow:visible;">
+      <path
+         id="path3879"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
+         transform="scale(0.8) rotate(180) translate(12.5,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Mend"
+       style="overflow:visible;">
+      <path
+         id="path3885"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
+         transform="scale(0.4) rotate(180) translate(10,0)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective3669"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3776"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="4"
+     inkscape:cx="153.97285"
+     inkscape:cy="106.85616"
+     inkscape:document-units="px"
+     inkscape:current-layer="g3861"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="g3861"
+     transform="translate(0.70532036,-1.6098709)">
+    <rect
+       style="fill:#f0f0f0;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3006"
+       width="99"
+       height="29"
+       x="9.7946796"
+       y="52.109871"
+       ry="5.75"
+       rx="5.75" />
+    <text
+       sodipodi:linespacing="125%"
+       id="text3051"
+       y="70.472176"
+       x="58.665771"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         style="font-size:14px;text-align:center;text-anchor:middle"
+         y="70.472176"
+         x="58.665771"
+         id="tspan3053"
+         sodipodi:role="line">producer</tspan></text>
+  </g>
+  <g
+     id="g3860"
+     transform="translate(0,3.7694445)">
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
+       d="M 109.62408,59.500002 208.62407,30.500001"
+       id="path3870"
+       inkscape:connector-curvature="0" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path4316"
+       d="M 109.62408,62.961111 208.62407,91.96111"
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" />
+  </g>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3051-5"
+     y="37.445599"
+     x="151.29156"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="font-size:14px;text-align:center;text-anchor:middle"
+       y="37.445599"
+       x="151.29156"
+       id="tspan3053-7"
+       sodipodi:role="line">provide1</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="151.29156"
+     y="101.8831"
+     id="text4546"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan4548"
+       x="151.29156"
+       y="101.8831"
+       style="font-size:14px;text-align:center;text-anchor:middle">provide2</tspan></text>
+  <g
+     transform="translate(200.70532,28.390129)"
+     id="g3840">
+    <rect
+       rx="5.75"
+       ry="5.75"
+       y="52.109871"
+       x="9.7946796"
+       height="29"
+       width="99"
+       id="rect3842"
+       style="fill:#f0f0f0;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="59.612549"
+       y="71.706062"
+       id="text3844"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3846"
+         x="59.612549"
+         y="71.706062"
+         style="font-size:14px;text-align:center;text-anchor:middle">consumer2</tspan></text>
+  </g>
+  <g
+     id="g3848"
+     transform="translate(200.70532,-31.609871)">
+    <rect
+       style="fill:#f0f0f0;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3850"
+       width="99"
+       height="29"
+       x="9.7946796"
+       y="52.109871"
+       ry="5.75"
+       rx="5.75" />
+    <text
+       sodipodi:linespacing="125%"
+       id="text3852"
+       y="71.613777"
+       x="59.557861"
+       style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         style="font-size:14px;text-align:center;text-anchor:middle"
+         y="71.613777"
+         x="59.557861"
+         id="tspan3854"
+         sodipodi:role="line">consumer1</tspan></text>
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tutorial/data/conveyor.png b/v0.2-M1/cif/tutorial/data/conveyor.png
new file mode 100644
index 0000000..eebdd49
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/conveyor.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/conveyor.png.svg b/v0.2-M1/cif/tutorial/data/conveyor.png.svg
new file mode 100644
index 0000000..dde5f12
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/conveyor.png.svg
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="620"
+   height="180"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="conveyor.png.svg">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective3669"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3776"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.8284272"
+     inkscape:cx="208.39851"
+     inkscape:cy="95.424358"
+     inkscape:document-units="px"
+     inkscape:current-layer="g3017"
+     showgrid="false"
+     inkscape:window-width="1916"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="belt"
+     transform="translate(199.5,-22)">
+    <path
+       id="belt_outer"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m -174,169 c 8.28427,0 139.71573,0 148,0 8.28427,0 15,-6.7157 15,-15 0,-8.2843 -6.71573,-15 -15,-15 0,0 0,0 0,0 0,0 -148,0 -148,0 0,0 0,0 0,0 -8.28427,0 -15,6.7158 -15,15 0,8.2843 6.71573,15 15,15 z"
+       sodipodi:nodetypes="ccsccccsc"
+       inkscape:connector-curvature="0" />
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#000000;stroke-width:0.56521809;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3659"
+       sodipodi:cx="20.5"
+       sodipodi:cy="224.5"
+       sodipodi:rx="6.5"
+       sodipodi:ry="6.5"
+       d="m 27,224.5 c 0,3.58985 -2.910149,6.5 -6.5,6.5 -3.589851,0 -6.5,-2.91015 -6.5,-6.5 0,-3.58985 2.910149,-6.5 6.5,-6.5 3.589851,0 6.5,2.91015 6.5,6.5 z"
+       transform="matrix(1.7692307,0,0,1.7692286,-210.26923,-243.19183)" />
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#000000;stroke-width:0.56521809;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3659-9"
+       sodipodi:cx="20.5"
+       sodipodi:cy="224.5"
+       sodipodi:rx="6.5"
+       sodipodi:ry="6.5"
+       d="m 27,224.5 c 0,3.58985 -2.910149,6.5 -6.5,6.5 -3.589851,0 -6.5,-2.91015 -6.5,-6.5 0,-3.58985 2.910149,-6.5 6.5,-6.5 3.589851,0 6.5,2.91015 6.5,6.5 z"
+       transform="matrix(1.7692307,0,0,1.7692286,-62.26923,-243.19183)" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m -174,148.4998 0,11.0002"
+       id="path3683"
+       inkscape:connector-curvature="0" />
+    <path
+       id="path3697"
+       d="m -168.4999,153.9999 -11.0002,0"
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       inkscape:connector-curvature="0" />
+    <path
+       id="path3699"
+       d="M -26,148.4998 -26,159.5"
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m -20.4999,153.9999 -11.0002,0"
+       id="path3701"
+       inkscape:connector-curvature="0" />
+  </g>
+  <g
+     id="box_wrapper"
+     transform="translate(10,-22)">
+    <rect
+       style="fill:#855e42;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="box"
+       width="119"
+       height="44"
+       x="0"
+       y="93.499977"
+       inkscape:label="#rect3746" />
+  </g>
+  <g
+     id="g3017"
+     transform="translate(379.5,-22)">
+    <path
+       sodipodi:nodetypes="ccsccccsc"
+       d="m -174,169 c 8.28427,0 139.71573,0 103,0 8.28427,0 15,-6.7157 15,-15 0,-8.2843 -6.71573,-15 -15,-15 0,0 0,0 0,0 0,0 -103,0 -103,0 0,0 0,0 0,0 -8.28427,0 -15,6.7158 -15,15 0,8.2843 6.71573,15 15,15 z"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3019"
+       inkscape:connector-curvature="0" />
+    <path
+       transform="matrix(1.7692307,0,0,1.7692286,-210.26923,-243.19183)"
+       d="m 27,224.5 c 0,3.58985 -2.910149,6.5 -6.5,6.5 -3.589851,0 -6.5,-2.91015 -6.5,-6.5 0,-3.58985 2.910149,-6.5 6.5,-6.5 3.589851,0 6.5,2.91015 6.5,6.5 z"
+       sodipodi:ry="6.5"
+       sodipodi:rx="6.5"
+       sodipodi:cy="224.5"
+       sodipodi:cx="20.5"
+       id="path3021"
+       style="fill:none;stroke:#000000;stroke-width:0.56521809;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:type="arc" />
+    <path
+       transform="matrix(1.7692307,0,0,1.7692286,-107.26923,-243.19183)"
+       d="m 27,224.5 a 6.5,6.5 0 1 1 -13,0 6.5,6.5 0 1 1 13,0 z"
+       sodipodi:ry="6.5"
+       sodipodi:rx="6.5"
+       sodipodi:cy="224.5"
+       sodipodi:cx="20.5"
+       id="path3023"
+       style="fill:none;stroke:#000000;stroke-width:0.56521809;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:type="arc" />
+    <path
+       id="path3025"
+       d="m -174,148.4998 0,11.0002"
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m -168.4999,153.9999 -11.0002,0"
+       id="path3027"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m -70.999999,148.4998 0,11.0002"
+       id="path3029"
+       inkscape:connector-curvature="0" />
+    <path
+       id="path3031"
+       d="m -65.499899,153.9999 -11.0002,0"
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       inkscape:connector-curvature="0" />
+  </g>
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 9.5,155.16667 0,4"
+     id="path3033"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3035"
+     d="m 144.5,155.16667 0,4"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 99.5,155.16667 0,4"
+     id="path3037"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3039"
+     d="m 54.5,155.16667 0,4"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 324.5,155.16667 0,4"
+     id="path3043"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3045"
+     d="m 279.5,155.16667 0,4"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 189.5,155.16667 0,4"
+     id="path3047"
+     inkscape:connector-curvature="0" />
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="9.5078125"
+     y="176.11092"
+     id="text3051"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3053"
+       x="9.5078125"
+       y="176.11092"
+       style="text-align:center;text-anchor:middle">0</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3055"
+     y="176.11092"
+     x="54.363281"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="text-align:center;text-anchor:middle"
+       y="176.11092"
+       x="54.363281"
+       id="tspan3057"
+       sodipodi:role="line">1</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="99.71875"
+     y="176.11092"
+     id="text3059"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3061"
+       x="99.71875"
+       y="176.11092"
+       style="text-align:center;text-anchor:middle">2</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="144.53516"
+     y="176.11092"
+     id="text3067"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3069"
+       x="144.53516"
+       y="176.11092"
+       style="text-align:center;text-anchor:middle">3</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3071"
+     y="176.11092"
+     x="189.5625"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="text-align:center;text-anchor:middle"
+       y="176.11092"
+       x="189.5625"
+       id="tspan3073"
+       sodipodi:role="line">4</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="279.44922"
+     y="176.11092"
+     id="text3075"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3077"
+       x="279.44922"
+       y="176.11092"
+       style="text-align:center;text-anchor:middle">6</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="324.53125"
+     y="176.11092"
+     id="text3083"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3085"
+       x="324.53125"
+       y="176.11092"
+       style="text-align:center;text-anchor:middle">7</tspan></text>
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 9.4399055,157.16667 314.9967245,0"
+     id="path3032"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3024"
+     d="m 234.5,155.16667 0,4"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <text
+     sodipodi:linespacing="125%"
+     id="text3026"
+     y="176.11092"
+     x="234.58594"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="text-align:center;text-anchor:middle"
+       y="176.11092"
+       x="234.58594"
+       id="tspan3028"
+       sodipodi:role="line">5</tspan></text>
+</svg>
diff --git a/v0.2-M1/cif/tutorial/data/conveyor_state_space.png b/v0.2-M1/cif/tutorial/data/conveyor_state_space.png
new file mode 100644
index 0000000..f100f94
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/conveyor_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/conveyor_state_space.png.tex b/v0.2-M1/cif/tutorial/data/conveyor_state_space.png.tex
new file mode 100644
index 0000000..da18fd4
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/conveyor_state_space.png.tex
@@ -0,0 +1,64 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=2.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s01) [            ] {0/-1};
+  \node[state]            (s02) [right of=s01] {1/-1};
+  \node[state]            (s03) [right of=s02] {2/-1};
+  \node[state]            (s04) [right of=s03] {3/-1};
+  \node[state]            (s05) [right of=s04] {4/-1};
+  \node[state]            (s06) [right of=s05] {0/4};
+  \node[state]            (s07) [right of=s06] {1/5};
+  \node[state]            (s08) [right of=s07] {2/6};
+  \node[state]            (s09) [right of=s08] {3/7};
+  \node[state]            (s10) [right of=s09] {4/7};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=0pt}]
+    (s01) edge[             ] node[                   ] {move   } (s02)
+    (s02) edge[             ] node[                   ] {move   } (s03)
+    (s03) edge[             ] node[                   ] {move   } (s04)
+    (s04) edge[             ] node[                   ] {move   } (s05)
+    (s05) edge[             ] node[                   ] {exit1  } (s06)
+    (s06) edge[             ] node[                   ] {move   } (s07)
+    (s07) edge[             ] node[                   ] {move   } (s08)
+    (s08) edge[             ] node[                   ] {move   } (s09)
+    (s09) edge[             ] node[                   ] {move   } (s10)
+
+    (s05) edge[loop below   ] node[                   ] {move   } (s05)
+    (s10) edge[loop below   ] node[                   ] {move   } (s10)
+
+    (s09) edge[bend right   ] node[sloped,anchor=south] {exit2  } (s04)
+    (s10) edge[bend right   ] node[sloped,anchor=south] {exit2  } (s05)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/data/counter_state_space.png b/v0.2-M1/cif/tutorial/data/counter_state_space.png
new file mode 100644
index 0000000..c1c8894
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/counter_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/counter_state_space.png.tex b/v0.2-M1/cif/tutorial/data/counter_state_space.png.tex
new file mode 100644
index 0000000..15c23af
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/counter_state_space.png.tex
@@ -0,0 +1,56 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  initial/.style={initial above},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state]            (s00) [            ] {0};
+  \node[state]            (s01) [right of=s00] {1};
+  \node[state]            (s02) [right of=s01] {2};
+  \node[state, initial]   (s03) [right of=s02] {3};
+  \node[state]            (s04) [right of=s03] {4};
+  \node[state]            (s05) [right of=s04] {5};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=0pt}]
+    (s00) edge[bend left] node[] {increment} (s01)
+    (s01) edge[bend left] node[] {decrement} (s00)
+    (s01) edge[bend left] node[] {increment} (s02)
+    (s02) edge[bend left] node[] {decrement} (s01)
+    (s02) edge[bend left] node[] {increment} (s03)
+    (s03) edge[bend left] node[] {decrement} (s02)
+    (s03) edge[bend left] node[] {increment} (s04)
+    (s04) edge[bend left] node[] {decrement} (s03)
+    (s04) edge[bend left] node[] {increment} (s05)
+    (s05) edge[bend left] node[] {decrement} (s04)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/data/discvar_change_state_space.png b/v0.2-M1/cif/tutorial/data/discvar_change_state_space.png
new file mode 100644
index 0000000..eddba38
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/discvar_change_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/discvar_change_state_space.png.tex b/v0.2-M1/cif/tutorial/data/discvar_change_state_space.png.tex
new file mode 100644
index 0000000..885278d
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/discvar_change_state_space.png.tex
@@ -0,0 +1,52 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s01) [            ] {off/0};
+  \node[state]            (s02) [right of=s01] {on/1};
+  \node[state]            (s03) [right of=s02] {off/1};
+  \node[state]            (s04) [right of=s03] {on/2};
+  \node[state]            (s05) [right of=s04] {off/2};
+  \node[state]            (s06) [right of=s05] {on/3};
+  \node[state, accepting] (s07) [right of=s06] {off/3};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=0pt}]
+    (s01) edge[] node[] {turn\_on } (s02)
+    (s02) edge[] node[] {turn\_off} (s03)
+    (s03) edge[] node[] {turn\_on } (s04)
+    (s04) edge[] node[] {turn\_off} (s05)
+    (s05) edge[] node[] {turn\_on } (s06)
+    (s06) edge[] node[] {turn\_off} (s07)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/data/monitoring_fixed_state_space.png b/v0.2-M1/cif/tutorial/data/monitoring_fixed_state_space.png
new file mode 100644
index 0000000..49a71a5
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/monitoring_fixed_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/monitoring_fixed_state_space.png.tex b/v0.2-M1/cif/tutorial/data/monitoring_fixed_state_space.png.tex
new file mode 100644
index 0000000..b125e8f
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/monitoring_fixed_state_space.png.tex
@@ -0,0 +1,55 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial] (s01) [                               ] {p/s};
+  \node[state]          (s02) [                   right of=s01] {i/s};
+  \node[state]          (s03) [                   right of=s02] {i/a};
+  \node[state]          (s05) [above =1cm of s03, right of=s03] {p/a};
+  \node[state]          (s06) [below =1cm of s03, right of=s03] {p/b};
+  \node[state]          (s04) [below =1cm of s05, right of=s05] {i/b};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=-1pt}]
+    (s01) edge[             ] node[                   ] {produce   } (s02)
+    (s02) edge[bend left =20] node[sloped,anchor=south] {provide\_a} (s05)
+    (s02) edge[bend right=20] node[sloped,anchor=north] {provide\_b} (s06)
+    (s03) edge[             ] node[sloped,anchor=north] {provide\_b} (s06)
+    (s04) edge[             ] node[sloped,anchor=south] {provide\_a} (s05)
+    (s05) edge[bend right= 7] node[sloped,anchor=south] {produce   } (s03)
+    (s06) edge[bend left = 7] node[sloped,anchor=south] {produce   } (s04)
+
+    (s03) edge[bend right= 7] node[sloped,anchor=north] {provide\_a} (s05)
+    (s04) edge[bend left = 7] node[sloped,anchor=north] {provide\_b} (s06)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/data/monitoring_problem_state_space.png b/v0.2-M1/cif/tutorial/data/monitoring_problem_state_space.png
new file mode 100644
index 0000000..f0374ba
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/monitoring_problem_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/monitoring_problem_state_space.png.tex b/v0.2-M1/cif/tutorial/data/monitoring_problem_state_space.png.tex
new file mode 100644
index 0000000..27b576c
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/monitoring_problem_state_space.png.tex
@@ -0,0 +1,52 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial] (s01) [                               ] {p/s};
+  \node[state]          (s02) [                   right of=s01] {i/s};
+  \node[state]          (s03) [                   right of=s02] {i/a};
+  \node[state]          (s05) [above =1cm of s03, right of=s03] {p/a};
+  \node[state]          (s06) [below =1cm of s03, right of=s03] {p/b};
+  \node[state]          (s04) [below =1cm of s05, right of=s05] {i/b};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=-1pt}]
+    (s01) edge[             ] node[                   ] {produce   } (s02)
+    (s02) edge[bend left =20] node[sloped,anchor=south] {provide\_a} (s05)
+    (s02) edge[bend right=20] node[sloped,anchor=north] {provide\_b} (s06)
+    (s03) edge[             ] node[sloped,anchor=north] {provide\_b} (s06)
+    (s04) edge[             ] node[sloped,anchor=south] {provide\_a} (s05)
+    (s05) edge[             ] node[sloped,anchor=south] {produce   } (s03)
+    (s06) edge[             ] node[sloped,anchor=north] {produce   } (s04)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/data/mutex_state_space.png b/v0.2-M1/cif/tutorial/data/mutex_state_space.png
new file mode 100644
index 0000000..b3eff6d
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/mutex_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/mutex_state_space.png.tex b/v0.2-M1/cif/tutorial/data/mutex_state_space.png.tex
new file mode 100644
index 0000000..d28ed26
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/mutex_state_space.png.tex
@@ -0,0 +1,64 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s1) [                               ] {i/i};
+  \node[state]            (s2) [above =1.1cm of s1, right of=s1] {p/i};
+  \node[state]            (s3) [below =1.1cm of s1, right of=s1] {i/p};
+  \node[state]            (s4) [                    right of=s2] {c/i};
+  \node[state]            (s5) [                    right of=s3] {i/c};
+  \node[state]            (s6) [                    right of=s4] {c/p};
+  \node[state]            (s7) [                    right of=s5] {p/c};
+  \node[state]            (s8) [below =1.1cm of s6, right of=s6] {c/c};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=0pt}]
+    (s1) edge[             ] node[sloped,anchor=south] {start1} (s2)
+    (s1) edge[             ] node[sloped,anchor=north] {start2} (s3)
+    (s2) edge[             ] node[sloped,anchor=south] {done1 } (s4)
+    (s3) edge[             ] node[sloped,anchor=north] {done2 } (s5)
+    (s4) edge[             ] node[sloped,anchor=south] {start2} (s6)
+    (s5) edge[             ] node[sloped,anchor=north] {start1} (s7)
+    (s6) edge[             ] node[sloped,anchor=south] {done2 } (s8)
+    (s7) edge[             ] node[sloped,anchor=north] {done1 } (s8)
+
+    (s4) edge[bend right=22] node[sloped,anchor=south] {reset1} (s1)
+    (s5) edge[bend left =22] node[sloped,anchor=north] {reset2} (s1)
+
+    (s8) edge[bend right=22] node[sloped,anchor=south] {reset2} (s4)
+    (s8) edge[bend left =22] node[sloped,anchor=north] {reset1} (s5)
+
+    (s6) edge[bend right= 9] node[sloped,anchor=north] {reset1} (s3)
+    (s7) edge[bend left = 9] node[sloped,anchor=south] {reset2} (s2)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/data/supermarket_state_space.png b/v0.2-M1/cif/tutorial/data/supermarket_state_space.png
new file mode 100644
index 0000000..e43281c
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/supermarket_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/supermarket_state_space.png.tex b/v0.2-M1/cif/tutorial/data/supermarket_state_space.png.tex
new file mode 100644
index 0000000..046ebdc
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/supermarket_state_space.png.tex
@@ -0,0 +1,78 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s00) [                                 ] {0/0};
+  \node[state]            (s01) [below =1.3cm of s00, right of=s00] {0/1};
+  \node[state]            (s02) [below =1.3cm of s01, right of=s01] {0/2};
+  \node[state]            (s10) [above =1.3cm of s00, right of=s00] {1/0};
+  \node[state]            (s11) [below =1.3cm of s10, right of=s10] {1/1};
+  \node[state]            (s12) [below =1.3cm of s11, right of=s11] {1/2};
+  \node[state]            (s20) [above =1.3cm of s10, right of=s10] {2/0};
+  \node[state]            (s21) [below =1.3cm of s20, right of=s20] {2/1};
+  \node[state]            (s22) [below =1.3cm of s21, right of=s21] {2/2};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=-2pt}]
+    (s00) edge[bend left=3] node[sloped,anchor=south] {queue1.enter} (s10)
+    (s00) edge[bend left=3] node[sloped,anchor=south] {queue2.enter} (s01)
+
+    (s01) edge[bend left=3] node[sloped,anchor=south] {queue1.enter} (s11)
+    (s01) edge[bend left=3] node[sloped,anchor=north] {queue2.exit } (s00)
+
+    (s02) edge[bend left=3] node[sloped,anchor=south] {queue1.enter} (s12)
+    (s02) edge[           ] node[sloped,anchor=north] {queue2.exit } (s01)
+
+    (s10) edge[bend left=3] node[sloped,anchor=south] {queue2.enter} (s11)
+    (s10) edge[bend left=3] node[sloped,anchor=north] {queue1.exit } (s00)
+
+    (s11) edge[bend left=3] node[sloped,anchor=south] {queue1.enter} (s21)
+    (s11) edge[bend left=3] node[sloped,anchor=south] {queue2.enter} (s12)
+    (s11) edge[bend left=3] node[sloped,anchor=north] {queue1.exit } (s01)
+    (s11) edge[bend left=3] node[sloped,anchor=north] {queue2.exit } (s10)
+
+    (s12) edge[bend left=3] node[sloped,anchor=south] {queue1.enter} (s22)
+    (s12) edge[bend left=3] node[sloped,anchor=north] {queue1.exit } (s02)
+    (s12) edge[bend left=3] node[sloped,anchor=north] {queue2.exit } (s11)
+
+    (s20) edge[bend left=3] node[sloped,anchor=south] {queue2.enter} (s21)
+    (s20) edge[           ] node[sloped,anchor=north] {queue1.exit } (s10)
+
+    (s21) edge[bend left=3] node[sloped,anchor=south] {queue2.enter} (s22)
+    (s21) edge[bend left=3] node[sloped,anchor=north] {queue1.exit } (s11)
+    (s21) edge[bend left=3] node[sloped,anchor=north] {queue2.exit } (s20)
+
+    (s22) edge[bend left=3] node[sloped,anchor=north] {queue1.exit } (s12)
+    (s22) edge[bend left=3] node[sloped,anchor=north] {queue2.exit } (s21)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/data/swapper_state_space.png b/v0.2-M1/cif/tutorial/data/swapper_state_space.png
new file mode 100644
index 0000000..07f7a8a
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/swapper_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/swapper_state_space.png.tex b/v0.2-M1/cif/tutorial/data/swapper_state_space.png.tex
new file mode 100644
index 0000000..07a0a0c
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/swapper_state_space.png.tex
@@ -0,0 +1,55 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  initial/.style={initial above},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state]            (s00) [            ] {0/0};
+  \node[state]            (s01) [right of=s00] {0/1};
+  \node[state]            (s02) [right of=s01] {1/1};
+  \node[state, initial]   (s03) [right of=s02] {1/2};
+  \node[state]            (s04) [right of=s03] {2/2};
+  \node[state]            (s05) [right of=s04] {2/3};
+  \node[state]            (s06) [right of=s05] {3/3};
+  \node[state]            (s07) [right of=s06] {3/4};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=0pt}]
+    (s00) edge[] node[] {swap} (s01)
+    (s01) edge[] node[] {swap} (s02)
+    (s02) edge[] node[] {swap} (s03)
+    (s03) edge[] node[] {swap} (s04)
+    (s04) edge[] node[] {swap} (s05)
+    (s05) edge[] node[] {swap} (s06)
+    (s06) edge[] node[] {swap} (s07)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/data/tau_event_state_space1.png b/v0.2-M1/cif/tutorial/data/tau_event_state_space1.png
new file mode 100644
index 0000000..9f59804
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/tau_event_state_space1.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/tau_event_state_space1.png.tex b/v0.2-M1/cif/tutorial/data/tau_event_state_space1.png.tex
new file mode 100644
index 0000000..f7146ca
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/tau_event_state_space1.png.tex
@@ -0,0 +1,43 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s00) [            ] {processing};
+  \node[state]            (s01) [right of=s00] {providing};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=0pt}]
+    (s00) edge[bend left=15] node[] {process} (s01)
+    (s01) edge[bend left=15] node[] {provide} (s00)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/data/tau_event_state_space2.png b/v0.2-M1/cif/tutorial/data/tau_event_state_space2.png
new file mode 100644
index 0000000..c1f4808
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/tau_event_state_space2.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/data/tau_event_state_space2.png.tex b/v0.2-M1/cif/tutorial/data/tau_event_state_space2.png.tex
new file mode 100644
index 0000000..e61b73b
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/data/tau_event_state_space2.png.tex
@@ -0,0 +1,43 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s00) [            ] {processing};
+  \node[state]            (s01) [right of=s00] {providing};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=0pt}]
+    (s00) edge[bend left=15] node[] {\texttt{tau}} (s01)
+    (s01) edge[bend left=15] node[] {provide} (s00)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/reuse1/conveyor.png b/v0.2-M1/cif/tutorial/reuse1/conveyor.png
new file mode 100644
index 0000000..b18defa
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/reuse1/conveyor.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/reuse1/conveyor.png.svg b/v0.2-M1/cif/tutorial/reuse1/conveyor.png.svg
new file mode 100644
index 0000000..d5c85d9
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/reuse1/conveyor.png.svg
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="620"
+   height="180"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="conveyor.png.svg">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective3669"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3776"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6568542"
+     inkscape:cx="144.32986"
+     inkscape:cy="72.276733"
+     inkscape:document-units="px"
+     inkscape:current-layer="svg2"
+     showgrid="false"
+     inkscape:window-width="1916"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     showguides="true"
+     inkscape:guide-bbox="true" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <rect
+     style="fill:#adff2f;fill-opacity:1;stroke:none"
+     width="10"
+     height="75"
+     x="139.5"
+     y="82.5"
+     id="rect9" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3809"
+     d="m 149.5,83.494576 0,74.010844"
+     style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.00000001, 2.00000002;stroke-dashoffset:0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.00000001, 2.00000002;stroke-dashoffset:0"
+     d="m 139.5,83.494576 0,74.010844"
+     id="path3807"
+     inkscape:connector-curvature="0" />
+  <g
+     id="belt"
+     transform="translate(199.5,-22)">
+    <path
+       id="belt_outer"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m -174,169 c 8.28427,0 139.71573,0 148,0 8.28427,0 15,-6.7157 15,-15 0,-8.2843 -6.71573,-15 -15,-15 0,0 0,0 0,0 0,0 -148,0 -148,0 0,0 0,0 0,0 -8.28427,0 -15,6.7158 -15,15 0,8.2843 6.71573,15 15,15 z"
+       sodipodi:nodetypes="ccsccccsc"
+       inkscape:connector-curvature="0" />
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#000000;stroke-width:0.56521809;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3659"
+       sodipodi:cx="20.5"
+       sodipodi:cy="224.5"
+       sodipodi:rx="6.5"
+       sodipodi:ry="6.5"
+       d="m 27,224.5 c 0,3.58985 -2.910149,6.5 -6.5,6.5 -3.589851,0 -6.5,-2.91015 -6.5,-6.5 0,-3.58985 2.910149,-6.5 6.5,-6.5 3.589851,0 6.5,2.91015 6.5,6.5 z"
+       transform="matrix(1.7692307,0,0,1.7692286,-210.26923,-243.19183)" />
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#000000;stroke-width:0.56521809;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3659-9"
+       sodipodi:cx="20.5"
+       sodipodi:cy="224.5"
+       sodipodi:rx="6.5"
+       sodipodi:ry="6.5"
+       d="m 27,224.5 c 0,3.58985 -2.910149,6.5 -6.5,6.5 -3.589851,0 -6.5,-2.91015 -6.5,-6.5 0,-3.58985 2.910149,-6.5 6.5,-6.5 3.589851,0 6.5,2.91015 6.5,6.5 z"
+       transform="matrix(1.7692307,0,0,1.7692286,-62.26923,-243.19183)" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m -174,148.4998 0,11.0002"
+       id="path3683"
+       inkscape:connector-curvature="0" />
+    <path
+       id="path3697"
+       d="m -168.4999,153.9999 -11.0002,0"
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       inkscape:connector-curvature="0" />
+    <path
+       id="path3699"
+       d="M -26,148.4998 -26,159.5"
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m -20.4999,153.9999 -11.0002,0"
+       id="path3701"
+       inkscape:connector-curvature="0" />
+  </g>
+  <g
+     id="box_wrapper"
+     transform="matrix(0.49579714,0,0,0.54544542,9.912529,40.663161)">
+    <rect
+       style="fill:#855e42;fill-opacity:1;stroke:#000000;stroke-width:1.92296922;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="box"
+       width="119"
+       height="44"
+       x="0"
+       y="93.499977"
+       inkscape:label="#rect3746" />
+  </g>
+  <g
+     id="g3017"
+     transform="translate(379.5,-22)" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 9.5,155.5 0,4"
+     id="path3033"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3035"
+     d="m 188.5,155.5 0,4"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 149.5,155.5 0,4"
+     id="path3037"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3039"
+     d="m 139.5,155.5 0,4"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="9.5078125"
+     y="176.77344"
+     id="text3051"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3053"
+       x="9.5078125"
+       y="176.77344"
+       style="text-align:center;text-anchor:middle">0</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3055"
+     y="176.77344"
+     x="132.12968"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="text-align:center;text-anchor:middle"
+       y="176.77344"
+       x="132.12968"
+       id="tspan3057"
+       sodipodi:role="line">13</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="156.42969"
+     y="176.77344"
+     id="text3059"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3061"
+       x="156.42969"
+       y="176.77344"
+       style="text-align:center;text-anchor:middle">14</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="188.53516"
+     y="176.77344"
+     id="text3067"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3069"
+       x="188.53516"
+       y="176.77344"
+       style="text-align:center;text-anchor:middle">18</tspan></text>
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 9.2247186,157.5 179.4303714,0"
+     id="path3032"
+     inkscape:connector-curvature="0" />
+</svg>
diff --git a/v0.2-M1/cif/tutorial/reuse2/library_dir_tree.png b/v0.2-M1/cif/tutorial/reuse2/library_dir_tree.png
new file mode 100644
index 0000000..621a518
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/reuse2/library_dir_tree.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/stochastics/pennies.png b/v0.2-M1/cif/tutorial/stochastics/pennies.png
new file mode 100644
index 0000000..ddb9767
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/stochastics/pennies.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/stochastics/pennies.png.dat b/v0.2-M1/cif/tutorial/stochastics/pennies.png.dat
new file mode 100644
index 0000000..154c4c1
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/stochastics/pennies.png.dat
@@ -0,0 +1,813 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+2.1000   0.0000
+2.1010   0.0000
+2.1020   0.0000
+2.1030   0.0000
+2.1040   0.0000
+2.1050   0.0000
+2.1060   0.0000
+2.1070   0.0000
+2.1080   0.0000
+2.1090   0.0000
+2.1100   0.0000
+2.1110   0.0000
+2.1120   0.0000
+2.1130   0.0000
+2.1140   0.0000
+2.1150   0.0000
+2.1160   0.0000
+2.1170   0.0000
+2.1180   0.0000
+2.1190   0.0000
+2.1200   0.0000
+2.1210   0.0000
+2.1220   0.0000
+2.1230   0.0000
+2.1240   0.0000
+2.1250   0.0000
+2.1260   0.0000
+2.1270   0.0000
+2.1280   0.0000
+2.1290   0.0000
+2.1300   0.0000
+2.1310   0.0000
+2.1320   0.0000
+2.1330   0.0000
+2.1340   0.0000
+2.1350   0.0000
+2.1360   0.0000
+2.1370   0.0000
+2.1380   0.0000
+2.1390   0.0000
+2.1400   0.0000
+2.1410   0.0000
+2.1420   0.0000
+2.1430   0.0000
+2.1440   0.0000
+2.1450   0.0000
+2.1460   0.0000
+2.1470   0.0000
+2.1480   0.0000
+2.1490   0.0000
+2.1500   0.0000
+2.1510   0.0000
+2.1520   0.0000
+2.1530   0.0000
+2.1540   0.0000
+2.1550   0.0000
+2.1560   0.0000
+2.1570   0.0000
+2.1580   0.0000
+2.1590   0.0000
+2.1600   0.0000
+2.1610   0.0000
+2.1620   0.0000
+2.1630   0.0000
+2.1640   0.0000
+2.1650   0.0000
+2.1660   0.0000
+2.1670   0.0000
+2.1680   0.0000
+2.1690   0.0000
+2.1700   0.0000
+2.1710   0.0000
+2.1720   0.0000
+2.1730   0.0000
+2.1740   0.0000
+2.1750   0.0000
+2.1760   0.0000
+2.1770   0.0000
+2.1780   0.0000
+2.1790   0.0000
+2.1800   0.0000
+2.1810   0.0000
+2.1820   0.0000
+2.1830   0.0000
+2.1840   0.0000
+2.1850   0.0000
+2.1860   0.0000
+2.1870   0.0000
+2.1880   0.0000
+2.1890   0.0000
+2.1900   0.0000
+2.1910   0.0000
+2.1920   0.0000
+2.1930   0.0000
+2.1940   0.0000
+2.1950   0.0000
+2.1960   0.0000
+2.1970   0.0000
+2.1980   0.0000
+2.1990   0.0000
+2.2000   0.0000
+2.2010   0.0000
+2.2020   0.0000
+2.2030   0.0000
+2.2040   0.0000
+2.2050   0.0000
+2.2060   0.0000
+2.2070   0.0000
+2.2080   0.0000
+2.2090   0.0000
+2.2100   0.0000
+2.2110   0.0000
+2.2120   0.0000
+2.2130   0.0000
+2.2140   0.0000
+2.2150   0.0000
+2.2160   0.0000
+2.2170   0.0000
+2.2180   0.0000
+2.2190   0.0000
+2.2200   0.0000
+2.2210   0.0000
+2.2220   0.0000
+2.2230   0.0000
+2.2240   0.0000
+2.2250   0.0000
+2.2260   0.0000
+2.2270   0.0000
+2.2280   0.0000
+2.2290   0.0000
+2.2300   0.0000
+2.2310   0.0000
+2.2320   0.0000
+2.2330   0.0000
+2.2340   0.0000
+2.2350   0.0000
+2.2360   0.0000
+2.2370   0.0000
+2.2380   0.0000
+2.2390   0.0000
+2.2400   0.0000
+2.2410   0.0000
+2.2420   0.0000
+2.2430   0.0000
+2.2440   0.0000
+2.2450   0.0000
+2.2460   0.0000
+2.2470   0.0000
+2.2480   0.0000
+2.2490   0.0000
+2.2500   0.0000
+2.2510   0.0000
+2.2520   0.0000
+2.2530   0.0000
+2.2540   0.0000
+2.2550   0.0000
+2.2560   0.0000
+2.2570   0.0000
+2.2580   0.0000
+2.2590   0.0000
+2.2600   0.0000
+2.2610   0.0000
+2.2620   0.0000
+2.2630   0.0000
+2.2640   0.0000
+2.2650   0.0000
+2.2660   0.0000
+2.2670   0.0000
+2.2680   0.0000
+2.2690   0.0000
+2.2700   0.0000
+2.2710   0.0000
+2.2720   0.0000
+2.2730   0.0000
+2.2740   0.0000
+2.2750   0.0000
+2.2760   0.0000
+2.2770   0.0000
+2.2780   0.0000
+2.2790   0.0000
+2.2800   0.0000
+2.2810   0.0000
+2.2820   0.0000
+2.2830   0.0000
+2.2840   0.0000
+2.2850   0.0000
+2.2860   0.0000
+2.2870   0.0000
+2.2880   0.0000
+2.2890   0.0000
+2.2900   0.0000
+2.2910   0.0000
+2.2920   0.0000
+2.2930   0.0000
+2.2940   0.0000
+2.2950   0.0000
+2.2960   0.0000
+2.2970   0.0000
+2.2980   0.0000
+2.2990   0.0000
+2.3000   0.0000
+2.3010   0.0000
+2.3020   0.0000
+2.3030   0.0000
+2.3040   0.0000
+2.3050   0.0000
+2.3060   0.0000
+2.3070   0.0000
+2.3080   0.0000
+2.3090   0.0000
+2.3100   0.0000
+2.3110   0.0000
+2.3120   0.0000
+2.3130   0.0000
+2.3140   0.0000
+2.3150   0.0000
+2.3160   0.0000
+2.3170   0.0000
+2.3180   0.0000
+2.3190   0.0000
+2.3200   0.0000
+2.3210   0.0000
+2.3220   0.0000
+2.3230   0.0000
+2.3240   0.0000
+2.3250   0.0000
+2.3260   0.0000
+2.3270   0.0000
+2.3280   0.0000
+2.3290   0.0000
+2.3300   0.0000
+2.3310   0.0000
+2.3320   0.0000
+2.3330   0.0000
+2.3340   0.0000
+2.3350   0.0000
+2.3360   0.0000
+2.3370   0.0000
+2.3380   0.0000
+2.3390   0.0000
+2.3400   0.0000
+2.3410   0.0000
+2.3420   0.0000
+2.3430   0.0000
+2.3440   0.0000
+2.3450   0.0000
+2.3460   0.0000
+2.3470   0.0000
+2.3480   0.0000
+2.3490   0.0000
+2.3500   0.0000
+2.3510   0.0000
+2.3520   0.0000
+2.3530   0.0000
+2.3540   0.0000
+2.3550   0.0000
+2.3560   0.0000
+2.3570   0.0000
+2.3580   0.0001
+2.3590   0.0001
+2.3600   0.0001
+2.3610   0.0001
+2.3620   0.0001
+2.3630   0.0002
+2.3640   0.0002
+2.3650   0.0003
+2.3660   0.0004
+2.3670   0.0005
+2.3680   0.0006
+2.3690   0.0007
+2.3700   0.0009
+2.3710   0.0011
+2.3720   0.0014
+2.3730   0.0017
+2.3740   0.0021
+2.3750   0.0027
+2.3760   0.0033
+2.3770   0.0040
+2.3780   0.0049
+2.3790   0.0061
+2.3800   0.0074
+2.3810   0.0090
+2.3820   0.0109
+2.3830   0.0133
+2.3840   0.0160
+2.3850   0.0194
+2.3860   0.0233
+2.3870   0.0280
+2.3880   0.0335
+2.3890   0.0400
+2.3900   0.0476
+2.3910   0.0566
+2.3920   0.0671
+2.3930   0.0793
+2.3940   0.0935
+2.3950   0.1100
+2.3960   0.1291
+2.3970   0.1511
+2.3980   0.1764
+2.3990   0.2055
+2.4000   0.2388
+2.4010   0.2767
+2.4020   0.3199
+2.4030   0.3689
+2.4040   0.4243
+2.4050   0.4869
+2.4060   0.5573
+2.4070   0.6362
+2.4080   0.7245
+2.4090   0.8231
+2.4100   0.9326
+2.4110   1.0542
+2.4120   1.1886
+2.4130   1.3368
+2.4140   1.4997
+2.4150   1.6783
+2.4160   1.8734
+2.4170   2.0860
+2.4180   2.3170
+2.4190   2.5671
+2.4200   2.8371
+2.4210   3.1276
+2.4220   3.4393
+2.4230   3.7726
+2.4240   4.1279
+2.4250   4.5054
+2.4260   4.9051
+2.4270   5.3269
+2.4280   5.7706
+2.4290   6.2356
+2.4300   6.7212
+2.4310   7.2266
+2.4320   7.7506
+2.4330   8.2918
+2.4340   8.8487
+2.4350   9.4194
+2.4360   10.0019
+2.4370   10.5938
+2.4380   11.1928
+2.4390   11.7961
+2.4400   12.4009
+2.4410   13.0042
+2.4420   13.6027
+2.4430   14.1933
+2.4440   14.7726
+2.4450   15.3371
+2.4460   15.8834
+2.4470   16.4080
+2.4480   16.9077
+2.4490   17.3792
+2.4500   17.8191
+2.4510   18.2246
+2.4520   18.5928
+2.4530   18.9210
+2.4540   19.2069
+2.4550   19.4485
+2.4560   19.6440
+2.4570   19.7919
+2.4580   19.8911
+2.4590   19.9409
+2.4600   19.9409
+2.4610   19.8911
+2.4620   19.7919
+2.4630   19.6440
+2.4640   19.4485
+2.4650   19.2069
+2.4660   18.9210
+2.4670   18.5928
+2.4680   18.2246
+2.4690   17.8191
+2.4700   17.3792
+2.4710   16.9077
+2.4720   16.4080
+2.4730   15.8834
+2.4740   15.3371
+2.4750   14.7726
+2.4760   14.1933
+2.4770   13.6027
+2.4780   13.0042
+2.4790   12.4009
+2.4800   11.7961
+2.4810   11.1928
+2.4820   10.5938
+2.4830   10.0019
+2.4840   9.4194
+2.4850   8.8487
+2.4860   8.2918
+2.4870   7.7506
+2.4880   7.2266
+2.4890   6.7212
+2.4900   6.2356
+2.4910   5.7706
+2.4920   5.3269
+2.4930   4.9051
+2.4940   4.5054
+2.4950   4.1279
+2.4960   3.7726
+2.4970   3.4393
+2.4980   3.1276
+2.4990   2.8371
+2.5000   2.5671
+2.5010   2.3170
+2.5020   2.0860
+2.5030   1.8734
+2.5040   1.6783
+2.5050   1.4997
+2.5060   1.3368
+2.5070   1.1886
+2.5080   1.0542
+2.5090   0.9326
+2.5100   0.8231
+2.5110   0.7245
+2.5120   0.6362
+2.5130   0.5573
+2.5140   0.4869
+2.5150   0.4243
+2.5160   0.3689
+2.5170   0.3199
+2.5180   0.2767
+2.5190   0.2388
+2.5200   0.2055
+2.5210   0.1764
+2.5220   0.1511
+2.5230   0.1291
+2.5240   0.1100
+2.5250   0.0935
+2.5260   0.0793
+2.5270   0.0671
+2.5280   0.0566
+2.5290   0.0476
+2.5300   0.0400
+2.5310   0.0335
+2.5320   0.0280
+2.5330   0.0233
+2.5340   0.0194
+2.5350   0.0160
+2.5360   0.0133
+2.5370   0.0109
+2.5380   0.0090
+2.5390   0.0074
+2.5400   0.0061
+2.5410   0.0049
+2.5420   0.0040
+2.5430   0.0033
+2.5440   0.0027
+2.5450   0.0021
+2.5460   0.0017
+2.5470   0.0014
+2.5480   0.0011
+2.5490   0.0009
+2.5500   0.0007
+2.5510   0.0006
+2.5520   0.0005
+2.5530   0.0004
+2.5540   0.0003
+2.5550   0.0002
+2.5560   0.0002
+2.5570   0.0001
+2.5580   0.0001
+2.5590   0.0001
+2.5600   0.0001
+2.5610   0.0001
+2.5620   0.0000
+2.5630   0.0000
+2.5640   0.0000
+2.5650   0.0000
+2.5660   0.0000
+2.5670   0.0000
+2.5680   0.0000
+2.5690   0.0000
+2.5700   0.0000
+2.5710   0.0000
+2.5720   0.0000
+2.5730   0.0000
+2.5740   0.0000
+2.5750   0.0000
+2.5760   0.0000
+2.5770   0.0000
+2.5780   0.0000
+2.5790   0.0000
+2.5800   0.0000
+2.5810   0.0000
+2.5820   0.0000
+2.5830   0.0000
+2.5840   0.0000
+2.5850   0.0000
+2.5860   0.0000
+2.5870   0.0000
+2.5880   0.0000
+2.5890   0.0000
+2.5900   0.0000
+2.5910   0.0000
+2.5920   0.0000
+2.5930   0.0000
+2.5940   0.0000
+2.5950   0.0000
+2.5960   0.0000
+2.5970   0.0000
+2.5980   0.0000
+2.5990   0.0000
+2.6000   0.0000
+2.6010   0.0000
+2.6020   0.0000
+2.6030   0.0000
+2.6040   0.0000
+2.6050   0.0000
+2.6060   0.0000
+2.6070   0.0000
+2.6080   0.0000
+2.6090   0.0000
+2.6100   0.0000
+2.6110   0.0000
+2.6120   0.0000
+2.6130   0.0000
+2.6140   0.0000
+2.6150   0.0000
+2.6160   0.0000
+2.6170   0.0000
+2.6180   0.0000
+2.6190   0.0000
+2.6200   0.0000
+2.6210   0.0000
+2.6220   0.0000
+2.6230   0.0000
+2.6240   0.0000
+2.6250   0.0000
+2.6260   0.0000
+2.6270   0.0000
+2.6280   0.0000
+2.6290   0.0000
+2.6300   0.0000
+2.6310   0.0000
+2.6320   0.0000
+2.6330   0.0000
+2.6340   0.0000
+2.6350   0.0000
+2.6360   0.0000
+2.6370   0.0000
+2.6380   0.0000
+2.6390   0.0000
+2.6400   0.0000
+2.6410   0.0000
+2.6420   0.0000
+2.6430   0.0000
+2.6440   0.0000
+2.6450   0.0000
+2.6460   0.0000
+2.6470   0.0000
+2.6480   0.0000
+2.6490   0.0000
+2.6500   0.0000
+2.6510   0.0000
+2.6520   0.0000
+2.6530   0.0000
+2.6540   0.0000
+2.6550   0.0000
+2.6560   0.0000
+2.6570   0.0000
+2.6580   0.0000
+2.6590   0.0000
+2.6600   0.0000
+2.6610   0.0000
+2.6620   0.0000
+2.6630   0.0000
+2.6640   0.0000
+2.6650   0.0000
+2.6660   0.0000
+2.6670   0.0000
+2.6680   0.0000
+2.6690   0.0000
+2.6700   0.0000
+2.6710   0.0000
+2.6720   0.0000
+2.6730   0.0000
+2.6740   0.0000
+2.6750   0.0000
+2.6760   0.0000
+2.6770   0.0000
+2.6780   0.0000
+2.6790   0.0000
+2.6800   0.0000
+2.6810   0.0000
+2.6820   0.0000
+2.6830   0.0000
+2.6840   0.0000
+2.6850   0.0000
+2.6860   0.0000
+2.6870   0.0000
+2.6880   0.0000
+2.6890   0.0000
+2.6900   0.0000
+2.6910   0.0000
+2.6920   0.0000
+2.6930   0.0000
+2.6940   0.0000
+2.6950   0.0000
+2.6960   0.0000
+2.6970   0.0000
+2.6980   0.0000
+2.6990   0.0000
+2.7000   0.0000
+2.7010   0.0000
+2.7020   0.0000
+2.7030   0.0000
+2.7040   0.0000
+2.7050   0.0000
+2.7060   0.0000
+2.7070   0.0000
+2.7080   0.0000
+2.7090   0.0000
+2.7100   0.0000
+2.7110   0.0000
+2.7120   0.0000
+2.7130   0.0000
+2.7140   0.0000
+2.7150   0.0000
+2.7160   0.0000
+2.7170   0.0000
+2.7180   0.0000
+2.7190   0.0000
+2.7200   0.0000
+2.7210   0.0000
+2.7220   0.0000
+2.7230   0.0000
+2.7240   0.0000
+2.7250   0.0000
+2.7260   0.0000
+2.7270   0.0000
+2.7280   0.0000
+2.7290   0.0000
+2.7300   0.0000
+2.7310   0.0000
+2.7320   0.0000
+2.7330   0.0000
+2.7340   0.0000
+2.7350   0.0000
+2.7360   0.0000
+2.7370   0.0000
+2.7380   0.0000
+2.7390   0.0000
+2.7400   0.0000
+2.7410   0.0000
+2.7420   0.0000
+2.7430   0.0000
+2.7440   0.0000
+2.7450   0.0000
+2.7460   0.0000
+2.7470   0.0000
+2.7480   0.0000
+2.7490   0.0000
+2.7500   0.0000
+2.7510   0.0000
+2.7520   0.0000
+2.7530   0.0000
+2.7540   0.0000
+2.7550   0.0000
+2.7560   0.0000
+2.7570   0.0000
+2.7580   0.0000
+2.7590   0.0000
+2.7600   0.0000
+2.7610   0.0000
+2.7620   0.0000
+2.7630   0.0000
+2.7640   0.0000
+2.7650   0.0000
+2.7660   0.0000
+2.7670   0.0000
+2.7680   0.0000
+2.7690   0.0000
+2.7700   0.0000
+2.7710   0.0000
+2.7720   0.0000
+2.7730   0.0000
+2.7740   0.0000
+2.7750   0.0000
+2.7760   0.0000
+2.7770   0.0000
+2.7780   0.0000
+2.7790   0.0000
+2.7800   0.0000
+2.7810   0.0000
+2.7820   0.0000
+2.7830   0.0000
+2.7840   0.0000
+2.7850   0.0000
+2.7860   0.0000
+2.7870   0.0000
+2.7880   0.0000
+2.7890   0.0000
+2.7900   0.0000
+2.7910   0.0000
+2.7920   0.0000
+2.7930   0.0000
+2.7940   0.0000
+2.7950   0.0000
+2.7960   0.0000
+2.7970   0.0000
+2.7980   0.0000
+2.7990   0.0000
+2.8000   0.0000
+2.8010   0.0000
+2.8020   0.0000
+2.8030   0.0000
+2.8040   0.0000
+2.8050   0.0000
+2.8060   0.0000
+2.8070   0.0000
+2.8080   0.0000
+2.8090   0.0000
+2.8100   0.0000
+2.8110   0.0000
+2.8120   0.0000
+2.8130   0.0000
+2.8140   0.0000
+2.8150   0.0000
+2.8160   0.0000
+2.8170   0.0000
+2.8180   0.0000
+2.8190   0.0000
+2.8200   0.0000
+2.8210   0.0000
+2.8220   0.0000
+2.8230   0.0000
+2.8240   0.0000
+2.8250   0.0000
+2.8260   0.0000
+2.8270   0.0000
+2.8280   0.0000
+2.8290   0.0000
+2.8300   0.0000
+2.8310   0.0000
+2.8320   0.0000
+2.8330   0.0000
+2.8340   0.0000
+2.8350   0.0000
+2.8360   0.0000
+2.8370   0.0000
+2.8380   0.0000
+2.8390   0.0000
+2.8400   0.0000
+2.8410   0.0000
+2.8420   0.0000
+2.8430   0.0000
+2.8440   0.0000
+2.8450   0.0000
+2.8460   0.0000
+2.8470   0.0000
+2.8480   0.0000
+2.8490   0.0000
+2.8500   0.0000
+2.8510   0.0000
+2.8520   0.0000
+2.8530   0.0000
+2.8540   0.0000
+2.8550   0.0000
+2.8560   0.0000
+2.8570   0.0000
+2.8580   0.0000
+2.8590   0.0000
+2.8600   0.0000
+2.8610   0.0000
+2.8620   0.0000
+2.8630   0.0000
+2.8640   0.0000
+2.8650   0.0000
+2.8660   0.0000
+2.8670   0.0000
+2.8680   0.0000
+2.8690   0.0000
+2.8700   0.0000
+2.8710   0.0000
+2.8720   0.0000
+2.8730   0.0000
+2.8740   0.0000
+2.8750   0.0000
+2.8760   0.0000
+2.8770   0.0000
+2.8780   0.0000
+2.8790   0.0000
+2.8800   0.0000
+2.8810   0.0000
+2.8820   0.0000
+2.8830   0.0000
+2.8840   0.0000
+2.8850   0.0000
+2.8860   0.0000
+2.8870   0.0000
+2.8880   0.0000
+2.8890   0.0000
+2.8900   0.0000
+2.8910   0.0000
+2.8920   0.0000
+2.8930   0.0000
+2.8940   0.0000
+2.8950   0.0000
+2.8960   0.0000
+2.8970   0.0000
+2.8980   0.0000
+2.8990   0.0000
+2.9000   0.0000
diff --git a/v0.2-M1/cif/tutorial/stochastics/pennies.png.plt b/v0.2-M1/cif/tutorial/stochastics/pennies.png.plt
new file mode 100644
index 0000000..01901dd
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/stochastics/pennies.png.plt
@@ -0,0 +1,44 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 800,200 font 'sans'
+set output "pennies.png"
+
+set key top right vertical
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+#set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+#set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+#set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+#set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.05, graph 0.05
+
+set format y ""
+
+plot \
+  "pennies.png.dat" using 1:($2) title "normal(2.46, 0.0004)" with lines ls 1
diff --git a/v0.2-M1/cif/tutorial/time/machine_plot.png b/v0.2-M1/cif/tutorial/time/machine_plot.png
new file mode 100644
index 0000000..fdb8a47
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/machine_plot.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/time/machine_plot.png.dat b/v0.2-M1/cif/tutorial/time/machine_plot.png.dat
new file mode 100644
index 0000000..ad04e57
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/machine_plot.png.dat
@@ -0,0 +1,20 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# time  t       t'
+0.0     0.0     1.0
+3.0     3.0     1.0
+3.0     0.0     1.0
+6.0     3.0     1.0
+6.0     0.0     1.0
+9.0     3.0     1.0
+9.0     0.0     1.0
diff --git a/v0.2-M1/cif/tutorial/time/machine_plot.png.plt b/v0.2-M1/cif/tutorial/time/machine_plot.png.plt
new file mode 100644
index 0000000..e73fbea
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/machine_plot.png.plt
@@ -0,0 +1,44 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 600,300 font 'sans'
+set output "machine_plot.png"
+
+set key outside horizontal bottom center
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.05, graph 0.05
+
+plot \
+  "machine_plot.png.dat" using 1:($1) title "time(time)" with lines ls 1, \
+  "machine_plot.png.dat" using 1:($2) title "t(time)"    with lines ls 2, \
+  "machine_plot.png.dat" using 1:($3) title "t'(time)"   with lines ls 3
diff --git a/v0.2-M1/cif/tutorial/time/machine_state_space.png b/v0.2-M1/cif/tutorial/time/machine_state_space.png
new file mode 100644
index 0000000..70ebcaf
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/machine_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/time/machine_state_space.png.tex b/v0.2-M1/cif/tutorial/time/machine_state_space.png.tex
new file mode 100644
index 0000000..13124af
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/machine_state_space.png.tex
@@ -0,0 +1,59 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3.5cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  initial/.style={initial left},
+  accepting/.style={accepting by arrow,accepting text=\ldots},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s00) [            ] {i, 0.0, 0.0};
+  \node[state]            (s01) [right of=s00] {p, 0.0, 0.0};
+  \node[state]            (s02) [right of=s01] {p, 3.0, 3.0};
+  \node[state]            (s03) [right of=s02] {i, 3.0, 3.0};
+  \node[state]            (s04) [right of=s03] {p, 3.0, 0.0};
+  \node[state]            (s05) [right of=s04] {p, 6.0, 3.0};
+  \node[state]            (s06) [right of=s05] {i, 6.0, 3.0};
+  \node[state]            (s07) [right of=s06] {p, 6.0, 0.0};
+  \node[state]            (s08) [right of=s07] {p, 9.0, 3.0};
+  \node[state, accepting] (s09) [right of=s08] {i, 9.0, 3.0};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=2pt}]
+    (s00) edge[] node[] {start}    (s01)
+    (s01) edge[] node[] {3.0}      (s02)
+    (s02) edge[] node[] {finished} (s03)
+    (s03) edge[] node[] {start}    (s04)
+    (s04) edge[] node[] {3.0}      (s05)
+    (s05) edge[] node[] {finished} (s06)
+    (s06) edge[] node[] {start}    (s07)
+    (s07) edge[] node[] {3.0}      (s08)
+    (s08) edge[] node[] {finished} (s09)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/time/person_plot.png b/v0.2-M1/cif/tutorial/time/person_plot.png
new file mode 100644
index 0000000..45f050d
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/person_plot.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/time/person_plot.png.dat b/v0.2-M1/cif/tutorial/time/person_plot.png.dat
new file mode 100644
index 0000000..766ebf8
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/person_plot.png.dat
@@ -0,0 +1,23 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# time  pos     pos'
+0.0     0.0     1.0
+10.0    10.0    1.0
+10.0    10.0    -2.0
+15.0    0.0     -2.0
+15.0    0.0     1.0
+25.0    10.0    1.0
+25.0    10.0    -2.0
+30.0    0.0     -2.0
+30.0    0.0     1.0
+40.0    10.0    1.0
diff --git a/v0.2-M1/cif/tutorial/time/person_plot.png.plt b/v0.2-M1/cif/tutorial/time/person_plot.png.plt
new file mode 100644
index 0000000..4ae0a39
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/person_plot.png.plt
@@ -0,0 +1,44 @@
+################################################################################
+# Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
+# Requires Gnuplot 4.4 or higher.
+
+set terminal pngcairo size 600,300 font 'sans'
+set output "person_plot.png"
+
+set key outside horizontal bottom center
+
+set style line 1 linecolor rgb '#dc3912' linetype 1 linewidth 2
+set style line 2 linecolor rgb '#3366cc' linetype 1 linewidth 2
+set style line 3 linecolor rgb '#109618' linetype 1 linewidth 2
+set style line 4 linecolor rgb '#ff9900' linetype 1 linewidth 2
+set style line 5 linecolor rgb '#990099' linetype 1 linewidth 2
+set style line 6 linecolor rgb '#00cccc' linetype 1 linewidth 2
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set border linewidth 1.5
+
+set style line 12 lc rgb'#808080' lt 0 lw 1
+set grid back ls 12
+set grid back
+
+set autoscale yfixmin
+set autoscale yfixmax
+set autoscale xfixmin
+set autoscale xfixmax
+set offsets 0, 0, graph 0.05, graph 0.05
+
+plot \
+  "person_plot.png.dat" using 1:($1) title "time(time)" with lines ls 1, \
+  "person_plot.png.dat" using 1:($2) title "pos(time)"  with lines ls 2, \
+  "person_plot.png.dat" using 1:($3) title "pos'(time)" with lines ls 3
diff --git a/v0.2-M1/cif/tutorial/time/tank.png b/v0.2-M1/cif/tutorial/time/tank.png
new file mode 100644
index 0000000..54e8ec9
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/tank.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/time/tank.png.svg b/v0.2-M1/cif/tutorial/time/tank.png.svg
new file mode 100644
index 0000000..70899aa
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/tank.png.svg
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="600"
+   height="250"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.48.3.1 r9886"
+   version="1.0"
+   sodipodi:docname="tank.png.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow2Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Lend"
+       style="overflow:visible">
+      <path
+         id="path3199"
+         style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+         d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z"
+         transform="matrix(-1.1,0,0,-1.1,-1.1,0)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="214.11606"
+     inkscape:cy="260.89569"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1213"
+     inkscape:window-height="1080"
+     inkscape:window-x="296"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#8080ff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+       id="water"
+       width="170"
+       height="71"
+       x="100.5"
+       y="-179.5"
+       inkscape:label="#rect5026"
+       transform="scale(1,-1)" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
+       d="m 185.48238,79.526202 0,48.145778"
+       id="path3953"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
+       x="195.10156"
+       y="99.059967"
+       id="Qi"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan2832"
+         x="195.10156"
+         y="99.059967"
+         style="text-align:start;text-anchor:start">Qi</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 100.5,99.5 0,80 c 28.33333,0 56.66667,0 85,0 l 42.5,0 42.5,0 0,-80"
+       id="path4491"
+       sodipodi:nodetypes="cccccc"
+       inkscape:connector-curvature="0" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
+       x="195.10156"
+       y="198.91934"
+       id="Qo"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan2836"
+         x="195.10156"
+         y="198.91934"
+         style="text-align:start;text-anchor:start">Qo</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
+       x="278"
+       y="145.33203"
+       id="V"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan2834"
+         x="278"
+         y="145.33203"
+         style="text-align:start;text-anchor:start">V</tspan></text>
+    <path
+       sodipodi:nodetypes="cc"
+       inkscape:connector-curvature="0"
+       id="path3003"
+       d="m 185.48238,165.5262 0,48.14578"
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)" />
+  </g>
+</svg>
diff --git a/v0.2-M1/cif/tutorial/time/tank_plot.png b/v0.2-M1/cif/tutorial/time/tank_plot.png
new file mode 100644
index 0000000..854fc6d
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/tank_plot.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/time/usecase_nonurg_state_space.png b/v0.2-M1/cif/tutorial/time/usecase_nonurg_state_space.png
new file mode 100644
index 0000000..a9d2f5b
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/usecase_nonurg_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/time/usecase_nonurg_state_space.png.tex b/v0.2-M1/cif/tutorial/time/usecase_nonurg_state_space.png.tex
new file mode 100644
index 0000000..fa758fc
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/usecase_nonurg_state_space.png.tex
@@ -0,0 +1,45 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3.8cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  initial/.style={initial left},
+  accepting/.style={accepting by arrow,accepting text=$\infty$},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s00) [            ] {first,    0.0};
+  \node[state]            (s01) [right of=s00] {second,   0.0};
+  \node[state, accepting] (s02) [right of=s01] {done,     0.0};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=2pt}]
+    (s00) edge[] node[] {\texttt{tau}} (s01)
+    (s01) edge[] node[] {\texttt{tau}} (s02)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/time/usecase_urgloc_state_space.png b/v0.2-M1/cif/tutorial/time/usecase_urgloc_state_space.png
new file mode 100644
index 0000000..c57aef9
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/usecase_urgloc_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/time/usecase_urgloc_state_space.png.tex b/v0.2-M1/cif/tutorial/time/usecase_urgloc_state_space.png.tex
new file mode 100644
index 0000000..90831c6
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/usecase_urgloc_state_space.png.tex
@@ -0,0 +1,45 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3.8cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  initial/.style={initial left},
+  accepting/.style={accepting by arrow,accepting text=$\infty$},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s00) [            ] {first,    0.0};
+  \node[state]            (s01) [right of=s00] {second,   0.0};
+  \node[state]            (s02) [right of=s01] {done,     0.0};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=2pt}]
+    (s00) edge[] node[] {\texttt{tau}} (s01)
+    (s01) edge[] node[] {\texttt{tau}} (s02)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/time/user_state_space.png b/v0.2-M1/cif/tutorial/time/user_state_space.png
new file mode 100644
index 0000000..629d3cf
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/user_state_space.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/time/user_state_space.png.tex b/v0.2-M1/cif/tutorial/time/user_state_space.png.tex
new file mode 100644
index 0000000..9b36f70
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/time/user_state_space.png.tex
@@ -0,0 +1,57 @@
+% ------------------------------------------------------------------------------
+% Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+%
+% See the NOTICE file(s) distributed with this work for additional
+% information regarding copyright ownership.
+%
+% This program and the accompanying materials are made available under the terms
+% of the MIT License which is available at https://opensource.org/licenses/MIT
+%
+% SPDX-License-Identifier: MIT
+% ------------------------------------------------------------------------------
+\documentclass{article}
+\usepackage{tikz}
+\usepackage{verbatim}
+
+\usepackage[paperwidth=40in, paperheight=20in]{geometry}
+
+\usetikzlibrary{arrows, automata, positioning, shapes.geometric}
+\begin{document}
+\pagestyle{empty}
+
+\definecolor{se-blue}{HTML}{D0D5FF}
+
+\newcommand{\state}[2]{\begin{tabular}{@{}c@{}}#1\\#2\end{tabular}}
+
+\begin{tikzpicture}[
+  ->,>=stealth',auto,node distance=3.8cm,thick,
+  every node/.style={font=\sffamily\small},
+  every state/.style={draw=se-blue,thick,top color=white,ellipse,
+                      bottom color=se-blue!75,initial text=},
+  initial/.style={initial left},
+  accepting/.style={accepting by arrow,accepting text=$\infty$},
+  every edge/.style={draw=black!50}]
+
+  \node[state, initial]   (s00) [            ] {push1,    0.0};
+  \node[state]            (s01) [right of=s00] {push1,    1.5};
+  \node[state]            (s02) [right of=s01] {release1, 1.5};
+  \node[state]            (s03) [right of=s02] {release1, 2.3};
+  \node[state]            (s04) [right of=s03] {push2,    2.3};
+  \node[state]            (s05) [right of=s04] {push2,    2.4};
+  \node[state]            (s06) [right of=s05] {release2, 2.4};
+  \node[state]            (s07) [right of=s06] {release2, 7.6};
+  \node[state, accepting] (s08) [right of=s07] {done,     7.6};
+
+  \path[every node/.style={font=\sffamily\normalsize,outer sep=2pt}]
+    (s00) edge[] node[] {1.5}     (s01)
+    (s01) edge[] node[] {push}    (s02)
+    (s02) edge[] node[] {0.8}     (s03)
+    (s03) edge[] node[] {release} (s04)
+    (s04) edge[] node[] {0.1}     (s05)
+    (s05) edge[] node[] {push}    (s06)
+    (s06) edge[] node[] {5.2}     (s07)
+    (s07) edge[] node[] {release} (s08)
+  ;
+
+\end{tikzpicture}
+\end{document}
diff --git a/v0.2-M1/cif/tutorial/values/list_indices.png b/v0.2-M1/cif/tutorial/values/list_indices.png
new file mode 100644
index 0000000..fad4887
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/values/list_indices.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/values/list_indices.png.svg b/v0.2-M1/cif/tutorial/values/list_indices.png.svg
new file mode 100644
index 0000000..ef2f650
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/values/list_indices.png.svg
@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="500"
+   height="200"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="list_indices.png.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Mend"
+       style="overflow:visible;">
+      <path
+         id="path3890"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
+         transform="scale(0.4) rotate(180) translate(10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Lend"
+       style="overflow:visible;">
+      <path
+         id="path3884"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
+         transform="scale(0.8) rotate(180) translate(12.5,0)" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="4"
+     inkscape:cx="52.083383"
+     inkscape:cy="72.481473"
+     inkscape:document-units="px"
+     inkscape:current-layer="svg2"
+     showgrid="false"
+     inkscape:window-width="1916"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1" />
+  <rect
+     style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+     id="rect3004"
+     width="49"
+     height="29"
+     x="10.5"
+     y="120.50002" />
+  <rect
+     y="120.50002"
+     x="59.5"
+     height="29"
+     width="49"
+     id="rect3774"
+     style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+  <rect
+     style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+     id="rect3776"
+     width="49"
+     height="29"
+     x="108.5"
+     y="120.50002" />
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="35.046875"
+     y="143.74808"
+     id="text3798"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3800"
+       x="35.046875"
+       y="143.74808"
+       style="font-size:24px;text-align:center;text-anchor:middle">7</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3802"
+     y="143.73636"
+     x="84.011719"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="font-size:24px;text-align:center;text-anchor:middle"
+       y="143.73636"
+       x="84.011719"
+       id="tspan3804"
+       sodipodi:role="line">8</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="133.05273"
+     y="143.73636"
+     id="text3806"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3808"
+       x="133.05273"
+       y="143.73636"
+       style="font-size:24px;text-align:center;text-anchor:middle">3</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3834"
+     y="91.748077"
+     x="35.046875"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="font-size:16px;text-align:center;text-anchor:middle"
+       y="91.748077"
+       x="35.046875"
+       id="tspan3836"
+       sodipodi:role="line">x[0]</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="84.011719"
+     y="91.748077"
+     id="text3838"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3840"
+       x="84.011719"
+       y="91.748077"
+       style="font-size:16px;text-align:center;text-anchor:middle">x[1]</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3842"
+     y="91.748077"
+     x="133.05273"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="font-size:16px;text-align:center;text-anchor:middle"
+       y="91.748077"
+       x="133.05273"
+       id="tspan3844"
+       sodipodi:role="line">x[2]</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="35.046875"
+     y="187.89062"
+     id="text3846"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3848"
+       x="35.046875"
+       y="187.89062"
+       style="font-size:16px;text-align:center;text-anchor:middle">x[-3]</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3850"
+     y="187.87891"
+     x="84.011719"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="font-size:16px;text-align:center;text-anchor:middle"
+       y="187.87891"
+       x="84.011719"
+       id="tspan3852"
+       sodipodi:role="line">x[-2]</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="133.05273"
+     y="187.87891"
+     id="text3854"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3856"
+       x="133.05273"
+       y="187.87891"
+       style="font-size:16px;text-align:center;text-anchor:middle">x[-1]</tspan></text>
+  <path
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 12.5,116 0,-5"
+     id="path3869"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3871"
+     d="m 57.5,116 0,-5"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3873"
+     d="m 12.479185,113.5 45.08463,0"
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3875"
+     d="m 34.294118,113.05113 0,-13.08827"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4507"
+     d="m 61.5,116 0,-5"
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 106.5,116 0,-5"
+     id="path4509"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 61.5,113.50014 45,0"
+     id="path4511"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
+     d="m 83.294118,113.05113 0,-13.08827"
+     id="path4513"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 110.5,116 0,-5"
+     id="path4515"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4517"
+     d="m 155.5,116 0,-5"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4519"
+     d="m 110.5,113.5 45,0"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4521"
+     d="m 132.29412,113.05113 0,-13.08827"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4523"
+     d="m 12.5,154.21286 0,5"
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 57.5,154.21286 0,5"
+     id="path4525"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 12.478737,156.713 45.042526,0"
+     id="path4527"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
+     d="m 34.294118,157.16173 0,13.08827"
+     id="path4529"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 61.5,154.21286 0,5"
+     id="path4531"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4533"
+     d="m 106.5,154.21286 0,5"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4535"
+     d="m 61.5,156.713 45,0"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4537"
+     d="m 83.294118,157.16173 0,13.08827"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4539"
+     d="m 110.5,154.21286 0,5"
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 155.5,154.21286 0,5"
+     id="path4541"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 110.5,156.71301 45,0"
+     id="path4543"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
+     d="m 132.29412,157.16173 0,13.08827"
+     id="path4545"
+     inkscape:connector-curvature="0" />
+</svg>
diff --git a/v0.2-M1/cif/tutorial/values/list_slicing.png b/v0.2-M1/cif/tutorial/values/list_slicing.png
new file mode 100644
index 0000000..5ea1c66
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/values/list_slicing.png
Binary files differ
diff --git a/v0.2-M1/cif/tutorial/values/list_slicing.png.svg b/v0.2-M1/cif/tutorial/values/list_slicing.png.svg
new file mode 100644
index 0000000..f27908b
--- /dev/null
+++ b/v0.2-M1/cif/tutorial/values/list_slicing.png.svg
@@ -0,0 +1,347 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="500"
+   height="200"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="list_slicing.png.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Mend"
+       style="overflow:visible;">
+      <path
+         id="path3890"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
+         transform="scale(0.4) rotate(180) translate(10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Lend"
+       style="overflow:visible;">
+      <path
+         id="path3884"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
+         transform="scale(0.8) rotate(180) translate(12.5,0)" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="4"
+     inkscape:cx="131.62232"
+     inkscape:cy="85.218581"
+     inkscape:document-units="px"
+     inkscape:current-layer="svg2"
+     showgrid="false"
+     inkscape:window-width="1916"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1" />
+  <rect
+     style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+     id="rect3004"
+     width="49"
+     height="29"
+     x="10.5"
+     y="100.50002" />
+  <rect
+     y="100.50002"
+     x="59.5"
+     height="29"
+     width="49"
+     id="rect3774"
+     style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+  <rect
+     style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+     id="rect3776"
+     width="49"
+     height="29"
+     x="108.5"
+     y="100.50002" />
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="35.046875"
+     y="123.74808"
+     id="text3798"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3800"
+       x="35.046875"
+       y="123.74808"
+       style="font-size:24px;text-align:center;text-anchor:middle">7</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3802"
+     y="123.73636"
+     x="84.011719"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="font-size:24px;text-align:center;text-anchor:middle"
+       y="123.73636"
+       x="84.011719"
+       id="tspan3804"
+       sodipodi:role="line">8</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="133.05273"
+     y="123.73636"
+     id="text3806"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3808"
+       x="133.05273"
+       y="123.73636"
+       style="font-size:24px;text-align:center;text-anchor:middle">3</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3834"
+     y="51.747627"
+     x="35.046875"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="font-size:16px;text-align:center;text-anchor:middle"
+       y="51.747627"
+       x="35.046875"
+       id="tspan3836"
+       sodipodi:role="line">x[:]</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="133.01172"
+     y="51.748077"
+     id="text3838"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3840"
+       x="133.01172"
+       y="51.748077"
+       style="font-size:16px;text-align:center;text-anchor:middle">x[2:4]</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3842"
+     y="51.747627"
+     x="231.46094"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="font-size:16px;text-align:center;text-anchor:middle"
+       y="51.747627"
+       x="231.46094"
+       id="tspan3844"
+       sodipodi:role="line">x[2:7]</tspan></text>
+  <text
+     sodipodi:linespacing="125%"
+     id="text3850"
+     y="177.87891"
+     x="231.46094"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="font-size:16px;text-align:center;text-anchor:middle"
+       y="177.87891"
+       x="231.46094"
+       id="tspan3852"
+       sodipodi:role="line">x[1:]</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="35.052727"
+     y="177.87863"
+     id="text3854"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3856"
+       x="35.052727"
+       y="177.87863"
+       style="font-size:16px;text-align:center;text-anchor:middle">x[:-1]</tspan></text>
+  <path
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 12.5,96 0,-5"
+     id="path3869"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3871"
+     d="m 253.5,96 0,-5"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3873"
+     d="m 12.648926,93.5 240.745154,0"
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path3875"
+     d="m 34.294118,93.05114 0,-32.004067"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4507"
+     d="m 110.5,76 0,-5"
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 204.5,76 0,-5"
+     id="path4509"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 110.50439,73.5 93.99123,0"
+     id="path4511"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
+     d="m 132.29412,73.051133 0,-12.047632"
+     id="path4513"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 110.5,86 0,-5"
+     id="path4515"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4517"
+     d="m 253.5,86 0,-5"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4519"
+     d="m 110.49866,83.5 143.00268,0"
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4521"
+     d="m 231,83.05113 0,-22.062099"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 61.5,144.21286 0,5"
+     id="path4531"
+     inkscape:connector-curvature="0" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4533"
+     d="m 253.5,144.21286 0,5"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4535"
+     d="m 61.500767,146.713 191.998453,0"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4537"
+     d="m 231,146.50001 0,13.24123"
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)" />
+  <path
+     inkscape:connector-curvature="0"
+     id="path4539"
+     d="m 12.5,134.21286 0,5"
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 204.5,134.213 0,5"
+     id="path4541"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 12.5,136.71301 191.73913,0"
+     id="path4543"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
+     d="m 34.29412,136.504 0,23.246"
+     id="path4545"
+     inkscape:connector-curvature="0" />
+  <rect
+     y="100.50002"
+     x="157.5"
+     height="29"
+     width="49"
+     id="rect3031"
+     style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+  <text
+     sodipodi:linespacing="125%"
+     id="text3033"
+     y="123.57816"
+     x="182.05273"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     xml:space="preserve"><tspan
+       style="font-size:24px;text-align:center;text-anchor:middle"
+       y="123.57816"
+       x="182.05273"
+       id="tspan3035"
+       sodipodi:role="line">5</tspan></text>
+  <rect
+     style="fill:#dedede;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+     id="rect3037"
+     width="49"
+     height="29"
+     x="206.5"
+     y="100.50002" />
+  <text
+     xml:space="preserve"
+     style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+     x="231.05273"
+     y="123.73636"
+     id="text3039"
+     sodipodi:linespacing="125%"><tspan
+       sodipodi:role="line"
+       id="tspan3041"
+       x="231.05273"
+       y="123.73636"
+       style="font-size:24px;text-align:center;text-anchor:middle">9</tspan></text>
+</svg>
diff --git a/v0.2-M1/eclipse-incubation.png b/v0.2-M1/eclipse-incubation.png
new file mode 100644
index 0000000..5fccef5
--- /dev/null
+++ b/v0.2-M1/eclipse-incubation.png
Binary files differ
diff --git a/v0.2-M1/escet/developer/link-with-editor.png b/v0.2-M1/escet/developer/link-with-editor.png
new file mode 100644
index 0000000..f5e782c
--- /dev/null
+++ b/v0.2-M1/escet/developer/link-with-editor.png
Binary files differ
diff --git a/v0.2-M1/escet/developer/view-menu.png b/v0.2-M1/escet/developer/view-menu.png
new file mode 100644
index 0000000..d6c0e9f
--- /dev/null
+++ b/v0.2-M1/escet/developer/view-menu.png
Binary files differ
diff --git a/v0.2-M1/escet/eclipse-escet-incubation-manual.pdf b/v0.2-M1/escet/eclipse-escet-incubation-manual.pdf
new file mode 100644
index 0000000..8b0cf4b
--- /dev/null
+++ b/v0.2-M1/escet/eclipse-escet-incubation-manual.pdf
Binary files differ
diff --git a/v0.2-M1/escet/eclipse-incubation.png b/v0.2-M1/escet/eclipse-incubation.png
new file mode 100644
index 0000000..5fccef5
--- /dev/null
+++ b/v0.2-M1/escet/eclipse-incubation.png
Binary files differ
diff --git a/v0.2-M1/escet/index.html b/v0.2-M1/escet/index.html
new file mode 100644
index 0000000..6248f2e
--- /dev/null
+++ b/v0.2-M1/escet/index.html
@@ -0,0 +1,6550 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="UTF-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="generator" content="Asciidoctor 2.0.12">
+<meta name="author" content="Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation">
+<title>Eclipse ESCET&#8482; documentation (Incubation)</title>
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
+<style>
+/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
+/* Uncomment @import statement to use as custom stylesheet */
+/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
+article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}
+audio,video{display:inline-block}
+audio:not([controls]){display:none;height:0}
+html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
+a{background:none}
+a:focus{outline:thin dotted}
+a:active,a:hover{outline:0}
+h1{font-size:2em;margin:.67em 0}
+abbr[title]{border-bottom:1px dotted}
+b,strong{font-weight:bold}
+dfn{font-style:italic}
+hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
+mark{background:#ff0;color:#000}
+code,kbd,pre,samp{font-family:monospace;font-size:1em}
+pre{white-space:pre-wrap}
+q{quotes:"\201C" "\201D" "\2018" "\2019"}
+small{font-size:80%}
+sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
+sup{top:-.5em}
+sub{bottom:-.25em}
+img{border:0}
+svg:not(:root){overflow:hidden}
+figure{margin:0}
+fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
+legend{border:0;padding:0}
+button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
+button,input{line-height:normal}
+button,select{text-transform:none}
+button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
+button[disabled],html input[disabled]{cursor:default}
+input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
+button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
+textarea{overflow:auto;vertical-align:top}
+table{border-collapse:collapse;border-spacing:0}
+*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
+html,body{font-size:100%}
+body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
+a:hover{cursor:pointer}
+img,object,embed{max-width:100%;height:auto}
+object,embed{height:100%}
+img{-ms-interpolation-mode:bicubic}
+.left{float:left!important}
+.right{float:right!important}
+.text-left{text-align:left!important}
+.text-right{text-align:right!important}
+.text-center{text-align:center!important}
+.text-justify{text-align:justify!important}
+.hide{display:none}
+img,object,svg{display:inline-block;vertical-align:middle}
+textarea{height:auto;min-height:50px}
+select{width:100%}
+.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
+div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
+a{color:#2156a5;text-decoration:underline;line-height:inherit}
+a:hover,a:focus{color:#1d4b8f}
+a img{border:0}
+p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
+p aside{font-size:.875em;line-height:1.35;font-style:italic}
+h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
+h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
+h1{font-size:2.125em}
+h2{font-size:1.6875em}
+h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
+h4,h5{font-size:1.125em}
+h6{font-size:1em}
+hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
+em,i{font-style:italic;line-height:inherit}
+strong,b{font-weight:bold;line-height:inherit}
+small{font-size:60%;line-height:inherit}
+code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
+ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
+ul,ol{margin-left:1.5em}
+ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
+ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
+ul.square{list-style-type:square}
+ul.circle{list-style-type:circle}
+ul.disc{list-style-type:disc}
+ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
+dl dt{margin-bottom:.3125em;font-weight:bold}
+dl dd{margin-bottom:1.25em}
+abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
+abbr{text-transform:none}
+blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
+blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
+blockquote cite::before{content:"\2014 \0020"}
+blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
+blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
+@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
+h1{font-size:2.75em}
+h2{font-size:2.3125em}
+h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
+h4{font-size:1.4375em}}
+table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede;word-wrap:normal}
+table thead,table tfoot{background:#f7f8f7}
+table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
+table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
+table tr.even,table tr.alt{background:#f8f8f7}
+table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
+h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
+h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
+.center{margin-left:auto;margin-right:auto}
+.stretch{width:100%}
+.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
+.clearfix::after,.float-group::after{clear:both}
+:not(pre).nobreak{word-wrap:normal}
+:not(pre).nowrap{white-space:nowrap}
+:not(pre).pre-wrap{white-space:pre-wrap}
+:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
+pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
+pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
+pre>code{display:block}
+pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
+em em{font-style:normal}
+strong strong{font-weight:400}
+.keyseq{color:rgba(51,51,51,.8)}
+kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
+.keyseq kbd:first-child{margin-left:0}
+.keyseq kbd:last-child{margin-right:0}
+.menuseq,.menuref{color:#000}
+.menuseq b:not(.caret),.menuref{font-weight:inherit}
+.menuseq{word-spacing:-.02em}
+.menuseq b.caret{font-size:1.25em;line-height:.8}
+.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
+b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
+b.button::before{content:"[";padding:0 3px 0 2px}
+b.button::after{content:"]";padding:0 2px 0 3px}
+p a>code:hover{color:rgba(0,0,0,.9)}
+#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
+#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
+#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
+#content{margin-top:1.25em}
+#content::before{content:none}
+#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
+#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
+#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
+#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
+#header .details span:first-child{margin-left:-.125em}
+#header .details span.email a{color:rgba(0,0,0,.85)}
+#header .details br{display:none}
+#header .details br+span::before{content:"\00a0\2013\00a0"}
+#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
+#header .details br+span#revremark::before{content:"\00a0|\00a0"}
+#header #revnumber{text-transform:capitalize}
+#header #revnumber::after{content:"\00a0"}
+#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
+#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
+#toc>ul{margin-left:.125em}
+#toc ul.sectlevel0>li>a{font-style:italic}
+#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
+#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
+#toc li{line-height:1.3334;margin-top:.3334em}
+#toc a{text-decoration:none}
+#toc a:active{text-decoration:underline}
+#toctitle{color:#7a2518;font-size:1.2em}
+@media screen and (min-width:768px){#toctitle{font-size:1.375em}
+body.toc2{padding-left:15em;padding-right:0}
+#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
+#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
+#toc.toc2>ul{font-size:.9em;margin-bottom:0}
+#toc.toc2 ul ul{margin-left:0;padding-left:1em}
+#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
+body.toc2.toc-right{padding-left:0;padding-right:15em}
+body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
+@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
+#toc.toc2{width:20em}
+#toc.toc2 #toctitle{font-size:1.375em}
+#toc.toc2>ul{font-size:.95em}
+#toc.toc2 ul ul{padding-left:1.25em}
+body.toc2.toc-right{padding-left:0;padding-right:20em}}
+#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
+#content #toc>:first-child{margin-top:0}
+#content #toc>:last-child{margin-bottom:0}
+#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
+#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
+#content{margin-bottom:.625em}
+.sect1{padding-bottom:.625em}
+@media screen and (min-width:768px){#content{margin-bottom:1.25em}
+.sect1{padding-bottom:1.25em}}
+.sect1:last-child{padding-bottom:0}
+.sect1+.sect1{border-top:1px solid #e7e7e9}
+#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
+#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
+#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
+#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
+#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
+details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
+details>summary:first-of-type{cursor:pointer;display:list-item;outline:none;margin-bottom:.75em}
+.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
+table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
+.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
+table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit}
+.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
+.admonitionblock>table td.icon{text-align:center;width:80px}
+.admonitionblock>table td.icon img{max-width:none}
+.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
+.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
+.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
+.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
+.exampleblock>.content>:first-child{margin-top:0}
+.exampleblock>.content>:last-child{margin-bottom:0}
+.sidebarblock{border-style:solid;border-width:1px;border-color:#dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;-webkit-border-radius:4px;border-radius:4px}
+.sidebarblock>:first-child{margin-top:0}
+.sidebarblock>:last-child{margin-bottom:0}
+.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
+.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
+.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
+@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
+@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
+.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
+.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
+.listingblock>.content{position:relative}
+.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
+.listingblock:hover code[data-lang]::before{display:block}
+.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
+.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
+.listingblock pre.highlightjs{padding:0}
+.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
+.listingblock pre.prettyprint{border-width:0}
+.prettyprint{background:#f7f7f8}
+pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
+pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
+pre.prettyprint li code[data-lang]::before{opacity:1}
+pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
+table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
+table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
+table.linenotable td.code{padding-left:.75em}
+table.linenotable td.linenos{border-right:1px solid currentColor;opacity:.35;padding-right:.5em}
+pre.pygments .lineno{border-right:1px solid currentColor;opacity:.35;display:inline-block;margin-right:.75em}
+pre.pygments .lineno::before{content:"";margin-right:-.125em}
+.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
+.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
+.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
+.quoteblock blockquote{margin:0;padding:0;border:0}
+.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
+.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
+.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
+.verseblock{margin:0 1em 1.25em}
+.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
+.verseblock pre strong{font-weight:400}
+.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
+.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
+.quoteblock .attribution br,.verseblock .attribution br{display:none}
+.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
+.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
+.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
+.quoteblock.abstract{margin:0 1em 1.25em;display:block}
+.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
+.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
+.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
+.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
+.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}
+p.tableblock:last-child{margin-bottom:0}
+td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
+td.tableblock>.content>:last-child{margin-bottom:-1.25em}
+table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
+table.grid-all>*>tr>*{border-width:1px}
+table.grid-cols>*>tr>*{border-width:0 1px}
+table.grid-rows>*>tr>*{border-width:1px 0}
+table.frame-all{border-width:1px}
+table.frame-ends{border-width:1px 0}
+table.frame-sides{border-width:0 1px}
+table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
+table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
+table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
+table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
+table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7}
+th.halign-left,td.halign-left{text-align:left}
+th.halign-right,td.halign-right{text-align:right}
+th.halign-center,td.halign-center{text-align:center}
+th.valign-top,td.valign-top{vertical-align:top}
+th.valign-bottom,td.valign-bottom{vertical-align:bottom}
+th.valign-middle,td.valign-middle{vertical-align:middle}
+table thead th,table tfoot th{font-weight:bold}
+tbody tr th{background:#f7f8f7}
+tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
+p.tableblock>code:only-child{background:none;padding:0}
+p.tableblock{font-size:1em}
+ol{margin-left:1.75em}
+ul li ol{margin-left:1.5em}
+dl dd{margin-left:1.125em}
+dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
+ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
+ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
+ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
+ul.unstyled,ol.unstyled{margin-left:0}
+ul.checklist{margin-left:.625em}
+ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
+ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
+ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
+ul.inline>li{margin-left:1.25em}
+.unstyled dl dt{font-weight:400;font-style:normal}
+ol.arabic{list-style-type:decimal}
+ol.decimal{list-style-type:decimal-leading-zero}
+ol.loweralpha{list-style-type:lower-alpha}
+ol.upperalpha{list-style-type:upper-alpha}
+ol.lowerroman{list-style-type:lower-roman}
+ol.upperroman{list-style-type:upper-roman}
+ol.lowergreek{list-style-type:lower-greek}
+.hdlist>table,.colist>table{border:0;background:none}
+.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
+td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
+td.hdlist1{font-weight:bold;padding-bottom:1.25em}
+td.hdlist2{word-wrap:anywhere}
+.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
+.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
+.colist td:not([class]):first-child img{max-width:none}
+.colist td:not([class]):last-child{padding:.25em 0}
+.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
+.imageblock.left{margin:.25em .625em 1.25em 0}
+.imageblock.right{margin:.25em 0 1.25em .625em}
+.imageblock>.title{margin-bottom:0}
+.imageblock.thumb,.imageblock.th{border-width:6px}
+.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
+.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
+.image.left{margin-right:.625em}
+.image.right{margin-left:.625em}
+a.image{text-decoration:none;display:inline-block}
+a.image object{pointer-events:none}
+sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
+sup.footnote a,sup.footnoteref a{text-decoration:none}
+sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
+#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
+#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
+#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
+#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
+#footnotes .footnote:last-of-type{margin-bottom:0}
+#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
+.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
+.gist .file-data>table td.line-data{width:99%}
+div.unbreakable{page-break-inside:avoid}
+.big{font-size:larger}
+.small{font-size:smaller}
+.underline{text-decoration:underline}
+.overline{text-decoration:overline}
+.line-through{text-decoration:line-through}
+.aqua{color:#00bfbf}
+.aqua-background{background:#00fafa}
+.black{color:#000}
+.black-background{background:#000}
+.blue{color:#0000bf}
+.blue-background{background:#0000fa}
+.fuchsia{color:#bf00bf}
+.fuchsia-background{background:#fa00fa}
+.gray{color:#606060}
+.gray-background{background:#7d7d7d}
+.green{color:#006000}
+.green-background{background:#007d00}
+.lime{color:#00bf00}
+.lime-background{background:#00fa00}
+.maroon{color:#600000}
+.maroon-background{background:#7d0000}
+.navy{color:#000060}
+.navy-background{background:#00007d}
+.olive{color:#606000}
+.olive-background{background:#7d7d00}
+.purple{color:#600060}
+.purple-background{background:#7d007d}
+.red{color:#bf0000}
+.red-background{background:#fa0000}
+.silver{color:#909090}
+.silver-background{background:#bcbcbc}
+.teal{color:#006060}
+.teal-background{background:#007d7d}
+.white{color:#bfbfbf}
+.white-background{background:#fafafa}
+.yellow{color:#bfbf00}
+.yellow-background{background:#fafa00}
+span.icon>.fa{cursor:default}
+a span.icon>.fa{cursor:inherit}
+.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
+.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
+.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
+.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
+.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
+.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
+.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
+.conum[data-value] *{color:#fff!important}
+.conum[data-value]+b{display:none}
+.conum[data-value]::after{content:attr(data-value)}
+pre .conum[data-value]{position:relative;top:-.125em}
+b.conum *{color:inherit!important}
+.conum:not([data-value]):empty{display:none}
+dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
+h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
+p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
+p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
+p{margin-bottom:1.25rem}
+.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
+.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
+.print-only{display:none!important}
+@page{margin:1.25cm .75cm}
+@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
+html{font-size:80%}
+a{color:inherit!important;text-decoration:underline!important}
+a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
+a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
+abbr[title]::after{content:" (" attr(title) ")"}
+pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
+thead{display:table-header-group}
+svg{max-width:100%}
+p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
+h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
+#header,#content,#footnotes,#footer{max-width:none}
+#toc,.sidebarblock,.exampleblock>.content{background:none!important}
+#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
+body.book #header{text-align:center}
+body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
+body.book #header .details{border:0!important;display:block;padding:0!important}
+body.book #header .details span:first-child{margin-left:0!important}
+body.book #header .details br{display:block}
+body.book #header .details br+span::before{content:none!important}
+body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
+body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
+.listingblock code[data-lang]::before{display:block}
+#footer{padding:0 .9375em}
+.hide-on-print{display:none!important}
+.print-only{display:block!important}
+.hide-for-print{display:none!important}
+.show-for-print{display:inherit!important}}
+@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem}
+.sect1{padding:0!important}
+.sect1+.sect1{border:0}
+#footer{background:none}
+#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
+@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
+</style>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<style>
+.menu, .submenu, .menuitem, .menuref {
+    background-color: Menu;
+}
+
+.button {
+    border: 1px solid ButtonFace;
+    /*
+    Styling too similar to a real button is considered bad practice, see https://github.com/asciidoctor/asciidoctor/issues/1881#issuecomment-250702085
+    border: 2px outset ButtonFace;
+    background-color: ButtonFace;
+    */
+    padding-left: 0.5ex;
+    padding-right: 0.5ex;
+    font-weight: normal;
+    font-family: "Segoe UI","Open Sans","DejaVu Sans",sans-serif;
+    white-space: nowrap;
+}
+.button:before {
+    content: none !important;
+}
+.button:after {
+    content: none !important;
+}
+
+#footer-text, #footer-text a {
+    color: rgba(255,255,255,.8)
+}
+</style>
+</head>
+<body class="book toc2 toc-left">
+<div id="header">
+<h1>Eclipse ESCET&#8482; documentation (Incubation)</h1>
+<div class="details">
+<span id="author" class="author">Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation</span><br>
+<span id="revnumber">version 0.2.0.20210521-133237</span>
+</div>
+<div id="toc" class="toc2">
+<div id="toctitle">Table of Contents</div>
+<ul class="sectlevel1">
+<li><a href="#intro-chapter-index">Introduction to Eclipse ESCET project</a>
+<ul class="sectlevel2">
+<li><a href="#intro-chapter-chi">Chi</a></li>
+<li><a href="#intro-chapter-cif">CIF</a></li>
+<li><a href="#intro-chapter-setext">SeText</a></li>
+<li><a href="#intro-chapter-tooldef">ToolDef</a></li>
+</ul>
+</li>
+<li><a href="#download-install-chapter-index">Download and install Eclipse ESCET toolkit</a>
+<ul class="sectlevel2">
+<li><a href="#download-install-install">Installation of Eclipse ESCET tools</a></li>
+<li><a href="#download-install-first-start">Starting Eclipse ESCET IDE for the first time</a></li>
+<li><a href="#download-install-update">Updating Eclipse ESCET tools</a></li>
+<li><a href="#download-install-remove">Removing Eclipse ESCET tools</a></li>
+<li><a href="#download-install-find-version">Finding the tool&#8217;s version number</a></li>
+</ul>
+</li>
+<li><a href="#use-chapter-index">Using Eclipse ESCET tools</a>
+<ul class="sectlevel2">
+<li><a href="#use-terminology">Eclipse terminology</a></li>
+<li><a href="#use-projects">Working with projects, directories, and files</a></li>
+<li><a href="#use-edit-exec">Editing files and executing commands</a></li>
+<li><a href="#use-escet-perspective">Eclipse ESCET perspective</a></li>
+<li><a href="#use-apps-view">Applications view</a></li>
+</ul>
+</li>
+<li><a href="#performance-chapter-index">Resolving performance and memory problems</a>
+<ul class="sectlevel2">
+<li><a href="#performance-clear-console">Clearing the console</a></li>
+<li><a href="#performance-reduce-console-output">Reducing console output</a></li>
+<li><a href="#performance-close-running-apps">Closing running applications</a></li>
+<li><a href="#performance-tweak-perf-settings">Tweaking performance settings</a></li>
+</ul>
+</li>
+<li><a href="#developer-chapter-index">Eclipse ESCET development</a>
+<ul class="sectlevel2">
+<li><a href="#developer-development-process-chapter-index">Development process</a></li>
+<li><a href="#developer-contributing-chapter-index">Contributing</a></li>
+<li><a href="#developer-issue-tracking-chapter-index">Issue tracking</a></li>
+<li><a href="#developer-dev-env-setup-chapter-index">Development environment setup</a></li>
+<li><a href="#developer-git-repo-chapter-index">Git repository</a></li>
+<li><a href="#developer-coding-standards-chapter-index">Coding standards</a></li>
+<li><a href="#developer-building-and-testing-chapter-index">Building and testing</a></li>
+<li><a href="#developer-release-process-chapter-index">Release process</a></li>
+<li><a href="#developer-third-party-tools-chapter-index">Third party tools</a></li>
+<li><a href="#developer-upgrade-instructions-chapter-index">Upgrade instructions</a></li>
+</ul>
+</li>
+<li><a href="#app-framework-chapter-index">Application framework</a>
+<ul class="sectlevel2">
+<li><a href="#app-framework-introduction">Introduction</a></li>
+<li><a href="#app-framework-standalone-vs-eclipse">Stand-alone execution versus Eclipse IDE</a></li>
+<li><a href="#app-framework-application-class">The Application class</a></li>
+<li><a href="#app-framework-exception-framework">The exception framework</a></li>
+<li><a href="#app-framework-exit-codes">Exit codes</a></li>
+<li><a href="#app-framework-io-framework">The I/O framework</a></li>
+<li><a href="#app-framework-option-framework">The option framework</a></li>
+<li><a href="#app-framework-compiler-framework">The compiler framework</a></li>
+<li><a href="#app-framework-implement-your-application">How to implement your own application</a></li>
+<li><a href="#app-framework-registration">Application registration</a></li>
+<li><a href="#app-framework-execution">Execution</a></li>
+</ul>
+</li>
+<li><a href="#release-notes-chapter-index">Eclipse ESCET release notes</a>
+<ul class="sectlevel2">
+<li><a href="#version-0-2">Version 0.2</a></li>
+<li><a href="#version-0-1">Version 0.1</a></li>
+</ul>
+</li>
+<li><a href="#contact-chapter-index">Contact information</a></li>
+<li><a href="#legal-chapter-index">Legal</a></li>
+</ul>
+</div>
+</div>
+<div id="content">
+<div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>The Eclipse Supervisory Control Engineering Toolkit (Eclipse ESCET&#8482;)
+project is an <a href="https://eclipse.org">Eclipse Foundation</a> open-source project
+that provides a toolkit for the development of supervisory controllers in the
+Model-Based Systems Engineering (MBSE) paradigm. The toolkit has a strong
+focus on model-based design, supervisory controller synthesis, and industrial
+applicability, for example to cyber-physical systems. The toolkit supports
+the entire development process of (supervisory) controllers, from modeling,
+supervisory controller synthesis, simulation-based validation and
+visualization, and formal verification, to real-time testing and
+implementation.</p>
+</div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>The Eclipse ESCET project and all its tools are currently in the
+<a href="https://wiki.eclipse.org/Development_Resources/Process_Guidelines/What_is_Incubation">Incubation Phase</a>.</p>
+</div>
+<div class="paragraph">
+<p><span class="image"><img src="./eclipse-incubation.png" alt="eclipse incubation" width="300"></span></p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="admonitionblock tip">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-tip" title="Tip"></i>
+</td>
+<td class="content">
+You can <a href="eclipse-escet-incubation-manual.pdf">download this manual</a>
+as a PDF as well.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The Eclipse ESCET toolkit features the following languages and associated
+tools:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#intro-chapter-chi">Chi</a></p>
+</li>
+<li>
+<p><a href="#intro-chapter-cif">CIF</a></p>
+</li>
+<li>
+<p><a href="#intro-chapter-setext">SeText</a></p>
+</li>
+<li>
+<p><a href="#intro-chapter-tooldef">ToolDef</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>This manual includes information related to the Eclipse ESCET toolkit as a
+whole, and applies to those tools as well. The following information is
+available for end users of the toolkit:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#intro-chapter-index">Introduction to Eclipse ESCET project</a></p>
+</li>
+<li>
+<p><a href="#download-install-chapter-index">Download and install Eclipse ESCET toolkit</a></p>
+</li>
+<li>
+<p><a href="#use-chapter-index">Using Eclipse ESCET tools</a></p>
+</li>
+<li>
+<p><a href="#performance-chapter-index">Resolving performance and memory problems</a></p>
+</li>
+<li>
+<p><a href="#release-notes-chapter-index">Eclipse ESCET release notes</a></p>
+</li>
+<li>
+<p><a href="#contact-chapter-index">Contact information</a></p>
+</li>
+<li>
+<p><a href="#legal-chapter-index">Legal</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following information is available for developers of the toolkit:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#developer-chapter-index">Eclipse ESCET development</a></p>
+</li>
+<li>
+<p><a href="#app-framework-chapter-index">Application framework</a></p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="intro-chapter-index">Introduction to Eclipse ESCET project</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p></p>
+</div>
+<div class="paragraph">
+<p>High-tech companies increasingly adopt the
+<a href="https://en.wikipedia.org/wiki/Model-based_systems_engineering">Model-Based Systems Engineering</a>
+(MBSE) paradigm. The use of (formal) models for controller design allows
+validation and verification of controllers long before they are implemented
+and integrated into the system. Early validation and verification have been
+shown to lead to less defects and reduced costs.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="paragraph">
+<p>The Eclipse Supervisory Control Engineering Toolkit (Eclipse ESCET&#8482;)
+project is an <a href="https://eclipse.org">Eclipse Foundation</a> open-source project
+that provides a toolkit for the development of supervisory controllers in the
+MBSE paradigm. The toolkit has a strong focus on model-based design,
+supervisory controller synthesis, and industrial applicability, for example to
+cyber-physical systems. The toolkit supports the entire development process of
+(supervisory) controllers, from modeling, supervisory controller synthesis,
+simulation-based validation and visualization, and formal verification, to
+real-time testing and implementation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="paragraph">
+<p>Supervisory controller synthesis is a key feature of the toolkit. It
+involves the automatic generation of supervisory controllers from a
+specification of the uncontrolled system and the (safety) requirements that
+the controller needs to enforce. This shifts controller design from 'how
+should the implementation work' to 'what should the controller do'.
+Implementation of the controller is achieved through (implementation
+language) code generation, reducing the number of errors introduced at this
+stage.</p>
+</div>
+<div class="paragraph">
+<p>The Eclipse ESCET toolkit features the following languages and associated
+tools:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#intro-chapter-chi">Chi</a></p>
+</li>
+<li>
+<p><a href="#intro-chapter-cif">CIF</a></p>
+</li>
+<li>
+<p><a href="#intro-chapter-setext">SeText</a></p>
+</li>
+<li>
+<p><a href="#intro-chapter-tooldef">ToolDef</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect2">
+<h3 id="intro-chapter-chi">Chi</h3>
+<div class="paragraph">
+<p>The Chi language is a modeling language for describing and analyzing the
+performance of discrete event systems by means of simulation. The language
+design is based on decades of successful analyses of various (industrial)
+systems, aiming to be powerful for advanced users, and easy to use for
+non-experts.</p>
+</div>
+<div class="paragraph">
+<p>The language uses a process-based view. A system (and its control) is
+modeled as a collection of parallel running processes, communicating with
+each other using point-to-point communication channels. Processes do not
+share data with other processes, and channels are synchronous (sending and
+receiving is always done together at the same time), making reasoning about
+process behavior easier. Processes and channels are dynamic, new processes
+can be created as needed, and communication channels can be created or
+rerouted, making for a powerful specification language.</p>
+</div>
+<div class="paragraph">
+<p>The language is designed to be formal and easily extensible. Models are
+written as an imperative program, with an intuitive syntax, making it easy
+to read and write models. A small generic set of statements can be used to
+describe algorithms, including assignments, <em>if</em>, <em>while</em> and <em>for</em>
+statements. This set is relatively easy to explain to non-experts, allowing
+them to understand the model, and participate in the discussions.</p>
+</div>
+<div class="paragraph">
+<p>The data of the system can be modeled using both basic data types, such as
+<em>booleans</em> and <em>integer</em> and <em>real</em> numbers, as well as high level structured
+collections of data like <em>lists</em>, <em>sets</em> and <em>dictionaries</em>. If desired,
+processes and channels can also be part of that data. Furthermore, timers and
+(quasi-)random number generation distributions are available for modeling
+timed and stochastic systems. Features to easily specify repeated experiments,
+e.g. for stochastic simulation, or simulation for various inputs obtained
+from files, exist to support large simulation experiments.</p>
+</div>
+<div class="paragraph">
+<p>While the language is generic, the main application area is modeling of
+the operation of (manufacturing) systems. During the design process,
+engineers can make use of analytical models, to get answers about the
+operation of the system. Simulation studies can provide insights into
+e.g. the throughput of the system, the effect of set-up time in a
+machine, or how the batch size of an order will influence the flow time
+of the product-items.</p>
+</div>
+<div class="paragraph">
+<p>The Chi toolset allows verification of properties of the actual system by
+means of simulation, e.g. to optimize the supervisory (logic) control of
+the system. The Chi language has features that allow for easy
+specification. Chi aims to make the process of verifying properties for
+large systems effortless.</p>
+</div>
+<div class="paragraph">
+<p>Tutorials and manuals demonstrate the use of the language for effective
+modeling of system processes. More detailed modeling of the processes and
+e.g performance indicators, or custom tailoring them to the real situation,
+has no inherent limits.</p>
+</div>
+<div class="paragraph">
+<p>See the separate <a href="https://eclipse.org/escet/chi">Chi documentation</a> for more
+information.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="intro-chapter-cif">CIF</h3>
+<div class="paragraph">
+<p>The CIF language is a powerful declarative automata-based modeling language for the
+specification of discrete event, timed (linear dynamics), hybrid (piecewise
+continuous dynamics) systems. It can be seen as a rich state machine language
+with the following main features:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Modular specification with synchronized events and communication between
+automata.</p>
+</li>
+<li>
+<p>Many data types are available (booleans, integers, reals, tuples, lists,
+arrays, sets, and dictionaries), combined with a powerful expression language
+for compact variables updates.</p>
+</li>
+<li>
+<p>Text-based specification of the automata, with many features to simplify
+modeling large non-trivial industrial systems.</p>
+</li>
+<li>
+<p>Primitives for supervisory controller synthesis are integrated in the
+language.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The CIF tooling supports the entire development process of controllers,
+including among others specification, supervisory controller synthesis,
+simulation-based validation and visualization, verification, real-time
+testing, and code generation. Highlights of the CIF tooling include:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Text-based editor that allows to easily specify and edit models.</p>
+</li>
+<li>
+<p>Feature-rich powerful data-based synthesis tool. A transformation to the
+supervisory controller synthesis tool Supremica is also available.</p>
+</li>
+<li>
+<p>A simulator that supports both interactive and automated validation of
+specifications. Powerful visualization features allow for interactive
+visualization-based validation.</p>
+</li>
+<li>
+<p>Conversion to formal verification tools such as mCRL2 and UPPAAL.</p>
+</li>
+<li>
+<p>Implementation language code generation (PLC languages, Java, C, and
+Simulink) for real-time testing and implementation of the designed controller.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>See the separate <a href="https://eclipse.org/escet/cif">CIF documentation</a> for
+more information.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="intro-chapter-setext">SeText</h3>
+<div class="paragraph">
+<p>SeText is a textual syntax specification language and associated scanner/parser
+generator. It can be used to specify the syntax of a language, and automatically
+generate a scanner and LALR(1) parser(s).</p>
+</div>
+<div class="paragraph">
+<p>SeText is used as scanner/parser technology for the other tools within the
+Eclipse ESCET project. It is however a generic scanner/parser generator that can
+also be used for the development of scanners and parsers for other languages.</p>
+</div>
+<div class="paragraph">
+<p>See the separate <a href="https://eclipse.org/escet/setext">SeText documentation</a> for more
+information.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="intro-chapter-tooldef">ToolDef</h3>
+<div class="paragraph">
+<p>ToolDef is a cross-platform and machine-independent scripting language.
+It supports command line execution, but is also available as plug-in for
+the Eclipse IDE, providing an integrated development experience.</p>
+</div>
+<div class="paragraph">
+<p>The ToolDef language features a simple and intuitive syntax to make it easy to
+write scripts, static typing to catch simple mistakes, a large number of
+built-in data types and tools, Java integration, and more.</p>
+</div>
+<div class="paragraph">
+<p>ToolDef libraries with ToolDef compatible tools are available for all tools
+within the Eclipse ESCET toolkit, allowing cross-platform and
+machine-independent scripting using Eclipse ESCET tools. ToolDef however is a
+generic scripting language, and can be used without using any of the other
+Eclipse ESCET tools. Furthermore, other tools can be made available for use
+within ToolDef scripts by defining ToolDef libraries for them.</p>
+</div>
+<div class="paragraph">
+<p>See the separate <a href="https://eclipse.org/escet/tooldef">ToolDef documentation</a> for
+more information.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="download-install-chapter-index">Download and install Eclipse ESCET toolkit</h2>
+<div class="sectionbody">
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+The Eclipse ESCET project and all its tools are currently in the
+<a href="https://wiki.eclipse.org/Development_Resources/Process_Guidelines/What_is_Incubation">Incubation Phase</a>.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>You can download Eclipse ESCET from the following locations:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://download.eclipse.org/escet">Eclipse ESCET downloads</a> (for recent versions)</p>
+</li>
+<li>
+<p><a href="https://archive.eclipse.org/escet">Eclipse ESCET archived downloads</a> (for older versions)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Downloads for Eclipse ESCET tools are available for the following platforms:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Windows, x64 (64-bit)</p>
+</li>
+<li>
+<p>Linux, x64 (64-bit)</p>
+</li>
+<li>
+<p>macOS, x64 (64-bit)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The downloads are archives that can be extracted anywhere on the local system.
+Each download contains the Eclipse ESCET toolkit, with the tools available in
+two ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>As IDE based on the Eclipse IDE, providing the full experience. Includes
+full GUI integration and e.g. text editors with syntax highlighting and error
+checking.</p>
+</li>
+<li>
+<p>As command line execution scripts (<code>bin</code> directory of the archives),
+allowing execution in a command line terminal or console,
+particularly useful for execution of the tools on headless clusters. The
+command line scripts are only available for Windows and Linux, not for macOS.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The tools are also available as plug-ins for the Eclipse IDE, by means of an
+Eclipse P2 update site.</p>
+</div>
+<div class="paragraph">
+<p>Furthermore, the following documentation is available for download:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Eclipse ESCET documentation (this documentation)</p>
+</li>
+<li>
+<p><a href="#intro-chapter-chi">Chi</a> documentation</p>
+</li>
+<li>
+<p><a href="#intro-chapter-cif">CIF</a> documentation</p>
+</li>
+<li>
+<p><a href="#intro-chapter-setext">SeText</a> documentation</p>
+</li>
+<li>
+<p><a href="#intro-chapter-tooldef">ToolDef</a> documentation</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following additional information is available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#download-install-install">Installation of Eclipse ESCET tools</a></p>
+</li>
+<li>
+<p><a href="#download-install-first-start">Starting Eclipse ESCET IDE for the first time</a></p>
+</li>
+<li>
+<p><a href="#download-install-update">Updating Eclipse ESCET tools</a></p>
+</li>
+<li>
+<p><a href="#download-install-remove">Removing Eclipse ESCET tools</a></p>
+</li>
+<li>
+<p><a href="#download-install-find-version">Finding the tool&#8217;s version number</a></p>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="download-install-install">Installation of Eclipse ESCET tools</h3>
+<div class="paragraph">
+<p>First, obtain the Eclipse ESCET tools:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#download-install-chapter-index">Download</a> the Eclipse ESCET tools.</p>
+</li>
+<li>
+<p>Extract the downloaded archive somewhere on your hard disk, to a new empty
+directory where you have read and write access.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>You can now start the Eclipse ESCET IDE:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>For Windows, execute <code>eclipse.exe</code> from the directory that contains the
+extracted files.</p>
+</li>
+<li>
+<p>For Linux, execute <code>eclipse</code> from the directory that contains the
+extracted files.</p>
+</li>
+<li>
+<p>For macOS, open the downloaded <code>.dmg</code> file by double clicking. This opens a
+window with the Eclipse app and a shortcut icon to your Applications folder.
+Drag the Eclipse icon onto the Applications folder icon. This causes the Eclipse
+app to be copied to the Applications folder, where all apps can be found.
+You can now open the Eclipse app from the Applications folder.</p>
+<div class="paragraph">
+<p>The first time you open the Eclipse app, you will get an error message saying
+either <em>"Eclipse" can&#8217;t be opened because Apple cannot check it for malicious
+software</em> or <em>"Eclipse" can&#8217;t be opened because it was not downloaded from the
+App store</em>. Dismiss the popup by clicking <b class="button">OK</b>. Go to <span class="menuseq"><b class="menu">Apple menu</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">System
+Preferences</b></span>, click <em>Security &amp; Privacy</em>, then click tab <em>General</em>. Under <em>Allow
+apps downloaded from:</em> you should see in light grey two tick boxes: one for <em>App
+Store</em> and
+one for <em>App Store and identified developers</em>. Below that, you should see an
+additional line: <em>"Eclipse.app"</em> was blocked from use because it is not from an
+identified developer, and after that, a button <b class="button">Open Anyway</b>. Clicking that
+button will allow the Eclipse app to be executed.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For more information, see the section on starting the Eclipse ESCET IDE
+<a href="#download-install-first-start">for the first time</a>.</p>
+</div>
+<div class="paragraph">
+<p>You can now also use the command line scripts located in the <code>bin</code>
+directory. These are only available for Windows and Linux, not for macOS. To see which
+tools are available, simply look in this directory. Each of these
+tools can be started with the <code>-h</code> or <code>--help</code> option to get further
+information. You may want to add the <code>bin</code> directory to your <code>PATH</code>
+environment variable. See e.g.
+<a href="https://www.java.com/en/download/help/path.xml">How do I set or change the PATH system variable?</a>
+for how to achieve this.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="download-install-first-start">Starting Eclipse ESCET IDE for the first time</h3>
+<div class="paragraph">
+<p>When you start the Eclipse ESCET IDE for the first time, it will ask you to
+choose a <a href="#use-terminology-workspace">workspace</a> directory. A workspace
+directory is where all your settings will be stored. It is also the default
+directory for <a href="#use-create-project">new projects</a>, in which you will store
+your files.</p>
+</div>
+<div class="paragraph">
+<p>Choose a workspace directory and continue. Make sure that you have read and
+write access to the directory you choose. If you wish, the Eclipse ESCET IDE
+can remember your workspace directory. Note that if the workspace directory
+you choose does not yet exist, Eclipse will create it for you.</p>
+</div>
+<div class="paragraph">
+<p>The first time Eclipse launches in a fresh workspace, you will get a
+<em>Welcome</em> screen. You can close this tab by clicking the 'X' at the right of
+the tab, or by clicking on the 'workbench' icon (the right most icon on
+the welcome page).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="download-install-update">Updating Eclipse ESCET tools</h3>
+<div class="paragraph">
+<p>There are two ways to obtain a newer version of the Eclipse ESCET tools:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>New download of the Eclipse ESCET tools (including command line scripts),
+to be used side-by-side the older version.</p>
+</li>
+<li>
+<p>In-place update of the Eclipse ESCET tools.</p>
+</li>
+</ul>
+</div>
+<div class="sect3">
+<h4 id="download-install-side-by-side-new-installation">Side by side new installation</h4>
+<div class="paragraph">
+<p>To download and install a new version of Eclipse ESCET tools (including the
+command line scripts) side-by-side an older version, follow these steps:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Follow the normal <a href="#download-install-install">installation instructions</a>,
+extracting the new version to a different directory than the old version.</p>
+</li>
+<li>
+<p>You can copy the data (<a href="#use-terminology-project">projects</a>, files, and
+settings) of an earlier installation to the new installation. While neither
+version of the Eclipse ESCET IDE is running, simply remove the
+<a href="#use-terminology-workspace">workspace</a> directory of the new installation,
+and copy the workspace directory of the earlier installation to the new
+installation.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Using these instructions, it is possible to use multiple installations side
+by side, at the same time, regardless of whether the installations are the
+same release or different releases. Simply extract them to different
+directories and launch them as you would normally do.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="download-install-in-place-update">In-place update</h4>
+<div class="paragraph">
+<p>To perform an in-place update of the Eclipse ESCET tools:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Select <span class="menuseq"><b class="menu">Help</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Check for Updates</b></span> within the Eclipse ESCET IDE. Follow
+the on-screen instructions to perform an in-place update.</p>
+</li>
+<li>
+<p>This will <em>not</em> update the command line scripts.</p>
+</li>
+<li>
+<p>If the tool indicates that no updates are available, while you are sure that
+an updated version has been released, or if some other problem occurs, please
+restart the tool and try again. If still an in-place update fails, try to
+install a new version side-by-side the older version.</p>
+</li>
+<li>
+<p>If you get a dialog stating there is a problem, click the <b class="button">Details</b>
+button for further details. If may mention <code>Address family not supported by
+protocol family: connect</code>. If so, close Eclipse, and add the following line
+to the <code>eclipse.ini</code> file:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>-Djava.net.preferIPv4Stack=true</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Add the line at the end of the file, on a line by itself. By default,
+<code>eclipse.ini</code> is located in the Eclipse ESCET tools installation directory,
+except for macOS, where instead it is in the <code>Eclipse.app/Contents/MacOS</code>
+directory inside the Eclipse ESCET tools installation directory. Restart the
+Eclipse ESCET IDE and try again.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="download-install-remove">Removing Eclipse ESCET tools</h3>
+<div class="paragraph">
+<p>Before removing a version of the Eclipse ESCET tools, you may want to preserve
+(back up) its <a href="#use-terminology-workspace">workspace</a> directory, to keep your
+data (settings, projects, files). Then, to remove a release, simply remove the
+directory that contains files that you extracted from the downloaded archive
+during <a href="#download-install-install">installation</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="download-install-find-version">Finding the tool&#8217;s version number</h3>
+<div class="paragraph">
+<p>From the Eclipse ESCET IDE, there are multiple ways to find out which version
+of the toolkit or specific tools you have currently installed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Via the Eclipse <em>About Eclipse ESCET</em> dialog.</p>
+<div class="paragraph">
+<p>The <em>About Eclipse ESCET</em> dialog can be opened via the
+<span class="menuseq"><b class="menu">Help</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">About Eclipse ESCET</b></span> menu of the Eclipse ESCET IDE. The dialog
+shows the version of the Eclipse ESCET toolkit. An <b class="button">Installation Details</b>
+button is available to open the <em>Eclipse Installation Details</em> dialog. In this
+dialog, the <em>Installed Software</em> tab shows all the installed software,
+including their versions under the <em>Version</em> column.</p>
+</div>
+</li>
+<li>
+<p>Via the option dialogs of the various tools.</p>
+<div class="paragraph">
+<p>Most of the Eclipse ESCET tools can be started in a way that shows the option
+dialog for that tool. All option dialogs for our tools have a <em>Help</em> category.
+By clicking on that category, the help text for that tool is shown.
+The help text includes the version of the tool that you are using.</p>
+</div>
+</li>
+<li>
+<p>Via the command line option, in a ToolDef script.</p>
+<div class="paragraph">
+<p>If you start an application using a ToolDef script, you can specify command
+line arguments in the script as well. Start a tool with the <code>-h</code> or <code>--help</code>
+option to see the command line help text, which includes the version.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For command line scripts, the following approach is recommended:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Start a tool with the <code>-h</code> or <code>--help</code> option to see the command line help
+text, which includes the version.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="use-chapter-index">Using Eclipse ESCET tools</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>After you have <a href="#download-install-install">installed</a> the Eclipse ESCET
+tools, you can start using them. The following information is available to
+get you started on using the Eclipse ESCET tools in general, and applies to
+the various tools in the toolkit:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#use-terminology">Eclipse terminology</a></p>
+</li>
+<li>
+<p><a href="#use-projects">Working with projects, directories, and files</a></p>
+</li>
+<li>
+<p><a href="#use-edit-exec">Editing files and executing commands</a></p>
+</li>
+<li>
+<p><a href="#use-escet-perspective">Eclipse ESCET perspective</a></p>
+</li>
+<li>
+<p><a href="#use-apps-view">Applications view</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Consult the documentation of the individual tools for specific information
+regarding their use.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect2">
+<h3 id="use-terminology">Eclipse terminology</h3>
+<div class="paragraph">
+<p>The Eclipse ESCET IDE is based on the <em>Eclipse IDE</em>, a cross platform
+Integrated Development Environment (IDE). There is quite a bit of terminology
+that is used within the IDE. If you are not familiar with Eclipse terminology,
+it may be difficult to use the Eclipse ESCET IDE. Here we&#8217;ll explain some
+basic Eclipse terminology:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#use-terminology-workspace">Eclipse workspace</a></p>
+</li>
+<li>
+<p><a href="#use-terminology-view">Eclipse views</a></p>
+</li>
+<li>
+<p><a href="#use-terminology-project">Eclipse projects</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+<div class="sect3">
+<h4 id="use-terminology-workspace">Eclipse workspace</h4>
+<div class="paragraph">
+<p>Eclipse stores all its settings in a so-called <em>workspace</em>. The workspace is
+simply a directory on your computer. You can choose any directory you like to
+serve as a workspace, as long as you have write access to that directory. It is
+usually best to choose an empty directory or a directory that does not yet
+exist as your workspace.</p>
+</div>
+<div class="paragraph">
+<p>Typically, and by default, a directory named <code>workspace</code> inside your Eclipse
+ESCET installation directory is used. Eclipse will ask you to choose a
+workspace directory when you start the Eclipse ESCET IDE for the
+<a href="#download-install-first-start">first time</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+The actual settings are stored in a sub-directory of the workspace directory,
+called <code>.metadata</code>. You should avoid manually manipulating this directory.
+Note that because the name of the directory starts with a dot (<code>.</code>),
+depending on your operating system, file browser, and settings, the directory
+may be hidden.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div id="use-terminology-workspace-change" class="paragraph">
+<p>You can easily change your workspace directory from within Eclipse, by
+selecting <span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Switch workspace</b></span>. Select one of the workspaces
+from the list of last used workspaces, or select <b class="menuref">Other&#8230;&#8203;</b>  to freely
+select any directory on your system to use as a workspace directory.</p>
+</div>
+<div class="paragraph">
+<p>
+It is possible to run multiple instances of Eclipse at the same time, but each
+instance must use its own workspace.</p>
+</div>
+<div class="paragraph">
+<p>
+
+The workspace is also the default directory for
+<a href="#use-create-project">new projects</a>. However,
+<a href="#use-terminology-project">projects</a> don&#8217;t have to be physically located
+inside your workspace directory. They can be stored in any directory on
+your system. Whenever you <a href="#use-create-project">create a project</a> and store
+it outside of your workspace, or whenever you
+<a href="#use-import-project">import an existing project</a> from outside your
+workspace, it is <em>linked</em> to the workspace, but remains physically stored in
+a directory outside of the workspace.</p>
+</div>
+<div class="paragraph">
+<p>Having projects stored outside of the workspace has some benefits. The most
+important benefit is that you can remove the workspace directory, without
+losing your files.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-terminology-view">Eclipse views</h4>
+<div class="paragraph">
+<p>Eclipse is an Integrated Development Environment (IDE) with a lot of
+functionality. Most of the functionality is available through <em>views</em>. A view
+is a part of the Eclipse graphical user interface. Views can be thought of as
+'sub-windows'. When you start Eclipse you are likely to see the
+<em>Project Explorer</em> or <em>Package Explorer</em> view on the left, and
+the <em>Problems</em> view at the bottom.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="use-terminology-view-open">Opening a view</h5>
+<div class="paragraph">
+<p>To open/show a view, select <span class="menuseq"><b class="menu">Window</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Show view</b></span> and then
+choose the view that you wish to open.</p>
+</div>
+<div class="paragraph">
+<p>If the particular view that you wish to open is not in that menu, choose
+<b class="menuref">Other&#8230;&#8203;</b> instead. A new dialog opens, in which you can find all
+available views. The views are organized into categories. Expand a category,
+select the desired view, and click <b class="button">OK</b>.</p>
+</div>
+<div class="paragraph">
+<p>Alternatively, in the <b class="menuref">Show view</b> dialog, enter the name of the view
+(or the first part of it) in the filter box at the top of the dialog, and
+observe how views that don&#8217;t match the filter are no longer displayed. This
+makes it easier to find the desired view.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-terminology-project">Eclipse projects</h4>
+<div class="paragraph">
+<p>Eclipse, being an Integrated Development Environment (IDE), does not
+only allow you to <a href="#use-edit">edit</a> a single file, and
+<a href="#use-commands">simulate</a> it, but also allows you to <em>manage</em> your files.</p>
+</div>
+<div class="paragraph">
+<p>Eclipse works with so-called <em>projects</em>. A project is a collection of files
+and directories. A project may be located anywhere on your system, even though
+by default project are <a href="#use-create-project">created</a> in your
+<a href="#use-terminology-workspace">workspace</a> directory.</p>
+</div>
+<div class="paragraph">
+<p>A project is essentially a directory on your computer, with a special file
+named <code>.project</code>. This special file stores the information about your
+project, such as the name of the project. It is recommended to keep the name
+of the project as Eclipse sees it, the same as the name of the directory in
+which the project is stored on your hard disk.</p>
+</div>
+<div class="paragraph">
+<p>You can see the projects that Eclipse knows about in the
+<em>Project Explorer</em> or <em>Package Explorer</em> &lt;use-terminology-view,view&gt;&gt;.</p>
+</div>
+<div class="paragraph">
+<p>For more information on projects, see the <a href="#use-projects">Working with projects, directories, and files</a> section.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="use-projects">Working with projects, directories, and files</h3>
+<div class="paragraph">
+<p>Eclipse uses <a href="#use-terminology-project">projects</a> to manage files and
+directories (also called <em>folders</em>). This section contains information on the
+following topics:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#use-create-project">Creating a new project</a></p>
+</li>
+<li>
+<p><a href="#use-import-project">Importing an existing project</a></p>
+</li>
+<li>
+<p><a href="#use-create-dir">Creating a new directory</a></p>
+</li>
+<li>
+<p><a href="#use-create-file">Creating a new file</a></p>
+</li>
+<li>
+<p><a href="#use-rename">Renaming a file, directory, or project</a></p>
+</li>
+<li>
+<p><a href="#use-locations">Locating files, directories, and projects</a></p>
+</li>
+<li>
+<p><a href="#use-refresh">Refreshing a file, directory, or project</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect3">
+<h4 id="use-create-project">Creating a new project</h4>
+<div class="paragraph">
+<p>To create a new project, ensure you have either the <em>Project Explorer</em> or
+<em>Package Explorer</em> <a href="#use-terminology-view">view</a> visible.</p>
+</div>
+<div class="paragraph">
+<p>Select <span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">New</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Project&#8230;&#8203;</b></span> to open the <em>New Project</em> window.
+Alternatively, right click somewhere in the <em>Project Explorer</em> or
+<em>Package Explorer</em> view, and select <span class="menuseq"><b class="menu">New</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Project&#8230;&#8203;</b></span>, to open the same
+window.</p>
+</div>
+<div class="paragraph">
+<p>In the <em>New Project</em> window, from the <em>General</em> category select <em>Project</em>,
+and click the <b class="button">Next &gt;</b> button.</p>
+</div>
+<div class="paragraph">
+<p>In the next window, enter a project name, for example <code>models</code>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+By default, a project is created inside your
+<a href="#use-terminology-workspace">workspace</a> directory. If you want it at a
+different place (so you can remove the workspace without losing your
+projects), uncheck the <em>Use default location</em> option, and enter a
+<em>Location</em>. Make sure the location does not yet exist, for example by ending
+with the project name. It is recommended to always create a project in a
+directory that has the same name as the project.</p>
+</div>
+<div class="paragraph">
+<p>Click the <b class="button">Finish</b> button to create the project. Observe how it
+appears in the <em>Project Explorer</em> or <em>Package Explorer</em> view.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-import-project">Importing an existing project</h4>
+<div class="paragraph">
+<p>If you previously created a project, but it is no longer visible in your
+<em>Project Explorer</em> or <em>Package Explorer</em> <a href="#use-terminology-view">view</a>,
+you can import it. Imported projects are <em>linked</em> to your
+<a href="#use-terminology-workspace">workspace</a>, but remain in their original location
+on your hard disk (by default, they are <em>not</em> moved or copied to your
+workspace directory).</p>
+</div>
+<div class="paragraph">
+<p>Importing existing projects is particularly useful if you removed you workspace
+directory and started with a fresh one, e.g. for a new installation.</p>
+</div>
+<div class="paragraph">
+<p>To import one or more existing projects, select <span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Import&#8230;&#8203;</b></span> to open
+the <em>Import</em> window. Alternatively, right click somewhere in the
+<em>Project Explorer</em> or <em>Package Explorer</em> view, and select
+<b class="menuref">Import&#8230;&#8203;</b> to open the same window.</p>
+</div>
+<div class="paragraph">
+<p>In the <em>Import</em> window, from the <em>General</em> category, select
+<em>Existing Projects into Workspace</em>, and click <b class="button">Next &gt;</b>.</p>
+</div>
+<div class="paragraph">
+<p>In the next window, in <em>Select root directory</em>, point it to the
+directory that contains the project you wish to import. The available projects
+in the given root directory, and all its sub-directories (recursively), are
+listed in the <em>Projects</em> list. Select the project(s) you want to
+import, by checking the relevant check boxes, and click <b class="button">Finish</b>.
+Observe how the project(s) appear(s) in the <em>Project Explorer</em> or
+<em>Package Explorer</em> view.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-remove-project">Removing a project from Eclipse</h4>
+<div class="paragraph">
+<p>To remove a project from Eclipse, ensure you have either the
+<em>Project Explorer</em> or <em>Package Explorer</em> <a href="#use-terminology-view">view</a>
+visible.</p>
+</div>
+<div class="paragraph">
+<p>Right click the project in the <em>Project Explorer</em> or <em>Package Explorer</em> view
+and choose <b class="menuref">Delete</b>. Alternatively, select it and press the <kbd>Delete</kbd>
+key on your keyboard. The <em>Delete Resources</em> dialog appears. To only remove
+the project from Eclipse, and keep the files on your hard disk, disable the
+<em>Delete project contents on disk (cannot be undone)</em> option and click the
+<b class="button">OK</b> button. Alternatively, to remove the project from Eclipse and also
+remove all the files in the project from your hard disk, enable the
+<em>Delete project contents on disk (cannot be undone)</em> option and click the
+<b class="button">OK</b> button.</p>
+</div>
+<div class="paragraph">
+<p>Wait for Eclipse to complete the removal operation.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-create-dir">Creating a new directory</h4>
+<div class="paragraph">
+<p>You can structure large collections of files, by putting them into different
+directories (also called <em>folders</em>). Directories can only be created in
+<a href="#use-terminology-project">projects</a>, or in other directories.</p>
+</div>
+<div class="paragraph">
+<p>Select the project or directory in which you want to create a new directory
+(by left clicking its name in the <em>Project Explorer</em> or <em>Package Explorer</em>
+<a href="#use-terminology-view">view</a>, and create a new directory by selecting
+<span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">New</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Folder</b></span>. Alternatively, right click on the project or
+directory instead, and from the popup menu select <span class="menuseq"><b class="menu">New</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Folder</b></span>.</p>
+</div>
+<div class="paragraph">
+<p>In the <em>New Folder</em> window, enter the <em>Folder name</em>, and click <b class="button">Finish</b>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-create-file">Creating a new file</h4>
+<div class="paragraph">
+<p>Select the <a href="#use-terminology-project">project</a> or directory in which you
+want to create a new file (by left clicking its name in the
+<em>Project Explorer</em> or <em>Package Explorer</em> <a href="#use-terminology-view">view</a>),
+and create a new file by selecting <span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">New</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">File</b></span>. Alternatively,
+right click on the project or directory instead, and from the popup menu
+select <span class="menuseq"><b class="menu">New</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">File</b></span>.</p>
+</div>
+<div class="paragraph">
+<p>In the <em>New File</em> window, enter the <em>File name</em>, and click <b class="button">Finish</b>.
+Make sure to give the file the correct file extension. E.g. CIF files
+should end with <code>.cif</code>.</p>
+</div>
+<div class="paragraph">
+<p>An editor for the new file opens, and you can start <a href="#use-edit">editing it</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-rename">Renaming a file, directory, or project</h4>
+<div class="paragraph">
+<p>To rename a file, directory, or <a href="#use-terminology-project">project</a>,
+select it by left clicking its name in the <em>Project Explorer</em> or
+<em>Package Explorer</em> <a href="#use-terminology-view">view</a>, and then select
+<span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Rename&#8230;&#8203;</b></span>. Alternatively, right click on the file, directory, or
+project instead, and from the popup menu select <span class="menuseq"><b class="menu">Refactor</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Rename&#8230;&#8203;</b></span>.
+A second alternative is to select the file, directory, or project, and
+then press the <kbd>F2</kbd> key.</p>
+</div>
+<div class="paragraph">
+<p>In the <em>Rename Resource</em> window, enter the <em>New name</em>, and click <b class="button">OK</b>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-locations">Locating files, directories, and projects</h4>
+<div class="paragraph">
+<p>Often, it is convenient to be able to manage files not from inside Eclipse,
+but from outside Eclipse, for instance in a file explorer provided by your
+operating system. The <em>Properties</em> <a href="#use-terminology-view">view</a> can be used
+to find out where the files, directories, and projects that are in Eclipse,
+are located on your hard disk. With the <em>Properties</em> view visible, select a
+file, directory, or project in the <em>Project Explorer</em> or <em>Package Explorer</em>
+view. In the <em>Property</em> column of the <em>Properties</em> view, look for <em>location</em>.
+The corresponding <em>Value</em> indicates where the file, directory, or project is
+located on your hard disk. Note that you can right click the location and
+choose <em>Copy</em> to copy the location to the clipboard.</p>
+</div>
+<div class="paragraph">
+<p>As an alternative to the <em>Properties</em> view, you can also use the
+<em>Properties</em>  window. Right click a file, directory, or project in the
+<em>Project Explorer</em> or <em>Package Explorer</em> view and choose <b class="menuref">Properties</b>.
+In the window that shows, select <em>Resource</em> on the left, if it is not already
+selected. Then, on the right, look for the <em>Location</em>.</p>
+</div>
+<div class="paragraph">
+<p>To directly open the directory that contains a file, directory, or project
+in your system&#8217;s file explorer, right click the file, directory, or project in
+the <em>Project Explorer</em> or <em>Package Explorer</em> view and choose
+<span class="menuseq"><b class="menu">Show In</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">System Explorer</b></span>.</p>
+</div>
+<div class="paragraph">
+<p>Don&#8217;t forget to <a href="#use-refresh">refresh</a> your projects in Eclipse after
+manipulating them outside Eclipse.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-refresh">Refreshing a file, directory, or project</h4>
+<div class="paragraph">
+<p>Whenever changes are made to files or directories from outside Eclipse, and
+those files or directories are also in one of the projects inside Eclipse,
+the changes are <em>not</em> always automatically reflected in the
+<em>Project Explorer</em> or <em>Package Explorer</em> <a href="#use-terminology-view">view</a>. To
+ensure that the current state of the files and directories are properly
+reflected in Eclipse, a refresh is required. To refresh a file, directory,
+or project, right click it, and choose <b class="menuref">Refresh</b>. Any files and
+directories that no longer exist will disappear from Eclipse. Any new files
+and directories created outside Eclipse will appear in Eclipse as well.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-filesize">Checking the size of a file</h4>
+<div class="paragraph">
+<p>When working with files, you may occasionally encounter large files. Opening
+large files in Eclipse can cause serious
+<a href="#performance-chapter-index">performance problems</a>. You can use the
+<em>Properties</em> <a href="#use-terminology-view">view</a> to check the size of a file. With
+the <em>Properties</em> view visible, select a file in the <em>Project Explorer</em> or
+<em>Package Explorer</em> view. In the <em>Property</em> column of the <em>Properties</em> view,
+look for <em>size</em>. The corresponding <em>Value</em> indicates the size of the file.</p>
+</div>
+<div class="paragraph">
+<p>As an alternative to the <em>Properties</em> view, you can also use the <em>Properties</em>
+window. Right click a file in the <em>Project Explorer</em> or <em>Package Explorer</em>
+view and choose <b class="menuref">Properties</b>. In the window that shows, select <em>Resource</em>
+on the left, if it is not already selected. Then, on the right, look for the
+<em>Size</em>.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="use-edit-exec">Editing files and executing commands</h3>
+<div class="paragraph">
+<p>This section contains information on <a href="#use-edit">editing text files</a> and
+<a href="#use-commands">executing commands</a> (such as starting a simulator).</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+
+
+
+
+
+</p>
+</div>
+<div class="sect3">
+<h4 id="use-edit">Editing a text file</h4>
+<div class="paragraph">
+<p>To edit a file, double click it in the <em>Project explorer</em> or
+<em>Package explorer</em> <a href="#use-terminology-view">view</a>.</p>
+</div>
+<div class="paragraph">
+<p>Whenever you open a text file, change it, or the editor receives the focus,
+the file is checked for errors. If there are errors (or warnings), they are
+displayed in the editor as shown below.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./use/model_with_error.png" alt="model with error">
+</div>
+</div>
+<div class="paragraph">
+<p>Note that you can hover over an error in the source code itself to find out
+what the problem is. Alternatively, you can hover over the error marker in
+the margin of the editor, or look at the <em>Problems</em> view. Also, if a file
+has an error or a warning, an overlay icon is shown in the <em>Project Explorer</em>
+and <em>Package Explorer</em> views, for that file, the directories that
+contain it, and the <a href="#use-terminology-project">project</a> that contains it.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-commands">Executing commands</h4>
+<div class="paragraph">
+<p>If you have a file without errors, you can execute certain commands on it. The
+various Eclipse ESCET tools add <em>commands</em> to Eclipse. For instance, CIF models
+can be simulated using a simulation command.</p>
+</div>
+<div class="paragraph">
+<p>To execute a command on a file, right click the file in the
+<em>Project Explorer</em> or <em>Package Explorer</em> <a href="#use-terminology-view">view</a>, and
+select the command. Alternatively, if you have the file open in an editor, right
+click the editor, and select the command.</p>
+</div>
+<div class="paragraph">
+<p>The commands that are available are determined by the file extension of the
+file. That is, only the commands applicable for a certain file are shown.</p>
+</div>
+<div class="paragraph">
+<p>Besides simulation, other commands may be available, depending on the modeling
+language and tools you use. Consult the specific documentation for each tool
+for more details.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="use-escet-perspective">Eclipse ESCET perspective</h3>
+<div class="paragraph">
+<p>The layout of the different parts of the Eclipse ESCET IDE, including the
+position and size of the various <a href="#use-terminology-view">views</a>, can be
+configured per perspective. Different perspectives allow you to use different
+layouts for different tasks.</p>
+</div>
+<div class="paragraph">
+<p>The Eclipse ESCET IDE ships with some built-in perspectives. The default
+<em>ESCET</em> perspective is ideally suited for the use of the Eclipse
+ESCET software.</p>
+</div>
+<div class="paragraph">
+<p>
+
+You can manually open the <em>ESCET</em> perspective (or any other perspective), by
+selecting <span class="menuseq"><b class="menu">Window</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Perspective</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Open Perspective</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Other&#8230;&#8203;</b></span>. Then, in the
+<em>Open Perspective</em> dialog, select the <em>ESCET</em> perspective from the list, and
+click the <b class="button">OK</b> button.</p>
+</div>
+<div class="paragraph">
+<p>
+
+By default, the Eclipse ESCET IDE shows the opened perspectives at the top
+right corner of the IDE. Each perspective is a button that can be used to
+active it. If the button appears in a pushed state, that perspective is
+active. The following image shows an Eclipse ESCET IDE with two open
+perspectives: the <em>Resource</em> perspective and the <em>ESCET</em> perspective.
+The <em>ESCET</em> perspective  is the currently enabled perspective.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./use/perspectives.png" alt="perspectives">
+</div>
+</div>
+<div class="paragraph">
+<p>By default, the <em>ESCET</em> perspective shows the following views:</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Project explorer (top left)</p>
+</li>
+<li>
+<p><a href="#use-apps-view">Applications</a> (bottom left)</p>
+</li>
+<li>
+<p>Problems (bottom, grouped)</p>
+</li>
+<li>
+<p>Properties (bottom, grouped)</p>
+</li>
+<li>
+<p>Console (bottom, grouped)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+You can manually <a href="#use-terminology-view-open">open</a> additional
+<a href="#use-terminology-view">views</a>, close some views, move views around,
+change the size of the different views, etc. If at any time you wish to go
+back to the original layout, you can reset the perspective, by selecting
+<span class="menuseq"><b class="menu">Window</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Perspective</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Reset Perspective&#8230;&#8203;</b></span>. Click the <b class="button">OK</b>
+button to confirm.</p>
+</div>
+<div class="paragraph">
+<p>
+
+Whenever a new release changes the default layout of a perspective, for
+instance by adding a new default view, you can reset the perspective to get
+the new view, or you can <a href="#use-terminology-view-open">open</a> that view it
+manually.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="use-apps-view">Applications view</h3>
+<div class="paragraph">
+<p>The <em>Applications</em> <a href="#use-terminology-view">view</a> can be used to manage the
+applications of the Eclipse ESCET software running within the Eclipse ESCET
+IDE.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./use/apps_view.png" alt="apps view">
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect3">
+<h4 id="use-opening-the-view">Opening the view</h4>
+<div class="paragraph">
+<p>The <em>Applications</em> view can be <a href="#use-terminology-view-open">opened</a> by
+selecting <span class="menuseq"><b class="menu">Window</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Show view</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Applications</b></span>, assuming the
+<a href="#use-escet-perspective">ESCET perspective</a> is enabled.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-apps-view-status">Application status</h4>
+<div class="paragraph">
+<p>The view shows a list of running applications. If an application starts another
+application, it is shown as a child, forming a tree structure. Each item of the
+tree shows a single application. In the example screenshot above, there are
+four running applications. The first application is a <em>ToolDef interpreter</em>,
+which is running a second application, a <em>CIF simulator</em>. The third
+application is also a <em>ToolDef interpreter</em>, which is running a fourth
+application, also a <em>CIF simulator</em>.</p>
+</div>
+<div class="paragraph">
+<p>To the left of each item, the status of the application is indicated. The
+following statuses are available:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><span class="image"><img src="./use/status_starting.png" alt="status starting"></span> Staring</p>
+</li>
+<li>
+<p><span class="image"><img src="./use/status_running.png" alt="status running"></span> Running</p>
+</li>
+<li>
+<p><span class="image"><img src="./use/status_terminating.png" alt="status terminating"></span> Terminating</p>
+</li>
+<li>
+<p><span class="image"><img src="./use/status_terminated.png" alt="status terminated"></span> Terminated</p>
+</li>
+<li>
+<p><span class="image"><img src="./use/status_finished.png" alt="status finished"></span> Finished</p>
+</li>
+<li>
+<p><span class="image"><img src="./use/status_failed.png" alt="status failed"></span> Failed</p>
+</li>
+<li>
+<p><span class="image"><img src="./use/status_crashed.png" alt="status crashed"></span> Crashed</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>When an application is started, it get a <em>Starting</em> state. Once the options
+have been processed from the command line and the option dialog (if requested),
+the actual application code is executed, and the status changes to <em>Running</em>.
+If the application is not terminated at the request of the user, the
+application will be done with its execution after some time. If execution
+finished without problems, it then reaches status <em>Finished</em>. If execution
+failed for some reason, it reaches status <em>Failed</em> instead. If the execution
+crashed due to internal problems, the application reaches status <em>Crashed</em>. If
+however the user <a href="#use-apps-view-termination">terminates</a> the application,
+the status is first changed to <em>Terminating</em>. Once the application has
+successfully been terminated, the status changes to <em>Terminated</em>.</p>
+</div>
+<div class="paragraph">
+<p>
+You can also view these statuses and their corresponding icons from within
+the IDE, by opening the <em>Application Status Legend</em> dialog, which is available
+via the view&#8217;s drop-down button popup menu:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./use/show_status_legend.png" alt="show status legend">
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-apps-view-termination">Termination</h4>
+<div class="paragraph">
+<p>The <em>Applications</em> view supports terminating running applications. There are
+several ways to terminate an application using the <em>Applications</em> view.</p>
+</div>
+<div class="paragraph">
+<p>When terminating an application (with a <em>Starting</em> or <em>Running</em> state), the
+application will get a <em>Terminating</em> state. Applications occasionally poll for
+termination requests. Therefore, it may take a while for the application to
+actually process the termination request. Once it has been processed, the
+application will have terminated, and the status changes to <em>Terminated</em> as
+well.</p>
+</div>
+<div class="paragraph">
+<p>Applications can&#8217;t process a termination request while a modal dialog (such as
+the option dialog) is open, or when input is requested from the console. They
+will terminate as soon as possible, after the dialog is closed, or the user has
+provided input via the console.</p>
+</div>
+<div class="paragraph">
+<p>The following buttons related to termination are available in the
+<em>Applications</em> view&#8217;s toolbar:</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Auto Terminate (<span class="image"><img src="./use/command_auto_terminate.png" alt="command auto terminate"></span>)</p>
+<div class="paragraph">
+<p>Most users will only want to have a single application running at a time,
+including application started by that application, etc. To facilitate this,
+the view provides an <em>Auto Terminate</em> feature. This feature can be enabled
+and disabled from the view&#8217;s toolbar. It is enabled by default. Your choice
+whether to enable or disable this option will be remembered, even after
+Eclipse is restarted. The feature only has an effect if the view is shown in
+at least one of the opened <a href="#use-escet-perspective">perspectives</a>.</p>
+</div>
+<div class="paragraph">
+<p>If enabled, and a new application (not started by another already running
+application) is started, all other already running applications are
+automatically terminated. The new application starts its execution
+immediately. The already running applications will start to process the
+termination request, and will terminate as soon as possible.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Terminate All (<span class="image"><img src="./use/command_terminate_all.png" alt="command terminate all"></span>)</p>
+<div class="paragraph">
+<p>The view&#8217;s toolbar contains a <em>Terminate All</em> button that can be used to
+terminate all running applications. The button is only enabled when at least
+one of the listed applications can be terminated. When clicked, all running
+applications are given a termination request, and will terminate as soon as
+possible.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Terminate (<span class="image"><img src="./use/command_terminate.png" alt="command terminate"></span>)</p>
+<div class="paragraph">
+<p>The view&#8217;s drop-down button popup menu contains a <em>Terminate</em> item that can
+be used to terminate all selected applications that are running. The item is
+only enabled when at least one of the listed applications that is selected,
+can be terminated. When clicked, all selected applications that can be
+terminated, are given a termination request, and will terminate as soon as
+possible.</p>
+</div>
+<div class="paragraph">
+<p>Even when a child application is selected, all applications in the entire
+tree, starting from the root, will be given a termination request, if not
+already terminated or having finished their execution. In other words, only
+an entire tree of related applications can be terminated.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-apps-view-removal">Removal</h4>
+<div class="paragraph">
+<p>The <em>Applications</em> view can get a bit crowded, if already terminated
+applications are not removed from the list. To keep only relevant applications,
+the <em>Applications</em> view supports removing items from the list.</p>
+</div>
+<div class="paragraph">
+<p>Only applications which have finished execution can be removed. That is, the
+root of the tree of applications needs to have a <em>Terminated</em>, <em>Finished</em>,
+<em>Failed</em>, or <em>Crashed</em> status, for the tree to be allowed to be removed. This
+prevents removing applications that are still running, which would make it
+impossible to terminate them, or observe their status.</p>
+</div>
+<div class="paragraph">
+<p>The following buttons related to removal are available in the <em>Applications</em>
+view&#8217;s toolbar:</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Auto Remove (<span class="image"><img src="./use/command_auto_remove.png" alt="command auto remove"></span>)</p>
+<div class="paragraph">
+<p>Most users will only want to only have applications listed in the view, that
+are either still running, or have just finished execution. To facilitate
+this, the view provides an <em>Auto Remove</em> feature. This feature can be enabled
+and disabled from the view&#8217;s toolbar. It is enabled by default. Your choice
+whether to enable or disable this option will be remembered, even after
+Eclipse is restarted. The feature only has an effect if the view is shown in
+at least one of the opened <a href="#use-escet-perspective">perspectives</a>.</p>
+</div>
+<div class="paragraph">
+<p>If enabled, and a new application (not started by another already running
+application) is started, all already terminated applications, will be removed
+from the list. If combined with the <em>Auto Terminate</em> feature, all other
+applications that can not be removed immediately because they are still
+running, will be removed as soon as possible, after they have been
+terminated.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Remove All (<span class="image"><img src="./use/command_remove_all.png" alt="command remove all"></span>)</p>
+<div class="paragraph">
+<p>The view&#8217;s drop-down button popup menu contains a <em>Remove All</em> item that can
+be used to remove all listed applications that may be removed. The item is
+only enabled when at least one of the listed applications can be removed.
+When clicked, all listed applications that can be removed, are immediately
+removed from the list.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Remove (<span class="image"><img src="./use/command_remove.png" alt="command remove"></span>)</p>
+<div class="paragraph">
+<p>The view&#8217;s drop-down button popup menu contains a <em>Remove</em> item that can
+be used to remove all selected applications that can be removed. The item is
+only enabled when at least one of the listed applications that is selected,
+can be removed. When clicked, all selected applications that can be
+removed, are immediately removed from the list.</p>
+</div>
+<div class="paragraph">
+<p>Even when a child application is selected, all applications in the entire
+tree, starting from the root, will be removed. In other words, only an entire
+tree of related applications can be removed, and only if all applications in
+that tree have finished execution.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="use-apps-view-expansion">Expansion</h4>
+<div class="paragraph">
+<p>When one application starts another application, they are listed in a tree,
+with the parent containing the child. When running a single application, it
+may be of interest to see which child applications are being executed by the
+parent application. However, when executing multiple applications, this may
+quickly crowd the view. It may then be better to keep all root items collapsed,
+only showing the status of the root applications. This provides an overview
+over those multiple applications.</p>
+</div>
+<div class="paragraph">
+<p>The following buttons related to expansion are available in the <em>Applications</em>
+view&#8217;s toolbar:</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Auto Expand (<span class="image"><img src="./use/command_auto_expand.png" alt="command auto expand"></span>)</p>
+<div class="paragraph">
+<p>Most users will have the <em>Auto Terminate</em> and <em>Auto Remove</em> features enabled,
+and will thus only have a single application listed. They will want to
+automatically expand a parent application, to show its children. To
+facilitate this, the view provides an <em>Auto Expand</em> feature. This feature can
+be enabled and disabled from the view&#8217;s toolbar. It is enabled by default.
+Your choice whether to enable or disable this option will be remembered, even
+after Eclipse is restarted. The feature only has an effect if the view is
+shown in at least one of the opened <a href="#use-escet-perspective">perspectives</a>.</p>
+</div>
+<div class="paragraph">
+<p>If enabled, and a parent application starts a child application, the item
+for the parent application in the view, is automatically expanded to show its
+children. If disabled, no items will be automatically expanded.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="performance-chapter-index">Resolving performance and memory problems</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>During the use of the Eclipse ESCET toolkit, you may encounter performance
+and/or memory problems. This includes slow execution, performance degradation over time,
+out-of-memory errors, etc. One way to solve such problems, is to use a
+computer that is faster and/or has more memory. If that is not an option, or
+if that doesn&#8217;t help, the following information is available to help you get
+rid of these problems:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#performance-clear-console">Clearing the console</a></p>
+</li>
+<li>
+<p><a href="#performance-reduce-console-output">Reducing console output</a></p>
+</li>
+<li>
+<p><a href="#performance-close-running-apps">Closing running applications</a></p>
+</li>
+<li>
+<p><a href="#performance-tweak-perf-settings">Tweaking performance settings</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In particular, the <a href="#performance-tweak-perf-settings">Tweaking performance settings</a> section
+provides information on how to give Eclipse ESCET tools more memory. This solves the most
+common performance problems and out-of-memory errors.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="sect2">
+<h3 id="performance-clear-console">Clearing the console</h3>
+<div class="paragraph">
+<p>In the Eclipse ESCET IDE, the <em>Console</em> <a href="#use-terminology-view">view</a> displays
+the console output generated by the applications that you run. This console keeps
+all the output in memory. If the application that you run creates a lot of output,
+this can quickly fill the available memory, and lead to
+<a href="#performance-tweak-perf-settings-practical">out of memory</a> errors.</p>
+</div>
+<div class="paragraph">
+<p>By clearing the console, the output is removed and the associated memory
+becomes free for other uses. To clear the console, right click the console
+(the part of the view that contains the actual console text) and choose
+<b class="menuref">Clear</b> from the popup menu. Alternatively, click the <em>Clear Console</em>
+button (<span class="image"><img src="./performance/clear_console.png" alt="clear console"></span>) of the <em>Console</em>
+view&#8217;s toolbar.</p>
+</div>
+<div class="paragraph">
+<p>The Eclipse <em>Console</em> view does not just keep the console output of the
+currently running application or applications in memory, it also keeps the
+output of all terminated applications in memory. To look at the applications
+that you executed, click the small arrow next to the <em>Display Selected Console</em>
+icon (<span class="image"><img src="./performance/console_pages.png" alt="console pages"></span>) of the <em>Console</em>
+view&#8217;s toolbar.A list of executed applications will appear, that looks
+something like this:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./performance/console_pages_list.png" alt="console pages list">
+</div>
+</div>
+<div class="paragraph">
+<p>In this case, four applications have been launched. The console output for the
+fourth application is currently displayed on the console, as indicated by the
+selection indicator on the left. Clicking on any of the other applications will
+activate the console for that application, and show its console output in the
+<em>Console</em> view. Clearing the console of applications that have
+terminated can free a lot of memory for other uses, if the applications
+produced a lot of console output.</p>
+</div>
+<div class="paragraph">
+<p>
+Note that instead of clearing the console after a lot of output has been
+generated, it is often better to <a href="#performance-reduce-console-output">prevent</a>
+that much output from being created in the first place.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="performance-reduce-console-output">Reducing console output</h3>
+<div class="paragraph">
+<p>Console output is expensive. Not only because of the amount of memory the
+generated console output uses, but also because the console output itself needs
+to be generated, and displayed on the console. Reducing console output can
+significantly increase the performance of our tools.</p>
+</div>
+<div class="paragraph">
+<p>Therefore, instead of <a href="#performance-clear-console">clearing the console</a>, it
+may be better to prevent that much output from being written to the console
+in the first place. If your model itself generates a lot of console output,
+consider letting it generate less output. Alternatively, if the tool you use
+generates a lot of console output, consider checking its options to see if
+you can disable certain console output.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+All Eclipse ESCET applications have an <em>Output mode</em> option (<em>General</em>
+category). Changing the value of this option from <em>Debug</em> to <em>Normal</em>,
+or from <em>Normal</em> to <em>Warning</em> may significantly reduce the amount of output
+that is written to the console. Note however that this is mostly an all or
+nothing approach. It is often much better to use application specific
+settings, or change your model, to reduce the amount of output that is
+generated, as it allows for more control over what output is or isn&#8217;t
+generated.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="performance-close-running-apps">Closing running applications</h3>
+<div class="paragraph">
+<p>One of the nice features of an the Eclipse ESCET IDE is that it allows the
+simultaneous execution of multiple applications, as well as the simultaneous
+execution of a single application on many different inputs. For instance, it
+is possible to simultaneously simulate two models using a simulator. The
+downside is that running multiple applications at the same time, costs more
+memory. Sometimes, if you forget to close an application, it can still
+consume memory, and may even still be running active computations, thus
+consuming processing power.</p>
+</div>
+<div class="sect3">
+<h4 id="performance-application-management-via-the-applications-view">Application management via the applications view</h4>
+<div class="paragraph">
+<p>The <a href="#use-apps-view">Applications view</a> can also be used observe the
+<a href="#use-apps-view-status">status</a> of running applications, and to
+<a href="#use-apps-view-termination">terminate</a> them.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="performance-application-management-via-the-console-view">Application management via the console view</h4>
+<div class="paragraph">
+<p>The Eclipse <em>Console</em> <a href="#use-terminology-view">view</a> maintains the console
+output for all running and finished applications. To look at the applications
+that you executed, click the small arrow next to the <em>Display Selected Console</em>
+icon (<span class="image"><img src="./performance/console_pages.png" alt="console pages"></span>) of the <em>Console</em> view&#8217;s
+toolbar. A list of executed applications will appear, that looks something
+like this:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./performance/console_pages_list.png" alt="console pages list">
+</div>
+</div>
+<div class="paragraph">
+<p>In this case, of the four applications that have been started, the second and
+fourth are still running. The console for the fourth application is currently
+displayed, as indicated by the selection indicator on the left. Clicking on any
+of the other applications will activate the console for that application,
+allowing it to be terminated, thus freeing resources for other applications.</p>
+</div>
+<div class="paragraph">
+<p>The application that is currently active in the console can be terminated at
+any time, by using the <em>Terminate</em> button
+(<span class="image"><img src="./performance/terminate_button.png" alt="terminate button"></span>),
+located at the upper right corner of the console. Note however that if the
+console does not have the focus, this button may not be visible. If the button
+is not visible, click somewhere in the console to make the button appear. If
+even then the button is still not available, it may still appear if you
+<em>Maximize</em> the console. Also note that the button has no effect
+while the application interactively asks for input from the console. However,
+once the console input is provided, and <kbd>ENTER</kbd> is pressed, the
+termination request will be processed.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+
+</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="performance-tweak-perf-settings">Tweaking performance settings</h3>
+<div class="paragraph">
+<p>If you run into errors related to running out of memory, you may need to tweak
+some settings. However, even if you don&#8217;t get errors, tweaking settings can
+significantly improve performance.</p>
+</div>
+<div class="paragraph">
+<p>This page provides a lot of background information, to allow you to better
+understand the impact of the various settings. If you wish, you can skip the
+background information, and go directly to the
+<a href="#performance-tweak-perf-settings-quickdirty">Quick and dirty solution</a> section.</p>
+</div>
+<div class="paragraph">
+<p>The following information is available on this page:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#performance-tweak-perf-settings-quickdirty">Quick and dirty solution</a></p>
+</li>
+<li>
+<p><a href="#performance-tweak-perf-settings-managed-gc">Managed memory and garbage collection</a></p>
+</li>
+<li>
+<p><a href="#performance-tweak-perf-settings-types">Different types of memory</a></p>
+</li>
+<li>
+<p><a href="#performance-tweak-perf-settings-benefits">Benefits of increasing the available memory</a></p>
+</li>
+<li>
+<p><a href="#performance-tweak-perf-settings-available">Available settings</a></p>
+</li>
+<li>
+<p><a href="#performance-tweak-perf-settings-change">Changing memory settings</a></p>
+</li>
+<li>
+<p><a href="#performance-tweak-perf-settings-practical">Practical hints to solve performance and memory problems</a></p>
+</li>
+<li>
+<p><a href="#performance-tweak-perf-settings-heapstatus">Monitoring Eclipse heap status</a></p>
+</li>
+<li>
+<p><a href="#performance-tweak-perf-settings-visualvm">Monitoring with VisualVM</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+<div class="sect3">
+<h4 id="performance-tweak-perf-settings-quickdirty">Quick and dirty solution</h4>
+<div class="paragraph">
+<p>This section explains a 'quick and dirty' solution that gives Eclipse more
+memory, resolving the most common performance problems and out-of-memory
+errors.</p>
+</div>
+<div class="paragraph">
+<p>Find the <code>eclipse.ini</code> file. By default, it is located in your Eclipse
+ESCET installation directory, except for macOS, where instead it is in the
+<code>Eclipse.app/Contents/MacOS</code> directory inside the Eclipse ESCET installation
+directory. Modify the last line (usually <code>-Xmx4g</code>). Replace it by the
+following to change the maximum available memory from 4
+<a href="https://en.wikipedia.org/wiki/Gibibyte">GiB</a> to 8 GiB:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>-Xmx8g</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Restart the Eclipse ESCET IDE or command line script to apply the new
+settings. If the instructions given here don&#8217;t fix your problem, or if
+the IDE or script will no longer start after you changed these settings,
+you should read the remainder of this page.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="performance-tweak-perf-settings-managed-gc">Managed memory and garbage collection</h4>
+<div class="paragraph">
+<p>Before going into the actual settings, this section provides a little
+background on managed memory and garbage collection, to make it easier to
+understand the following sections. The information here is highly simplified,
+in order not to complicate matters too much.</p>
+</div>
+<div class="paragraph">
+<p>The Eclipse ESCET IDE and command line scripts run on
+<a href="https://en.wikipedia.org/wiki/Java_%28programming_language%29">Java</a>, a
+computer programming language. The <em>Java Virtual Machine</em> (JVM) manages all
+memory used by Eclipse, as well as the Eclipse ESCET tools. Not all settings
+may apply, as different
+versions of the JVM often change/tweak their garbage collector, settings,
+defaults, etc. As such, the information on this page should be used to guide
+you, but may not be completely accurate.</p>
+</div>
+<div class="paragraph">
+<p>The JVM keeps track of all data that is maintained by the Eclipse ESCET tools,
+and releases (frees) the memory once it is no longer needed, so that it can
+be used to store other data. The JVM frees memory by means of a process called
+<a href="https://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29">garbage collection</a>
+(GC). Garbage collection is a complex process, but generally it consists of
+locking the memory to avoid modification during garbage collection, finding the
+data that is no longer used (mark the garbage), and then freeing the memory
+associated with that data (sweep the marked garbage).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="performance-tweak-perf-settings-types">Different types of memory</h4>
+<div class="paragraph">
+<p>In order to understand the memory related settings, some understanding of
+Java&#8217;s memory architecture is essential. The following figure provides an
+overview of Java&#8217;s memory architecture, and the different types of memory that
+are used:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./performance/java_memory.png" alt="java memory">
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+The operating system (OS) has memory available, either as physical
+<a href="https://en.wikipedia.org/wiki/Random-access_memory">RAM</a>, or
+as
+<a href="https://en.wikipedia.org/wiki/Virtual_memory">virtual memory</a>.
+When Java is executed, the Java program (<code>java</code> executable on Linux and macOS,
+<code>java.exe</code> on Windows), becomes one of the running
+<a href="https://en.wikipedia.org/wiki/Process_%28computing%29">processes</a>. The
+process uses a part of the operating system&#8217;s memory to store its data. This
+memory is called the <em>Java process heap</em>. The <em>Java process heap</em> is divided
+into two parts, the <em>Java object heap</em> and <em>'Everything else'</em>. The
+<em>Java object heap</em> contains all data actually used by the running Java program,
+which in our case is the Eclipse ESCET IDE and/or Eclipse ESCET command line
+scripts. The <em>'Everything else'</em> part contains various data, mostly used by
+the JVM internally.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+
+Java uses a generational garbage collector. New data, called <em>objects</em> in Java,
+are created in the <em>young generation</em>, or more specifically, in its
+<em>allocation space</em> (also called <em>eden space</em>). When the young generation
+becomes full, the garbage collector will remove all garbage (no longer used
+data) using a <em>minor collection</em>, which removes garbage from the young
+generation. The garbage collector uses the survivor spaces to store the
+surviving objects. Objects that survive a few minor collections are moved to
+the <em>old generation</em>, which stores the longer living objects, as well as the
+larger objects that don&#8217;t fit in the young generation, which is usually much
+smaller than the old generation. When the old generation becomes full, the
+garbage collector performs a <em>major collection</em> removing garbage from the
+entire Java object heap, which is much more work, and thus much more costly
+than a minor collection.</p>
+</div>
+<div class="paragraph">
+<p>The <em>'Everything else'</em> part of the Java process heap contains various data
+used internally by the JVM. This includes the <em>'Metaspace'</em> with all the Java
+code of Eclipse and our own plugins, the values of constants, etc. It also
+includes the <em>native code</em>, the highly optimized code generated for the
+specific
+<a href="https://en.wikipedia.org/wiki/Computer_architecture">architecture</a>
+of your machine, that can actually be executed on your processor. Furthermore,
+it includes the
+<a href="https://en.wikipedia.org/wiki/Stack-based_memory_allocation">stacks</a>
+of all the
+<a href="https://en.wikipedia.org/wiki/Thread_%28computer_science%29">threads</a>
+that are running in parallel. There is also a part that contains the data
+maintained by the garbage collector itself, for administrative purposes. The
+'Everything else' part contains various other types of data, that are
+irrelevant for the current discussion.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="performance-tweak-perf-settings-benefits">Benefits of increasing the available memory</h4>
+<div class="paragraph">
+<p>If Java runs out of available memory, our applications running in Eclipse will
+terminate with an 'out of memory' error message. In such cases, increasing the
+available memory will likely solve the problem. However, even if you don&#8217;t run
+out of memory, increasing the amount of memory that is available to Java can
+significantly improve Java&#8217;s performance.</p>
+</div>
+<div class="paragraph">
+<p>The garbage collector performs a minor collection when the young generation
+becomes 'full'. Here, 'full' doesn&#8217;t necessarily mean 100%, as Java may e.g.
+try to keep the heap about 40% to 70% filled. Increasing the size of the
+young generation makes it possible to allocate more new objects before the
+young generation becomes 'full'. During garbage collection, program execution
+may become halted, to ensure that memory doesn&#8217;t change during the collection
+process. The longer one can go without garbage collection, the less halting,
+and thus the greater the performance of the program.</p>
+</div>
+<div class="paragraph">
+<p>
+
+If an application uses a lot of data that lives for longer periods of time, the
+old generation may become mostly filled with data. It then becomes harder and
+harder for the garbage collector to move objects from the young generation to
+the old generation. This may be caused by
+<a href="https://en.wikipedia.org/wiki/Fragmentation_%28computing%29">fragmentation</a>,
+due to some objects from the old generation being removed by the garbage
+collector. In such cases, if the <em>gaps</em> are too small to hold the new objects,
+the old generation may need to be <em>compacted</em>, a form of
+<a href="https://en.wikipedia.org/wiki/Defragmentation">defragmentation</a>. After
+compaction, the single larger gap hopefully has more than enough free space to
+contain the new objects. The compaction process is expensive, as a lot of
+objects need to moved. If the situation gets really bad, Java may need to spend
+more time performing expensive garbage collection operations than it spends
+time on actually executing the program you&#8217;re running. By increasing the size
+of the old generation to more than the application needs, a lot more free space
+is available, reducing the need for frequent compaction, thus significantly
+increasing the performance of the application.</p>
+</div>
+<div class="paragraph">
+<p>These are just some of the reasons why increasing the amount of available
+memory can improve program execution times, even though enough memory was
+already available to complete the given task. In general, the more memory
+Java has, the better it performs.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="performance-tweak-perf-settings-available">Available settings</h4>
+<div class="paragraph">
+<p>The JVM has
+<a href="https://www.oracle.com/java/technologies/javase/vmoptions-jsp.html">way too many options</a>
+to list here, but the settings listed in this section are of particular
+practical relevance. Most of the settings affect memory sizes. Each setting is
+described using a name, a command line syntax (between parentheses), and a
+description. The command line syntax is used to specify the setting, as
+explained in the <a href="#performance-tweak-perf-settings-change">Changing memory settings</a> section.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Initial Java object heap size (<code>-Xms&lt;size&gt;</code>)</p>
+<div class="paragraph">
+<p>The size of the Java object heap when Java starts. Java will increase and/or
+decrease the size of the Java object heap as needed.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Maximum Java object heap size (<code>-Xmx&lt;size&gt;</code>)</p>
+<div class="paragraph">
+<p>The maximum size of the Java object heap. Java will increase the size of the
+Java object heap as needed, but never to more than the amount indicated by
+this setting.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Minimum percentage of free heap space (<code>-XX:MinHeapFreeRatio=&lt;n&gt;</code>)</p>
+<div class="paragraph">
+<p>Java will increase the size of the Java object heap as needed. Frequent heap
+resizing is costly. To prevent frequent resizing, the JVM allocates more
+space than it really needs. This way, a lot of new objects can be allocated
+before running out of space, which requires the heap to be increased again.</p>
+</div>
+<div class="paragraph">
+<p>This setting indicates the desired minimum percentage of free heap space
+after each garbage collection operation. This is a desired percentage only,
+and if it conflicts with other settings, it is ignored. For instance, if this
+setting is set to 40%, but 80% of the maximum heap size is in
+use, only 20% free space may be allocated.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Maximum percentage of free heap space (<code>-XX:MaxHeapFreeRatio=&lt;n&gt;</code>)</p>
+<div class="paragraph">
+<p>Java will decrease the size of the Java object heap if possible, to ensure
+that Java doesn&#8217;t keep claiming memory that it no longer needs. Frequent heap
+resizing is costly. To prevent frequent resizing, the JVM allocates more
+space than it really needs. This way, a lot of new objects can be allocated
+before running out of space, which requires the heap to be increased again.</p>
+</div>
+<div class="paragraph">
+<p>This setting indicates the desired maximum percentage of free heap space
+after each garbage collection operation.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Ratio of young/old generation sizes (<code>-XX:NewRatio=&lt;n&gt;</code>)</p>
+<div class="paragraph">
+<p>The ratio (1:n) of the young generation size to the old generation size. That
+is, with a ratio of 1:8, the old generation is 8 times as large as the young
+generation. In the command line syntax, the <code>8</code> is specified.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Ratio of allocation/survivor space sizes (<code>-XX:SurvivorRatio=&lt;n&gt;</code>)</p>
+<div class="paragraph">
+<p>The ratio (1:n) of the survivor spaces size to the allocation space size.
+That is, with a ratio of 1:8, the allocation space is 8 times as large as the
+survivor space. In the command line syntax, the <code>8</code> is specified.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Use garbage collector overhead limit (<code>-XX:+UseGCOverheadLimit</code>)</p>
+<div class="paragraph">
+<p>By default, the JVM uses a policy that limits the proportion of the VM&#8217;s time
+that is spent on the garbage collector. If the limit is exceeded, the garbage
+collector has trouble doing its work (usually due to too little free memory),
+and performance is impacted so badly, that executed is practically halted.
+Instead of continuing, the JVM will issue an 'out of memory' error.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Maximum code cache size (<code>-XX:ReservedCodeCacheSize=&lt;size&gt;</code>)</p>
+<div class="paragraph">
+<p>The maximum size of the code cache for native code.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Compile threshold (<code>-XX:CompileThreshold=&lt;n&gt;</code>)</p>
+<div class="paragraph">
+<p>By default, the JVM runs in mixed mode, which means that some code is interpreted,
+while other code is compiled to native code, which runs much faster. Since
+compilation takes time as well, compilation is only performed for often used
+code.</p>
+</div>
+<div class="paragraph">
+<p>This setting indicates the number of method (a peace of Java code)
+invocations/branches before a method is compiled for improved performance.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Thread stack size (<code>-Xss&lt;size&gt;</code>)</p>
+<div class="paragraph">
+<p>The size of the stack of each thread.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The <code>&lt;size&gt;</code> part of the command line syntax is to be replaced by an actual
+size, in bytes. The size can be postfixed with a <code>k</code> or <code>K</code> for
+<a href="https://en.wikipedia.org/wiki/Kibibyte">kibibytes</a>, an <code>m</code> or <code>M</code> for
+<a href="https://en.wikipedia.org/wiki/Mebibyte">mebibytes</a>, or a <code>g</code> or <code>G</code> for
+<a href="https://en.wikipedia.org/wiki/Gibibyte">gibibytes</a>. For instance, <code>32k</code> is
+32 kibibytes, which is equal to <code>32768</code>, which is 32,768 bytes.</p>
+</div>
+<div class="paragraph">
+<p>The <code>&lt;n&gt;</code> part of the command line syntax is to be replaced by an integer
+number. The values that are allowed are option specific.</p>
+</div>
+<div class="paragraph">
+<p>The <code>+</code> part of the command line syntax indicates that the corresponding
+feature is to be enabled. Replace the <code>+</code> by a <code>-</code> to disable the feature
+instead of enabling it.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="performance-tweak-perf-settings-change">Changing memory settings</h4>
+<div class="paragraph">
+<p>There are several ways to supply the command line arguments for the settings to
+Java. The easiest way to do it, when using Eclipse, is to modify the
+<code>eclipse.ini</code> file. By default, it is located in your Eclipse
+ESCET installation directory, except for macOS, where instead it is in the
+<code>Eclipse.app/Contents/MacOS</code> directory inside the Eclipse ESCET installation
+directory.</p>
+</div>
+<div class="paragraph">
+<p>Each of the settings you want to change should be added to the <code>eclipse.ini</code>
+text file, in the command line syntax. Each setting must be put on a line
+<em>by itself</em>. Furthermore, all these JVM settings must be put <em>after</em> the line
+that contains <code>-vmargs</code>. Settings on lines before the <code>-vmargs</code> line are the
+settings for the launcher that starts Eclipse, rather than to the JVM.</p>
+</div>
+<div class="paragraph">
+<p>Note that the default <code>eclipse.ini</code> file supplied with Eclipse may already
+contain some of the settings. If so, don&#8217;t add the setting again. Instead,
+change the value of the existing setting. The settings that are present by
+default, as well as their values, may change from release to release.</p>
+</div>
+<div class="paragraph">
+<p>After modifying <code>eclipse.ini</code>, restart the Eclipse ESCET IDE or command line
+script for the changes to take effect.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+<div class="sect4">
+<h5 id="performance-miscellaneous-troubleshooting">Miscellaneous troubleshooting</h5>
+<div class="paragraph">
+<p>If the <code>ECLIPSE_HOME</code> environment variable is defined, that directory is used
+instead of the default directory, to look for <code>eclipse.ini</code>. However, most
+users should not be affected by this.</p>
+</div>
+<div class="paragraph">
+<p>Using the <code>-vmargs</code> command line option replaces the similar settings from
+the <code>eclipse.ini</code> file. For most users, this will not be applicable.
+If <code>--launcher.appendVmargs</code> is specified either in the <code>eclipse.ini</code> file,
+or on the command line, the <code>-vmargs</code> settings of the command line are added
+to the <code>eclipse.ini</code> file <code>-vmargs</code> instead of replacing them.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="performance-tweak-perf-settings-practical">Practical hints to solve performance and memory problems</h4>
+<div class="paragraph">
+<p>
+In general, giving Java extra memory only makes it perform better. As such,
+increasing the maximum Java object heap size (<code>-Xmx</code>), is generally a good
+idea, if you have enough free memory.</p>
+</div>
+<div class="paragraph">
+<p>
+If you actually run out of memory, Java will emit a
+<code>java.lang.OutOfMemoryError</code>, with a message to indicate the type of memory
+that was insufficient. Below some common out of memory error message are
+listed, with possible solutions:</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>java.lang.OutOfMemoryError: Java heap space</code></p>
+<div class="paragraph">
+<p>The Java object heap needs more space. Increase the maximum Java object heap
+size (<code>-Xmx</code> setting).</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>java.lang.OutOfMemoryError: GC overhead limit exceeded</code></p>
+<div class="paragraph">
+<p>The 'use garbage collector overhead limit' feature is enabled, and the
+garbage collector overhead limit was exceeded. The best way to solve this,
+is to make sure the limit is not exceeded, by giving Java more memory, and
+thus making it easier for the garbage collector to do its work. Increase the
+maximum Java object heap size (<code>-Xmx</code> setting).</p>
+</div>
+<div class="paragraph">
+<p>Alternatively, disable the 'use garbage collector overhead limit' feature
+(<code>-XX:-UseGCOverheadLimit</code> setting, note the <code>-</code> instead of the <code>+</code>).
+However, this doesn&#8217;t solve the underlying problem, as the limit will still
+be exceeded. Java will try to continue, and will either fail, or be very
+slow.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>warning: CodeCache is full. Compiler has been disabled.</code></p>
+<div class="paragraph">
+<p>This message is not a <code>java.lang.OutOfMemoryError</code>, but may still be
+printed to the console. It is usually followed by <code>warning: Try increasing
+the code cache size using -XX:ReservedCodeCacheSize=</code>. The warnings indicate
+that the code cache for native code is full. They already indicate the
+solution: increase the maximum size of the code cache
+(<code>-XX:ReservedCodeCacheSize</code> setting).</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>java.lang.OutOfMemoryError: unable to create new native thread</code></p>
+<div class="paragraph">
+<p>A new thread could not be created. The best way to solve this problem is to
+decrease the maximum Java object heap size (<code>-Xmx</code> setting), to make room
+for the 'Everything else' part of the Java memory, including the stack of the
+new thread.</p>
+</div>
+<div class="paragraph">
+<p>Alternatively, decrease the size of stacks on all threads (<code>-Xss</code> setting).
+However, decreasing the thread stack size may cause more
+<code>java.lang.StackOverflowError</code> errors, and is thus not recommended.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="performance-tweak-perf-settings-heapstatus">Monitoring Eclipse heap status</h4>
+<div class="paragraph">
+<p>In Eclipse, it is possible to observe the amount of Java object heap space that
+is being used. In Eclipse, open the <em>Preferences</em> dialog, via
+<span class="menuseq"><b class="menu">Window</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Preferences</b></span>. Select the <em>General</em> category on the left, if not
+already selected. On the right, make sure the <b class="menuref">Show heap status</b> option is
+checked, and click <b class="button">OK</b> to close the dialog.</p>
+</div>
+<div class="paragraph">
+<p>The heap status should now be displayed in the bottom right corner of the
+Eclipse window:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./performance/eclipse_heap_status1.png" alt="eclipse heap status1">
+</div>
+</div>
+<div class="paragraph">
+<p>This example shows that the Java object heap (not the Java process heap) is
+currently 147 MB in size. Of that 147 MB, 62 MB are in use. The entire graph
+(the gray background) indicates the total heap size (147 MB), while the dark gray
+part indicates the used part of the heap (62 MB).</p>
+</div>
+<div class="paragraph">
+<p>Clicking on the garbage can icon, to the right of the heap status, will trigger
+a major collection cycle of the garbage collector.</p>
+</div>
+<div class="paragraph">
+<p>By right clicking on the heap status, and enabling the <em>Show Max Heap</em> option,
+the heap status shows more information:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./performance/eclipse_heap_status2.png" alt="eclipse heap status2">
+</div>
+</div>
+<div class="paragraph">
+<p>The text still shows the amount of used heap memory (74 MB) out of the total
+size of the current heap (147 MB). The scale of the background colors however,
+is different. The entire graph (the light gray background) now indicates the maximum
+heap size. The orange part indicates the current heap size. The dark gray part
+still indicates the part of the heap that is in use. If the used part of the
+memory gets past the red bar, it will become red as well, to indicate that you
+are approaching the maximum allowed Java object heap size, and may need to
+increase it (<code>-Xmx</code> setting).</p>
+</div>
+<div class="paragraph">
+<p>Hover over the heap status to get the same information in a tooltip.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="performance-tweak-perf-settings-visualvm">Monitoring with VisualVM</h4>
+<div class="paragraph">
+<p>VisualVM is a tool to monitor, troubleshoot, and profile running Java
+applications. It can be downloaded from the
+<a href="https://visualvm.github.io/">VisualVM website</a>.</p>
+</div>
+<div class="paragraph">
+<p>Download the 'Standalone' version, and extract the archive somewhere on your
+system.</p>
+</div>
+<div class="paragraph">
+<p>On Windows, start <code>visualvm.exe</code> from the <code>bin</code> directory by double
+clicking on it. On Linux, start <code>visualvm</code> from the <code>bin</code> directory.
+On macOS, use the <code>.dmg</code> file as you would any other such file.</p>
+</div>
+<div class="paragraph">
+<p>After you start VisualVM for the first time, you may see some dialogs. Just go
+through the steps until you get to the actual application.</p>
+</div>
+<div class="paragraph">
+<p>In VisualVM, you&#8217;ll see the currently running Java applications, for the local
+system:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./performance/visualvm_pid.png" alt="visualvm pid">
+</div>
+</div>
+<div class="paragraph">
+<p>Sometimes VisualVM can identify the Java applications, sometimes it can&#8217;t.
+This may also depend on you operating system, and the version of VisualVM.
+Find the application you want to know more about and double click it. A new
+tab opens on the right. The new tab has various tabs of its own:</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>Overview</em>: provides various basic information, including the
+location of the JVM, its command line settings, etc.</p>
+</li>
+<li>
+<p><em>Monitor</em>: provides a quick overview of among others the CPU usage,
+GC activity, Java object heap usage, number of loaded classes, and the number
+of running threads, over time.</p>
+</li>
+<li>
+<p><em>Threads</em>: provides an overview of the running threads, and their
+status, over time. The <b class="button">Thread Dump</b> button can be used to dump the
+stack traces of all currently running threads.</p>
+</li>
+<li>
+<p><em>Sampler</em> and <em>Profiler</em>: provide CPU and memory
+<a href="https://en.wikipedia.org/wiki/Profiling_%28computer_programming%29">profiling</a>, over
+time, by using sampling and instrumentation respectively.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The <em>Monitor</em> tab can be used to determine which type of memory should be
+increased. The <em>Sampler</em> tab can be used to profile an application, and
+figure out where bottlenecks are. This information can be used
+by the developers of the application to improve the performance of the
+application, by removing those bottlenecks.</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./performance/visualvm_sshot.png" alt="visualvm sshot">
+</div>
+</div>
+<div class="paragraph">
+<p>
+Via <span class="menuseq"><b class="menu">Tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Plugins</b></span> you can access the <em>Plugins</em> window, where you manage
+the plugins. Various plugins are available. The <em>Visual GC</em> plugin is of
+particular interest. After installing it, restart VisualVM, or close the
+tabs of the JVMs you&#8217;re monitoring and open them again. You&#8217;ll get an extra tab
+for monitored JVMs, the <em>Visual GC</em> tab. This tab is somewhat similar to the
+<em>Monitor</em> tab, but shows more detailed information about the garbage collector,
+its various generations, etc.</p>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="developer-chapter-index">Eclipse ESCET development</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Thanks for your interest in Eclipse Supervisory Control Engineering Toolkit
+(Eclipse ESCET) project.</p>
+</div>
+<div class="paragraph">
+<p>For more information about the project, see:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://projects.eclipse.org/projects/technology.escet">Eclipse ESCET project home</a></p>
+</li>
+<li>
+<p><a href="https://eclipse.org/escet">Eclipse ESCET website</a></p>
+</li>
+</ul>
+</div>
+<div id="develop-dev-list" class="paragraph">
+<p>Contact the project developers via the project&#8217;s 'dev' list.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://accounts.eclipse.org/mailing-list/escet-dev">Eclipse ESCET 'dev' list</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For other means to interact with the Eclipse ESCET community and its
+developers, see the <a href="#contact-chapter-index">contact</a> section.</p>
+</div>
+<div class="paragraph">
+<p>Further topics:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#developer-development-process-chapter-index">Development process</a></p>
+</li>
+<li>
+<p><a href="#developer-contributing-chapter-index">Contributing</a></p>
+</li>
+<li>
+<p><a href="#developer-issue-tracking-chapter-index">Issue tracking</a></p>
+</li>
+<li>
+<p><a href="#developer-dev-env-setup-chapter-index">Development environment setup</a></p>
+</li>
+<li>
+<p><a href="#developer-git-repo-chapter-index">Git repository</a></p>
+</li>
+<li>
+<p><a href="#developer-coding-standards-chapter-index">Coding standards</a></p>
+</li>
+<li>
+<p><a href="#developer-building-and-testing-chapter-index">Building and testing</a></p>
+</li>
+<li>
+<p><a href="#developer-release-process-chapter-index">Release process</a></p>
+</li>
+<li>
+<p><a href="#developer-third-party-tools-chapter-index">Third party tools</a></p>
+</li>
+<li>
+<p><a href="#developer-upgrade-instructions-chapter-index">Upgrade instructions</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect2">
+<h3 id="developer-development-process-chapter-index">Development process</h3>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+If you want to contribute to the Eclipse ESCET project, please refer to
+the specific <a href="#developer-contributing-chapter-index">contributing</a> information.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The Eclipse ESCET project primarily uses GitLab for its development:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://gitlab.eclipse.org/eclipse/escet/escet">Eclipse ESCET GitLab</a></p>
+</li>
+</ul>
+</div>
+<div class="sect3">
+<h4 id="developer-discussion">Discussion</h4>
+<div class="paragraph">
+<p>It is often a good idea to first discuss new ideas and features with the rest
+of the project developers, i.e. the project committers and the project
+community. Discussions can take place on the project&#8217;s
+<a href="#developer-chapter-index">'dev' list</a>, especially for radical
+new ideas and new features that have not been discussed before.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="developer-issue-tracking">Issue tracking</h4>
+<div class="paragraph">
+<p>If the project committers and the community agree that it is a good idea
+to have the new feature, an issue should be created in the
+<a href="#developer-issue-tracking-chapter-index">issue tracker</a>. For improvements
+where extensive discussion is not expected, as well as for obvious bugs, an
+issue can be created directly, without first discussing it on the 'dev' list.
+The discussion can also continue in the issue itself, once the issue is
+created.</p>
+</div>
+<div class="paragraph">
+<p>When creating an issue, take the following into account:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>An issue must be created in the issue tracker for all development, however
+small. This ensures we can link issues can commits to keep track of
+everything.</p>
+</li>
+<li>
+<p>Issues are ideally kept relatively small in scope. Bigger tasks can be split
+up into multiple issues, and follow-up issues can be created as needed. This
+allows to separate concerns, and also to work in a more agile way, e.g.:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Issues can be addressed more quickly.</p>
+</li>
+<li>
+<p>Merge requests can be reviewed more easily as they are not as big.</p>
+</li>
+<li>
+<p>Merge issues are less likely to occur, as branches have a shorter lifespan.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>If a new feature is split up into multiple issues, these can be related
+together using an epic. In such cases, add the issues to the epic to track
+the progress of the new feature using the epic.</p>
+</li>
+<li>
+<p>Attach the appropriate
+<a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/labels">predefined labels</a>
+to the issue:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Either something is broken ('Bug' label) or we want something more,
+different, better, etc ('Enhancement' label).</p>
+</li>
+<li>
+<p>Add all relevant component labels (e.g. 'Chi' and 'CIF' labels). Typically
+at least one such label should be present, but it is also possible to add
+multiple labels if the issue involves multiple components. The components
+correspond to the directories in the root of our
+<a href="#developer-git-repo-chapter-index">Git repository</a>.</p>
+</li>
+<li>
+<p>The Eclipse ESCET project committers can add the 'Help Wanted' label to an
+issue to indicate that they don&#8217;t have the time to work on the issue, and that
+help from the community is wanted.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Link the issue to any other issues, as relevant, e.g. if an issue requires
+that another issue is addressed first.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="developer-releases-and-milestones">Releases and milestones</h4>
+<div class="paragraph">
+<p>For every software version a GitLab milestone is created, to track its scope and
+progress. First the scope is discussed and agreed upon. Then, a
+GitLab milestone is created, the relevant issues are created if not yet
+present, and the issues are associated with the milestone. The issues can
+then be picked up to be addressed.</p>
+</div>
+<div class="paragraph">
+<p>A single GitLab milestone is used per software version. Each software version
+has one or more milestone releases, followed by one or more release candidates,
+and is completed by a final release.</p>
+</div>
+<div class="paragraph">
+<p>See also:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/milestones">Eclipse ESCET milestones</a></p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
+<h4 id="developer-working-on-issues">Working on issues</h4>
+<div class="paragraph">
+<p>The process to work on issues is as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Unassigned issues can be picked up.</p>
+</li>
+<li>
+<p>Assign yourself to the issue when you are working on an issue, such
+that others won&#8217;t start working on it as well.</p>
+</li>
+<li>
+<p>Unassign yourself if you are no longer working on an issue, don&#8217;t plan to
+continue, and the issue is not finished.</p>
+</li>
+<li>
+<p>Don&#8217;t unassign yourself after finishing the work, just close the issue.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="developer-working-with-branches">Working with branches</h4>
+<div class="paragraph">
+<p>The Eclipse ESCET project roughly follows the
+<a href="https://nvie.com/posts/a-successful-git-branching-model/">GitFlow branching model</a>.
+The <code>master</code> branch is thus for released content only, and the current development
+status is captured in the <code>develop</code> branch.</p>
+</div>
+<div class="paragraph">
+<p>If possible, we approach the somewhat heavy GitFlow branching model in a
+practical way, reducing overhead.</p>
+</div>
+<div class="paragraph">
+<p>When creating and working with branches, consider the following:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Always work in a branch for the issue. That is, never commit directly to the
+<code>develop</code> branch, but always use a merge request from a feature branch.</p>
+</li>
+<li>
+<p>Branches for work on issues (feature branches) should be relatively short
+lived. This makes it easier to keep the overview, allows for more agile
+development, and reduces the chance for merge conflicts.</p>
+</li>
+<li>
+<p>The GitFlow branching model allows for sub teams that share work but don&#8217;t
+push that to 'origin' (yet). It also allows feature branches that live only
+locally on a developer&#8217;s PC and not on 'origin'. To be transparent, Eclipse
+Foundation open source projects don&#8217;t do this. We push to our GitLab server
+regularly, to ensure that the community can see what the project is working on.</p>
+</li>
+<li>
+<p>We have no strict branch naming rules. You can Let GitLab create the branch
+for the issue. For an issue with number #2 named 'Test', it will create a
+branch named <code>2-test</code>. This includes the issue number, which makes it easy to
+relate a branch to an issue, without having to look inside the branch for
+commits (if there even are any). It also includes the issue name, which is
+convenient as it indicates what the branch is about, without having to look
+up the issue.</p>
+</li>
+<li>
+<p>There are many ways to create a branch. One way is to create it from the
+GitLab issue. On the web page for a GitLab issue, there is a
+<em>Create merge request</em> button. Select the arrow to the right of it to
+show more options. Select <em>Create branch</em>. Adapt the <em>Branch name</em> and
+<em>Source</em> as needed. Typically the defaults suffice. Click the
+<em>Create branch</em> button to create the branch.</p>
+</li>
+<li>
+<p>We prefer not to create a draft merge request with the creation of the
+branch, as then commits in the branch lead to commits on the merge requests,
+which lead to notification emails.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="developer-commits">Commits</h4>
+<div class="paragraph">
+<p>As is standard for Git commits, the first line of the commit message must be
+a short summary, and must not exceed 72 characters.</p>
+</div>
+<div class="paragraph">
+<p>For the Eclipse ESCET project, this line must start with the issue number,
+to allow GitLab to link commits to issues. For instance: <code>#1 commit summary</code>.
+In case a commit relates to multiple issues, list each of them, e.g.
+<code>#1 #2 commit summary</code>. Merge commits are exempt from this rule.</p>
+</div>
+<div class="paragraph">
+<p>Furthermore, all commits must adhere to the requirements as defined by the
+Eclipse Foundation:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://www.eclipse.org/projects/handbook/#resources-commit">Git Commit Records</a>
+(Eclipse Foundation Project Handbook)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If you are not an Eclipse ESCET project committer, with write access to our
+Git repository, see the information on
+<a href="#developer-contributing-chapter-index">contributing</a> to the Eclipse ESCET
+project.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="developer-merge-requests">Merge requests</h4>
+<div class="paragraph">
+<p>Once the work on an issue is done and pushed to a branch, it must be reviewed
+before it is merged back. Reviews are done via merge requests. The process is
+as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Create a merge request for merging the branch.
+You can create a merge request from the Eclipse ESCET Gitlab
+<a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/branches">Branches page</a>.
+Select the <em>Merge request</em> button next to the branch to be merged.</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Typically a branch is created from and merged back to the <code>develop</code> branch,
+but this can be changed if needed.</p>
+</li>
+<li>
+<p>Start the merge request title with the related issue number(s), to allow
+easier tracking of merge requests back to issues.</p>
+</li>
+<li>
+<p>If you include <code>Closes #nnn</code> in the description of the merge request,
+with <code>nnn</code> an issue number, that issue will automatically be closed once the
+merge request is merged. Use <code>Addresses #nnn</code> instead, if the merge request
+addresses part of the issue, but work remains, to prevent the issue from
+being closed. Always include either of them to ensure the merge request is
+properly linked to the issues it addresses. Include multiple of them if
+appropriate.</p>
+</li>
+<li>
+<p>It is not mandatory to select <em>assignees</em>, <em>reviewers</em>, etc.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>The merge request is reviewed by the Eclipse ESCET project committers.</p>
+</li>
+<li>
+<p>Improvements are made as necessary, reviewed again, etc, until the branch
+is considered to be ready to merge.</p>
+</li>
+<li>
+<p>The branch is merged and removed.</p>
+</li>
+<li>
+<p>If the branch fully addressed the associated issue or issues, it/they
+should be closed.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If you are not an Eclipse ESCET project committer, with write access to our
+Git repository, see the information on
+<a href="#developer-contributing-chapter-index">contributing</a> to the Eclipse ESCET
+project.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="developer-contributing-chapter-index">Contributing</h3>
+<div class="paragraph">
+<p>Thanks for your interest in Eclipse Supervisory Control Engineering Toolkit
+(Eclipse ESCET) project.</p>
+</div>
+<div class="paragraph">
+<p>It is often a good idea to first discuss your contribution with the project&#8217;s
+community and committers, before creating the actual code (e.g. patches),
+documentation, etc of your contribution. Discussions can take place via an
+<a href="#developer-issue-tracking-chapter-index">issue</a> in the issue tracker, or on
+the project&#8217;s <a href="#developer-chapter-index">'dev' list</a>.</p>
+</div>
+<div class="paragraph">
+<p>To contribute your actual contribution, e.g. code, documentation, examples,
+or anything else to the project, please first create an issue in the
+<a href="#developer-issue-tracking-chapter-index">issue tracker</a>.</p>
+</div>
+<div class="paragraph">
+<p>The easiest way to contribute the actual contribution, is to use GitLab:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Ensure you&#8217;re logged in to the Eclipse Foundation GitLab:</p>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://gitlab.eclipse.org">Eclipse Foundation GitLab</a></p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Clone the official Eclipse ESCET Git repository.
+You can click the 'Fork' button at the top right of the page.
+This creates a fork of the official repository under your own
+account.</p>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://gitlab.eclipse.org/eclipse/escet/escet">Official Eclipse ESCET Git repository</a></p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Make your changes in the forked repository under your own account.</p>
+</li>
+<li>
+<p>Create a merge request of those changes from the forked repository under
+your own account. As the target, select the official Eclipse ESCET repository
+from which you forked earlier. Typically, you should target the <code>develop</code>
+branch.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="paragraph">
+<p>Before your contribution can be accepted by the project team, you must
+electronically sign the Eclipse Contributor Agreement (ECA):</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://www.eclipse.org/legal/ECA.php">Eclipse Contributor Agreement (ECA)</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The non-committer that authored the commit, must have an Eclipse Foundation Account
+and must have a signed Eclipse Contributor Agreement (ECA) on file. The email address
+of the author must match the email address on the Eclipse Foundation Account.</p>
+</div>
+<div class="paragraph">
+<p>For more information, including the specific format of commit messages,
+please see the Eclipse Foundation Project Handbook:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://www.eclipse.org/projects/handbook">Eclipse Foundation Project Handbook</a></p>
+</li>
+<li>
+<p><a href="https://www.eclipse.org/projects/handbook/#resources-commit">Git Commit Records</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Always start a commit message with the issue number, e.g.
+<code>#1 Some commit message</code>.</p>
+</div>
+<div class="paragraph">
+<p>A contribution by a non-committer will be reviewed by the project committers.
+This includes adherence to the project&#8217;s
+<a href="#developer-coding-standards-chapter-index">coding standards</a>. Discussions
+regarding the contribution will take place in the associated issue and/or
+merge request. If the committers agree with the contribution, they will commit
+the contribution into the project&#8217;s Git repository.</p>
+</div>
+<div class="paragraph">
+<p>Remember that contributions are always welcome, and contributions don&#8217;t have
+to be perfect. The project&#8217;s developers can help to improve your contribution.
+If you need any help, just ask the project&#8217;s developers using the issue or the
+project&#8217;s <a href="#develop-dev-list">'dev' list</a>.</p>
+</div>
+<div class="paragraph">
+<p>See for more information our
+<a href="#developer-development-process-chapter-index">development process</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="developer-issue-tracking-chapter-index">Issue tracking</h3>
+<div class="paragraph">
+<p>The Eclipse ESCET project uses GitLab to track ongoing development and
+issues:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/milestones">Eclipse ESCET milestones</a></p>
+</li>
+<li>
+<p><a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/issues">Eclipse ESCET issues</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Be sure to search for existing issues before you create another one. Remember
+that contributions are always welcome!</p>
+</div>
+<div class="paragraph">
+<p>To contribute code (e.g. patches), documentation, or anything else, see the
+<a href="#developer-contributing-chapter-index">contributing</a> section.</p>
+</div>
+<div class="paragraph">
+<p>To understand how we work with issues, see our
+<a href="#developer-development-process-chapter-index">development process</a>.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="developer-dev-env-setup-chapter-index">Development environment setup</h3>
+<div class="paragraph">
+<p>Follow these instructions to set up an Eclipse ESCET development environment.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="paragraph">
+<p>Get the Eclipse Installer:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Go to <a href="https://www.eclipse.org/" class="bare">https://www.eclipse.org/</a> in a browser.</p>
+</li>
+<li>
+<p>Click on the big <b class="button">Download</b> button at the top right.</p>
+</li>
+<li>
+<p>Download Eclipse Installer, 64 bit edition, using the <b class="button">Download 64 bit</b>
+button.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="paragraph">
+<p>To create a development environment for the first time:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Start the Eclipse Installer that you downloaded.</p>
+</li>
+<li>
+<p>Use the hamburger menu at the top right to switch to advanced mode.</p>
+</li>
+<li>
+<p>For Windows:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>When asked to keep the installer in a permanent location, choose to do so.
+Select a directory of your choosing.</p>
+</li>
+<li>
+<p>The Eclipse installer will start automatically in advanced mode, from the
+new permanent location.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>For Linux:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>The Eclipse installer will restart in advanced mode.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Continue with non-first time instructions for setting up a development
+environment.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>To create a development environment for a non-first time:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In the first wizard window:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Select <em>Eclipse Platform</em> from the big list at the top.</p>
+</li>
+<li>
+<p>Select <em>2021-03</em> for <em>Product Version</em>.</p>
+</li>
+<li>
+<p>For <em>Java 11+ VM</em> select
+<em>JRE 11.0.2 - http://download.eclipse.org/justj/jres/11/updates/release/11.0.2</em>.</p>
+</li>
+<li>
+<p>Choose whether you want a P2 bundle pool (recommended).</p>
+</li>
+<li>
+<p>Click <b class="button">Next</b>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>In the second wizard window:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Use the green '+' icon at the top right to add the Oomph setup.</p>
+<div class="ulist">
+<ul>
+<li>
+<p>For <em>Catalog</em>, choose <em>Eclipse Projects</em>.</p>
+</li>
+<li>
+<p>For <em>Resource URIs</em>, enter
+<code>https://gitlab.eclipse.org/eclipse/escet/escet/-/raw/develop/org.eclipse.escet.setup</code>
+and make sure there are no spaces before or after the URL.</p>
+</li>
+<li>
+<p>Click <b class="button">OK</b>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Check the checkbox for <em>Eclipse ESCET</em>, from the big list. It is under <em>Eclipse
+Projects</em> / <em>&lt;User&gt;</em>.</p>
+</li>
+<li>
+<p>At the bottom right, select the <em>develop</em> stream.</p>
+</li>
+<li>
+<p>Click <b class="button">Next</b>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>In the third wizard window:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Enable the <em>Show all variables</em> option to show all options.</p>
+</li>
+<li>
+<p>Choose a <em>Root install folder</em> and <em>Installation folder name</em>.
+The new development environment will be put at
+<code>&lt;root_installation_folder&gt;/&lt;installation_folder_name&gt;</code>.</p>
+</li>
+<li>
+<p>For <em>Eclipse Foundation account full name</em> fill in your full name (first
+and last name) matching the full name in your Eclipse Foundation account.
+This will be used as name for Git commits.</p>
+</li>
+<li>
+<p>For <em>Eclipse Foundation account email address</em> fill in the email address
+associated with your Eclipse Foundation account. This will be used as email
+for Git commits.</p>
+</li>
+<li>
+<p>Click <b class="button">Next</b>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>In the fourth wizard window:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Select <b class="button">Finish</b>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Wait for the setup to complete and the development environment to be
+launched.</p>
+<div class="ulist">
+<ul>
+<li>
+<p>If asked, accept any licenses and certificates.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Press <b class="button">Finish</b> in the Eclipse Installer to close the Eclipse Installer.</p>
+</li>
+<li>
+<p>In the new development environment, observe Oomph executing the startup
+tasks (such as Git clone, importing projects, etc). If this is not
+automatically shown, click the rotating arrows icon in the status bar
+(bottom right) of the new development environment.</p>
+</li>
+<li>
+<p>Wait for the startup tasks to finish successfully.</p>
+</li>
+<li>
+<p>NOTE: If you don&#8217;t open the Oomph dialog, the status bar icon icon may
+disappear when the tasks are successfully completed.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>If you have any issues during setting up the development environment, consider
+the following:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Make sure to use a recent version of the Eclipse Installer. These versions
+include a recent JRE, which includes up-to-date certificates, preventing issues
+when accessing https URLs.</p>
+</li>
+<li>
+<p>You can set the following environment variables to force the use of IPv4, in
+case of any issues accessing/downloading remote files:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>_JAVA_OPTIONS=-Djava.net.preferIPv4Stack=true
+_JPI_VM_OPTIONS=-Djava.net.preferIPv4Stack=true</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>After setting them, make sure to fully close the Eclipse Installer and then
+start it again, for the changes to be picked up.</p>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In your new development environment, consider changing the following settings:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>For the <em>Package Explorer</em> <a href="#use-terminology-view">view</a>:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Enable the <em>Link with Editor</em> setting, using the
+<span class="image"><img src="./developer/link-with-editor.png" alt="link with editor"></span> icon.</p>
+</li>
+<li>
+<p>Enable showing resources (files/folders) with names starting with a period.
+Open the <em>View Menu</em> (<span class="image"><img src="./developer/view-menu.png" alt="view menu"></span>) and choose
+<b class="menuref">Filters&#8230;&#8203;</b>. Uncheck the <code>.* resources</code> option and click <b class="button">OK</b>.</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="developer-git-repo-chapter-index">Git repository</h3>
+<div class="paragraph">
+<p>The Eclipse ESCET project maintains the following source code repositories:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>https://gitlab.eclipse.org/eclipse/escet/escet.git</code></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>These can also be accessed via a web interface:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://gitlab.eclipse.org/eclipse/escet/escet">Eclipse ESCET GitLab</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="paragraph">
+<p>The software is written in the <a href="https://www.oracle.com/java/">Java</a> programming
+language, as a collection of <a href="https://www.eclipse.org/pde/">Eclipse plugins</a>,
+and using the <a href="https://www.eclipse.org/modeling/emf/">Eclipse Modeling Framework</a>
+(EMF).</p>
+</div>
+<div class="paragraph">
+<p>For ease of programming, the <a href="https://eclipse.org">Eclipse IDE</a> is recommended.
+See also the section on
+<a href="#developer-dev-env-setup-chapter-index">setting up a development environment</a>.</p>
+</div>
+<div class="paragraph">
+<p>To contribute code (e.g. patches), documentation, or anything else, see the
+<a href="#developer-contributing-chapter-index">contributing</a> section.</p>
+</div>
+<div class="paragraph">
+<p>The way we work with our Git repository is explained as part of our
+<a href="#developer-development-process-chapter-index">development process</a>.</p>
+</div>
+<div class="sect3">
+<h4 id="developer-repository-structure">Repository structure</h4>
+<div class="paragraph">
+<p>In the Eclipse ESCET source code repository (Git repository), three layers are
+distinguished:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The top layer contains user-oriented languages for designing controllers.
+Currently there are two modeling languages in this layer,
+<a href="#intro-chapter-cif">CIF</a> and <a href="#intro-chapter-chi">Chi</a>.</p>
+<div class="paragraph">
+<p>The third language in the top layer is <a href="#intro-chapter-tooldef">ToolDef</a>, a
+cross-platform scripting language to run tests, and to automate the various
+tools that need to be executed while designing a controller.</p>
+</div>
+</li>
+<li>
+<p>The middle layer contains developer oriented support code.
+It has a language of its own, named <a href="#intro-chapter-setext">SeText</a>. This
+language implements an LALR(1) parser generator with a few twists to make it
+easy to use in a Java environment and to connect it to an Eclipse text editor.</p>
+<div class="paragraph">
+<p>The other part of the middle layer is common functionality shared between the
+languages.</p>
+</div>
+</li>
+<li>
+<p>The bottom layer is mostly configuration to attach the software to the Eclipse
+platform, including build and release engineering.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>This document describes the structure of the top and middle layers. For the
+bottom layer, standard Eclipse and Maven/Tycho tools are used, which are
+described elsewhere.</p>
+</div>
+<div class="paragraph">
+<p>The three layers are not further distinguished in the repository. Instead,
+different parts are stored in different sub-directories from the root.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="developer-language-directories">Language directories</h4>
+<div class="paragraph">
+<p>Each language has its own subdirectory in the root, <code>/cif</code> and <code>/chi</code> for the
+<a href="#intro-chapter-cif">CIF</a> and <a href="#intro-chapter-chi">Chi</a> modeling languages,
+<code>/tooldef</code> for the <a href="#intro-chapter-tooldef">ToolDef</a> language,
+and <code>/setext</code> for the <a href="#intro-chapter-setext">SeText</a> language.</p>
+</div>
+<div class="paragraph">
+<p>Within a language directory, a directory exists for each part of the code
+(often equivalent to a plugin), with the same name as the plugin.
+The pattern of a plugin name is <code>org.eclipse.escet.&lt;language&gt;.&lt;plugin-name&gt;</code>
+where the plugin-name in different directories has the same meaning.
+A non-exhaustive list:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 80%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Plugin name</th>
+<th class="tableblock halign-left valign-top">Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>documentation</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">User-oriented documentation about the language, such as a user manual or a
+reference manual.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>metamodel</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Ecore metamodel back bone of the language. Model classes for the central
+data structure that all tools of the language use.
+Often generated using modeling tools such as Sirius, but manually written
+classes exist as well.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>metamodel.java</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Generated Java constructor and walker classes for the Ecore metamodel data
+structure.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>parser</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">SeText input, and generated or manually written code to parse
+an input file and convert it to an tree of classes that can be given to the
+type checker.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>typechecker</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Implementation of the type checker to check the parsed input, and annotate
+it with derived information, resulting in an model instance that can be used
+by all tools of the language.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>io</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Text file loading, parsing, and type checking, and possibly writing result
+specifications.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>texteditor</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Code for editing source files of the language in an text Eclipse editor,
+with folding, syntax highlighting, and reporting of errors and warnings in
+the specification.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>tests</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Collection of tests to check the tools for the language. Typically a set
+of input specifications, a set of expected output files, and a
+<a href="#intro-chapter-tooldef">ToolDef</a> script to run the tests. These tests can
+be seen as integration tests.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>&lt;plugin-name&gt;.tests</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Unit tests for that specific plugin.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>codegen</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Code generator to convert the input specification to a runnable model.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>runtime</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Support libraries used by the runnable model.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>tooldefs</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Interface definitions to make tools of the language available for
+<a href="#intro-chapter-tooldef">ToolDef</a>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>common</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Common functionality used by many tools of the language.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Other plugin names are often tools with the same name.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="developer-middle-layer-common-functionality">Middle layer common functionality</h4>
+<div class="paragraph">
+<p>The common code between all languages is stored in the <code>/common</code> directory,
+again with full name of the plugin as sub-directory names.
+These plugins contain:</p>
+</div>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 66.6667%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Plugin name</th>
+<th class="tableblock halign-left valign-top">Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.app.framework</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Common <a href="#app-framework-chapter-index">application framework</a>.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.app.framework.appsview.ui</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The <a href="#use-apps-view">Applications view</a>. User interface of the active
+applications.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.box</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Library to generate formatted code-like text.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.eclipse.ui</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Common Eclipse User Interface code.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.emf</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Common <em>EMF</em> code.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.emf.ecore.codegen</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Code generators from <em>Ecore</em> files.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.emf.ecore.validation</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Common <em>EMF</em> validation code.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.emf.ecore.xmi</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Common <em>EMF</em> <em>XMI</em> serialization code.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.java</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Common <em>Java</em> functions and classes, in particular the <em>Lists</em>, <em>Sets</em>,
+<em>Maps</em> and <em>Strings</em> classes.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.position.common</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Common functions for (text-file) positions in source files.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.position.metamodel</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The Ecore metamodel for (text-file) positions in source files.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.svg</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Common <em>SVG</em> library for viewing and manipulating <em>SVG</em> trees.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.eclipse.escet.common.typechecker</code></p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Common type checker functionality.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="developer-coding-standards-chapter-index">Coding standards</h3>
+<div class="paragraph">
+<p>The Eclipse ESCET
+<a href="#developer-dev-env-setup-chapter-index">development environment</a>
+has some features that allow developing high quality contributions:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>A Java formatter profile is included. It allows to automatically
+format Java code for consistency and convenience.</p>
+</li>
+<li>
+<p>The <a href="https://checkstyle.org/eclipse-cs">Eclipse Checkstyle Plugin</a> and
+a Checkstyle configuration are included. They can be used to detect various
+other issues in Java code and other files.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For all contributions to the Eclipse ESCET project, check the following:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>All Java code should be formatted using the provided formatting profile.</p>
+</li>
+<li>
+<p>All contributions should be checked using the provided Checkstyle
+configuration.</p>
+</li>
+<li>
+<p>All contributions should be free of warnings and errors, when working
+with them in the Eclipse ESCET development environment.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Remember that <a href="#developer-contributing-chapter-index">contributions</a> are
+always welcome, and contributions don&#8217;t have to be perfect. The project&#8217;s
+developers can help to improve your contribution, and ensure it adheres to
+these coding standards.</p>
+</div>
+<div class="paragraph">
+<p>For any questions regarding these coding standards, please
+<a href="#developer-chapter-index">contact</a> the project&#8217;s developers.</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="developer-building-and-testing-chapter-index">Building and testing</h3>
+<div class="paragraph">
+<p>The Eclipse ESCET software can be built using Maven/Tycho. The build will
+build every individual plugin and feature, as well as the update site,
+product and all documentation. Manually run it in one of the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>In an Eclipse-based
+<a href="#developer-dev-env-setup-chapter-index">development environment</a>,
+select <span class="menuseq"><b class="menu">Run</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Run Configurations&#8230;&#8203;</b></span> to open the <em>Run Configurations</em>
+dialog. From the list at the left, under <em>Maven Build</em>, select the
+<em>build</em> launch configuration, and click the <b class="button">Run</b> button to run
+the build.</p>
+<div class="paragraph">
+<p>Additional launch configurations are available to build documentation
+projects separately.</p>
+</div>
+</li>
+<li>
+<p>On Windows, in a command prompt, with the root of the Git repository as
+current directory, enter <code>.\build.cmd</code> and press <kbd>ENTER</kbd>.
+This requires Maven to be available on your system (to be on your <code>PATH</code>).</p>
+</li>
+<li>
+<p>On Linux/macOS, in a shell, with the root of the Git repository as
+current directory, enter <code>./build.sh</code> and press <kbd>ENTER</kbd>.
+This requires Maven to be available on your system (to be on your <code>PATH</code>).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Builds are in certain cases also automatically executed on our build server:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://ci.eclipse.org/escet/">Eclipse ESCET Jenkins server</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Run tests in one of the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>As part of the build, all tests will be performed as well.</p>
+</li>
+<li>
+<p>Launch configurations to run the integration/regression tests for a specific
+language are also available, under the <em>JUnit Plug-in Test</em> section of the
+<em>Run Configurations</em> dialog.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="developer-release-process-chapter-index">Release process</h3>
+<div class="paragraph">
+<p>The process for working on, and releasing a new version of the Eclipse ESCET tools, involves the
+following steps:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Prepare the Git repository for the next version (not a milestone or release
+candidate):</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Run in the root of the Git repository the command
+<code>./mvn_escet.sh org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=&lt;new-version&gt;</code>,
+where <code>&lt;new-version&gt;</code> is replaced by the new version, e.g. <code>0.2.0.qualifier</code>.
+This replaces most version numbers automatically. Check all changes to ensure
+no versions are updated that should not be updated.</p>
+</li>
+<li>
+<p>Verify that the <code>feature</code> <code>url</code> and <code>version</code> of all <code>org.eclipse.escet.*</code>
+features in <code>org.eclipse.escet.product/category.xml</code> are properly updated.
+The old version should no longer be present. This should be automatic.</p>
+</li>
+<li>
+<p>Verify that the <code>product</code> <code>version</code> in
+<code>org.eclipse.escet.product/escet.product</code> is properly updated.
+The old version should no longer be present. This should be automatic.</p>
+</li>
+<li>
+<p>Verify that the <code>feature</code> <code>version</code> of the product feature in
+<code>org.eclipse.escet.product/escet.product</code> is properly updated.
+The old version should no longer be present. This should be automatic.</p>
+</li>
+<li>
+<p>Verify that the <code>Bundle-Version</code> of all <code>MANIFEST.MF</code> files in
+<code>org.eclipse.escet.*</code> projects are properly updated. The old version should
+no longer be present. This should be automatic.</p>
+</li>
+<li>
+<p>Manually replace in all <code>MANIFEST.MF</code> files the regex
+<code>org\.eclipse\.escet\.([a-z0-9\.]+);bundle-version="&lt;old-version&gt;"</code> by
+<code>org.eclipse.escet.\1;bundle-version="&lt;new-version&gt;"</code>, where
+<code>&lt;old-version&gt;</code> and <code>&lt;new-version&gt;</code> are replaced by actual versions,
+e.g. <code>0.1.0</code>. Check for unintended changes.
+Search for the old version in all manifests to ensure none remain.</p>
+</li>
+<li>
+<p>In all documentation sets, add a new section to the release notes for the
+new release, before the existing releases:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code>=== Version 0.2
+
+TBD</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>Verify that the <code>&lt;version&gt;</code> of a POM and its parent in each <code>pom.xml</code> are
+properly updated. The old version should no longer be present. This should
+mostly be automatic. Manually adapt it where necessary.</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Manually adapt the version in <code>org.eclipse.escet.configuration/pom.xml</code>.</p>
+</li>
+<li>
+<p>Manually adapt the parent version in <code>org.eclipse.escet.root/pom.xml</code>.
+Also remove the version for the pom itself, to prevent a warning that the
+version of the pom and its parent are identical.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Manually adapt the <code>&lt;version&gt;</code> of the target platform in
+<code>org.eclipse.escet.configuration/pom.xml</code>.</p>
+</li>
+<li>
+<p>Verify that the <code>version</code> of all <code>feature.xml</code> files in
+<code>org.eclipse.escet.*</code> projects .xml` are properly updated.
+The old version should no longer be present. This should
+mostly be automatic. Manually adapt it where necessary.</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Manually adapt the <code>version</code> of the <code>org.eclipse.escet.license.mit</code>
+feature.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Manually replace in all <code>feature.xml</code> files the literal text
+<code>license-feature-version="&lt;old-version&gt;"</code> by
+<code>license-feature-version="&lt;new-version&gt;"</code>, where <code>&lt;old-version&gt;</code> and
+<code>&lt;new-version&gt;</code> are replaced by actual versions, e.g. <code>0.1.0.qualifier</code>.
+Check for unintended changes.</p>
+</li>
+<li>
+<p>Manually replace in all <code>feature.xml</code> files the regex
+<code>&lt;import feature="([^"]+)" version="&lt;old-version&gt;"/&gt;</code> by
+<code>&lt;import feature="\1" version="&lt;new-version&gt;"/&gt;</code>, where <code>&lt;old-version&gt;</code> and
+<code>&lt;new-version&gt;</code> are replaced by actual versions, e.g. <code>0.1.0.qualifier</code>.
+Check for unintended changes.</p>
+</li>
+<li>
+<p>Manually search for the old version in all <code>features.xml</code> files to ensure
+none remain.</p>
+</li>
+<li>
+<p>Search the entire Git repository (all projects) for the old version number
+and update anything that still requires updating.</p>
+</li>
+<li>
+<p>Test that the <a href="#developer-building-and-testing-chapter-index">build works</a>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Prepare for the next release in the <code>develop</code> branch until it is ready to be
+released.</p>
+</li>
+<li>
+<p>Create a GitLab merge request from <code>develop</code> to <code>master</code>, and merge it.
+Since <code>master</code> is a protected branch for the Eclipse ESCET GitLab, a GitLab
+merge request is the only way to update it.</p>
+</li>
+<li>
+<p>Check that the build on <code>master</code> succeeds in Jenkins.</p>
+</li>
+<li>
+<p>Add a tag on the commit in <code>master</code> that is to be released. Only version
+tags with a specific syntax will be picked up by Jenkins to be released.
+For instance, use <code>v0.1</code>, <code>v0.1.1</code>, <code>v2.0</code>, etc for releases, <code>v0.1-M1</code>
+for a milestone build, or <code>v0.1-RC1</code> for a release candidate.</p>
+<div class="paragraph">
+<p>Add the tag via GitLab, at
+<a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/tags/new" class="bare">https://gitlab.eclipse.org/eclipse/escet/escet/-/tags/new</a>. Use the
+<em>Tag name</em> also as <em>Message</em>. Make sure to select <code>master</code> as branch from
+which to create the tag. For the <em>Release notes</em>, use a short text inspired
+by the release plan.</p>
+</div>
+<div class="paragraph">
+<p>As an example, consider milestone 1 of release v0.1: see
+<a href="https://projects.eclipse.org/projects/technology.escet/releases/0.1" class="bare">https://projects.eclipse.org/projects/technology.escet/releases/0.1</a> for the
+release plan, <a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/tags/v0.1-M1" class="bare">https://gitlab.eclipse.org/eclipse/escet/escet/-/tags/v0.1-M1</a>
+for the tag and
+<a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/releases/v0.1-M1" class="bare">https://gitlab.eclipse.org/eclipse/escet/escet/-/releases/v0.1-M1</a> for the
+GitLab release record.</p>
+</div>
+</li>
+<li>
+<p>Edit the GitLab release record, adding the GitLab milestone to the
+release record. Save the changes.</p>
+</li>
+<li>
+<p>Jenkins will automatically pick up the new tag. Log in to Jenkins and
+manually trigger a build for the tag. Jenkins will then automatically build
+and release a new version from that tag.</p>
+</li>
+<li>
+<p>All releases can be downloaded at <a href="https://download.eclipse.org/escet/" class="bare">https://download.eclipse.org/escet/</a>.
+For a version <code>v0.1</code>, the downloads will be located at
+<code>https://download.eclipse.org/escet/v0.1</code>.</p>
+<div class="paragraph">
+<p>Note that according to the Eclipse Foundation Wiki page
+<a href="https://wiki.eclipse.org/IT_Infrastructure_Doc">IT Infrastructure Doc</a>,
+"Once your files are on the <code>download.eclipse.org</code> server, they are
+immediately available to the general public. However, for release builds,
+we ask that you wait at least four hours for our mirror sites to fetch the
+new files before linking to them. It typically takes a day or two for all
+the mirror sites to synchronize with us and get new files."</p>
+</div>
+<div class="paragraph">
+<p>That same wiki page also notes that "Although you can link directly to
+<code>download.eclipse.org/yourfile.zip</code>, you can also use the <em>Find a Mirror</em>
+script [&#8230;&#8203;]. Using this script allows you to view download statistics and
+allows users to pick a nearby mirror site for their download." It further
+indicates that "P2 repositories are not normally accessed via the mirror
+selection script." The <em>Find a Mirror</em> script also transparently handles
+files moved from <code>download.eclipse.org</code> to <code>archive.eclipse.org</code>.</p>
+</div>
+</li>
+<li>
+<p>Jenkins will automatically push the website for the new release to the
+website Git repository, in a directory for the specific release. For a version
+<code>v0.1</code>, the website can be accessed at <code>https://www.eclipse.org/escet/v0.1</code>.
+It may take a few minutes for the Git repository to be synced to the webserver
+and for the website for the new version to become available.</p>
+</li>
+<li>
+<p>If the website for the new release is to be the standard visible website for
+the project (at <code><a href="https://www.eclipse.org/escet" class="bare">https://www.eclipse.org/escet</a></code>), it has to be manually
+replaced. This is to ensure that a bugfix release for an older version doesn&#8217;t
+override the standard visible website. The following steps explain how to
+'promote' a website for a specific version to become the standard visible
+website:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Make sure you&#8217;ve uploaded your SSH public key to Eclipse Gerrit. This is
+a one-time only step. Go to <a href="https://git.eclipse.org/r/" class="bare">https://git.eclipse.org/r/</a>. Sign in using your
+Eclipse Foundation committer account. Use the gear icon at the top right to
+access your account settings. Under <em>SSH Keys</em> add your SSH public key. Also
+make note of your <em>username</em>, <em>Full name</em> and <em>Email</em> address.</p>
+</li>
+<li>
+<p>Clone the Eclipes ESCET website Git repository using
+<code>git clone ssh://&lt;username&gt;@git.eclipse.org:29418/www.eclipse.org/escet.git</code>.
+Make sure to replace <code>&lt;username&gt;</code> by your Eclipse Foundation committer
+account <em>username</em>.</p>
+</li>
+<li>
+<p>In the cloned repository, remove all files/folders in the root of the
+Git repository pertaining to the current standard visible website.
+Be sure not to remove any of the directories with websites for specific
+releases.</p>
+</li>
+<li>
+<p>Copy the files/folders from the directory with the website for the
+release that you want to make the standard visible website, and put them
+in the root of the Git repository.</p>
+</li>
+<li>
+<p>Add all changes to be committed, e.g. by using <code>git add -A</code>.</p>
+</li>
+<li>
+<p>Make sure to use the <em>Full name</em> and <em>Email</em> address of your Eclipse
+Foundation committer account. E.g. use
+<code>git config --local user.name "&lt;full_name&gt;"</code> and
+<code>git config --local user.email "&lt;email&gt;"</code>, replacing <code>&lt;full_name&gt;</code> and
+<code>&lt;email&gt;</code> by the appropriate information matching your Eclipse Foundation
+committer account.</p>
+</li>
+<li>
+<p>Commit the changes. Use as commit message
+<code>Set standard visible website to release &lt;version&gt;.</code>, replacing <code>&lt;version&gt;</code>
+by the release version that will become the new standard visible website.
+Make sure to sign off the commit to pass Eclipse Foundation automatic
+commit validation. E.g. use the following to commit the changes:
+<code>git commit -s -m "Set standard visible website to release v0.1."</code>.</p>
+</li>
+<li>
+<p>Push the changes to the Git server. E.g. use <code>git push</code>. If successful
+you should see the changes at the Git server&#8217;s web view, at
+<a href="https://git.eclipse.org/c/www.eclipse.org/escet.git/" class="bare">https://git.eclipse.org/c/www.eclipse.org/escet.git/</a>.</p>
+</li>
+<li>
+<p>It may take a few minutes for the Git repository to be synced to the
+webserver, and for the new standard visible website to become available.
+The standard visible website can be accessed at
+<code><a href="https://www.eclipse.org/escet" class="bare">https://www.eclipse.org/escet</a></code>. Depending on browser cache settings and
+other factors, it may be necessary to force refresh your browser for it
+to pick up the changes on the server.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Remove/archive old releases:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>For every release (not a milestone or release candidate), remove
+all milestones and release candidates of the previous version and older.
+E.g. for <code>v0.2</code>, remove <code>v0.1-M1</code>, <code>v0.1-M2</code>, <code>v0.1-RC1</code>, etc. Also archive
+all releases older than the current and previous release. E.g. for <code>v0.3</code>
+archive <code>v0.1</code> and older, but keep <code>v0.2</code>.</p>
+<div class="paragraph">
+<p>Consider whether archiving or removing P2 update sites will lead to issues
+for users. See for more information the Eclipse Foundation Wiki page
+<a href="https://wiki.eclipse.org/Equinox/p2/p2.mirrorsURL#Moving_a_repo_to_archive.eclipse.org">Moving
+a repo to archive.eclipse.org</a>.</p>
+</div>
+</li>
+<li>
+<p>Old websites can be removed in a similar way to the above instructions to
+change the default website. Only remove the directory for the milestone
+or release candidate.</p>
+</li>
+<li>
+<p>Older downloads can be archived. Go to <a href="https://download.eclipse.org/escet/" class="bare">https://download.eclipse.org/escet/</a>.
+Make sure you&#8217;re logged in. This should make check-boxes appear. Select the
+folders to archive and click the <em>Archive</em> button. It may take a few minutes
+for archiving to complete.</p>
+</li>
+<li>
+<p>Archived downloads can be removed. Go to <a href="https://archive.eclipse.org/escet/" class="bare">https://archive.eclipse.org/escet/</a>.
+Make sure you&#8217;re logged in. This should make check-boxes appear. Select the
+folders to delete and click the <em>Delete</em> button. It may take a few minutes
+for deleting to complete.</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="developer-third-party-tools-chapter-index">Third party tools</h3>
+<div class="paragraph">
+<p>As part of development for the Eclipse ESCET project, several third party
+tools are used. They are used to e.g. run scripts, generate files, etc.</p>
+</div>
+<div class="paragraph">
+<p>The following third party tools are used to run scripts:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Bash, to run <code>.bash</code> scripts.</p>
+</li>
+<li>
+<p>GNU utilities, to use in scripts, e.g. <code>cat</code>, <code>cp</code>, <code>diff</code>, <code>dirname</code>,
+<code>find</code>, <code>grep</code>, <code>mv</code>, <code>readlink</code>, <code>rm</code>, <code>sed</code>, <code>sort</code> and <code>wc</code>.</p>
+</li>
+<li>
+<p>Perl, to run <code>.pl</code> scripts.</p>
+</li>
+<li>
+<p>Python, version 3, to run <code>.py</code> scripts.</p>
+</li>
+<li>
+<p>Shell, to run <code>.sh</code> scripts.</p>
+</li>
+<li>
+<p>Windows command prompt, to run <code>.cmd</code> scripts.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following third party tools are used to build:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Maven, to run the main build from a console.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following third party tools are used to generate/convert images:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>bbox_add.pl</code> Perl script, used in conjunction with LaTeX, obtained from
+<a href="http://www.inference.org.uk/mackay/perl/bbox_add.pl" class="bare">http://www.inference.org.uk/mackay/perl/bbox_add.pl</a>.</p>
+</li>
+<li>
+<p><code>eps2png</code> Perl script, used in conjunction with LaTeX, obtained from
+<a href="https://metacpan.org/pod/eps2png" class="bare">https://metacpan.org/pod/eps2png</a>.</p>
+</li>
+<li>
+<p>Gnuplot, to generate images.</p>
+</li>
+<li>
+<p>ImageMagic, used in conjunction with LaTeX, including <code>convert</code>.</p>
+</li>
+<li>
+<p>Inkscape, to convert <code>.svg</code> images.</p>
+</li>
+<li>
+<p>LaTeX, to generate images, including <code>dvips</code>, <code>latex</code>, <code>pdfcrop</code> and
+<code>pdflatex</code>.</p>
+</li>
+<li>
+<p>Make, run <code>Makefile</code> builds, to generate images.</p>
+</li>
+<li>
+<p>LaTeX <code>rail</code> package, including <code>rail</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following third party tools are used to build some of the
+documentation:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>LaTeX, including <code>bibtex</code> and <code>pdflatex</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following third party tools are used to generate test classes and
+package them into a JAR file, for certain tests:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Java Development Kit (JDK), version 7 or higher, including <code>javac</code> and
+<code>jar</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Most of these tools are not needed to run a build or run the tests, as the
+generated files (e.g. images) are committed into Git.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="developer-upgrade-instructions-chapter-index">Upgrade instructions</h3>
+<div class="paragraph">
+<p>To upgrade to a new Eclipse Platform/IDE/SDK version:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Version updates</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Look up Orbit version for the new Eclipse Platform/IDE/SDK release, see
+<a href="https://download.eclipse.org/tools/orbit/downloads/" class="bare">https://download.eclipse.org/tools/orbit/downloads/</a>.</p>
+</li>
+<li>
+<p>Update Oomph setup, configuring new Eclipse and Orbit versions.</p>
+</li>
+<li>
+<p>Update <code>dev-env-setup.asciidoc</code> to match new Eclipse version.</p>
+</li>
+<li>
+<p>Update <code>org.eclipse.platform</code> version for the product feature (<code>org.eclipse.escet.product.feature</code> project).</p>
+</li>
+<li>
+<p>Update Eclipse and Orbit update site URLs in product.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>New development environment</p>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#developer-dev-env-setup-chapter-index">Set up a new development environment</a>.</p>
+</li>
+<li>
+<p>Commit target platform changes after regenerated by Oomph.</p>
+</li>
+<li>
+<p>Check workspace for any errors/warnings and address them if any.</p>
+</li>
+<li>
+<p>Check <em>New and Noteworthy</em> (release notes) for changes and adapt as necessary.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Batik dependencies</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Check what version of Batik is provided on the new Orbit version.</p>
+</li>
+<li>
+<p>Update the version constraints for Batik in the Oomph setup.</p>
+</li>
+<li>
+<p>Update the version constraints for Batik in plug-in manifests.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Java formatter profile</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Make a dummy change to the Eclipse ESCET Java formatter profile, and change it back.</p>
+</li>
+<li>
+<p>Compare the new configuration against the old configuration, to see if there are any new settings.</p>
+</li>
+<li>
+<p>In case of new settings, configure them as desired.</p>
+</li>
+<li>
+<p>Reformat all Java code using the new formatter profile.</p>
+</li>
+<li>
+<p>Update the formatter profile in the Oomph setup.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Java errors/warnings settings</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Check the properties of the <code>org.eclipse.escet.common.java</code> project, under <span class="menuseq"><b class="menu">Java Compiler</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Errors/Warnings</b></span>.</p>
+</li>
+<li>
+<p>Make a dummy change and change it back.</p>
+</li>
+<li>
+<p>In case of changes to <code>*.prefs</code> files in <code>.settings</code>, configure the new settings as desired.</p>
+</li>
+<li>
+<p>Run <code>misc/java-code-style/copy_here.bash ../../common/org.eclipse.escet.common.java</code> from <code>misc/java-code-style</code>
+to copy the new settings to the central place.</p>
+</li>
+<li>
+<p>Run <code>misc/java-code-style/copy_there.bash</code> from <code>misc/java-code-style</code> to copy the new settings to all relevant
+projects.</p>
+</li>
+<li>
+<p>Force a rebuild in Eclipse and check for any warnings/errors, addressing them if any.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Validation</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Run a <a href="#developer-building-and-testing-chapter-index">Maven build</a>.</p>
+</li>
+<li>
+<p>Ensure no errors or warning during Maven build.</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>To upgrade to a new Tycho version:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Update version in <code>org.eclipse.escet.root/.mvn/extensions.xml</code>.</p>
+</li>
+<li>
+<p>Update version in <code>org.eclipse.escet.configuration/pom.xml</code>.</p>
+</li>
+<li>
+<p>Check Tycho release notes for changes and adapt as necessary.</p>
+</li>
+<li>
+<p>Run a <a href="#developer-building-and-testing-chapter-index">Maven build</a>.</p>
+</li>
+<li>
+<p>Ensure no errors or warning during Maven build.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>To upgrade to a new Java version:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>For major Java versions (e.g. 11 to 12):</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Update <code>Bundle-RequiredExecutionEnvironment</code> for all plug-in manifests.</p>
+</li>
+<li>
+<p>Update <code>JRE_CONTAINER</code> in all <code>.classpath</code> files.</p>
+</li>
+<li>
+<p>Update <code>JRE_CONTAINER</code> in all launch configurations.</p>
+</li>
+<li>
+<p>Update Java versions in <code>org.eclipse.jdt.core.prefs</code> files.</p>
+</li>
+<li>
+<p>Update <code>osgi.requiredJavaVersion</code> in the product.</p>
+</li>
+<li>
+<p>Update Java <code>source</code> and <code>target</code> versions in <code>RuntimeJavaCompiler</code> class.</p>
+</li>
+<li>
+<p>Update Java version for <code>executionEnvironment</code> in <code>org.eclipse.escet.configuration/pom.xml</code>.</p>
+</li>
+<li>
+<p>Update Java version in <code>Jenkinsfile</code>.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>For any Java versions (e.g. 11 to 12, or 11.0.1 to 11.0.2):</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Update the JustJ version in the Oomph setup (<code>eclipse.justj.version.*</code> variables).</p>
+</li>
+<li>
+<p>Regenerate the target platform file using Oomph.</p>
+</li>
+<li>
+<p>Update the JustJ version in the product.</p>
+</li>
+<li>
+<p>Update <code>dev-env-setup.asciidoc</code> to match new Java version.</p>
+</li>
+<li>
+<p>Force a rebuild in Eclipse and check for any warnings/errors, addressing them if any.</p>
+</li>
+<li>
+<p>Run a <a href="#developer-building-and-testing-chapter-index">Maven build</a>.</p>
+</li>
+<li>
+<p>Ensure no errors or warning during Maven build.</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="app-framework-chapter-index">Application framework</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The Eclipse ESCET application framework provides common functionality for
+applications within the Eclipse ESCET toolkit. The following topics explain
+the framework in more detail:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#app-framework-introduction">Introduction</a></p>
+</li>
+<li>
+<p><a href="#app-framework-standalone-vs-eclipse">Stand-alone execution versus Eclipse IDE</a></p>
+</li>
+<li>
+<p><a href="#app-framework-application-class">The Application class</a></p>
+</li>
+<li>
+<p><a href="#app-framework-exception-framework">The exception framework</a></p>
+</li>
+<li>
+<p><a href="#app-framework-exit-codes">Exit codes</a></p>
+</li>
+<li>
+<p><a href="#app-framework-io-framework">The I/O framework</a></p>
+</li>
+<li>
+<p><a href="#app-framework-option-framework">The option framework</a></p>
+</li>
+<li>
+<p><a href="#app-framework-compiler-framework">The compiler framework</a></p>
+</li>
+<li>
+<p><a href="#app-framework-implement-your-application">How to implement your own application</a></p>
+</li>
+<li>
+<p><a href="#app-framework-registration">Application registration</a></p>
+</li>
+<li>
+<p><a href="#app-framework-execution">Execution</a></p>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="app-framework-introduction">Introduction</h3>
+<div class="paragraph">
+<p>The Eclipse ESCET application framework provides common functionality for
+applications within the Eclipse ESCET toolkit. It has several goals:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Provide a uniform end-user experience, for example in the form of uniform
+option dialogs.</p>
+</li>
+<li>
+<p>Hide technical details from the end user, for example in the form of
+crash reports and user friendly error messages, instead of stack traces.</p>
+</li>
+<li>
+<p>Provide support for applications to run both as a stand-alone Java program
+(say, from the command line), as well as within the Eclipse environment.</p>
+</li>
+<li>
+<p>Provide the basic functionality needed by most applications, to reduce the
+overhead needed for developers to develop an application.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The documentation for this framework describes the issues that the application
+framework attempts to solve, and the way it solves them. It also provides
+guidance in implementing applications using the application framework.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="app-framework-standalone-vs-eclipse">Stand-alone execution versus Eclipse IDE</h3>
+<div class="paragraph">
+<p>One of the goals of the application framework is to make it easier to allow
+applications to run as stand-alone Java command line applications, as well as
+run within the Eclipse IDE. The main problem faced when
+supporting general applications to run within Eclipse, is that such
+applications all run within the same instance of the Java Virtual Machine
+(JVM). In fact, a single application may have multiple instances running at
+the same time, within a single instance of the IDE. The following sections
+address the issues that arise when running within the IDE, and how the
+application framework handles them.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect3">
+<h4 id="app-framework-app-static-information">Application static information</h4>
+<div class="paragraph">
+<p>Within Java programs, members can be defined with the <code>static</code> modifier.
+Since multiple instances of an application may be running simultaneously,
+within a single instance of the IDE, one should avoid using static variables
+that contain information that is specific to a single instance of the
+application. For instance, assume an application that maintains an integer
+counter, used to generate unique identifiers. If defined in a class as
+follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">public static int count = 0;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>and incremented when needed, the first instance of the application will run
+just fine. Variable <code>count</code> starts at zero, and is incremented over and over
+again. When a second instance of the application starts however, the static
+variable keeps its value, as the new application is started within the same
+Eclipse instance, and thus within the same JVM. The count won&#8217;t start from
+zero, thus leading to different results for the application.</p>
+</div>
+<div class="paragraph">
+<p>The conclusion is that one should be careful to avoid static variables that
+hold information specific to an application instance.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-application-options">Application options</h4>
+<div class="paragraph">
+<p>Applications often have settings, and they are generally passed as command
+line arguments. GUI applications however, often use a dialog to configure the
+options instead. To allow applications within the application framework to
+work in both scenarios, all applications should use the option framework.</p>
+</div>
+<div class="paragraph">
+<p>See also the <a href="#app-framework-option-framework">option framework</a> section.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-stdin-stdout-stderr">Stdin, stdout, and stderr</h4>
+<div class="paragraph">
+<p>Command line applications generally obtain input from stdin, and write output
+to stdout and/or stderr streams. For applications running within the IDE,
+those streams are connected to the Eclipse application (IDE) as a whole, and
+not to the applications running within the IDE. To provide a uniform I/O
+interface, the application framework includes an I/O framework.</p>
+</div>
+<div class="paragraph">
+<p>See also the <a href="#app-framework-io-framework">I/O framework</a> section.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-guis-and-swt">Graphical User Interfaces (GUIs) and SWT</h4>
+<div class="paragraph">
+<p>The Eclipse IDE uses the Standard Widget Toolkit (SWT) for its graphical user interface
+(GUI). To be compatible with the Eclipse IDE, all GUI applications should use SWT as
+well. In order for GUI applications to work seamlessly within the Eclipse IDE as well
+as stand-alone, the application framework automatically registers the main SWT
+display thread for stand-alone applications, and uses the Eclipse SWT display
+thread when running within the Eclipse IDE. This reduces the burden of having to
+register the main SWT display threads, but also avoids blocking and other thread
+related issues.</p>
+</div>
+<div class="paragraph">
+<p>Using the <em>GUI</em> option, the GUI can be enabled or disabled. If disabled,
+headless execution mode is used, which disables creation of a SWT display
+thread, and thus disables all GUI functionality, including the option dialog.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-app-termination">Application termination</h4>
+<div class="paragraph">
+<p>Within Java, the <code>System.exit</code> method can be used to immediately terminate
+an application, by terminating the JVM. For applications running within
+the Eclipse IDE, this not only terminates the application, but the IDE as well. As
+such, the <code>System.exit</code> method should never be used in applications that
+are intended to be executed within the IDE.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-sigint">SIGINT</h4>
+<div class="paragraph">
+<p>Stand-alone applications can typically be started from a the command line
+terminal window. Pressing <span class="keyseq"><kbd>Ctrl</kbd>+<kbd>C</kbd></span> at such a command line terminal window
+terminates the currently running application (on Unix-based systems, this
+generates a SIGINT). Applications running within the Eclipse IDE however, don&#8217;t run
+in an actual command line terminal. Instead, they run within the IDE,
+and the stdin, stdout, and stderr streams are coupled to the Eclipse console
+view. The Eclipse console view does not support termination using the
+<span class="keyseq"><kbd>Ctrl</kbd>+<kbd>C</kbd></span> key combination. Instead, <span class="keyseq"><kbd>Ctrl</kbd>+<kbd>C</kbd></span> is used to copy console output
+to the clipboard. To remedy this situation, application framework applications
+running within Eclipse get a <em>Terminate</em> button with their console within the IDE,
+to allow for easy termination.</p>
+</div>
+<div class="paragraph">
+<p>Furthermore, the application framework allows termination requests via the
+<code>AppEnv.terminate</code> method. Application framework applications and threads
+should regularly call the <code>AppEnv.isTerminationRequested</code> method to see
+whether they should terminate.</p>
+</div>
+<div class="paragraph">
+<p>See also the <a href="#use-apps-view-termination">termination features</a> of the
+<a href="#use-apps-view">Applications</a> <a href="#use-terminology-view">view</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-exceptions">Exceptions</h4>
+<div class="paragraph">
+<p>Exceptions are Java feature that allows applications to report error
+conditions. Exceptions can generally be divided into two categories: internal
+errors, and end-user errors. Internal errors should generally not happen,
+and make the application crash. The application framework provides crash
+reports for end users to report crashes due to internal errors. The application
+framework also provides exception classes for end-user errors, to provide
+nice error messages, instead of stack traces.</p>
+</div>
+<div class="paragraph">
+<p>See also the <a href="#app-framework-exception-framework">exception framework</a>
+section.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-system-properties">System properties</h4>
+<div class="paragraph">
+<p>Java uses system properties (<code>System.getProperty</code> method etc). Those
+properties are global to the entire JVM, meaning they are shared between
+applications running within the Eclipse IDE. The application framework provides
+functionality to maintain system properties on a per application basis,
+turning them into application properties. All application framework
+applications should use the <code>getProp*</code> and <code>setProp*</code> methods in the
+<code>AppEnv</code> class instead of the property related methods in the <code>System</code>
+class. This ensures that the application properties are used instead of the
+global system properties.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-filepaths-and-current-working-dir">File paths and current working directory</h4>
+<div class="paragraph">
+<p>One of the standard system properties in Java is the <code>user.dir</code> property,
+which refers to the current working directory, or more precisely, the
+directory from which the JVM was started. Java doesn&#8217;t allow changing
+the current working directory. The application framework however, maintains
+the current working directory on a per application basis. Changing the current
+working directory is also supported. Application framework applications
+should use the methods in the <code>org.eclipse.escet.common.app.framework.Paths</code>
+class to get and set the current working directory, to resolve relative paths,
+etc. These methods also allow both Windows (<code>\</code>) and Unix (<code>/</code>) separators to
+be used in paths, on all platforms, transparently.</p>
+</div>
+<div class="paragraph">
+<p>Furthermore, within the Eclipse IDE, the concept of a
+<a href="#use-terminology-workspace">workspace</a> is introduced. In
+order to allow importing of resources from other projects etc, it may be nice
+to allow end users to specify platform paths (plug-in paths or workspace
+paths). Eclipse Modeling Framework (EMF) URIs, besides local file system paths,
+provide functionality for platform URIs as well. EMF URIs can for instance be
+used to load models that are instances of an Ecore. The <code>Paths</code> class mentioned
+above features methods to create such EMF URIs, from various sources. Those
+methods also feature smart handling of <code>platform:/auto/...</code> paths, an addition to
+platform URIs, added by the application framework. Such URIs are first
+resolved in the workspace, and if they can&#8217;t be found there, they are resolved
+in the plug-ins. This allows for easier debugging, as the workspace always
+overrides the plug-ins.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="app-framework-application-class">The Application class</h3>
+<div class="paragraph">
+<p>The <code>org.eclipse.escet.common.app.framework.Application&lt;T&gt;</code> class is the main
+class of the application framework. All application should inherit from this
+abstract class. The generic parameter <code>&lt;T&gt;</code> is further explained in the section
+about the <a href="#app-framework-io-framework">I/O framework</a>.</p>
+</div>
+<div class="paragraph">
+<p>The next sections introduce the specific parts of the application framework.
+After that, you&#8217;ll find a section on how to implement your own application,
+using the application framework.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="app-framework-exception-framework">The exception framework</h3>
+<div class="paragraph">
+<p>The application framework contains the exception framework. Its main goal
+is to hide stack traces from end users. Exceptions can generally be divided
+into two categories: internal errors, and end-user errors.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect3">
+<h4 id="app-framework-enduser-exceptions">End-user exceptions</h4>
+<div class="paragraph">
+<p>All exceptions that should be presented to the end user are considered end-user
+exceptions. These messages should be written in terms that the end user should
+be able to understand. For end-user exceptions, the exception framework does
+not display stack traces (at least not by default). All end-user exceptions must
+implement the <code>org.eclipse.escet.common.app.framework.exceptions.EndUserException</code>
+interface, and may inherit from the
+<code>org.eclipse.escet.common.app.framework.exceptions.ApplicationException</code> class.
+All applications that use the application framework must satisfy these
+requirements when the error message is to be presented to end users. It is
+recommended to reuse existing application framework exceptions whenever possible.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-internal-exceptions">Internal exceptions</h4>
+<div class="paragraph">
+<p>All exceptions that are not to be presented to end users are considered to
+be internal exceptions. Internal exceptions crash the application and are
+always considered to be bugs. The application framework generates crash
+reports for internal errors, so that end users can easily report them. Also,
+stack traces are not shown on the console. They are however present in the
+crash report, along with among others information about the system, the Java
+version used, the application that crashed (name, version, etc), and if
+the OSGi framework is running, the available plug-ins etc.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-chained-excpetions">Chained exceptions</h4>
+<div class="paragraph">
+<p>Java supports the concept of <em>chained exceptions</em>. The end-user exceptions of
+the application framework support this as well. If an uncaught end-user
+exception needs to be presented to the end user, the message of the exception
+is printed to the console, prefixed with the <code>ERROR:</code> text. All the causes of
+the exception are printed as well, each on a line of their own. Those messages
+are prefixed with the <code>CAUSE:</code> text. For exceptions that provide an end-user
+readable message, only that message is printed after the <code>CAUSE:</code> text. For
+other exceptions, the simple name of the exception class, enclosed in
+parentheses, is printed between the <code>CAUSE:</code> text and the exception message.
+All end-user exceptions (the ones inheriting from the
+<code>org.eclipse.escet.common.app.framework.exceptions.ApplicationException</code> class),
+as well as all other exceptions explicitly designed as such (by implementing the
+<code>org.eclipse.escet.common.app.framework.exceptions.EndUserException</code> interface)
+are considered to provide readable messages. For other exceptions, it is
+assumed that they don&#8217;t. This includes all exceptions provided by Java itself.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-development-mode">Development mode</h4>
+<div class="paragraph">
+<p>Developers can enable the development mode option (<code>DevModeOption</code> class) to
+always get stack traces for all internal exceptions (thus for crashes, but not
+for end-user exceptions), instead of crash reports. For more information, see
+the <a href="#app-framework-option-framework">option framework</a> section.</p>
+</div>
+<div class="paragraph">
+<p>The development mode option is ideal for automated tests, where a stack trace
+on stderr is much more ideal than a crash report.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="app-framework-exit-codes">Exit codes</h3>
+<div class="paragraph">
+<p>Application framework applications can terminate with the following exit codes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>0</code>: Application finished without errors.</p>
+</li>
+<li>
+<p><code>1</code>: Application finished after reporting an error to the end user.</p>
+</li>
+<li>
+<p><code>2</code>: Application crashed after running out of memory.</p>
+</li>
+<li>
+<p><code>3</code>: Application crashed for any reason other than running out of memory.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Note that applications themselves should always return a zero exit code. The
+other exit codes are generated automatically by the exception framework when
+applicable.</p>
+</div>
+<div class="paragraph">
+<p>Any exceptions to these rules should generally be avoided, but otherwise must
+be clearly documented for end users.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="app-framework-io-framework">The I/O framework</h3>
+<div class="paragraph">
+<p>To provide a uniform I/O interface, the application framework includes an
+I/O framework. This framework is sometimes also called the output framework,
+as it mainly handles output. The main goals of this framework are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Provide uniform stdin, stdout, and stderr support for applications running
+on the command line, or within the Eclipse IDE.</p>
+</li>
+<li>
+<p>Provide a general framework for output, based on output components that
+can be registered and unregistered.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect3">
+<h4 id="app-framework-output-components">Output components</h4>
+<div class="paragraph">
+<p>The I/O framework works with output components. All output that the application
+generates, is given to the output components. Each output component can decide
+for itself what to do with that output. All applications include at least
+a <code>StreamOutputComponent</code>, that redirects stream output to the console. For
+stand-alone applications, this means redirection to stdout and stderr. For
+application running within the Eclipse IDE, this means redirection to a
+<em>Console</em> <a href="#use-terminology-view">view</a>.</p>
+</div>
+<div class="paragraph">
+<p>Applications that only need to provide error, warning, normal, and debug
+textual output, the default output component interface (<code>IOutputComponent</code>)
+suffices. Applications that want to provide additional (typed) output, should
+create a derived interface that inherits from <code>IOutputComponent</code>, and extends
+the interface with additional callback methods. For an example of this, see
+the <code>org.eclipse.escet.cif.simulator.output.SimulatorOutputComponent</code>
+interface.</p>
+</div>
+<div class="paragraph">
+<p>The <code>OutputComponentBase</code> class can be used as a base class for output
+components. It implements the full <code>IOutputComponent</code> interface, but does
+nothing with the output that is generated by the application. Derived classes
+can easily override one or more methods to process output.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-output-provider">Output provider</h4>
+<div class="paragraph">
+<p>Each instance of an application has its own output provider. The output
+provider keeps track of the output components that are registered, and allows
+sending of output to the output components through static methods.</p>
+</div>
+<div class="paragraph">
+<p>If an application uses the default <code>IOutputComponent</code> as its output
+interface, an instance of <code>OutputProvider&lt;IOutputComponent&gt;</code> can be used.
+This will suffice for most applications. If an extended output component
+interface is defined, the <code>OutputProvider</code> class should be extended to
+provide additional static methods. For an example of this, see the
+<code>org.eclipse.escet.cif.simulator.output.SimulatorOutputComponent</code> class.</p>
+</div>
+<div class="paragraph">
+<p>For details on how and where to create an instance of the output provider for
+an application, see the section on
+<a href="#app-framework-implement-your-application">how to implement your own application</a>.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-stdout-and-stderr">Stdout and stderr</h4>
+<div class="paragraph">
+<p>Command line applications generally write output to stdout and/or stderr
+streams. For applications running within the Eclipse IDE, those streams are
+connected to the Eclipse IDE as a whole, and not to the applications
+running within Eclipse. The I/O framework solves this issue, by providing a
+uniform I/O interface.</p>
+</div>
+<div class="paragraph">
+<p>The <code>org.eclipse.escet.common.app.framework.output.OutputProvider&lt;T&gt;</code> class
+provides several static methods that can be used to generate output. Several
+forms of output are supported by default:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Error output is automatically generated by the exception framework, for
+uncaught exceptions. It is however possible to manually generate error
+output, by using the <code>OutputProvider.err</code> method. This could for instance
+be useful if multiple error messages are to be outputted.</p>
+</li>
+<li>
+<p>Warning output can be generated by applications, by using the
+<code>OutputProvider.warn</code> method. The application framework counts the number
+of warnings generated by an application, and the count can be retrieved
+using the <code>OutputProvider.getWarningCount</code> method.</p>
+</li>
+<li>
+<p>Normal output can be generated by applications, by using the
+<code>OutputProvider.out</code> method. To support structured output, the I/O
+frame maintains an indentation level, which can be increased and decreased
+one level at a time.</p>
+</li>
+<li>
+<p>Debug output can be generated by applications, by using the
+<code>OutputProvider.dbg</code> method. To support structured output, the I/O
+frame maintains an indentation level, which can be increased and decreased
+one level at a time.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>One of the default options of the application framework is the output mode
+option (<code>OutputModeOption</code> class). It can be used to control what output gets
+forwarded to the output components. For performance reasons, it may be useful
+to query whether certain output gets forwarded. The <code>OutputProvider</code> class
+provides the <code>dowarn</code>, <code>doout</code>, and <code>dodbg</code> methods for this.</p>
+</div>
+<div class="paragraph">
+<p>It should now be clear that application should never access <code>System.out</code> and
+<code>System.err</code> directly. Instead, they should use the output provider.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-stdin">Stdin</h4>
+<div class="paragraph">
+<p>There is no equivalent to the <code>OutputProvider</code> for stdin. Instead, use the
+<code>AppEnv.getStreams()</code> method to obtain the streams for the current
+application. The <code>AppEnv.getStreams().IN</code> streams can be used to read data
+from the stdin stream associated with the current application.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-buffering-flushing">Buffering and flushing</h4>
+<div class="paragraph">
+<p>The I/O framework buffers all input and output streams by default, and also
+automatically performs line based flushing for output and error streams.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="app-framework-option-framework">The option framework</h3>
+<div class="paragraph">
+<p>Applications often have settings, and they are generally passed as command
+line arguments. GUI applications however, often use a dialog to configure the
+options instead. To allow applications within the application framework to
+work in both scenarios, the application framework provides the option
+framework.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect3">
+<h4 id="app-framework-option-class">The option class</h4>
+<div class="paragraph">
+<p>All options of applications that use the application framework, should be
+specified as application framework options. Each option is a derived class
+of the <code>org.eclipse.escet.common.app.framework.options.Option&lt;T&gt;</code> class.
+The generic type parameter <code>&lt;T&gt;</code> indicates that options are strongly typed
+with respect to their values.</p>
+</div>
+<div class="paragraph">
+<p>
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-cli-options-and-option-dialog">Command line options and the option dialog</h4>
+<div class="paragraph">
+<p>The option framework requires all options to work via the command line, but
+options can also support the option dialog. It is recommended for all options
+to support the option dialog. The option framework process options as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>All registered options are first initialized to their default values.</p>
+</li>
+<li>
+<p>The pre-options hook for the application is fired.</p>
+</li>
+<li>
+<p>The command line options are parsed.</p>
+</li>
+<li>
+<p>If the command line options enabled the option dialog option (a standard
+application framework option that controls whether the option dialog is to
+be shown), the option dialog is shown. The option values as processed so
+far, are shown to the user in this dialog. The user can modify the options
+via the dialog and choose <b class="button">OK</b> to continue.</p>
+<div class="ulist">
+<ul>
+<li>
+<p>If the user chose <b class="button">Cancel</b> in the option dialog, terminate the
+application.</p>
+</li>
+<li>
+<p>All registered options are reset to their default values. This also
+clears the remaining arguments option, if any.</p>
+</li>
+<li>
+<p>The options set in the dialog are parsed. This overwrites the values
+of all options.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>The post-processing hook is fired for all options that have it.</p>
+</li>
+<li>
+<p>All option values are checked (validated).</p>
+</li>
+<li>
+<p>The post-options hook for the application is fired.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-option-categories">Option categories</h4>
+<div class="paragraph">
+<p>Options can be ordered into categories. Categories can be combined into a
+hierarchical structure. This allows the option dialog to show options per
+category, and allows the command line help message to show command line
+option help per category. In both cases, this adds structure to the possibly
+large amount of options, and makes it easier for end users to find the option
+they are looking for.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-instantiating-options">Instantiating options</h4>
+<div class="paragraph">
+<p>For every option, there may be at most one instance. Therefore, never use
+the constructors of options directly. Instead use the following:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">Options.getInstance(MyOption.class)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>to get an instance of an option.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-getting-setting-option-values">Getting and setting option values</h4>
+<div class="paragraph">
+<p>Applications don&#8217;t have access to the command line arguments. The option
+framework automatically process the command line arguments based on the options
+registered for the application. Applications always retrieve the values of
+options through static methods defined in the option classes.</p>
+</div>
+<div class="paragraph">
+<p>Options are usually set via command line arguments, or via the option dialog.
+It is however also possible to set option values at run-time:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">Options.set(MyOption.class, &lt;value&gt;);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-option-processing-order">Option processing order</h4>
+<div class="paragraph">
+<p>If possible, options should not depend on the order in which they are parsed.
+If the value of one option depends on the value of another option, use the
+post-processing hook to achieve consistency.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-cli-option-syntax">Command line option syntax</h4>
+<div class="paragraph">
+<p>All options have a long form (<code>--option</code>), optionally with a value
+(<code>--option=VALUE</code>). They can also have short form (<code>-o</code>), optionally with
+a value (<code>-oVALUE</code> or <code>-o VALUE</code>). All arguments that do not start with a
+dash symbol (<code>-</code>) are considered to be the 'remaining arguments'. It is
+possible to register one option that processes those remaining arguments. Such
+special options have <code>*</code> as long option name.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-implement-new-options">Implementing your own options</h4>
+<div class="paragraph">
+<p>Simply derive from the <code>Option</code> class, and study its API to implement your own
+options. You can also look at existing options for best practices. Furthermore,
+the option framework provides several options that can be used in applications:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>BooleanOption</code>: convenience base class for boolean options.</p>
+</li>
+<li>
+<p><code>FilesOption</code>: multiple remaining arguments input file paths option.</p>
+</li>
+<li>
+<p><code>InputFileOption</code>: single remaining argument input file path option.</p>
+</li>
+<li>
+<p><code>OutputFileOption</code>: output file path option (<code>--output</code> / <code>-o</code>).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+
+
+</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-standard-options">Standard options</h4>
+<div class="paragraph">
+<p>The application framework provides several options that must be registered
+for every application:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>DevModeOption</code>: option to enable/disable development mode. Developers can
+enable this option to get stack traces in case of internal exceptions,
+instead of crash reports. See also the chapter on the exception framework.</p>
+</li>
+<li>
+<p><code>HelpOption</code>: option to show the application help text at the console.</p>
+</li>
+<li>
+<p><code>LicenseOption</code>: option to print the license text of the application at
+the console, and terminate the application.</p>
+</li>
+<li>
+<p><code>OptionDialogOption</code>: option to show the option dialog.</p>
+</li>
+<li>
+<p><code>OutputModeOption</code>: option to control the amount of output produced by the
+application. See also the <a href="#app-framework-io-framework">I/O framework</a>
+section.</p>
+</li>
+<li>
+<p><code>GuiOption</code>: option to disable the GUI (enabled headless execution mode).
+See also the section on <a href="#app-framework-guis-and-swt">GUIs and SWT</a>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>See also the section on
+<a href="#app-framework-implement-your-application">how to implement your own application</a>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="app-framework-compiler-framework">The compiler framework</h3>
+<div class="paragraph">
+<p>For performance reasons, it can be better to generate and compile code at
+runtime, than to use an interpreter. The Java compiler supports this. However,
+in an Eclipse/OSGi environment, some additional effort is required to make it
+all work. The application framework contains a compiler framework in the
+<code>org.eclipse.escet.common.app.framework.javacompiler</code> package. It supports
+in-memory compilation of in-memory code, with full transparent OSGi support.
+That is, whether used from inside the Eclipse IDE, or from a stand-alone
+application, the compiler framework takes care of the details. The framework
+supports various representations of in-memory code, and can be extended with
+additional representations.</p>
+</div>
+<div class="paragraph">
+<p>The compiler framework requires the use of a Java Development Kit (JDK). A
+Java Runtime Environment (JRE) is not sufficient.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="app-framework-implement-your-application">How to implement your own application</h3>
+<div class="paragraph">
+<p>This section more or less explains step by step how to implement your own
+application, by using the application framework.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Decide whether it is enough to use the <code>IOutputComponent</code> interface, or
+that you need more. See also the <a href="#app-framework-io-framework">I/O framework</a>
+section.</p>
+</li>
+<li>
+<p>Create a new class, deriving from <code>Application</code>.</p>
+</li>
+<li>
+<p>Add a <code>main</code> method to your application class. For instance:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">/**
+ * Application main method.
+ *
+ * @param args The command line arguments supplied to the application.
+ */
+public static void main(String[] args) {
+    MyApp app = new MyApp();
+    app.run(args);
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This allows for standalone execution.</p>
+</div>
+</li>
+<li>
+<p>Add constructors as needed. You&#8217;ll probably want to implement some or most
+of the constructors provided by the <code>Application</code> class. In order to
+support standalone execution, the following constructor is required:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">/** Constructor for the {@link MyApp} class. */
+public MyApp() {
+    // Nothing to do here.
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>In order to support the ToolDef <code>app</code> tool, which can be used to run
+application framework applications from ToolDef scripts, the following
+constructor is required:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">/**
+ * Constructor for the {@link MyApp} class.
+ *
+ * @param streams The streams to use for input, output, and error streams.
+ */
+public MyApp(AppStreams streams) {
+    super(streams);
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This constructor is also required by the <code>ChildAppStarter</code> class, to support
+starting one application framework application from another application
+framework application.</p>
+</div>
+</li>
+<li>
+<p>Implement the mandatory methods <code>getAppName</code> and <code>getAppDescription</code>.</p>
+</li>
+<li>
+<p>Implement mandatory method <code>getProvider</code>. If you use <code>IOutputComponent</code>,
+then you can implement it as follows:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">return new OutputProvider&lt;&gt;();</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If you don&#8217;t use <code>IOutputComponent</code>, return a new instance of a derived
+class of <code>OutputProvider</code> that implements the derived interface of
+<code>IOutputComponent</code>.</p>
+</div>
+</li>
+<li>
+<p>If you don&#8217;t use <code>IOutputComponent</code>, override the
+<code>getStreamOutputComponent</code> method, and return a new instance of a derived
+class of <code>StreamOutputComponent</code> that implements the derived interface of
+<code>IOutputComponent</code>. Such a class usually ignores all other output, and
+thus behaves exactly as <code>StreamOutputComponent</code>, but implements the full
+output interface of the application.</p>
+</li>
+<li>
+<p>Implement mandatory method <code>getAllOptions</code>. You&#8217;ll need to return an
+option category that wraps the actual option categories of the application.
+Use the <code>getGeneralOptionCategory</code> to obtain the default application
+options category, which must always be the first category of options for
+your application. An example of an implementation of this method:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">@Override
+@SuppressWarnings("rawtypes")
+protected OptionCategory getAllOptions() {
+    OptionCategory generalOpts = getGeneralOptionCategory();
+
+    OptionCategory debugOpts =
+        new OptionCategory("Debug", "Debugging options.", list(),
+                           list(Options.getInstance(DebugOption.class)));
+
+    OptionCategory options =
+        new OptionCategory("My Application Options",
+                           "All options for My Application.",
+                           list(generalOpts, debugOpts), list());
+
+    return options;
+}</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>Implement mandatory method <code>runInternal</code> with the actual application code.</p>
+</li>
+<li>
+<p>Override optional method <code>getHelpMessageNotes</code> if applicable.</p>
+</li>
+<li>
+<p>Override optional methods <code>preOptions</code> and <code>postOptions</code> if applicable.</p>
+</li>
+<li>
+<p>Override optional method <code>getAppVersion</code> if applicable.</p>
+</li>
+</ul>
+</div>
+<div class="sect3">
+<h4 id="app-framework-runinternal-method">The runInternal method</h4>
+<div class="paragraph">
+<p>Some things to consider when implementing the <code>runInternal</code> method:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If you want to support stand-alone execution, register all Eclipse Modeling
+Framework (EMF) metamodels with the EMF metamodel registry. Also register any
+parsers, constraints, etc. For instance:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">if (!Platform.isRunning()) {
+    // Register languages and parsers for stand-alone execution.
+    LanguageRegistry.register...(...)
+}</code></pre>
+</div>
+</div>
+</li>
+<li>
+<p>The start of the <code>runInternal</code> method is a good place to add output
+components, as all options have been fully processed at this point. Output
+components can be registered by using the application&#8217;s output provider
+(though static methods).</p>
+</li>
+<li>
+<p>The code in this method and all code directly or indirectly executed by this
+method, should regularly call the <code>AppEnv.isTerminationRequested</code> method,
+to find out whether the application should be terminated.</p>
+</li>
+<li>
+<p>For the return code of this method, always use value zero, to indicate
+successful termination. Other exit codes are automatically generated by the
+exception framework, if applicable. See also the
+<a href="#app-framework-exit-codes">exit codes</a> section.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="app-framework-registration">Application registration</h3>
+<div class="paragraph">
+<p>Applications that use the application framework maintain their own data. This
+includes options, output components (via an output provider), streams, etc.
+Only a single application can be registered for each thread. Only once the
+application terminates and automatically unregisters itself, can a new
+application register itself in that thread. To run multiple applications
+in parallel, simply run them on different threads.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect3">
+<h4 id="app-framework-multi-threaded-apps">Multi-threaded applications</h4>
+<div class="paragraph">
+<p>All data stored for the application is wrapped in the <code>AppEnvData</code> class, and
+stored by the <code>AppEnv</code> class, on a per-thread basis. If your application uses
+multiple threads, you need to register each thread with the application
+framework. Use the <code>AppEnv.registerThread</code> method for this. This method
+requires the current application environment data as parameter, which may
+be obtained by using the <code>AppEnv.getData</code> method. To avoid managed memory
+leaks, always unregister threads once they are no longer used, by using the
+<code>AppEnv.unregisterThread</code> method.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-unit-tests">Unit tests</h4>
+<div class="paragraph">
+<p>If unit tests use methods that depend on the application being registered, then
+the unit test will need to register an application. Examples of method using
+the application framework are methods that use options, or produce output via
+the application framework. Especially for unit tests, the
+<code>AppEnv.registerSimple</code> method can be used to register a dummy application.
+This method uses a default application environment, without an actual
+application, registers a default stream output provider, sets the output mode
+to errors and warnings only (no normal or debug output), and disables
+development mode. It can be used in a unit test class as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">/***/ @BeforeClass
+public static void oneTimeSetUp() {
+    AppEnv.registerSimple();
+}
+
+/***/ @AfterClass
+public static void oneTimeTearDown() {
+    AppEnv.unregisterApplication();
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If any options are used, they will need to be available as well. For instance,
+one could add the following to the <code>oneTimeSetUp</code> method, or at the start of
+the actual unit test method:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">Options.set(SomeOption.class, &lt;value&gt;);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="app-framework-running-app-from-other-app">Running an application from another application</h4>
+<div class="paragraph">
+<p>As noted above, only a single application can be registered for a single
+thread. To start one application from another application, simply run the
+second application in a fresh thread. In the new thread, do the following:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Construct the child application, using a constructor with the <code>AppStreams</code>
+argument, to pass along the streams from the parent application.</p>
+</li>
+<li>
+<p>Set the current working directory to the current working directory of the
+parent application.</p>
+</li>
+<li>
+<p>Obtain the Eclipse IDE console (if any) from the parent application, and couple
+it the child application.</p>
+</li>
+<li>
+<p>Run the child application.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>After the child application thread finishes, make sure you:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Restore the coupling between the Eclipse IDE console (if any) and the parent
+application.</p>
+</li>
+<li>
+<p>If the child application finished due to a termination request, request
+termination for the parent application.</p>
+</li>
+<li>
+<p>Decide what to do with the exit code of the child application. If it is
+non-zero, you&#8217;ll probably want to terminate the parent application.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>To make it easier to follow this approach, the <code>ChildAppStarter.exec</code>
+methods can be used.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="app-framework-execution">Execution</h3>
+<div class="paragraph">
+<p>Application framework applications can be executed in the following ways:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>As plain Java application, from the command line.</p>
+<div class="paragraph">
+<p>Using the <em>GUI</em> option, the application can be executed either with full GUI
+support, or as headless application.</p>
+</div>
+<div class="paragraph">
+<p>The OSGi framework will not be running, and the Eclipse workbench will not
+be available.</p>
+</div>
+</li>
+<li>
+<p>As application within the Eclipse IDE, with full GUI support.</p>
+<div class="paragraph">
+<p>The OSGi framework will be running, and the Eclipse workbench will be
+available.</p>
+</div>
+</li>
+<li>
+<p>As headless Eclipse application.</p>
+<div class="paragraph">
+<p>Using the <em>GUI</em> option, the application can be executed either with full GUI
+support, or as headless application.</p>
+</div>
+<div class="paragraph">
+<p>The OSGi framework will be running, but the Eclipse workbench will not be
+available.</p>
+</div>
+<div class="paragraph">
+<p>The <code>org.eclipse.escet.common.app.framework.AppEclipseApplication</code> application
+can be provided to the <code>-application</code> command line argument of Eclipse to
+start any application framework application. This functionality is
+implemented by the
+<code>org.eclipse.escet.common.app.framework.AppEclipseApplication</code> which
+provides a generic implementation of Eclipse&#8217;s <code>IApplication</code> interface
+that supports execution of any application framework application.</p>
+</div>
+<div class="paragraph">
+<p>The following command line arguments are expected:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The name of the plug-in (OSGi bundle) that provides the application.</p>
+</li>
+<li>
+<p>The full/absolute name of the Java class that implements the application.
+Must extend the <code>Application</code> class and have a parameterless constructor.</p>
+</li>
+<li>
+<p>The remaining command line arguments are the command line arguments for
+the application itself.</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="release-notes-chapter-index">Eclipse ESCET release notes</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The release notes for the releases of the Eclipse ESCET tools,
+as part of the Eclipse ESCET project, are listed below in reverse
+chronological order.</p>
+</div>
+<div class="paragraph">
+<p>The release notes may refer to issues, the details for which can be found
+at the Eclipse ESCET
+<a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/issues">GitLab issues page</a>.</p>
+</div>
+<div class="paragraph">
+<p>See also the release notes for the specific tools for more information:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="https://www.eclipse.org/escet/cif/#release-notes-chapter-index">CIF release notes</a></p>
+</li>
+<li>
+<p><a href="https://www.eclipse.org/escet/chi/#release-notes-chapter-index">Chi release notes</a></p>
+</li>
+<li>
+<p><a href="https://www.eclipse.org/escet/tooldef/#release-notes-chapter-index">ToolDef release notes</a></p>
+</li>
+<li>
+<p><a href="https://www.eclipse.org/escet/setext/#setext-readme-release-notes">SeText release notes</a></p>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="version-0-2">Version 0.2</h3>
+<div class="paragraph">
+<p>TBD</p>
+</div>
+<div class="paragraph">
+<p>Improvements and fixes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Various documentation updates, including simpler installation instructions
+(issues #30 and #31).</p>
+</li>
+<li>
+<p>This release is based on Java 11. Java is now included again in the release
+and no longer needs to be installed separately (issues #29 and #30).</p>
+</li>
+<li>
+<p>Linux command line scripts now work from any directory rather than only from
+the <code>bin</code> directory that contains them (issue #88).</p>
+</li>
+<li>
+<p>macOS releases are now packaged as <code>.dmg</code> files and with proper entitlements
+(issue #31).</p>
+</li>
+<li>
+<p>This release is based on Eclipse 2021-03 (issue #28).</p>
+</li>
+<li>
+<p>Non-release builds now indicate they are a development build in the Eclipse
+About dialog (issue #26).</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="version-0-1">Version 0.1</h3>
+<div class="paragraph">
+<p>The first release of the Eclipse ESCET project and toolkit.
+This release is based on the initial contribution by the Eindhoven University
+of Technology (TU/e).</p>
+</div>
+<div class="paragraph">
+<p>Most notable changes compared to the last TU/e release:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>A JDK is no longer bundled with the downloads. A JDK must be installed
+separately and manually. Future releases will again include a JDK.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>This release is based on the Eclipse IDE version 2020-06 and supports Java 8.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="contact-chapter-index">Contact information</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Thanks for your interest in Eclipse Supervisory Control Engineering Toolkit
+(Eclipse ESCET) project.</p>
+</div>
+<div class="paragraph">
+<p>You can interact with the Eclipse ESCET community and its developers in
+various ways:</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><a href="https://www.eclipse.org/forums/index.php/f/527/">Eclipse ESCET forum</a></dt>
+<dd>
+<p>If you have any questions regarding the Eclipse ESCET project, any of its
+tools, or how to use them, feel free to ask them on the project forum.</p>
+</dd>
+<dt class="hdlist1"><a href="#developer-issue-tracking-chapter-index">Issue tracking</a></dt>
+<dd>
+<p>If you wish to browse existing issues or report new ones, then see the
+issue tracking section for more information.</p>
+</dd>
+<dt class="hdlist1"><a href="#developer-chapter-index">Developer information</a></dt>
+<dd>
+<p>If you specifically want to contact the Eclipse ESCET developers concerning
+development related activities, want to contribute to the Eclipse ESCET
+project, or want to browse the source code, then see the developer
+information.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="legal-chapter-index">Legal</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The material in this documentation is
+Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation.</p>
+</div>
+<div class="paragraph">
+<p>Eclipse ESCET and ESCET are trademarks of the Eclipse Foundation.
+Eclipse, and the Eclipse Logo are registered trademarks of the
+Eclipse Foundation. Other names may be trademarks of their
+respective owners.</p>
+</div>
+<div class="paragraph">
+<p><strong>License</strong></p>
+</div>
+<div class="paragraph">
+<p>The Eclipse Foundation makes available all content in this document
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the MIT License. A copy of the MIT License
+is available at <a href="https://opensource.org/licenses/MIT" class="bare">https://opensource.org/licenses/MIT</a>. For purposes of the
+MIT License, "Software" will mean the Content.</p>
+</div>
+<div class="paragraph">
+<p>If you did not receive this Content directly from the Eclipse Foundation,
+the Content is being redistributed by another party ("Redistributor") and
+different terms and conditions may apply to your use of any object code in
+the Content. Check the Redistributor&#8217;s license that was provided with the
+Content. If no such license exists, contact the Redistributor. Unless
+otherwise indicated below, the terms and conditions of the MIT License
+still apply to any source code in the Content and such source code may be
+obtained at <a href="http://www.eclipse.org" class="bare">http://www.eclipse.org</a>.</p>
+</div>
+</div>
+</div>
+</div>
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+  messageStyle: "none",
+  tex2jax: {
+    inlineMath: [["\\(", "\\)"]],
+    displayMath: [["\\[", "\\]"]],
+    ignoreClass: "nostem|nolatexmath"
+  },
+  asciimath2jax: {
+    delimiters: [["\\$", "\\$"]],
+    ignoreClass: "nostem|noasciimath"
+  },
+  TeX: { equationNumbers: { autoNumber: "none" } }
+})
+MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
+  MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) {
+    if ((node = data.script.parentNode) && (node = node.parentNode) && node.classList.contains("stemblock")) {
+      data.math.root.display = "block"
+    }
+    return data
+  })
+})
+</script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+
+<div id="footer">
+<div id="footer-text">
+<a href="https://www.eclipse.org">Eclipse Home</a>
+|
+<a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a>
+|
+<a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a>
+|
+<a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a>
+|
+<a href="https://www.eclipse.org/legal">Eclipse Legal</a>
+</div>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/v0.2-M1/escet/performance/clear_console.png b/v0.2-M1/escet/performance/clear_console.png
new file mode 100644
index 0000000..be1948b
--- /dev/null
+++ b/v0.2-M1/escet/performance/clear_console.png
Binary files differ
diff --git a/v0.2-M1/escet/performance/console_pages.png b/v0.2-M1/escet/performance/console_pages.png
new file mode 100644
index 0000000..77965da
--- /dev/null
+++ b/v0.2-M1/escet/performance/console_pages.png
Binary files differ
diff --git a/v0.2-M1/escet/performance/console_pages_list.png b/v0.2-M1/escet/performance/console_pages_list.png
new file mode 100644
index 0000000..144d1ea
--- /dev/null
+++ b/v0.2-M1/escet/performance/console_pages_list.png
Binary files differ
diff --git a/v0.2-M1/escet/performance/eclipse_heap_status1.png b/v0.2-M1/escet/performance/eclipse_heap_status1.png
new file mode 100644
index 0000000..e995af9
--- /dev/null
+++ b/v0.2-M1/escet/performance/eclipse_heap_status1.png
Binary files differ
diff --git a/v0.2-M1/escet/performance/eclipse_heap_status2.png b/v0.2-M1/escet/performance/eclipse_heap_status2.png
new file mode 100644
index 0000000..eebfe6e
--- /dev/null
+++ b/v0.2-M1/escet/performance/eclipse_heap_status2.png
Binary files differ
diff --git a/v0.2-M1/escet/performance/java_memory.png b/v0.2-M1/escet/performance/java_memory.png
new file mode 100644
index 0000000..5924e06
--- /dev/null
+++ b/v0.2-M1/escet/performance/java_memory.png
Binary files differ
diff --git a/v0.2-M1/escet/performance/java_memory.png.svg b/v0.2-M1/escet/performance/java_memory.png.svg
new file mode 100644
index 0000000..82b43e6
--- /dev/null
+++ b/v0.2-M1/escet/performance/java_memory.png.svg
@@ -0,0 +1,407 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="800"
+   height="370"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="java_memory.png.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend"
+       style="overflow:visible">
+      <path
+         id="path3683"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mend"
+       style="overflow:visible">
+      <path
+         id="path3689"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         transform="matrix(-0.4,0,0,-0.4,-4,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Lend"
+       style="overflow:visible">
+      <path
+         id="path3701"
+         style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(-1.1,0,0,-1.1,-1.1,0)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="496.31697"
+     inkscape:cy="78.648691"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1912"
+     inkscape:window-height="1111"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-682.36218)">
+    <rect
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2816"
+       width="779"
+       height="29"
+       x="10.499998"
+       y="692.86218" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="400.24219"
+       y="713.40125"
+       id="text3590"><tspan
+         sodipodi:role="line"
+         id="tspan3592"
+         x="400.24219"
+         y="713.40125"
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans">Operating System (OS) memory (RAM, virtual memory)</tspan></text>
+    <rect
+       y="772.86218"
+       x="10.499998"
+       height="29"
+       width="779"
+       id="rect2831"
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <text
+       id="text2833"
+       y="793.40125"
+       x="401.10547"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans"
+         y="793.40125"
+         x="401.10547"
+         id="tspan2835"
+         sodipodi:role="line">Java process heap (java/java.exe)</tspan></text>
+    <rect
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2837"
+       width="569"
+       height="29"
+       x="10.499999"
+       y="852.86218" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="295.85156"
+       y="873.40125"
+       id="text2839"><tspan
+         sodipodi:role="line"
+         id="tspan2841"
+         x="295.85156"
+         y="873.40125"
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans">Java object heap</tspan></text>
+    <rect
+       y="852.86218"
+       x="590.5"
+       height="29"
+       width="199"
+       id="rect2843"
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <text
+       id="text2845"
+       y="873.40125"
+       x="690"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans"
+         y="873.40125"
+         x="690"
+         id="tspan2847"
+         sodipodi:role="line">'Everything else'</tspan></text>
+    <rect
+       y="932.86218"
+       x="10.499999"
+       height="29"
+       width="119"
+       id="rect2849"
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <text
+       id="text2851"
+       y="953.40515"
+       x="70.882812"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans"
+         y="953.40515"
+         x="70.882812"
+         id="tspan2853"
+         sodipodi:role="line">Young gen.</tspan></text>
+    <rect
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2855"
+       width="108.99999"
+       height="29"
+       x="380.5"
+       y="932.86218" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="435.08203"
+       y="953.28015"
+       id="text2857"><tspan
+         sodipodi:role="line"
+         id="tspan2859"
+         x="435.08203"
+         y="953.28015"
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans">Metaspace</tspan></text>
+    <rect
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2861"
+       width="229"
+       height="29"
+       x="140.49998"
+       y="932.86218" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="255.23827"
+       y="953.40125"
+       id="text2863"><tspan
+         sodipodi:role="line"
+         id="tspan2865"
+         x="255.23827"
+         y="953.40125"
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans">Old generation</tspan></text>
+    <rect
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2867"
+       width="329"
+       height="29"
+       x="10.499999"
+       y="1012.8622" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="175.36328"
+       y="1033.3065"
+       id="text2869"><tspan
+         sodipodi:role="line"
+         id="tspan2871"
+         x="175.36328"
+         y="1033.3065"
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans">Allocation space</tspan></text>
+    <rect
+       y="1012.8622"
+       x="350.5"
+       height="29"
+       width="139"
+       id="rect2873"
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:0.99999994;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <text
+       id="text2875"
+       y="1033.3065"
+       x="419.89856"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans"
+         y="1033.3065"
+         x="419.89856"
+         id="tspan2877"
+         sodipodi:role="line">Survivor spaces</tspan></text>
+    <rect
+       y="932.86218"
+       x="500.5"
+       height="29"
+       width="108.99999"
+       id="rect2879"
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <text
+       id="text2881"
+       y="953.32703"
+       x="554.64062"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans"
+         y="953.32703"
+         x="554.64062"
+         id="tspan2883"
+         sodipodi:role="line">Native code</tspan></text>
+    <rect
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2885"
+       width="69"
+       height="29"
+       x="620.5"
+       y="932.86218" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="654.86719"
+       y="953.32703"
+       id="text2887"><tspan
+         sodipodi:role="line"
+         id="tspan2889"
+         x="654.86719"
+         y="953.32703"
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans">Stacks</tspan></text>
+    <rect
+       y="932.86218"
+       x="700.5"
+       height="29"
+       width="39"
+       id="rect2891"
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <text
+       id="text2893"
+       y="953.27625"
+       x="719.99219"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans"
+         y="953.27625"
+         x="719.99219"
+         id="tspan2895"
+         sodipodi:role="line">GC</tspan></text>
+    <rect
+       style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2897"
+       width="39"
+       height="29"
+       x="750.5"
+       y="932.86218" />
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="770.01172"
+       y="953.47937"
+       id="text2899"><tspan
+         sodipodi:role="line"
+         id="tspan2901"
+         x="770.01172"
+         y="953.47937"
+         style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Sans;-inkscape-font-specification:Sans">...</tspan></text>
+    <path
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       d="m 10,722.36218 480,0 300,50 -780,0 0,-50 z"
+       id="rect4875"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       id="path4878"
+       d="m 10,802.36218 575,0 -5,50 -570,0 0,-50 z"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       d="m 10,882.36218 140,0 -20,50 -120,0 0,-50 z"
+       id="path4880"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       id="path4882"
+       d="m 10,962.36218 100,0 230,50.00002 -330,0 0,-50.00002 z"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       d="m 585,802.36218 205,0 0,50 -200,0 -5,-50 z"
+       id="path4884" />
+    <path
+       id="path4886"
+       d="m 150,882.36218 430,0 -210,50 -230,0 10,-50 z"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       d="m 590,882.36218 40,0 -140,50 -110,0 210,-50 z"
+       id="path4888"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       id="path4890"
+       d="m 630,882.36218 40,0 -60,50 -110,0 130,-50 z"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       d="m 670,882.36218 40,0 -20,50 -70,0 50,-50 z"
+       id="path4892"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       id="path4894"
+       d="m 710,882.36218 40,0 -10,50 -40,0 10,-50 z"
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       d="m 750,882.36218 40,0 0,50 -40,0 0,-50 z"
+       id="path4896" />
+    <path
+       style="fill:#dcdcdc;fill-opacity:1;stroke:none"
+       d="m 110,962.36218 20,0 360,50.00002 -140,0 -240,-50.00002 z"
+       id="path4898"
+       sodipodi:nodetypes="ccccc" />
+  </g>
+</svg>
diff --git a/v0.2-M1/escet/performance/terminate_button.png b/v0.2-M1/escet/performance/terminate_button.png
new file mode 100644
index 0000000..f07119b
--- /dev/null
+++ b/v0.2-M1/escet/performance/terminate_button.png
Binary files differ
diff --git a/v0.2-M1/escet/performance/visualvm_pid.png b/v0.2-M1/escet/performance/visualvm_pid.png
new file mode 100644
index 0000000..06d08f5
--- /dev/null
+++ b/v0.2-M1/escet/performance/visualvm_pid.png
Binary files differ
diff --git a/v0.2-M1/escet/performance/visualvm_sshot.png b/v0.2-M1/escet/performance/visualvm_sshot.png
new file mode 100644
index 0000000..90caecc
--- /dev/null
+++ b/v0.2-M1/escet/performance/visualvm_sshot.png
Binary files differ
diff --git a/v0.2-M1/escet/use/apps_view.png b/v0.2-M1/escet/use/apps_view.png
new file mode 100644
index 0000000..9bc16a9
--- /dev/null
+++ b/v0.2-M1/escet/use/apps_view.png
Binary files differ
diff --git a/v0.2-M1/escet/use/command_app_status_legend.png b/v0.2-M1/escet/use/command_app_status_legend.png
new file mode 100644
index 0000000..71defe0
--- /dev/null
+++ b/v0.2-M1/escet/use/command_app_status_legend.png
Binary files differ
diff --git a/v0.2-M1/escet/use/command_auto_expand.png b/v0.2-M1/escet/use/command_auto_expand.png
new file mode 100644
index 0000000..c1d07f1
--- /dev/null
+++ b/v0.2-M1/escet/use/command_auto_expand.png
Binary files differ
diff --git a/v0.2-M1/escet/use/command_auto_remove.png b/v0.2-M1/escet/use/command_auto_remove.png
new file mode 100644
index 0000000..58e171c
--- /dev/null
+++ b/v0.2-M1/escet/use/command_auto_remove.png
Binary files differ
diff --git a/v0.2-M1/escet/use/command_auto_terminate.png b/v0.2-M1/escet/use/command_auto_terminate.png
new file mode 100644
index 0000000..aa0ce66
--- /dev/null
+++ b/v0.2-M1/escet/use/command_auto_terminate.png
Binary files differ
diff --git a/v0.2-M1/escet/use/command_remove.png b/v0.2-M1/escet/use/command_remove.png
new file mode 100644
index 0000000..4f4b001
--- /dev/null
+++ b/v0.2-M1/escet/use/command_remove.png
Binary files differ
diff --git a/v0.2-M1/escet/use/command_remove_all.png b/v0.2-M1/escet/use/command_remove_all.png
new file mode 100644
index 0000000..97d5291
--- /dev/null
+++ b/v0.2-M1/escet/use/command_remove_all.png
Binary files differ
diff --git a/v0.2-M1/escet/use/command_terminate.png b/v0.2-M1/escet/use/command_terminate.png
new file mode 100644
index 0000000..8ab7a91
--- /dev/null
+++ b/v0.2-M1/escet/use/command_terminate.png
Binary files differ
diff --git a/v0.2-M1/escet/use/command_terminate_all.png b/v0.2-M1/escet/use/command_terminate_all.png
new file mode 100644
index 0000000..ced551c
--- /dev/null
+++ b/v0.2-M1/escet/use/command_terminate_all.png
Binary files differ
diff --git a/v0.2-M1/escet/use/model_with_error.png b/v0.2-M1/escet/use/model_with_error.png
new file mode 100644
index 0000000..78c229b
--- /dev/null
+++ b/v0.2-M1/escet/use/model_with_error.png
Binary files differ
diff --git a/v0.2-M1/escet/use/perspectives.png b/v0.2-M1/escet/use/perspectives.png
new file mode 100644
index 0000000..234271f
--- /dev/null
+++ b/v0.2-M1/escet/use/perspectives.png
Binary files differ
diff --git a/v0.2-M1/escet/use/show_status_legend.png b/v0.2-M1/escet/use/show_status_legend.png
new file mode 100644
index 0000000..85ec494
--- /dev/null
+++ b/v0.2-M1/escet/use/show_status_legend.png
Binary files differ
diff --git a/v0.2-M1/escet/use/status_crashed.png b/v0.2-M1/escet/use/status_crashed.png
new file mode 100644
index 0000000..65963c2
--- /dev/null
+++ b/v0.2-M1/escet/use/status_crashed.png
Binary files differ
diff --git a/v0.2-M1/escet/use/status_failed.png b/v0.2-M1/escet/use/status_failed.png
new file mode 100644
index 0000000..0e16959
--- /dev/null
+++ b/v0.2-M1/escet/use/status_failed.png
Binary files differ
diff --git a/v0.2-M1/escet/use/status_finished.png b/v0.2-M1/escet/use/status_finished.png
new file mode 100644
index 0000000..8082604
--- /dev/null
+++ b/v0.2-M1/escet/use/status_finished.png
Binary files differ
diff --git a/v0.2-M1/escet/use/status_running.png b/v0.2-M1/escet/use/status_running.png
new file mode 100644
index 0000000..a8f403c
--- /dev/null
+++ b/v0.2-M1/escet/use/status_running.png
Binary files differ
diff --git a/v0.2-M1/escet/use/status_starting.png b/v0.2-M1/escet/use/status_starting.png
new file mode 100644
index 0000000..5e705df
--- /dev/null
+++ b/v0.2-M1/escet/use/status_starting.png
Binary files differ
diff --git a/v0.2-M1/escet/use/status_terminated.png b/v0.2-M1/escet/use/status_terminated.png
new file mode 100644
index 0000000..45a6aab
--- /dev/null
+++ b/v0.2-M1/escet/use/status_terminated.png
Binary files differ
diff --git a/v0.2-M1/escet/use/status_terminating.png b/v0.2-M1/escet/use/status_terminating.png
new file mode 100644
index 0000000..0e9a823
--- /dev/null
+++ b/v0.2-M1/escet/use/status_terminating.png
Binary files differ
diff --git a/v0.2-M1/index.html b/v0.2-M1/index.html
new file mode 100644
index 0000000..fb0ac72
--- /dev/null
+++ b/v0.2-M1/index.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<html lang="en">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>Eclipse ESCET website</title>
+    <style>
+        tr, td {
+            padding: 0;
+            margin: 0;
+        }
+        td a {
+            margin-right: 10px;
+        }
+    </style>
+</head>
+<body>
+
+<p><strong>Eclipse Supervisory Control Engineering Toolkit (Eclipse ESCET™)</strong></p>
+
+<p>Version: v0.2-M1</p>
+
+<p>The Eclipse ESCET project provides a toolkit for the development of
+supervisory controllers in the Model-Based Systems Engineering paradigm.</p>
+
+<p>
+<table>
+<tr>
+<td><a href="escet">Eclipse ESCET website</a></td>
+<td>The website and documentation for the Eclipse ESCET project and its tools.</td>
+</tr>
+<tr>
+<td><a href="chi">Chi website</a></td>
+<td>The website and documentation for the Chi language and tools.</td></tr>
+<tr>
+<td><a href="cif">CIF website</a></td>
+<td>The website and documentation for the CIF language and tools.</td></tr>
+<tr>
+<td><a href="setext">SeText website</a></td>
+<td>The website and documentation for the SeText language and tools.</td></tr>
+<tr>
+<td><a href="tooldef">ToolDef website</a></td>
+<td>The website and documentation for the ToolDef language and tools.</td></tr>
+</table>
+</p>
+
+<p><img src="eclipse-incubation.png" width="250px"></p>
+
+<p>
+<a href="https://www.eclipse.org">Eclipse Home</a>
+|
+<a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a>
+|
+<a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a>
+|
+<a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a>
+|
+<a href="https://www.eclipse.org/legal">Eclipse Legal</a>
+</p>
+
+</body>
+</html>
diff --git a/v0.2-M1/setext/eclipse-escet-incubation-setext-manual.pdf b/v0.2-M1/setext/eclipse-escet-incubation-setext-manual.pdf
new file mode 100644
index 0000000..c4f2f3a
--- /dev/null
+++ b/v0.2-M1/setext/eclipse-escet-incubation-setext-manual.pdf
Binary files differ
diff --git a/v0.2-M1/setext/eclipse-incubation.png b/v0.2-M1/setext/eclipse-incubation.png
new file mode 100644
index 0000000..5fccef5
--- /dev/null
+++ b/v0.2-M1/setext/eclipse-incubation.png
Binary files differ
diff --git a/v0.2-M1/setext/index.html b/v0.2-M1/setext/index.html
new file mode 100644
index 0000000..880ad5f
--- /dev/null
+++ b/v0.2-M1/setext/index.html
@@ -0,0 +1,1479 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="UTF-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="generator" content="Asciidoctor 2.0.12">
+<meta name="author" content="Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation">
+<title>SeText documentation (Incubation)</title>
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
+<style>
+/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
+/* Uncomment @import statement to use as custom stylesheet */
+/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
+article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}
+audio,video{display:inline-block}
+audio:not([controls]){display:none;height:0}
+html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
+a{background:none}
+a:focus{outline:thin dotted}
+a:active,a:hover{outline:0}
+h1{font-size:2em;margin:.67em 0}
+abbr[title]{border-bottom:1px dotted}
+b,strong{font-weight:bold}
+dfn{font-style:italic}
+hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
+mark{background:#ff0;color:#000}
+code,kbd,pre,samp{font-family:monospace;font-size:1em}
+pre{white-space:pre-wrap}
+q{quotes:"\201C" "\201D" "\2018" "\2019"}
+small{font-size:80%}
+sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
+sup{top:-.5em}
+sub{bottom:-.25em}
+img{border:0}
+svg:not(:root){overflow:hidden}
+figure{margin:0}
+fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
+legend{border:0;padding:0}
+button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
+button,input{line-height:normal}
+button,select{text-transform:none}
+button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
+button[disabled],html input[disabled]{cursor:default}
+input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
+button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
+textarea{overflow:auto;vertical-align:top}
+table{border-collapse:collapse;border-spacing:0}
+*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
+html,body{font-size:100%}
+body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
+a:hover{cursor:pointer}
+img,object,embed{max-width:100%;height:auto}
+object,embed{height:100%}
+img{-ms-interpolation-mode:bicubic}
+.left{float:left!important}
+.right{float:right!important}
+.text-left{text-align:left!important}
+.text-right{text-align:right!important}
+.text-center{text-align:center!important}
+.text-justify{text-align:justify!important}
+.hide{display:none}
+img,object,svg{display:inline-block;vertical-align:middle}
+textarea{height:auto;min-height:50px}
+select{width:100%}
+.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
+div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
+a{color:#2156a5;text-decoration:underline;line-height:inherit}
+a:hover,a:focus{color:#1d4b8f}
+a img{border:0}
+p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
+p aside{font-size:.875em;line-height:1.35;font-style:italic}
+h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
+h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
+h1{font-size:2.125em}
+h2{font-size:1.6875em}
+h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
+h4,h5{font-size:1.125em}
+h6{font-size:1em}
+hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
+em,i{font-style:italic;line-height:inherit}
+strong,b{font-weight:bold;line-height:inherit}
+small{font-size:60%;line-height:inherit}
+code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
+ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
+ul,ol{margin-left:1.5em}
+ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
+ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
+ul.square{list-style-type:square}
+ul.circle{list-style-type:circle}
+ul.disc{list-style-type:disc}
+ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
+dl dt{margin-bottom:.3125em;font-weight:bold}
+dl dd{margin-bottom:1.25em}
+abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
+abbr{text-transform:none}
+blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
+blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
+blockquote cite::before{content:"\2014 \0020"}
+blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
+blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
+@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
+h1{font-size:2.75em}
+h2{font-size:2.3125em}
+h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
+h4{font-size:1.4375em}}
+table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede;word-wrap:normal}
+table thead,table tfoot{background:#f7f8f7}
+table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
+table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
+table tr.even,table tr.alt{background:#f8f8f7}
+table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
+h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
+h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
+.center{margin-left:auto;margin-right:auto}
+.stretch{width:100%}
+.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
+.clearfix::after,.float-group::after{clear:both}
+:not(pre).nobreak{word-wrap:normal}
+:not(pre).nowrap{white-space:nowrap}
+:not(pre).pre-wrap{white-space:pre-wrap}
+:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
+pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
+pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
+pre>code{display:block}
+pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
+em em{font-style:normal}
+strong strong{font-weight:400}
+.keyseq{color:rgba(51,51,51,.8)}
+kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
+.keyseq kbd:first-child{margin-left:0}
+.keyseq kbd:last-child{margin-right:0}
+.menuseq,.menuref{color:#000}
+.menuseq b:not(.caret),.menuref{font-weight:inherit}
+.menuseq{word-spacing:-.02em}
+.menuseq b.caret{font-size:1.25em;line-height:.8}
+.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
+b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
+b.button::before{content:"[";padding:0 3px 0 2px}
+b.button::after{content:"]";padding:0 2px 0 3px}
+p a>code:hover{color:rgba(0,0,0,.9)}
+#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
+#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
+#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
+#content{margin-top:1.25em}
+#content::before{content:none}
+#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
+#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
+#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
+#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
+#header .details span:first-child{margin-left:-.125em}
+#header .details span.email a{color:rgba(0,0,0,.85)}
+#header .details br{display:none}
+#header .details br+span::before{content:"\00a0\2013\00a0"}
+#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
+#header .details br+span#revremark::before{content:"\00a0|\00a0"}
+#header #revnumber{text-transform:capitalize}
+#header #revnumber::after{content:"\00a0"}
+#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
+#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
+#toc>ul{margin-left:.125em}
+#toc ul.sectlevel0>li>a{font-style:italic}
+#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
+#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
+#toc li{line-height:1.3334;margin-top:.3334em}
+#toc a{text-decoration:none}
+#toc a:active{text-decoration:underline}
+#toctitle{color:#7a2518;font-size:1.2em}
+@media screen and (min-width:768px){#toctitle{font-size:1.375em}
+body.toc2{padding-left:15em;padding-right:0}
+#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
+#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
+#toc.toc2>ul{font-size:.9em;margin-bottom:0}
+#toc.toc2 ul ul{margin-left:0;padding-left:1em}
+#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
+body.toc2.toc-right{padding-left:0;padding-right:15em}
+body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
+@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
+#toc.toc2{width:20em}
+#toc.toc2 #toctitle{font-size:1.375em}
+#toc.toc2>ul{font-size:.95em}
+#toc.toc2 ul ul{padding-left:1.25em}
+body.toc2.toc-right{padding-left:0;padding-right:20em}}
+#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
+#content #toc>:first-child{margin-top:0}
+#content #toc>:last-child{margin-bottom:0}
+#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
+#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
+#content{margin-bottom:.625em}
+.sect1{padding-bottom:.625em}
+@media screen and (min-width:768px){#content{margin-bottom:1.25em}
+.sect1{padding-bottom:1.25em}}
+.sect1:last-child{padding-bottom:0}
+.sect1+.sect1{border-top:1px solid #e7e7e9}
+#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
+#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
+#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
+#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
+#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
+details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
+details>summary:first-of-type{cursor:pointer;display:list-item;outline:none;margin-bottom:.75em}
+.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
+table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
+.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
+table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit}
+.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
+.admonitionblock>table td.icon{text-align:center;width:80px}
+.admonitionblock>table td.icon img{max-width:none}
+.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
+.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
+.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
+.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
+.exampleblock>.content>:first-child{margin-top:0}
+.exampleblock>.content>:last-child{margin-bottom:0}
+.sidebarblock{border-style:solid;border-width:1px;border-color:#dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;-webkit-border-radius:4px;border-radius:4px}
+.sidebarblock>:first-child{margin-top:0}
+.sidebarblock>:last-child{margin-bottom:0}
+.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
+.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
+.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
+@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
+@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
+.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
+.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
+.listingblock>.content{position:relative}
+.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
+.listingblock:hover code[data-lang]::before{display:block}
+.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
+.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
+.listingblock pre.highlightjs{padding:0}
+.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
+.listingblock pre.prettyprint{border-width:0}
+.prettyprint{background:#f7f7f8}
+pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
+pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
+pre.prettyprint li code[data-lang]::before{opacity:1}
+pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
+table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
+table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
+table.linenotable td.code{padding-left:.75em}
+table.linenotable td.linenos{border-right:1px solid currentColor;opacity:.35;padding-right:.5em}
+pre.pygments .lineno{border-right:1px solid currentColor;opacity:.35;display:inline-block;margin-right:.75em}
+pre.pygments .lineno::before{content:"";margin-right:-.125em}
+.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
+.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
+.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
+.quoteblock blockquote{margin:0;padding:0;border:0}
+.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
+.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
+.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
+.verseblock{margin:0 1em 1.25em}
+.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
+.verseblock pre strong{font-weight:400}
+.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
+.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
+.quoteblock .attribution br,.verseblock .attribution br{display:none}
+.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
+.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
+.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
+.quoteblock.abstract{margin:0 1em 1.25em;display:block}
+.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
+.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
+.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
+.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
+.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}
+p.tableblock:last-child{margin-bottom:0}
+td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
+td.tableblock>.content>:last-child{margin-bottom:-1.25em}
+table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
+table.grid-all>*>tr>*{border-width:1px}
+table.grid-cols>*>tr>*{border-width:0 1px}
+table.grid-rows>*>tr>*{border-width:1px 0}
+table.frame-all{border-width:1px}
+table.frame-ends{border-width:1px 0}
+table.frame-sides{border-width:0 1px}
+table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
+table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
+table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
+table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
+table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7}
+th.halign-left,td.halign-left{text-align:left}
+th.halign-right,td.halign-right{text-align:right}
+th.halign-center,td.halign-center{text-align:center}
+th.valign-top,td.valign-top{vertical-align:top}
+th.valign-bottom,td.valign-bottom{vertical-align:bottom}
+th.valign-middle,td.valign-middle{vertical-align:middle}
+table thead th,table tfoot th{font-weight:bold}
+tbody tr th{background:#f7f8f7}
+tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
+p.tableblock>code:only-child{background:none;padding:0}
+p.tableblock{font-size:1em}
+ol{margin-left:1.75em}
+ul li ol{margin-left:1.5em}
+dl dd{margin-left:1.125em}
+dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
+ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
+ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
+ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
+ul.unstyled,ol.unstyled{margin-left:0}
+ul.checklist{margin-left:.625em}
+ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
+ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
+ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
+ul.inline>li{margin-left:1.25em}
+.unstyled dl dt{font-weight:400;font-style:normal}
+ol.arabic{list-style-type:decimal}
+ol.decimal{list-style-type:decimal-leading-zero}
+ol.loweralpha{list-style-type:lower-alpha}
+ol.upperalpha{list-style-type:upper-alpha}
+ol.lowerroman{list-style-type:lower-roman}
+ol.upperroman{list-style-type:upper-roman}
+ol.lowergreek{list-style-type:lower-greek}
+.hdlist>table,.colist>table{border:0;background:none}
+.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
+td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
+td.hdlist1{font-weight:bold;padding-bottom:1.25em}
+td.hdlist2{word-wrap:anywhere}
+.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
+.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
+.colist td:not([class]):first-child img{max-width:none}
+.colist td:not([class]):last-child{padding:.25em 0}
+.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
+.imageblock.left{margin:.25em .625em 1.25em 0}
+.imageblock.right{margin:.25em 0 1.25em .625em}
+.imageblock>.title{margin-bottom:0}
+.imageblock.thumb,.imageblock.th{border-width:6px}
+.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
+.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
+.image.left{margin-right:.625em}
+.image.right{margin-left:.625em}
+a.image{text-decoration:none;display:inline-block}
+a.image object{pointer-events:none}
+sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
+sup.footnote a,sup.footnoteref a{text-decoration:none}
+sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
+#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
+#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
+#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
+#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
+#footnotes .footnote:last-of-type{margin-bottom:0}
+#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
+.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
+.gist .file-data>table td.line-data{width:99%}
+div.unbreakable{page-break-inside:avoid}
+.big{font-size:larger}
+.small{font-size:smaller}
+.underline{text-decoration:underline}
+.overline{text-decoration:overline}
+.line-through{text-decoration:line-through}
+.aqua{color:#00bfbf}
+.aqua-background{background:#00fafa}
+.black{color:#000}
+.black-background{background:#000}
+.blue{color:#0000bf}
+.blue-background{background:#0000fa}
+.fuchsia{color:#bf00bf}
+.fuchsia-background{background:#fa00fa}
+.gray{color:#606060}
+.gray-background{background:#7d7d7d}
+.green{color:#006000}
+.green-background{background:#007d00}
+.lime{color:#00bf00}
+.lime-background{background:#00fa00}
+.maroon{color:#600000}
+.maroon-background{background:#7d0000}
+.navy{color:#000060}
+.navy-background{background:#00007d}
+.olive{color:#606000}
+.olive-background{background:#7d7d00}
+.purple{color:#600060}
+.purple-background{background:#7d007d}
+.red{color:#bf0000}
+.red-background{background:#fa0000}
+.silver{color:#909090}
+.silver-background{background:#bcbcbc}
+.teal{color:#006060}
+.teal-background{background:#007d7d}
+.white{color:#bfbfbf}
+.white-background{background:#fafafa}
+.yellow{color:#bfbf00}
+.yellow-background{background:#fafa00}
+span.icon>.fa{cursor:default}
+a span.icon>.fa{cursor:inherit}
+.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
+.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
+.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
+.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
+.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
+.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
+.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
+.conum[data-value] *{color:#fff!important}
+.conum[data-value]+b{display:none}
+.conum[data-value]::after{content:attr(data-value)}
+pre .conum[data-value]{position:relative;top:-.125em}
+b.conum *{color:inherit!important}
+.conum:not([data-value]):empty{display:none}
+dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
+h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
+p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
+p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
+p{margin-bottom:1.25rem}
+.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
+.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
+.print-only{display:none!important}
+@page{margin:1.25cm .75cm}
+@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
+html{font-size:80%}
+a{color:inherit!important;text-decoration:underline!important}
+a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
+a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
+abbr[title]::after{content:" (" attr(title) ")"}
+pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
+thead{display:table-header-group}
+svg{max-width:100%}
+p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
+h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
+#header,#content,#footnotes,#footer{max-width:none}
+#toc,.sidebarblock,.exampleblock>.content{background:none!important}
+#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
+body.book #header{text-align:center}
+body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
+body.book #header .details{border:0!important;display:block;padding:0!important}
+body.book #header .details span:first-child{margin-left:0!important}
+body.book #header .details br{display:block}
+body.book #header .details br+span::before{content:none!important}
+body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
+body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
+.listingblock code[data-lang]::before{display:block}
+#footer{padding:0 .9375em}
+.hide-on-print{display:none!important}
+.print-only{display:block!important}
+.hide-for-print{display:none!important}
+.show-for-print{display:inherit!important}}
+@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem}
+.sect1{padding:0!important}
+.sect1+.sect1{border:0}
+#footer{background:none}
+#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
+@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
+</style>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<style>
+.menu, .submenu, .menuitem, .menuref {
+    background-color: Menu;
+}
+
+.button {
+    border: 1px solid ButtonFace;
+    /*
+    Styling too similar to a real button is considered bad practice, see https://github.com/asciidoctor/asciidoctor/issues/1881#issuecomment-250702085
+    border: 2px outset ButtonFace;
+    background-color: ButtonFace;
+    */
+    padding-left: 0.5ex;
+    padding-right: 0.5ex;
+    font-weight: normal;
+    font-family: "Segoe UI","Open Sans","DejaVu Sans",sans-serif;
+    white-space: nowrap;
+}
+.button:before {
+    content: none !important;
+}
+.button:after {
+    content: none !important;
+}
+
+#footer-text, #footer-text a {
+    color: rgba(255,255,255,.8)
+}
+</style>
+</head>
+<body class="book toc2 toc-left">
+<div id="header">
+<h1>SeText documentation (Incubation)</h1>
+<div class="details">
+<span id="author" class="author">Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation</span><br>
+<span id="revnumber">version 0.2.0.20210521-133237</span>
+</div>
+<div id="toc" class="toc2">
+<div id="toctitle">Table of Contents</div>
+<ul class="sectlevel1">
+<li><a href="#setext-reference-manual">SeText Reference Manual</a>
+<ul class="sectlevel2">
+<li><a href="#setext-lexical-syntax">SeText lexical syntax</a></li>
+<li><a href="#setext-specifying-lexical-syntax">Specifying lexical syntax using SeText</a></li>
+<li><a href="#setext-regular-expressions">Regular expressions</a></li>
+<li><a href="#setext-terminal-descriptions">Terminal descriptions</a></li>
+<li><a href="#setext-imports">Imports</a></li>
+<li><a href="#setext-scanner-hooks">Scanner hooks</a></li>
+<li><a href="#setext-specifying-grammars">Specifying grammars using SeText</a></li>
+<li><a href="#setext-parser-hooks">Parser hooks</a></li>
+<li><a href="#setext-usage-hints">Usage hints</a></li>
+<li><a href="#setext-generated-scanners-parsers">Generated scanners/parsers</a></li>
+</ul>
+</li>
+<li><a href="#setext-using-in-an-eclipse-plugin-project">Using SeText in an Eclipse Plug-in Project</a></li>
+<li><a href="#setext-limitations-issues">Limitations and issues</a></li>
+<li><a href="#setext-release-notes">SeText release notes</a>
+<ul class="sectlevel2">
+<li><a href="#version-0-2">Version 0.2</a></li>
+<li><a href="#version-0-1">Version 0.1</a></li>
+</ul>
+</li>
+<li><a href="#setext-legal">Legal</a></li>
+</ul>
+</div>
+</div>
+<div id="content">
+<div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>SeText is a textual syntax specification language and associated scanner/parser
+generator. It can be used to specify the syntax of a language, and automatically
+generate a scanner and LALR(1) parser(s).</p>
+</div>
+<div class="paragraph">
+<p>SeText is one of the tools of the Eclipse ESCET&#8482; project. Visit the
+<a href="https://eclipse.org/escet">project website</a> for downloads,
+installation instructions, source code, general tool usage information,
+information on how to contribute, and more.</p>
+</div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>The Eclipse ESCET project, including the SeText language and toolset,
+is currently in the
+<a href="https://wiki.eclipse.org/Development_Resources/Process_Guidelines/What_is_Incubation">Incubation Phase</a>.</p>
+</div>
+<div class="paragraph">
+<p><span class="image"><img src="./eclipse-incubation.png" alt="eclipse incubation" width="300"></span></p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>For the purpose of this document, it is assumed that the reader is familiar
+with scanner/parser generators (for example <em>yacc</em>/<em>bison</em> and <em>lex</em>/<em>flex</em>),
+scanner and LALR(1) parser technology (including regular expressions and BNF
+notation), and understands the limitations of the LALR(1) algorithm.</p>
+</div>
+<div class="admonitionblock tip">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-tip" title="Tip"></i>
+</td>
+<td class="content">
+You can <a href="eclipse-escet-incubation-setext-manual.pdf">download this manual</a>
+as a PDF as well.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The following topics are discussed:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#setext-reference-manual">SeText Reference Manual</a></p>
+</li>
+<li>
+<p><a href="#setext-using-in-an-eclipse-plugin-project">Using SeText in an Eclipse Plug-in Project</a></p>
+</li>
+<li>
+<p><a href="#setext-limitations-issues">Limitations and issues</a></p>
+</li>
+<li>
+<p><a href="#setext-release-notes">SeText release notes</a></p>
+</li>
+<li>
+<p><a href="#setext-legal">Legal information</a></p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="setext-reference-manual">SeText Reference Manual</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This manual explains the SeText language.
+Topics discussed here are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#setext-lexical-syntax">SeText lexical syntax</a></p>
+</li>
+<li>
+<p><a href="#setext-specifying-lexical-syntax">Specifying lexical syntax using SeText</a></p>
+</li>
+<li>
+<p><a href="#setext-regular-expressions">Regular expressions</a></p>
+</li>
+<li>
+<p><a href="#setext-terminal-descriptions">Terminal descriptions</a></p>
+</li>
+<li>
+<p><a href="#setext-imports">Imports</a></p>
+</li>
+<li>
+<p><a href="#setext-scanner-hooks">Scanner hooks</a></p>
+</li>
+<li>
+<p><a href="#setext-specifying-grammars">Specifying grammars using SeText</a></p>
+</li>
+<li>
+<p><a href="#setext-parser-hooks">Parser hooks</a></p>
+</li>
+<li>
+<p><a href="#setext-usage-hints">Usage hints</a></p>
+</li>
+<li>
+<p><a href="#setext-generated-scanners-parsers">Generated scanners/parsers</a></p>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="setext-lexical-syntax">SeText lexical syntax</h3>
+<div class="paragraph">
+<p>SeText supports the following comments:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Everything after <code>//</code> until the end of the line is a comment.</p>
+</li>
+<li>
+<p>Everything from <code>/*</code> up to the next <code>*/</code>, possibly spanning multiple
+lines, is a comment.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>SeText keywords may be used by escaping them with a <code>$</code> character.</p>
+</div>
+<div class="paragraph">
+<p>Whitespace (spaces, tabs, and new lines) are essentially ignored.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="setext-specifying-lexical-syntax">Specifying lexical syntax using SeText</h3>
+<div class="paragraph">
+<p>Terminals can be specified as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@terminals:
+  @keywords Operators = and or;
+  @keywords Functions = log sin cos tan;
+end
+
+@terminals:
+  IDTK = "$?[a-zA-Z_][a-zA-Z0-9_]*" {scanID};
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Here we specified two groups of terminals. The first group specifies two
+keyword (sub-)groups, named <code>Operators</code> and <code>Functions</code>. For these keywords
+(<code>and</code>, <code>or</code>, <code>log</code>, etc), terminals are created (<code>ANDKW</code>, <code>ORKW</code>,
+<code>LOGKW</code>, etc). Furthermore, the keyword group names (<code>Operators</code> and
+<code>Functions</code>) may be used as non-terminals in the grammar, to recognize
+exactly one of the keyword terminals created for that keyword group.</p>
+</div>
+<div class="paragraph">
+<p>The second group specifies an <code>IDTK</code> terminal, defined by a regular
+expression (see below). The <code>{scanID}</code> part indicates that the resulting
+tokens should be passed to the <code>scanID</code> method in the hooks class (see
+below), to allow post-processing. Post-processing methods are also allowed
+for keyword identifiers, such as <code>sin</code> and <code>cos</code> in the example.</p>
+</div>
+<div class="paragraph">
+<p>SeText generated scanners use longest match when recognizing tokens. If two
+or more terminals recognize the same longest match, priorities are used to
+resolve the conflict. For the example above, the first group of terminals has
+priority over the second group, thus giving the keywords priority over the
+identifiers. That is, <code>@terminals</code> groups listed earlier in the specification
+have higher priority than <code>@terminals</code> groups listed later in the
+specification. If two terminals accept the same input, and they are defined
+within the same group (they have the same priority), then the specification
+is invalid.</p>
+</div>
+<div class="paragraph">
+<p>It is also possible to use scanner states:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@terminals:
+  "//.*";
+  "/\*" -&gt; BLOCK_COMMENT;
+  @eof;
+end
+
+@terminals BLOCK_COMMENT:
+  "\*/" -&gt;;
+  ".";
+  "\n";
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first group of terminals is for the default state, as no state name is
+specified. Single line comments (<code>// ...</code>) are detected using the first
+regular expression. This expression is not given a name, and can thus not be
+used in parser rules.</p>
+</div>
+<div class="paragraph">
+<p>The second regular expression detects the start of block comments (<code>/*</code>)
+and switches the scanner to the <code>BLOCK_COMMENT</code> state.</p>
+</div>
+<div class="paragraph">
+<p>The second group of terminals is detected only when the scanner is in the
+<code>BLOCK_COMMENT</code> state, as indicated by the <code>BLOCK_COMMENT</code> state name after
+the <code>@terminals</code> keyword. Everything except for the end of the comment is
+ignored (no name for the terminals, and no new scanner state). The end of
+block comments (<code>*/</code>) makes the scanner go back to the default scanner
+state (arrow without state name).</p>
+</div>
+<div class="paragraph">
+<p>The <code>@eof</code> terminal indicates that end-of-file is allowed in a scanner
+state (in this case, the default scanner state).</p>
+</div>
+<div class="paragraph">
+<p>For every scanner, the name of the Java class to generate should be specified,
+as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@scanner some.package.SomeScanner;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The scanner class must not be a generic class. Imports (see below) can be used
+to shorten the specification of the Java class name.</p>
+</div>
+<div class="paragraph">
+<p>Shortcuts can be used for reuse of regular expressions:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@shortcut identifier = "$?[a-zA-Z_][a-zA-Z0-9_]*";
+
+@terminals:
+  ID2TK = "{identifier}.{identifier}";
+  ID3TK = "{identifier}.{identifier}.{identifier}";
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It is possible to use shortcuts in other shortcuts, as long as a shortcut is
+defined before its use.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="setext-regular-expressions">Regular expressions</h3>
+<div class="paragraph">
+<p>Regular expressions are enclosed in double quotes. Within them, the following
+are supported:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>a</code> for character <code>a</code>, for any <code>a</code> (special characters need escaping).</p>
+</li>
+<li>
+<p><code>\n</code> for the new line character (Unicode U+0A).</p>
+</li>
+<li>
+<p><code>\r</code> for the carriage return character (Unicode U+0D).</p>
+</li>
+<li>
+<p><code>\t</code> for the tab character (Unicode U+09).</p>
+</li>
+<li>
+<p><code>\a</code> for character <code>a</code>, for any <code>a</code> (especially useful for escaping
+special characters).</p>
+</li>
+<li>
+<p><code>\\</code> for character <code>\</code> (escaped).</p>
+</li>
+<li>
+<p><code>\"</code> for character <code>"</code> (escaped).</p>
+</li>
+<li>
+<p><code>(x)</code> for regular expression <code>x</code> (allows for grouping).</p>
+</li>
+<li>
+<p><code>xy</code> for regular expression <code>x</code> followed by regular expression <code>y</code>.</p>
+</li>
+<li>
+<p><code>x*</code> for zero or more times regular expression <code>x</code>.</p>
+</li>
+<li>
+<p><code>x+</code> for one or more times regular expression <code>x</code>.</p>
+</li>
+<li>
+<p><code>x?</code> for zero or one times regular expression <code>x</code>.</p>
+</li>
+<li>
+<p><code>.</code> for any ASCII character except <code>\n</code> (new line, Unicode U+0A).</p>
+</li>
+<li>
+<p><code>x|y</code> for either regular expression <code>x</code> or regular expression <code>y</code>
+(but not both).</p>
+</li>
+<li>
+<p><code>[abc]</code> for exactly one of the characters <code>a</code>, <code>b</code> or <code>c</code>.</p>
+</li>
+<li>
+<p><code>[a-z]</code> for exactly one of the characters <code>a</code>, <code>b</code>, &#8230;&#8203;, or <code>z</code>.
+This notation is called a character class. Note that the ranges of
+characters are based on their ASCII character codes.</p>
+</li>
+<li>
+<p><code>[^a]</code> for any ASCII character except for character <code>a</code>. This notation
+is called a negated character class.</p>
+</li>
+<li>
+<p><code>{s}</code> for the regular expression defined by shortcut <code>s</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>To include special characters, they must always be escaped, wherever they
+occur in the regular expression. For instance, regular expression <code>[a\^]</code>
+recognizes either character <code>a</code> or character <code>^</code> (but not both). Here
+the <code>^</code> character is escaped, as it is a special character (it may be used
+at the beginning of a character class to invert the character class).</p>
+</div>
+<div class="paragraph">
+<p>New lines are not allowed in the regular expressions themselves. Obviously,
+it is possible to detect new lines using regular expressions.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="setext-terminal-descriptions">Terminal descriptions</h3>
+<div class="paragraph">
+<p>Terminals can be given an end user readable description (just before the
+semicolon), for use in parser error messages:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@terminals:
+  @keywords Operators = and            // "and"
+                        or;            // "or"
+  IDTK   = "[a-z]+" [an identifier];   // an identifier
+  ID2TK  = "[A-Z]+" [ an identifier ]; // an identifier
+  ASNGTK = ":=";                       // ":="
+  @eof;                                // end-of-file
+  X = "[abc]";                         // X
+  "[def]";                             // no description</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Keyword literals (<code>ANDTK</code> and <code>ORTK</code> in the example above) have the
+keywords surrounded by double quotes as default description. Similarly,
+terminals defined by regular expressions without choice (no character classes,
+star operators, etc) and using only 'graphical' characters (no control
+characters, end-of-file, new lines, etc) also have the literal text that they
+match (surrounded by double quotes) as default description (see <code>ASGNTK</code> in
+the example above). The end-of-file token has <code>end-of-file</code> as default
+description. Keywords that don&#8217;t have a description and don&#8217;t have default
+descriptions as described above, get the name of the terminal as description
+(see <code>X</code> in the example above). If they don&#8217;t have a name, they have no
+description.</p>
+</div>
+<div class="paragraph">
+<p>Nameless terminals are not used by the parser, and therefore do not require a
+description. The end-of-file terminal has a default description, and can not be
+given a custom description. Giving a terminal a custom description if it
+already has a default description, leads to a warning.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="setext-imports">Imports</h3>
+<div class="paragraph">
+<p>Java classes/types can be specified in SeText specifications using their fully
+quantified names, optionally with generic type parameters:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">java.util.String
+java.util.List
+java.util.List&lt;java.util.String&gt;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>but it is also possible to use imports:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@import java.util.String;
+@import java.util.String as string;
+@import java.util;
+@import java.util as u;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The first import imports <code>java.util.String</code> as <code>String</code>. The second
+imports the same type as <code>string</code>. The third import imports the <code>java.util</code>
+package as <code>util</code>. The fourth import imports that same package as <code>u</code>.
+After these imports, the following all refer to the <code>java.util.String</code> Java
+type/class:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">java.util.String
+util.String
+u.String
+String
+string</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It is also possible to import generic types, with their type parameters
+instantiated:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@import java.util.List&lt;java.util.String&gt; as stringList</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>allowing <code>stringList</code> to be used as a short form for
+<code>java.util.List&lt;java.util.String&gt;</code>.</p>
+</div>
+<div class="paragraph">
+<p>Note that it is not possible to use imports to shorten other imports.</p>
+</div>
+<div class="paragraph">
+<p>Finally, note that Java types where the first part of the identifier (the
+part before any dot) does not refer to an import, are considered absolute.
+This means that any Java type name not containing a dot, and not referring to
+an import, is also considered absolute, and thus refers to a class with that
+name, in the default package.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="setext-scanner-hooks">Scanner hooks</h3>
+<div class="paragraph">
+<p>As indicated above, the following SeText specification:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@terminals:
+  IDTK = "$?[a-zA-Z_][a-zA-Z0-9_]*" {scanID};
+end</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>defines a terminal <code>IDTK</code>, which if recognized, is passed to a <code>scanID</code>
+method for post-processing. If such a call back hook method is specified,
+a (non-generic) hooks class is required. It can be specified as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@hooks some.package.SomeHooks;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>As for all Java types, imports can be used. For this example, the
+<code>some.package.SomeHooks</code> class must have a default (parameterless)
+constructor, and an instance method with the following signature:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">public void scanID(Token token);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>where the <code>Token</code> class is the <code>org.eclipse.escet.setext.runtime.Token</code> class. The
+method may perform in-place modifications to the <code>text</code> field of the
+<code>token</code> parameter.</p>
+</div>
+<div class="paragraph">
+<p>It is allowed to throw <code>org.eclipse.escet.setext.runtime.exceptions.SyntaxException</code>
+exceptions in the hooks methods.</p>
+</div>
+<div class="paragraph">
+<p>Note that each generated scanner has an inner interface named <code>Hooks</code> that
+defines all the required call back hook methods. The hooks class must implement
+the interface. This does not apply to scanners that don&#8217;t have any terminals
+with call back hooks.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="setext-specifying-grammars">Specifying grammars using SeText</h3>
+<div class="paragraph">
+<p>All SeText grammars start with one or more start symbols:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@main  Program    : some.package.ProgramParser;
+@start Expression : some.package.ExpressionParser;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This specifies two start symbols, the non-terminals <code>Program</code> and
+<code>Expression</code>. Each start symbol further specifies the parser class that
+should be generated for that start symbol. Once again, imports are allowed,
+and the classes must be non-generic.</p>
+</div>
+<div class="paragraph">
+<p>There are two types of start symbols:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>regular start symbols (<code>@start</code> keyword)</p>
+</li>
+<li>
+<p>main start symbols (<code>@main</code> keyword)</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The main start symbols are exactly the same as the regular ones, except that
+they must cover the entire grammar. That is, all non-terminals must be
+reachable from each of the main start symbols. There is no such restriction
+for regular start symbols.</p>
+</div>
+<div class="paragraph">
+<p>The non-terminals and rules (or productions) can be specified using a BNF
+like syntax, as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">{java.util.List&lt;some.package.SomeClass&gt;}
+NonTerm : /* empty */
+        | NonTerm2
+        | NonTerm NonTerm2
+        | NonTerm3 @PLUSTK NonTerm3 SEMICOLTK
+        ;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This example specifies a non-terminal named <code>NonTerm</code>. Once reduced, the
+call back hooks for this non-terminal must result in a Java object of type
+<code>java.util.List&lt;some.package.SomeClass&gt;</code>. Here, both generic types and
+imports are allowed.</p>
+</div>
+<div class="paragraph">
+<p>The non-terminal is defined by four rules (or productions). The first rule
+is empty, as clarified by the comment. The comment is obviously not required.
+The second rule consists of a single non-terminal <code>NonTerm2</code>, etc.</p>
+</div>
+<div class="paragraph">
+<p>Each non-terminal rule gives rise to a call back hook method. The parameters of
+that method are determined by the symbols that make up that rule. That is,
+all non-terminal are always passed to the call back hook method. Terminals
+are only passed to the method if they are prefixed with a <code>@</code> character.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="setext-parser-hooks">Parser hooks</h3>
+<div class="paragraph">
+<p>For parsers, a hooks class must always be specified. The scanner and all
+parsers share a single (non-generic) hooks class. The following specification
+(from which we omit the scanner part):</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-setext" data-lang="setext">@hooks some.package.SomeHooks;
+
+@import some.package.ast;
+
+@main Expression : some.package.ExpressionParser;
+
+{ast.Expression}
+Expression : /* empty */
+           | Expression @PLUSTK Literal
+           | Expression MINUSTK Literal
+           ;
+
+{ast.Literal}
+Literal : @IDTK
+        | PITK
+        ;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>requires a <code>some.package.SomeHooks</code> Java class, with a default
+(parameterless) constructor, and five methods, with the following signatures:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">public Expression parseExpression1();
+
+public Expression parseExpression2(Expression e1, Token t2, Literal l3);
+
+public Expression parseExpression3(Expression e1, Literal l3);
+
+public Literal parseLiteral1(Token t1);
+
+public Literal parseLiteral2();</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The return types are determined by the non-terminals. The names of the methods
+are formed from the text <code>parse</code>, the name of the non-terminal, and number
+of the rule, within the non-terminal. Note that all numbers have equal length.
+For instance <code>01</code>, <code>02</code>, <code>03</code>, &#8230;&#8203;, <code>12</code>. The parameters consist of
+all the non-terminals that make up the , as well and those terminals with a
+<code>@</code> before them. The types of the non-terminal parameters are the types of
+the corresponding non-terminals. For terminals, the type is the
+<code>org.eclipse.escet.setext.runtime.Token</code> class. The parameter names are formed from
+their types (first character of the simple name of the class, in lower case),
+followed by the number of the symbol in the rule, without any <code>0</code> prefixes.
+All numbers start counting at one (<code>1</code>).</p>
+</div>
+<div class="paragraph">
+<p>Note that each generated parser has an inner interface named <code>Hooks</code> that
+defines all the required call back hook methods. The hooks class must implement
+the interface(s). This interface specifies one additional method, which all
+parser hooks classes must implement:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">public void setParser&lt;Parser&lt;?&gt; parser);</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>where the <code>Parser&lt;?&gt;</code> class is the <code>org.eclipse.escet.setext.runtime.Parser</code> class.
+This method is provided to allow hooks classes access to the parser that
+creates the hooks class, and its source information. For more information,
+see the <code>getSource</code> method of the <code>Parser</code> class.</p>
+</div>
+<div class="paragraph">
+<p>An implementation of a hooks class for this example could look like this:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-java" data-lang="java">package some.package;
+
+import org.eclipse.escet.setext.runtime.Parser;
+import org.eclipse.escet.setext.runtime.Token;
+import some.package.ast.Expression;
+import some.package.ast.Literal;
+
+public class SomeHooks implements ExpressionParser.Hooks {
+    @Override
+    public void setParser(Parser&lt;?&gt; parser) {
+        // No need to store this...
+    }
+
+    @Override
+    public Expression parseExpression1() {
+        return null; // Do something more useful here...
+    }
+
+    @Override
+    public Expression parseExpression2(Expression e1, Token t2, Literal l3) {
+        return null; // Do something more useful here...
+    }
+
+    @Override
+    public Expression parseExpression3(Expression e1, Literal l3) {
+        return null; // Do something more useful here...
+    }
+
+    @Override
+    public Literal parseLiteral1(Token t1) {
+        return null; // Do something more useful here...
+    }
+
+    @Override
+    public Literal parseLiteral2() {
+        return null; // Do something more useful here...
+    }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>It is allowed to throw <code>org.eclipse.escet.setext.runtime.exceptions.SyntaxException</code>
+exceptions in the hooks methods. Furthermore, it is allowed to add fold regions
+to the parser (which then needs to be stored as it is provided via the
+<code>setParser</code> hook method), using the <code>addFoldRange</code> methods of the
+<code>org.eclipse.escet.setext.runtime.Parser</code> class.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="setext-usage-hints">Usage hints</h3>
+<div class="paragraph">
+<p>Here are some hints on using SeText:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>It is recommended to name the generated and hooks classes, using the
+following convention: <code>XyzScanner</code>, <code>XyzParser</code>, <code>XyzHooks</code>, for
+the scanner, parser, and hooks classes of a language <code>Xyz</code> or <code>XYZ</code>.
+For parsers for a part of a language, it is recommended to name the
+generated parsers <code>XyzPartParser</code>, for non-terminal <code>Part</code> of language
+<code>Xyz</code> or <code>XYZ</code>. Following these naming conventions ensures consistency
+in the naming of the classes.</p>
+</li>
+<li>
+<p>It is recommended to import the packages that contain the classes used
+as the types of the non-terminals. For instance, import the expressions
+package <code>some.long.package.name.expressions</code> as <code>expressions</code> or
+<code>exprs</code>, and then use <code>{exprs.SomeClass}</code> as the type for a
+non-terminal, instead of <code>{some.long.package.name.expressions.SomeClass}</code>.
+Importing the package instead of the individual classes reduces the number
+of imports, and also avoids conflicts between non-terminals names and
+class names. For standard Java types, however, it is recommended to import
+the full type. For instance, import <code>java.lang.String</code> or
+<code>java.util.List</code>.</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="setext-generated-scanners-parsers">Generated scanners/parsers</h3>
+<div class="paragraph">
+<p>The generated scanners and parsers depend on the <code>org.eclipse.escet.setext.runtime</code>
+and <code>org.eclipse.escet.common.java</code> plug-ins. Generated scanners and parsers inherit
+from the <code>org.eclipse.escet.setext.runtime.Scanner</code> class and
+<code>org.eclipse.escet.setext.runtime.Parser</code> class respectively. Look at those classes for
+the public API of generated scanners/parsers, as it should be fairly
+self-explanatory.</p>
+</div>
+<div class="paragraph">
+<p>Besides the scanner and parser(s), debug output is generated from which the
+scanner and parser(s) can be analyzed. In particular, the debug output for
+the parsers makes it possible to find out the details about conflicts in the
+grammar. Furthermore, a skeleton is generated for the hooks class.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="setext-using-in-an-eclipse-plugin-project">Using SeText in an Eclipse Plug-in Project</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>For a new language, follow these steps:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Create a <em>Plug-in Project</em> in Eclipse.</p>
+</li>
+<li>
+<p>Add the <code>org.eclipse.escet.common.java</code> and <code>org.eclipse.escet.setext.runtime</code> plug-ins to
+the <em>Required plug-ins</em> in the project&#8217;s manifest. Also add any plug-ins
+that define the classes that you will be referring to in the SeText
+specification.</p>
+</li>
+<li>
+<p>Create the Java package where your scanner, parser(s) and hooks classes
+are to be stored.</p>
+</li>
+<li>
+<p>Create a text file ending with <code>.setext</code> in that same package. Fill the
+specification, and save it.</p>
+</li>
+<li>
+<p>Right click the file in the <em>Project Explorer</em> or <em>Package Explorer</em>,
+and choose the <em>Generate Parser(s)</em> action. Alternatively, right click
+the text editor for the SeText specification and choose the same action.</p>
+</li>
+<li>
+<p>Observe how the files are generated. Make sure the console is free of
+warnings and errors.</p>
+</li>
+<li>
+<p>Copy the hooks class skeleton (extension <code>.skeleton</code> to extension
+<code>.java</code>), and implement the hooks.</p>
+</li>
+<li>
+<p>You are ready to use the scanner and parser(s).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>After changes to the SeText specification:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Regenerate the code, as before.</p>
+</li>
+<li>
+<p>If a <code>Hooks</code> interface has changed, update the hooks class.</p>
+</li>
+<li>
+<p>You are ready to use the modified scanner and parser(s).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>It may be a good idea to put the <code>.skeleton</code> file in a version control
+system. That way, after regeneration, you can ask for a diff. You then
+know what has changed, and how you need to update the hooks class.</p>
+</div>
+<div class="paragraph">
+<p>Also note that if a generated <code>Hooks</code> interface changes after a regeneration,
+Java will report errors for methods not yet present in the hook class.
+Similarly, Java will complain about changed method signatures, and methods that
+no longer exist in the <code>Hooks</code> interface (and thus have invalid <code>@Override</code>
+annotations in the hooks class).</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="setext-limitations-issues">Limitations and issues</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The following limitations currently apply:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>SeText only allows for the specification of scanners that accept ASCII
+input.</p>
+</li>
+<li>
+<p>SeText currently assumes UTF-8 encoded files. If the input file is actually
+encoded using a different encoding, scanner exceptions may indicate the
+wrong character.</p>
+</li>
+<li>
+<p>SeText does not support grammars with conflicts (shift/reduce,
+reduce/reduce, accept/reduce).</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="setext-release-notes">SeText release notes</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The release notes for the releases of SeText and the associated tools, as
+part of the Eclipse ESCET project, are listed below in reverse chronological
+order.</p>
+</div>
+<div class="paragraph">
+<p>The release notes may refer to issues, the details for which can be found
+at the Eclipse ESCET
+<a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/issues">GitLab issues page</a>.</p>
+</div>
+<div class="paragraph">
+<p>See also the Eclipse ESCET
+<a href="https://www.eclipse.org/escet/escet/#release-notes-chapter-index">toolkit release notes</a>
+covering those aspects that are common to the various Eclipse ESCET tools.</p>
+</div>
+<div class="sect2">
+<h3 id="version-0-2">Version 0.2</h3>
+<div class="paragraph">
+<p>TBD</p>
+</div>
+<div class="paragraph">
+<p>Improvements and fixes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Documentation has been adapted to be more like the documentation of the
+other Eclipse ESCET tools (issue #51).</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="version-0-1">Version 0.1</h3>
+<div class="paragraph">
+<p>The first release of SeText as part of the Eclipse ESCET project.
+This release is based on the initial contribution by the Eindhoven University
+of Technology (TU/e).</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="setext-legal">Legal</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The material in this documentation is
+Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation.</p>
+</div>
+<div class="paragraph">
+<p>Eclipse ESCET and ESCET are trademarks of the Eclipse Foundation.
+Eclipse, and the Eclipse Logo are registered trademarks of the
+Eclipse Foundation. Other names may be trademarks of their
+respective owners.</p>
+</div>
+<div class="paragraph">
+<p><strong>License</strong></p>
+</div>
+<div class="paragraph">
+<p>The Eclipse Foundation makes available all content in this document
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the MIT License. A copy of the MIT License
+is available at <a href="https://opensource.org/licenses/MIT" class="bare">https://opensource.org/licenses/MIT</a>. For purposes of the
+MIT License, "Software" will mean the Content.</p>
+</div>
+<div class="paragraph">
+<p>If you did not receive this Content directly from the Eclipse Foundation,
+the Content is being redistributed by another party ("Redistributor") and
+different terms and conditions may apply to your use of any object code in
+the Content. Check the Redistributor&#8217;s license that was provided with the
+Content. If no such license exists, contact the Redistributor. Unless
+otherwise indicated below, the terms and conditions of the MIT License
+still apply to any source code in the Content and such source code may be
+obtained at <a href="http://www.eclipse.org" class="bare">http://www.eclipse.org</a>.</p>
+</div>
+</div>
+</div>
+</div>
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+  messageStyle: "none",
+  tex2jax: {
+    inlineMath: [["\\(", "\\)"]],
+    displayMath: [["\\[", "\\]"]],
+    ignoreClass: "nostem|nolatexmath"
+  },
+  asciimath2jax: {
+    delimiters: [["\\$", "\\$"]],
+    ignoreClass: "nostem|noasciimath"
+  },
+  TeX: { equationNumbers: { autoNumber: "none" } }
+})
+MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
+  MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) {
+    if ((node = data.script.parentNode) && (node = node.parentNode) && node.classList.contains("stemblock")) {
+      data.math.root.display = "block"
+    }
+    return data
+  })
+})
+</script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+
+<div id="footer">
+<div id="footer-text">
+<a href="https://www.eclipse.org">Eclipse Home</a>
+|
+<a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a>
+|
+<a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a>
+|
+<a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a>
+|
+<a href="https://www.eclipse.org/legal">Eclipse Legal</a>
+</div>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/v0.2-M1/tooldef/eclipse-escet-incubation-tooldef-manual.pdf b/v0.2-M1/tooldef/eclipse-escet-incubation-tooldef-manual.pdf
new file mode 100644
index 0000000..918106b
--- /dev/null
+++ b/v0.2-M1/tooldef/eclipse-escet-incubation-tooldef-manual.pdf
Binary files differ
diff --git a/v0.2-M1/tooldef/eclipse-incubation.png b/v0.2-M1/tooldef/eclipse-incubation.png
new file mode 100644
index 0000000..5fccef5
--- /dev/null
+++ b/v0.2-M1/tooldef/eclipse-incubation.png
Binary files differ
diff --git a/v0.2-M1/tooldef/favicon.png b/v0.2-M1/tooldef/favicon.png
new file mode 100644
index 0000000..d394f09
--- /dev/null
+++ b/v0.2-M1/tooldef/favicon.png
Binary files differ
diff --git a/v0.2-M1/tooldef/index.html b/v0.2-M1/tooldef/index.html
new file mode 100644
index 0000000..55001ba
--- /dev/null
+++ b/v0.2-M1/tooldef/index.html
@@ -0,0 +1,6422 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="UTF-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="generator" content="Asciidoctor 2.0.12">
+<meta name="author" content="Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation">
+<link rel="icon" type="image/png" href="favicon.png">
+<title>ToolDef documentation (Incubation)</title>
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
+<style>
+/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
+/* Uncomment @import statement to use as custom stylesheet */
+/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
+article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}
+audio,video{display:inline-block}
+audio:not([controls]){display:none;height:0}
+html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
+a{background:none}
+a:focus{outline:thin dotted}
+a:active,a:hover{outline:0}
+h1{font-size:2em;margin:.67em 0}
+abbr[title]{border-bottom:1px dotted}
+b,strong{font-weight:bold}
+dfn{font-style:italic}
+hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
+mark{background:#ff0;color:#000}
+code,kbd,pre,samp{font-family:monospace;font-size:1em}
+pre{white-space:pre-wrap}
+q{quotes:"\201C" "\201D" "\2018" "\2019"}
+small{font-size:80%}
+sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
+sup{top:-.5em}
+sub{bottom:-.25em}
+img{border:0}
+svg:not(:root){overflow:hidden}
+figure{margin:0}
+fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
+legend{border:0;padding:0}
+button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
+button,input{line-height:normal}
+button,select{text-transform:none}
+button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
+button[disabled],html input[disabled]{cursor:default}
+input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
+button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
+textarea{overflow:auto;vertical-align:top}
+table{border-collapse:collapse;border-spacing:0}
+*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
+html,body{font-size:100%}
+body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
+a:hover{cursor:pointer}
+img,object,embed{max-width:100%;height:auto}
+object,embed{height:100%}
+img{-ms-interpolation-mode:bicubic}
+.left{float:left!important}
+.right{float:right!important}
+.text-left{text-align:left!important}
+.text-right{text-align:right!important}
+.text-center{text-align:center!important}
+.text-justify{text-align:justify!important}
+.hide{display:none}
+img,object,svg{display:inline-block;vertical-align:middle}
+textarea{height:auto;min-height:50px}
+select{width:100%}
+.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
+div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
+a{color:#2156a5;text-decoration:underline;line-height:inherit}
+a:hover,a:focus{color:#1d4b8f}
+a img{border:0}
+p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
+p aside{font-size:.875em;line-height:1.35;font-style:italic}
+h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
+h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
+h1{font-size:2.125em}
+h2{font-size:1.6875em}
+h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
+h4,h5{font-size:1.125em}
+h6{font-size:1em}
+hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
+em,i{font-style:italic;line-height:inherit}
+strong,b{font-weight:bold;line-height:inherit}
+small{font-size:60%;line-height:inherit}
+code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
+ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
+ul,ol{margin-left:1.5em}
+ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
+ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
+ul.square{list-style-type:square}
+ul.circle{list-style-type:circle}
+ul.disc{list-style-type:disc}
+ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
+dl dt{margin-bottom:.3125em;font-weight:bold}
+dl dd{margin-bottom:1.25em}
+abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
+abbr{text-transform:none}
+blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
+blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
+blockquote cite::before{content:"\2014 \0020"}
+blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
+blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
+@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
+h1{font-size:2.75em}
+h2{font-size:2.3125em}
+h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
+h4{font-size:1.4375em}}
+table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede;word-wrap:normal}
+table thead,table tfoot{background:#f7f8f7}
+table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
+table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
+table tr.even,table tr.alt{background:#f8f8f7}
+table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
+h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
+h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
+.center{margin-left:auto;margin-right:auto}
+.stretch{width:100%}
+.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
+.clearfix::after,.float-group::after{clear:both}
+:not(pre).nobreak{word-wrap:normal}
+:not(pre).nowrap{white-space:nowrap}
+:not(pre).pre-wrap{white-space:pre-wrap}
+:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
+pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
+pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
+pre>code{display:block}
+pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
+em em{font-style:normal}
+strong strong{font-weight:400}
+.keyseq{color:rgba(51,51,51,.8)}
+kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
+.keyseq kbd:first-child{margin-left:0}
+.keyseq kbd:last-child{margin-right:0}
+.menuseq,.menuref{color:#000}
+.menuseq b:not(.caret),.menuref{font-weight:inherit}
+.menuseq{word-spacing:-.02em}
+.menuseq b.caret{font-size:1.25em;line-height:.8}
+.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
+b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
+b.button::before{content:"[";padding:0 3px 0 2px}
+b.button::after{content:"]";padding:0 2px 0 3px}
+p a>code:hover{color:rgba(0,0,0,.9)}
+#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
+#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
+#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
+#content{margin-top:1.25em}
+#content::before{content:none}
+#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
+#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
+#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
+#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
+#header .details span:first-child{margin-left:-.125em}
+#header .details span.email a{color:rgba(0,0,0,.85)}
+#header .details br{display:none}
+#header .details br+span::before{content:"\00a0\2013\00a0"}
+#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
+#header .details br+span#revremark::before{content:"\00a0|\00a0"}
+#header #revnumber{text-transform:capitalize}
+#header #revnumber::after{content:"\00a0"}
+#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
+#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
+#toc>ul{margin-left:.125em}
+#toc ul.sectlevel0>li>a{font-style:italic}
+#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
+#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
+#toc li{line-height:1.3334;margin-top:.3334em}
+#toc a{text-decoration:none}
+#toc a:active{text-decoration:underline}
+#toctitle{color:#7a2518;font-size:1.2em}
+@media screen and (min-width:768px){#toctitle{font-size:1.375em}
+body.toc2{padding-left:15em;padding-right:0}
+#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
+#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
+#toc.toc2>ul{font-size:.9em;margin-bottom:0}
+#toc.toc2 ul ul{margin-left:0;padding-left:1em}
+#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
+body.toc2.toc-right{padding-left:0;padding-right:15em}
+body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
+@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
+#toc.toc2{width:20em}
+#toc.toc2 #toctitle{font-size:1.375em}
+#toc.toc2>ul{font-size:.95em}
+#toc.toc2 ul ul{padding-left:1.25em}
+body.toc2.toc-right{padding-left:0;padding-right:20em}}
+#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
+#content #toc>:first-child{margin-top:0}
+#content #toc>:last-child{margin-bottom:0}
+#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
+#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
+#content{margin-bottom:.625em}
+.sect1{padding-bottom:.625em}
+@media screen and (min-width:768px){#content{margin-bottom:1.25em}
+.sect1{padding-bottom:1.25em}}
+.sect1:last-child{padding-bottom:0}
+.sect1+.sect1{border-top:1px solid #e7e7e9}
+#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
+#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
+#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
+#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
+#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
+details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
+details>summary:first-of-type{cursor:pointer;display:list-item;outline:none;margin-bottom:.75em}
+.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
+table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
+.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
+table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit}
+.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
+.admonitionblock>table td.icon{text-align:center;width:80px}
+.admonitionblock>table td.icon img{max-width:none}
+.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
+.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
+.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
+.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
+.exampleblock>.content>:first-child{margin-top:0}
+.exampleblock>.content>:last-child{margin-bottom:0}
+.sidebarblock{border-style:solid;border-width:1px;border-color:#dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;-webkit-border-radius:4px;border-radius:4px}
+.sidebarblock>:first-child{margin-top:0}
+.sidebarblock>:last-child{margin-bottom:0}
+.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
+.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
+.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
+@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
+@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
+.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
+.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
+.listingblock>.content{position:relative}
+.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
+.listingblock:hover code[data-lang]::before{display:block}
+.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
+.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
+.listingblock pre.highlightjs{padding:0}
+.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
+.listingblock pre.prettyprint{border-width:0}
+.prettyprint{background:#f7f7f8}
+pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
+pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
+pre.prettyprint li code[data-lang]::before{opacity:1}
+pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
+table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
+table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
+table.linenotable td.code{padding-left:.75em}
+table.linenotable td.linenos{border-right:1px solid currentColor;opacity:.35;padding-right:.5em}
+pre.pygments .lineno{border-right:1px solid currentColor;opacity:.35;display:inline-block;margin-right:.75em}
+pre.pygments .lineno::before{content:"";margin-right:-.125em}
+.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
+.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
+.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
+.quoteblock blockquote{margin:0;padding:0;border:0}
+.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
+.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
+.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
+.verseblock{margin:0 1em 1.25em}
+.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
+.verseblock pre strong{font-weight:400}
+.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
+.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
+.quoteblock .attribution br,.verseblock .attribution br{display:none}
+.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
+.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
+.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
+.quoteblock.abstract{margin:0 1em 1.25em;display:block}
+.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
+.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
+.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
+.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
+.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}
+p.tableblock:last-child{margin-bottom:0}
+td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
+td.tableblock>.content>:last-child{margin-bottom:-1.25em}
+table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
+table.grid-all>*>tr>*{border-width:1px}
+table.grid-cols>*>tr>*{border-width:0 1px}
+table.grid-rows>*>tr>*{border-width:1px 0}
+table.frame-all{border-width:1px}
+table.frame-ends{border-width:1px 0}
+table.frame-sides{border-width:0 1px}
+table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
+table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
+table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
+table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
+table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7}
+th.halign-left,td.halign-left{text-align:left}
+th.halign-right,td.halign-right{text-align:right}
+th.halign-center,td.halign-center{text-align:center}
+th.valign-top,td.valign-top{vertical-align:top}
+th.valign-bottom,td.valign-bottom{vertical-align:bottom}
+th.valign-middle,td.valign-middle{vertical-align:middle}
+table thead th,table tfoot th{font-weight:bold}
+tbody tr th{background:#f7f8f7}
+tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
+p.tableblock>code:only-child{background:none;padding:0}
+p.tableblock{font-size:1em}
+ol{margin-left:1.75em}
+ul li ol{margin-left:1.5em}
+dl dd{margin-left:1.125em}
+dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
+ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
+ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
+ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
+ul.unstyled,ol.unstyled{margin-left:0}
+ul.checklist{margin-left:.625em}
+ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
+ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
+ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
+ul.inline>li{margin-left:1.25em}
+.unstyled dl dt{font-weight:400;font-style:normal}
+ol.arabic{list-style-type:decimal}
+ol.decimal{list-style-type:decimal-leading-zero}
+ol.loweralpha{list-style-type:lower-alpha}
+ol.upperalpha{list-style-type:upper-alpha}
+ol.lowerroman{list-style-type:lower-roman}
+ol.upperroman{list-style-type:upper-roman}
+ol.lowergreek{list-style-type:lower-greek}
+.hdlist>table,.colist>table{border:0;background:none}
+.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
+td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
+td.hdlist1{font-weight:bold;padding-bottom:1.25em}
+td.hdlist2{word-wrap:anywhere}
+.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
+.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
+.colist td:not([class]):first-child img{max-width:none}
+.colist td:not([class]):last-child{padding:.25em 0}
+.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
+.imageblock.left{margin:.25em .625em 1.25em 0}
+.imageblock.right{margin:.25em 0 1.25em .625em}
+.imageblock>.title{margin-bottom:0}
+.imageblock.thumb,.imageblock.th{border-width:6px}
+.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
+.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
+.image.left{margin-right:.625em}
+.image.right{margin-left:.625em}
+a.image{text-decoration:none;display:inline-block}
+a.image object{pointer-events:none}
+sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
+sup.footnote a,sup.footnoteref a{text-decoration:none}
+sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
+#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
+#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
+#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
+#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
+#footnotes .footnote:last-of-type{margin-bottom:0}
+#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
+.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
+.gist .file-data>table td.line-data{width:99%}
+div.unbreakable{page-break-inside:avoid}
+.big{font-size:larger}
+.small{font-size:smaller}
+.underline{text-decoration:underline}
+.overline{text-decoration:overline}
+.line-through{text-decoration:line-through}
+.aqua{color:#00bfbf}
+.aqua-background{background:#00fafa}
+.black{color:#000}
+.black-background{background:#000}
+.blue{color:#0000bf}
+.blue-background{background:#0000fa}
+.fuchsia{color:#bf00bf}
+.fuchsia-background{background:#fa00fa}
+.gray{color:#606060}
+.gray-background{background:#7d7d7d}
+.green{color:#006000}
+.green-background{background:#007d00}
+.lime{color:#00bf00}
+.lime-background{background:#00fa00}
+.maroon{color:#600000}
+.maroon-background{background:#7d0000}
+.navy{color:#000060}
+.navy-background{background:#00007d}
+.olive{color:#606000}
+.olive-background{background:#7d7d00}
+.purple{color:#600060}
+.purple-background{background:#7d007d}
+.red{color:#bf0000}
+.red-background{background:#fa0000}
+.silver{color:#909090}
+.silver-background{background:#bcbcbc}
+.teal{color:#006060}
+.teal-background{background:#007d7d}
+.white{color:#bfbfbf}
+.white-background{background:#fafafa}
+.yellow{color:#bfbf00}
+.yellow-background{background:#fafa00}
+span.icon>.fa{cursor:default}
+a span.icon>.fa{cursor:inherit}
+.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
+.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
+.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
+.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
+.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
+.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
+.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
+.conum[data-value] *{color:#fff!important}
+.conum[data-value]+b{display:none}
+.conum[data-value]::after{content:attr(data-value)}
+pre .conum[data-value]{position:relative;top:-.125em}
+b.conum *{color:inherit!important}
+.conum:not([data-value]):empty{display:none}
+dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
+h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
+p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
+p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
+p{margin-bottom:1.25rem}
+.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
+.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
+.print-only{display:none!important}
+@page{margin:1.25cm .75cm}
+@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
+html{font-size:80%}
+a{color:inherit!important;text-decoration:underline!important}
+a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
+a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
+abbr[title]::after{content:" (" attr(title) ")"}
+pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
+thead{display:table-header-group}
+svg{max-width:100%}
+p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
+h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
+#header,#content,#footnotes,#footer{max-width:none}
+#toc,.sidebarblock,.exampleblock>.content{background:none!important}
+#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
+body.book #header{text-align:center}
+body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
+body.book #header .details{border:0!important;display:block;padding:0!important}
+body.book #header .details span:first-child{margin-left:0!important}
+body.book #header .details br{display:block}
+body.book #header .details br+span::before{content:none!important}
+body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
+body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
+.listingblock code[data-lang]::before{display:block}
+#footer{padding:0 .9375em}
+.hide-on-print{display:none!important}
+.print-only{display:block!important}
+.hide-for-print{display:none!important}
+.show-for-print{display:inherit!important}}
+@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem}
+.sect1{padding:0!important}
+.sect1+.sect1{border:0}
+#footer{background:none}
+#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
+@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
+</style>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+<style>
+.menu, .submenu, .menuitem, .menuref {
+    background-color: Menu;
+}
+
+.button {
+    border: 1px solid ButtonFace;
+    /*
+    Styling too similar to a real button is considered bad practice, see https://github.com/asciidoctor/asciidoctor/issues/1881#issuecomment-250702085
+    border: 2px outset ButtonFace;
+    background-color: ButtonFace;
+    */
+    padding-left: 0.5ex;
+    padding-right: 0.5ex;
+    font-weight: normal;
+    font-family: "Segoe UI","Open Sans","DejaVu Sans",sans-serif;
+    white-space: nowrap;
+}
+.button:before {
+    content: none !important;
+}
+.button:after {
+    content: none !important;
+}
+
+#footer-text, #footer-text a {
+    color: rgba(255,255,255,.8)
+}
+</style>
+</head>
+<body class="book toc2 toc-left">
+<div id="header">
+<h1>ToolDef documentation (Incubation)</h1>
+<div class="details">
+<span id="author" class="author">Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation</span><br>
+<span id="revnumber">version 0.2.0.20210521-133237</span>
+</div>
+<div id="toc" class="toc2">
+<div id="toctitle">Table of Contents</div>
+<ul class="sectlevel1">
+<li><a href="#introduction-chapter-index">Introduction</a></li>
+<li><a href="#lang-ref-chapter-index">Language reference</a>
+<ul class="sectlevel2">
+<li><a href="#lang-ref-syntax">Syntax</a>
+<ul class="sectlevel3">
+<li><a href="#lang-ref-syntax-lexical">Lexical syntax</a></li>
+<li><a href="#lang-ref-syntax-grammar">Grammar</a></li>
+</ul>
+</li>
+<li><a href="#lang-ref-built-in-tools-and-operators">Built-in tools and operators</a>
+<ul class="sectlevel3">
+<li><a href="#lang-ref-builtins-operators">Built-in operators</a></li>
+<li><a href="#lang-ref-builtins-data">Built-in data tools</a></li>
+<li><a href="#lang-ref-builtins-io">Built-in I/O tools</a></li>
+<li><a href="#lang-ref-builtins-generic">Built-in generic tools</a></li>
+<li><a href="#lang-ref-builtins-path">Built-in path tools</a></li>
+<li><a href="#lang-ref-builtins-file">Built-in file tools</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#tools-chapter-index">Tooling</a>
+<ul class="sectlevel2">
+<li><a href="#tools-command-line">Command line</a></li>
+<li><a href="#tools-eclipse-ide">Eclipse IDE</a></li>
+</ul>
+</li>
+<li><a href="#release-notes-chapter-index">ToolDef release notes</a>
+<ul class="sectlevel2">
+<li><a href="#version-0-2">Version 0.2</a></li>
+<li><a href="#version-0-1">Version 0.1</a></li>
+</ul>
+</li>
+<li><a href="#legal-chapter-index">Legal</a></li>
+</ul>
+</div>
+</div>
+<div id="content">
+<div id="preamble">
+<div class="sectionbody">
+<div class="paragraph">
+<p>ToolDef is a cross-platform and machine-independent scripting language.
+It supports command line execution, but is also available as plug-in for
+the <a href="https://eclipse.org">Eclipse</a> IDE, providing an integrated development
+experience.</p>
+</div>
+<div class="paragraph">
+<p>ToolDef is one of the tools of the Eclipse ESCET&#8482; project. Visit the
+<a href="https://eclipse.org/escet">project website</a> for downloads,
+installation instructions, source code, general tool usage information,
+information on how to contribute, and more.</p>
+</div>
+<div class="admonitionblock warning">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-warning" title="Warning"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>The Eclipse ESCET project, including the ToolDef language and toolset,
+is currently in the
+<a href="https://wiki.eclipse.org/Development_Resources/Process_Guidelines/What_is_Incubation">Incubation Phase</a>.</p>
+</div>
+<div class="paragraph">
+<p><span class="image"><img src="./eclipse-incubation.png" alt="eclipse incubation" width="300"></span></p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="admonitionblock tip">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-tip" title="Tip"></i>
+</td>
+<td class="content">
+You can <a href="eclipse-escet-incubation-tooldef-manual.pdf">download this manual</a>
+as a PDF as well.
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The documentation consists of:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-ref-chapter-index">ToolDef language reference manual</a></p>
+</li>
+<li>
+<p><a href="#tools-chapter-index">ToolDef tool manual</a></p>
+</li>
+<li>
+<p><a href="#release-notes-chapter-index">ToolDef release notes</a></p>
+</li>
+<li>
+<p><a href="#legal-chapter-index">Legal information</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Some screenshots of ToolDef editing and execution:</p>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./screenshot_ide.png" alt="screenshot ide">
+</div>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="./screenshot_cmdline.png" alt="screenshot cmdline">
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="introduction-chapter-index">Introduction</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p></p>
+</div>
+<div class="paragraph">
+<p>The ToolDef language features the following concepts:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Simple and intuitive syntax makes it easy to writing scripts.</p>
+</li>
+<li>
+<p>A large number of built-in data types, including booleans, integers, longs,
+doubles, strings, lists, sets, maps, tuples, and objects.</p>
+</li>
+<li>
+<p>Static typing allows to catch simple mistakes.</p>
+</li>
+<li>
+<p>The type system is compatible with <a href="http://oracle.com/java">Java</a>,
+allowing easy integration with existing Java code.</p>
+</li>
+<li>
+<p>A large library of useful built-in operators and tools, including tools to
+write to the console, to start applications or execute other ToolDef scripts,
+to manipulate paths, to interact with files and directories, and to
+manipulate data of the various supported data types.</p>
+</li>
+<li>
+<p>Easy to extend with new tools, written in ToolDef itself, or in
+<a href="http://oracle.com/java">Java</a>.</p>
+</li>
+<li>
+<p>Tools can be parameterized with types.</p>
+</li>
+<li>
+<p>Tools can be overloaded.</p>
+</li>
+<li>
+<p>Tools can have optional parameters.</p>
+</li>
+<li>
+<p>Tools can have a variable number of arguments.</p>
+</li>
+<li>
+<p>Tool invocations can use both positional and named arguments.</p>
+</li>
+<li>
+<p>Tools can return a single value, multiple values, or no values at all.</p>
+</li>
+<li>
+<p>Automatic type widening.</p>
+</li>
+<li>
+<p>Type declarations allow for reuse.</p>
+</li>
+<li>
+<p>Value semantics for ease of use.</p>
+</li>
+<li>
+<p>The usual imperative statements, including assignments, tool invocation,
+<code>if</code> statement, <code>for</code> statement, <code>while</code> statement, <code>return</code>
+statement, <code>exit</code> statement, <code>break</code> statement, and <code>continue</code>
+statement.</p>
+</li>
+<li>
+<p>Powerful assignment statement, including partial variable assignment, and
+multi-assignments.</p>
+</li>
+<li>
+<p>Variable declarations as statements, allowing variables to be declared in
+the middle of scripts, or in scopes, such as in bodies of <code>for</code> statements.</p>
+</li>
+<li>
+<p>Powerful <code>for</code> statement, allowing tuple unpacking, and iteration over
+values of various data types.</p>
+</li>
+<li>
+<p>A powerful import mechanism, allowing reuse of scripts, tools, and code.</p>
+</li>
+<li>
+<p>A registered library mechanism, allowing easy importing of libraries of
+tools.</p>
+</li>
+<li>
+<p>Platform independent path handling, allowing a single script with relative
+paths to be executed on Window, Linux, and Mac OS X.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For more information, see also the <a href="#lang-ref-chapter-index">language reference</a> documentation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="paragraph">
+<p>The ToolDef tooling features:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Platform and machine independent execution of ToolDef scripts, on Microsoft
+Windows, Linux, and Mac OS X.</p>
+</li>
+<li>
+<p>Command line execution.</p>
+</li>
+<li>
+<p>Tight integration with the <a href="https://eclipse.org">Eclipse</a> IDE.</p>
+</li>
+<li>
+<p>User-friendly error messages.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>For more information, see also the <a href="#tools-chapter-index">tool</a> documentation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="lang-ref-chapter-index">Language reference</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The documentation in this language reference manual serves as reference.
+It is not intended to be read from beginning to end, but more to look up
+specific information when needed. The reference documentation generally
+provides detailed and complete information, but this information may not
+always be presented in the most accessible way.</p>
+</div>
+<div class="paragraph">
+<p>The information is divided into categories. The following categories and
+information is part of the language reference documentation:</p>
+</div>
+<div class="paragraph">
+<p><em>Syntax</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-ref-syntax-lexical">Lexical syntax</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-syntax-grammar">Grammar</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p><em>Built-in tools and operators</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-ref-builtins-operators">Built-in operators</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data">Built-in data tools</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-io">Built-in I/O tools</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-generic">Built-in generic tools</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-path">Built-in path tools</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file">Built-in file tools</a></p>
+</li>
+</ul>
+</div>
+<div class="sect2">
+<h3 id="lang-ref-syntax">Syntax</h3>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-syntax-lexical">Lexical syntax</h4>
+<div class="paragraph">
+<p>This page describes the ToolDef lexical syntax.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-keywords">Keywords</h5>
+<div class="paragraph">
+<p><em>General</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">as          else        if          map         tool
+bool        end         import      null        true
+break       exit        in          object      tuple
+continue    false       int         return      type
+double      for         list        set         while
+elif        from        long        string</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>Operators</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">and         div         mod         not         or</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>Built-in data tools</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">abs         enumerate      log         reverse       str
+ceil        floor          lower       round         strdup
+contains    fmt            ltrim       rtrim         subset
+del         indexof        max         size          trim
+delidx      join           min         sorted        upper
+empty       keys           pow         split         values
+endswith    lastindexof    range       sqrt
+entries     ln             replace     startswith</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>Built-in I/O tools</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">err         errln       out         outln</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>Built-in generic tools</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">app         exec        tooldef</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>Built-in path tools</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">abspath     dirname
+basename    fileext
+chdir       hasfileext
+chfileext   pathjoin
+curdir      scriptpath</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><em>Built-in file tools</em></p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">cpdir       filenewer   isfile      readlines
+cpfile      filesize    mkdir       rmdir
+diff        find        mvdir       rmfile
+exists      isdir       mvfile      writefile</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-terminals">Terminals</h5>
+<div class="paragraph">
+<p>Besides the keyword terminals listed above, ToolDef features several other
+terminals:</p>
+</div>
+<div class="paragraph">
+<p>
+
+
+
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>IDENTIFIERTK</code></dt>
+<dd>
+<p>An identifier. Defined by the regular expression:
+<code>[$]?[a-zA-Z_][a-zA-Z0-9_]*</code>. They thus consist of letters, numbers
+and underscore characters (<code>_</code>). Identifiers may not start with a
+numeric digit. Keywords take priority over identifiers. To use a
+keyword as an identifier, prefix it with a <code>$</code> character.
+The <code>$</code> is not part of the identifier name.</p>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">apple       // identifier
+bear        // identifier
+int         // keyword
+$int        // identifier 'int' (override keyword priority with $)</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>RELATIVENAMETK</code></dt>
+<dd>
+<p>A name. Defined by the regular expression:
+<code>[$]?[a-zA-Z_][a-zA-Z0-9_]*(\.[$]?[a-zA-Z_][a-zA-Z0-9_]*)+</code>.
+It thus consists of two or more <code>IDENTIFIERTK</code> joined together
+with periods (<code>.</code>).</p>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">some_library.some_tool</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>NUMBERTK</code></dt>
+<dd>
+<p>An integer literal. Defined by the regular expression: <code>0|[1-9][0-9]*</code>.
+Integers thus consist of numeric digits. Only for the number <code>0</code> may an
+integer literal start with <code>0</code>. E.g. <code>02</code> is invalid.</p>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">0
+1
+123</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>DOUBLETK</code></dt>
+<dd>
+<p>A double literal. Defined by the regular expression:
+<code>(0|[1-9][0-9]*)(\.[0-9]+|(\.[0-9]+)?[eE][\-\+]?[0-9]+)</code>.
+Simple double literals consist of an integer literal followed by
+a period (<code>.</code>) and some numeric digits. Double literals using scientific
+notation start with either an integer literal or a simple double literal.
+They then contain either an <code>e</code> or <code>E</code>, followed by the exponent.
+The exponent consists of numeric digits, optionally preceded by <code>+</code> or <code>-</code>.</p>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">0.0
+1e5
+1E+03
+1.05e-78</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>STRINGTK</code></dt>
+<dd>
+<p>A string literal. Defined by the regular expression:
+<code>\"([^\\\"\n]|\\[nt\\\"])*\"</code>. String literals are enclosed in double
+quotes (<code>"</code>). String literals must be on a single line and must thus not
+include new line characters (<code>\n</code>, Unicode U+0A). To include a double quote
+(<code>"</code>) in a string literal, it must be escaped as <code>\"</code>. Since a
+backslash (<code>\</code>) serves as escape character, to include a backslash in a string
+literal it must be escaped as <code>\\</code>. To include a tab character in a string
+literal, use <code>\t</code>. To include a newline in a string literal, use <code>\n</code>.</p>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">"hello world"
+"first line\nsecond line"</code></pre>
+</div>
+</div>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-whitespace">Whitespace</h5>
+<div class="paragraph">
+<p>ToolDef supports spaces, tabs, and new line characters as whitespace.
+Whitespace is ignored (except in string literals), but can be used to separate
+tokens as well as for layout purposes. The use of tab characters is allowed,
+but should be avoided if possible, as layout will be different for text
+editors with different tab settings. You may generally format a ToolDef
+script as you see fit, and start on a new line when desired.</p>
+</div>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">// Normal layout.
+int x = 5;
+
+// Alternative layout.
+int
+  x    =
+    5
+  ;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+
+</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-comments">Comments</h5>
+<div class="paragraph">
+<p>ToolDef features two types of comments. Single line comments start with
+<code>//</code> and end at end of the line. Multi line comments start with <code>/*</code> and
+end at <code>*/</code>. Comments are ignored.</p>
+</div>
+<div class="paragraph">
+<p>Examples:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">int x = 5; // Single line comment.
+
+int /* some comment */ x = /* some
+  more comments
+  and some more
+ end of the multi line comment */ 5;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-syntax-grammar">Grammar</h4>
+<div class="paragraph">
+<p>Below, the <a href="http://en.wikipedia.org/wiki/Formal_grammar">grammar</a> of the
+ToolDef language is shown, in a form closely resembling
+<a href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form">Backus-Naur Form</a>
+(BNF). The <code>Script</code>
+<a href="http://en.wikipedia.org/wiki/Nonterminal_symbol">non-terminal</a> is the
+<a href="http://en.wikipedia.org/wiki/Start_symbol_(formal_languages)">start symbol</a>
+of the grammar. Text between quotes are terminals. Names using only upper case
+letters are defined in the <a href="#lang-ref-syntax-lexical">lexical syntax</a>. The
+remaining names are the non-terminals of the grammar.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-bnf" data-lang="bnf">Script : /* empty */
+       | Decls
+       ;
+
+Decls : Decl
+      | Decls Decl
+      ;
+
+Decl : Import
+     | "type" TypeDecls ";"
+     | "tool" IDENTIFIERTK OptTypeParams ToolParameters ":" OptStatements "end"
+     | "tool" Types IDENTIFIERTK OptTypeParams ToolParameters ":" OptStatements "end"
+     | Statement
+     ;
+
+Import : "import" STRINGTK ";"
+       | "import" STRINGTK "as" IDENTIFIERTK ";"
+       | "import" Name ";"
+       | "import" Name "as" IDENTIFIERTK ";"
+       | "import" Name ":" Name ";"
+       | "import" Name ":" Name "as" IDENTIFIERTK ";"
+       | "from" STRINGTK "import" ImportParts ";"
+       ;
+
+ImportParts : "*"
+            | IDENTIFIERTK
+            | IDENTIFIERTK "as" IDENTIFIERTK
+            | ImportParts "," "*"
+            | ImportParts "," IDENTIFIERTK
+            | ImportParts "," IDENTIFIERTK "as" IDENTIFIERTK
+            ;
+
+TypeDecls : TypeDecl
+          | TypeDecls "," TypeDecl
+          ;
+
+TypeDecl : IDENTIFIERTK "=" Type
+         ;
+
+OptTypeParams : /* empty */
+              | "&lt;" Names "&gt;"
+              ;
+
+ToolParameters : "(" ")"
+               | "(" ToolParams ")"
+               ;
+
+ToolParams : Type ToolParam
+           | Type "..." ToolParam
+           | ToolParams "," Type ToolParam
+           | ToolParams "," Type "..." ToolParam
+           ;
+
+ToolParam : IDENTIFIERTK
+          | IDENTIFIERTK "=" Expression
+          ;
+
+OptStatements : /* empty */
+              | OptStatements Statement
+              ;
+
+Statement : Type VarDecls ";"
+          | "while" Expression ":" OptStatements "end"
+          | "while" Expression "::" Statement
+          | "for" AddressableDecls "in" Expression ":" OptStatements "end"
+          | "for" AddressableDecls "in" Expression "::" Statement
+          | "if" Expression ":" OptStatements OptElifStatements OptElseStatement "end"
+          | "if" Expression "::" Statement
+          | "break" ";"
+          | "continue" ";"
+          | Addressables "=" Expressions ";"
+          | "return" ";"
+          | "return" Expressions ";"
+          | ToolInvokeExpression ";"
+          | "exit" ";"
+          | "exit" Expression ";"
+          ;
+
+VarDecls : VarDecl
+         | VarDecls "," VarDecl
+         ;
+
+VarDecl : IDENTIFIERTK
+        | IDENTIFIERTK "=" Expression
+        ;
+
+OptElifStatements : /* empty */
+                  | OptElifStatements "elif" Expression ":" OptStatements
+                  ;
+
+OptElseStatement : /* empty */
+                 | "else" OptStatements
+                 ;
+
+AddressableDecls : AddressableDecl
+                 | AddressableDecls "," AddressableDecl
+                 ;
+
+AddressableDecl : IDENTIFIERTK
+                | "(" AddressableDecl "," AddressableDecls ")"
+                ;
+
+Addressables : Addressable
+             | Addressables "," Addressable
+             ;
+
+Addressable : IDENTIFIERTK
+            | IDENTIFIERTK Projections
+            | "(" Addressable "," Addressables ")"
+            ;
+
+Projections : Projection
+            | Projections Projection
+            ;
+
+Projection : "[" Expression "]"
+           ;
+
+Types : Type
+      | Types "," Type
+      ;
+
+Type : "bool"
+     | "bool" "?"
+     | "int"
+     | "int" "?"
+     | "long"
+     | "long" "?"
+     | "double"
+     | "double" "?"
+     | "string"
+     | "string" "?"
+     | "list" Type
+     | "list" "?" Type
+     | "set" Type
+     | "set" "?" Type
+     | "map" "(" Type ":" Type ")"
+     | "map" "?" "(" Type ":" Type ")"
+     | "tuple" "(" Type "," Types ")"
+     | "tuple" "?" "(" Type "," Types ")"
+     | "object"
+     | "object" "?"
+     | Name
+     ;
+
+Expressions : Expression
+            | Expressions "," Expression
+            ;
+
+OptExpression : /* empty */
+              | Expression
+              ;
+
+Expression : AndExpression
+           | Expression "or" AndExpression
+           ;
+
+AndExpression : CompareExpression
+              | AndExpression "and" CompareExpression
+              ;
+
+CompareExpression : AddExpression
+                  | CompareExpression "&lt;" AddExpression
+                  | CompareExpression "&lt;=" AddExpression
+                  | CompareExpression "==" AddExpression
+                  | CompareExpression "!=" AddExpression
+                  | CompareExpression "&gt;=" AddExpression
+                  | CompareExpression "&gt;" AddExpression
+                  ;
+
+AddExpression : MulExpression
+              | AddExpression "-" MulExpression
+              | AddExpression "+" MulExpression
+              ;
+
+MulExpression : UnaryExpression
+              | MulExpression "*" UnaryExpression
+              | MulExpression "/" UnaryExpression
+              | MulExpression "div" UnaryExpression
+              | MulExpression "mod" UnaryExpression
+              ;
+
+UnaryExpression : ProjExpression
+                | "-" UnaryExpression
+                | "+" UnaryExpression
+                | "not" UnaryExpression
+                ;
+
+ProjExpression : ExpressionFactor
+               | ProjExpression "[" Expression "]"
+               | ProjExpression "[" OptExpression ":" OptExpression "]"
+               ;
+
+ExpressionFactor : "true"
+                 | "false"
+                 | NUMBERTK
+                 | DOUBLETK
+                 | "null"
+                 | STRINGTK
+                 | "&lt;" Type "&gt;" ExpressionFactor
+                 | "[" "]"
+                 | "[" Expressions OptComma "]"
+                 | "{" "}"
+                 | "{" Expressions OptComma "}"
+                 | "{" MapEntries OptComma "}"
+                 | "(" Expression "," Expressions OptComma ")"
+                 | "(" Expression ")"
+                 | ToolInvokeExpression
+                 | Name
+                 ;
+
+MapEntries : Expression ":" Expression
+           | MapEntries "," Expression ":" Expression
+           ;
+
+ToolInvokeExpression : ToolRef "(" ToolArgs OptComma ")"
+                     | ToolRef "(" ")"
+                     ;
+
+ToolRef : BuiltInTool
+        | Name
+        ;
+
+BuiltInTool : BuiltInIoTool
+            | BuiltInGenericTool
+            | BuiltInPathTool
+            | BuiltInFileTool
+            | BuiltInDataTool
+            ;
+
+ToolArgs : Expression
+         | IDENTIFIERTK "=" Expression
+         | ToolArgs "," Expression
+         | ToolArgs "," IDENTIFIERTK "=" Expression
+         ;
+
+Names : Name
+      | Names "," Name
+      ;
+
+Name : IDENTIFIERTK
+     | RELATIVENAMETK
+     ;
+
+OptComma : /* empty */
+         | ","
+         ;
+
+BuiltInIoTool : "err"
+              | "errln"
+              | "out"
+              | "outln"
+              ;
+
+BuiltInGenericTool : "app"
+                   | "exec"
+                   | "tooldef"
+                   ;
+
+BuiltInPathTool : "abspath"
+                | "basename"
+                | "chdir"
+                | "chfileext"
+                | "curdir"
+                | "dirname"
+                | "fileext"
+                | "hasfileext"
+                | "pathjoin"
+                | "scriptpath"
+                ;
+
+BuiltInFileTool : "cpdir"
+                | "cpfile"
+                | "diff"
+                | "exists"
+                | "filenewer"
+                | "filesize"
+                | "find"
+                | "isdir"
+                | "isfile"
+                | "mkdir"
+                | "mvdir"
+                | "mvfile"
+                | "readlines"
+                | "rmdir"
+                | "rmfile"
+                | "writefile"
+                ;
+
+BuiltInDataTool : "abs"
+                | "ceil"
+                | "contains"
+                | "del"
+                | "delidx"
+                | "empty"
+                | "endswith"
+                | "entries"
+                | "enumerate"
+                | "floor"
+                | "fmt"
+                | "indexof"
+                | "join"
+                | "keys"
+                | "lastindexof"
+                | "ln"
+                | "log"
+                | "lower"
+                | "ltrim"
+                | "max"
+                | "min"
+                | "pow"
+                | "range"
+                | "replace"
+                | "reverse"
+                | "round"
+                | "rtrim"
+                | "size"
+                | "sorted"
+                | "split"
+                | "sqrt"
+                | "startswith"
+                | "str"
+                | "strdup"
+                | "subset"
+                | "trim"
+                | "upper"
+                | "values"
+                ;</code></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="lang-ref-built-in-tools-and-operators">Built-in tools and operators</h3>
+<div class="sect3">
+<h4 id="lang-ref-builtins-operators">Built-in operators</h4>
+<div class="paragraph">
+<p>This page describes the built-in operators:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-ref-builtins-operators-not">not</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-and">and</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-or">or</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-plus-unary">+ (unary)</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-dash-unary">- (unary)</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-plus-binary">+ (binary)</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-dash-binary">- (binary)</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-star">*</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-slash">/</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-div">div</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-mod">mod</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-lt">&lt;</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-le">&lt;=</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-gt">></a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-ge">>=</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-eq">==</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-operators-ne">!=</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The signatures of the operators are given using tool headers, to show the name
+of the operator, the types of the arguments, and the type of the resulting
+value. Operators however, can not be used by means of tool invocations.
+Operators with one argument are put directly before the argument (e.g.
+<code>not true</code>, <code>-5</code>), while operators with two arguments are put between the
+arguments (e.g. <code>true and false</code>, <code>1 + 3</code>).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-not">not operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool not(bool arg)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the logical inverse of a boolean value.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>arg</code></dt>
+<dd>
+<p>The boolean value.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The logical inverse result.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-and">and operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool  and(bool left, bool right)
+tool set T and&lt;T&gt;(set T left, set T right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the conjunction of two boolean values, or the intersection of two sets.
+For boolean values, the operator uses short circuit evaluation. That is, the
+<code>right</code> argument is only evaluated if necessary, i.e. only if the <code>left</code>
+argument evaluates to <code>true</code>.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the set.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first boolean value or set.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second boolean value or set.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The conjunction or intersection result.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-or">or operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool  or(bool left, bool right)
+tool set T or&lt;T&gt;(set T left, set T right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the disjunction of two boolean values, or the union of two sets.
+For boolean values, the operator uses short circuit evaluation. That is, the
+<code>right</code> argument is only evaluated if necessary, i.e. only if the <code>left</code>
+argument evaluates to <code>false</code>.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the set.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first boolean value or set.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second boolean value or set.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The disjunction or union result.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-plus-unary">+ operator (unary)</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int    +(int arg)
+tool long   +(long arg)
+tool double +(double arg)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the unary plus of an integer, long, or double value. This is
+essentially the
+<a href="http://en.wikipedia.org/wiki/Identity_function">identity function</a>.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>arg</code></dt>
+<dd>
+<p>The integer, long, or double value.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The integer, long, or double value.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-plus-binary">+ operator (binary)</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int      +(int left, int right)
+tool long     +(long left, long right)
+tool double   +(double left, double right)
+tool string   +(string left, string right)
+tool list T   +&lt;T&gt;(list T left, list T right)
+tool map(K:V) +&lt;K, V&gt;(map(K:V) left, map(K:V) right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the addition of two integer, long, or double numbers, the concatenation
+of two strings or lists, or the update of a first map with the entries of a
+second map. For two maps, essentially, the entries of the first map are
+overwritten by the entries of the second map, while entries for new keys are
+added.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list.</p>
+</dd>
+<dt class="hdlist1"><code>K</code></dt>
+<dd>
+<p>The type of the keys of the map.</p>
+</dd>
+<dt class="hdlist1"><code>V</code></dt>
+<dd>
+<p>The type of the values of the map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first integer, long, or double number, string, list, or map.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second integer, long, or double number, string, list, or map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The addition, concatenation, or map update result.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in overflow (for integer, long, and double numbers
+only).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-dash-unary">- operator (unary)</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int    -(int arg)
+tool long   -(long arg)
+tool double -(double arg)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the negation of an integer, long, or double value.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>arg</code></dt>
+<dd>
+<p>The integer, long, or double value.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The negation result.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in overflow.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-dash-binary">- operator (binary)</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int      -(int left, int right)
+tool long     -(long left, long right)
+tool double   -(double left, double right)
+tool set T    -&lt;T&gt;(set T left, set T right)
+tool map(K:V) -&lt;K, V&gt;(map(K:V) left, list K right)
+tool map(K:V) -&lt;K, V&gt;(map(K:V) left, set K right)
+tool map(K:V) -&lt;K, V, V2&gt;(map(K:V) left, map(K:V2) right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the subtraction of two integer, long, or double numbers, the set
+difference of two sets, the map with the keys from the list removed from it,
+the map with the keys from the set removed from it, or the first map with the
+keys from the second map removed from it.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list.</p>
+</dd>
+<dt class="hdlist1"><code>K</code></dt>
+<dd>
+<p>The type of the keys of the map.</p>
+</dd>
+<dt class="hdlist1"><code>V</code></dt>
+<dd>
+<p>The type of the values of the map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first integer, long, or double number, the first set, or the (first) map.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second integer, long, or double number, the (second) set, the list, or
+the second map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The subtraction, set difference, or map removal result.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in overflow (for integer, long, and double numbers
+only).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-star">* operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int    *(int left, int right)
+tool long   *(long left, long right)
+tool double *(double left, double right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the multiplication of two integer, long, or double numbers.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first integer, long, or double number.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second integer, long, or double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The multiplication result.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in overflow.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-slash">/ operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool double /(double left, double right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the division of two double numbers.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first double number.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The division result.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in overflow or division by zero.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-div">div operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int  div(int left, int right)
+tool long div(long left, long right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the integer division of two integer or long numbers.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first integer or long number.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second integer or long number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The integer division result.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in overflow or division by zero.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-mod">mod operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int  mod(int left, int right)
+tool long mod(long left, long right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the modulus of two integer or long numbers.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first integer or long number.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second integer or long number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The modulus result.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in division by zero.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-lt">&lt; operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool &lt;(int left, int right)
+tool bool &lt;(long left, long right)
+tool bool &lt;(double left, double right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether the first integer, long, or double number is less than the
+second integer, long, or double number.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first integer, long, or double number.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second integer, long, or double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the first number is less than the second number, <code>false</code>
+otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-le">&lt;= operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool &lt;=(int left, int right)
+tool bool &lt;=(long left, long right)
+tool bool &lt;=(double left, double right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether the first integer, long, or double number is less than or equal
+to the second integer, long, or double number.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first integer, long, or double number.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second integer, long, or double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the first number is less than or equal to the second number,
+<code>false</code> otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-gt">> operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool &gt;(int left, int right)
+tool bool &gt;(long left, long right)
+tool bool &gt;(double left, double right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether the first integer, long, or double number is greater than the
+second integer, long, or double number.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first integer, long, or double number.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second integer, long, or double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the first number is greater than the second number, <code>false</code>
+otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-ge">>= operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool &gt;=(int left, int right)
+tool bool &gt;=(long left, long right)
+tool bool &gt;=(double left, double right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether the first integer, long, or double number is greater than or
+equal to the second integer, long, or double number.</p>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first integer, long, or double number.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second integer, long, or double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the first number is greater than or equal to the second number,
+<code>false</code> otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-eq">== operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool ==&lt;T&gt;(T left, T right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether the first value is equal to the second value.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the values.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first value. May be <code>null</code>.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second value. May be <code>null</code>.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the first value is equal to the second value, <code>false</code> otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-operators-ne">!= operator</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool !=&lt;T&gt;(T left, T right)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether the first value is unequal to the second value.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the values.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Arguments</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>left</code></dt>
+<dd>
+<p>The first value. May be <code>null</code>.</p>
+</dd>
+<dt class="hdlist1"><code>right</code></dt>
+<dd>
+<p>The second value. May be <code>null</code>.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the first value is unequal to the second value, <code>false</code>
+otherwise.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-builtins-data">Built-in data tools</h4>
+<div class="paragraph">
+<p>This page describes the built-in data tools:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-ref-builtins-data-abs">abs</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-ceil">ceil</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-contains">contains</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-del">del</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-delidx">delidx</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-empty">empty</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-endswith">endswith</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-entries">entries</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-enumerate">enumerate</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-floor">floor</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-fmt">fmt</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-indexof">indexof</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-join">join</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-keys">keys</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-lastindexof">lastindexof</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-ln">ln</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-log">log</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-lower">lower</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-ltrim">ltrim</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-max">max</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-min">min</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-pow">pow</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-range">range</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-replace">replace</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-reverse">reverse</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-round">round</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-rtrim">rtrim</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-size">size</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-sorted">sorted</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-split">split</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-sqrt">sqrt</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-startswith">startswith</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-str">str</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-strdup">strdup</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-subset">subset</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-trim">trim</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-upper">upper</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-data-values">values</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-abs">abs tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int    abs(int x)
+tool long   abs(long x)
+tool double abs(double x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the absolute value of an integer, long, or double number.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The integer, long, or double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The absolute value.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in overflow (for integer and long numbers only).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-ceil">ceil tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool long ceil(double x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given double number rounded to a whole long number, towards
+positive infinity.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The double number rounded to a whole long number, towards positive infinity.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in overflow.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-contains">contains tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool contains(string whole, string part)
+tool bool contains&lt;T&gt;(list T $list, T elem)
+tool bool contains&lt;T&gt;(set T $set, T elem)
+tool bool contains&lt;K,V&gt;(map(K:V) $map, K key)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether a given string is contained in another given string, a given
+value is contained in a given list, a given value is contained in a given set,
+or a given value is a key of a given map.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list or set.</p>
+</dd>
+<dt class="hdlist1"><code>K</code></dt>
+<dd>
+<p>The type of the keys of the map.</p>
+</dd>
+<dt class="hdlist1"><code>V</code></dt>
+<dd>
+<p>The type of the values of the map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>whole</code>, <code>list</code>, <code>set</code>, <code>map</code></dt>
+<dd>
+<p>The whole string, the list, the set, or the map.</p>
+</dd>
+<dt class="hdlist1"><code>part</code>, <code>elem</code>, <code>key</code></dt>
+<dd>
+<p>The part string (potentially contained in the whole string), or the value
+(potential element of the list or set, or potential key of the map).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the part string is contained in the whole string, if the value is
+contained in the list, if the value is contained in the set, or if the value is
+a key of the map, <code>false</code> otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-del">del tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool list T   del&lt;T&gt;(list T $list, T elem)
+tool set T    del&lt;T&gt;(set T $set, T elem)
+tool map(K:V) del&lt;K,V&gt;(map(K:V) $map, K key)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given list with all occurrences of the given element removed from
+it, the given set with the given element removed from it, or the given map
+with the given entry with the given key removed from it. If the element or key
+does not exist, the list, set or map is returned unmodified.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list or set.</p>
+</dd>
+<dt class="hdlist1"><code>K</code></dt>
+<dd>
+<p>The type of the keys of the map.</p>
+</dd>
+<dt class="hdlist1"><code>V</code></dt>
+<dd>
+<p>The type of the values of the map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>list</code>, <code>set</code>, <code>map</code></dt>
+<dd>
+<p>The list, set, or map.</p>
+</dd>
+<dt class="hdlist1"><code>elem</code>, <code>key</code></dt>
+<dd>
+<p>The element or key to remove. May be <code>null</code>.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The list with all occurrences of the element removed from it, the set with the
+element removed from it, or the map with the entry with the given key removed
+from it.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-delidx">delidx tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool list T delidx&lt;T&gt;(list T $list, int index)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Removes an element from a list, and returns the list without that element.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>list</code></dt>
+<dd>
+<p>The list.</p>
+</dd>
+<dt class="hdlist1"><code>index</code></dt>
+<dd>
+<p>The 0-based index into the list of the element to remove. Negative indices
+are allowed, and count from the right.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The list with the element removed from it.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the index is out of bounds for the list.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-empty">empty tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool empty(string x)
+tool bool empty&lt;T&gt;(list T x)
+tool bool empty&lt;T&gt;(set T x)
+tool bool empty&lt;K,V&gt;(map(K:V) x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether a given string, list, set, or map is empty (no characters,
+elements, or entries).</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list or set.</p>
+</dd>
+<dt class="hdlist1"><code>K</code></dt>
+<dd>
+<p>The type of the keys of the map.</p>
+</dd>
+<dt class="hdlist1"><code>V</code></dt>
+<dd>
+<p>The type of the values of the map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The string, list, set, or map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the given string, list, set, or map is empty, <code>false</code> otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-endswith">endswith tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool endswith(string whole, string suffix)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether the first given string ends with the second given string. For
+an empty suffix, always returns <code>true</code>.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>whole</code></dt>
+<dd>
+<p>The first given string.</p>
+</dd>
+<dt class="hdlist1"><code>suffix</code></dt>
+<dd>
+<p>The second given string.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the first given string ends with the second given string, <code>false</code>
+otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-entries">entries tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool list tuple(K, V) entries&lt;K,V&gt;(map(K:V) $map)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns a list with 2-tuples of keys and values for all entries of the given
+map.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>K</code></dt>
+<dd>
+<p>The type of the keys of the map.</p>
+</dd>
+<dt class="hdlist1"><code>V</code></dt>
+<dd>
+<p>The type of the values of the map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>map</code></dt>
+<dd>
+<p>The map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The list with 2-tuples of keys and values for all entries of the given map.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-enumerate">enumerate tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool list tuple(int, T) enumerate&lt;T&gt;(list T $list)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns a list with 2-tuples of 0-based indices and elements for all elements
+of the given list.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>list</code></dt>
+<dd>
+<p>The list.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The list with 2-tuples of 0-based indices and elements for all elements of the
+given list.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-floor">floor tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool long floor(double x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given double number rounded to a whole long number, towards
+negative infinity.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The double number rounded to a whole long number, towards negative infinity.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in overflow.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-fmt">fmt tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string fmt(string pattern, object?... args)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Formats a text based on a pattern and arguments.</p>
+</div>
+<div class="paragraph">
+<p>See also the <a href="#lang-ref-builtins-data-str">str</a> tool, as <code>str(value)</code> is
+equal to <code>fmt("%s", value)</code>.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>pattern</code></dt>
+<dd>
+<p>The format pattern.</p>
+</dd>
+<dt class="hdlist1"><code>args</code></dt>
+<dd>
+<p>The arguments.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The formatted text.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the format pattern is invalid.</p>
+</li>
+<li>
+<p>If the format pattern and arguments don&#8217;t match.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-indexof">indexof tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int indexof(string whole, string part)
+tool int indexof(string whole, string part, int offset)
+tool int indexof&lt;T&gt;(list T $list, T elem)
+tool int indexof&lt;T&gt;(list T $list, T elem, int offset)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the 0-based index of the first occurrence of the second given string
+or value, in the first given string or list. The tool looks for an occurrence
+from left to right of the first given string or elements of the first given
+list. If an offset is given, the tool only looks for an occurrence at or after
+that 0-based offset. If no offset is not given, the tool starts looking at the
+first (left most) character or list element.</p>
+</div>
+<div class="paragraph">
+<p>Returns <code>-1</code> if the second given string or value doesn&#8217;t occur in the first
+given string or list, at or after the 0-based offset if given, or at all if
+no offset is given. For an empty second string, always returns <code>0</code> if no
+offset is given. For an empty second string, if an offset is given, always
+returns the offset, unless there is no character at the given offset, in which
+<code>-1</code> is always returned.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>whole</code>, <code>list</code></dt>
+<dd>
+<p>The first given string, or the list.</p>
+</dd>
+<dt class="hdlist1"><code>part</code>, <code>elem</code></dt>
+<dd>
+<p>The second given string, or the value.</p>
+</dd>
+<dt class="hdlist1"><code>offset</code></dt>
+<dd>
+<p>The optional 0-based offset.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The 0-based index of the first occurrence, at or after the given offset if
+given, or <code>-1</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-join">join tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string join(string... texts)
+tool string join(list string texts)
+tool string join(list string texts, string separator)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given texts joined together. They can be joined without any
+separator, or using a given separator.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>texts</code></dt>
+<dd>
+<p>The texts to join.</p>
+</dd>
+<dt class="hdlist1"><code>separator</code></dt>
+<dd>
+<p>The optional separator text to use.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The joined texts.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-keys">keys tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool set K keys&lt;K,V&gt;(map(K:V) $map)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns a set with the keys of the given map.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>K</code></dt>
+<dd>
+<p>The type of the keys of the map.</p>
+</dd>
+<dt class="hdlist1"><code>V</code></dt>
+<dd>
+<p>The type of the values of the map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>map</code></dt>
+<dd>
+<p>The map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The set with the keys of the map.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-lastindexof">lastindexof tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int lastindexof(string whole, string part)
+tool int lastindexof(string whole, string part, int offset)
+tool int lastindexof&lt;T&gt;(list T $list, T elem)
+tool int lastindexof&lt;T&gt;(list T $list, T elem, int offset)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the 0-based index of the last occurrence of the second given string
+or value, in the first given string or list. The tool looks for an occurrence
+from left to right of the first given string or elements of the first given
+list. If an offset is given, the tool only looks for an occurrence at or before
+that 0-based offset. If no offset is not given, the tool starts looking at the
+first (left most) character or list element.</p>
+</div>
+<div class="paragraph">
+<p>Returns <code>-1</code> if the second given string or value doesn&#8217;t occur in the first
+given string or list, at or before the 0-based offset if given, or at all if
+no offset is given. For an empty second string, always returns the size of the
+first given string, if no offset is given. For an empty second string, if an
+offset is given, always returns the offset, unless there is no character at the
+given offset, in which <code>-1</code> is always returned.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>whole</code>, <code>list</code></dt>
+<dd>
+<p>The first given string, or the list.</p>
+</dd>
+<dt class="hdlist1"><code>part</code>, <code>elem</code></dt>
+<dd>
+<p>The second given string, or the value.</p>
+</dd>
+<dt class="hdlist1"><code>offset</code></dt>
+<dd>
+<p>The optional 0-based offset.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The 0-based index of the last occurrence, at or before the given offset if
+given, or <code>-1</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-ln">ln tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool double ln(double x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the natural logarithm of a double number.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The natural logarithm of the double number.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the double number is not positive.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-log">log tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool double log(double x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the logarithm (base 10) of a double number.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The logarithm (base 10) of the double number.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the double number is not positive.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-lower">lower tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string lower(string text)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given text, converted to lower case. Uses a US English locale.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>text</code></dt>
+<dd>
+<p>The text.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The text, in lower case.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-ltrim">ltrim tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string ltrim(string text)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given text with whitespace at the left/start of the text removed.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>text</code></dt>
+<dd>
+<p>The text.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The text with whitespace at the left/start of the text removed.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-max">max tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int    max(int... x)
+tool long   max(long... x)
+tool double max(double... x)
+tool int    max(list int x)
+tool long   max(list long x)
+tool double max(list double x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the maximum of some integer, long, or double numbers. If no numbers are
+given, the minimum representable finite integer, long, or double value is
+returned.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The integer, long, or double numbers.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The maximum number.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-min">min tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int    min(int... x)
+tool long   min(long... x)
+tool double min(double... x)
+tool int    min(list int x)
+tool long   min(list long x)
+tool double min(list double x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the minimum of some integer, long, or double numbers. If no numbers are
+given, the maximum representable finite integer, long, or double value is
+returned.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The integer, long, or double numbers.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The minimum number.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-pow">pow tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool double pow(double base, double exponent)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the exponentiation (power) of two double numbers.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>base</code></dt>
+<dd>
+<p>The base double number.</p>
+</dd>
+<dt class="hdlist1"><code>exponent</code></dt>
+<dd>
+<p>The exponent double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The exponentiation result.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in double overflow, or <code>NaN</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-range">range tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool list int range(int count)
+tool list int range(int begin, int $end)
+tool list int range&lt;T&gt;(list T $list)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns a list of numbers representing the range <code>[0..count-1]</code>,
+<code>[begin..end]</code>, or <code>[0..size(list)-1]</code>. That is, for <code>count</code> = <code>5</code> the
+list <code>[0, 1, 2, 3, 4]</code> is returned, for <code>begin</code> = <code>-3</code> and <code>end</code> =
+<code>2</code> the list <code>[-3, -2, -1, 0, 1, 2]</code> is returned, and for a <code>list</code> with
+<code>5</code> elements the list <code>[0, 1, 2, 3, 4]</code> is returned.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>count</code></dt>
+<dd>
+<p>The number of elements in the resulting list. Negative counts are treated as
+zero.</p>
+</dd>
+<dt class="hdlist1"><code>begin</code></dt>
+<dd>
+<p>The lower bound of the range.</p>
+</dd>
+<dt class="hdlist1"><code>end</code></dt>
+<dd>
+<p>The upper bound of the range.</p>
+</dd>
+<dt class="hdlist1"><code>list</code></dt>
+<dd>
+<p>The list.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The range <code>[0..count-1]</code>, <code>[begin..end]</code>, or <code>[0..size(list)-1]</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-replace">replace tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string replace(string text, string oldtext, string newtext)
+tool list T replace&lt;T&gt;(list T $list, T oldelem, T newelem)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the string or list with old sub strings or elements replaced by new
+text or elements. For strings, the replacement proceeds from the beginning of
+the string to the end. That is, replacing <code>"aa"</code> with <code>"b"</code> in the string
+<code>"aaa"</code> will result in <code>"ba"</code> rather than <code>"ab"</code>. For lists, the
+replacement is performed for all matching old elements.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>text</code>, <code>list</code></dt>
+<dd>
+<p>The text (string) or list in which to replace text or elements.</p>
+</dd>
+<dt class="hdlist1"><code>oldtext</code>, <code>oldelem</code></dt>
+<dd>
+<p>The text (sub string) or element to replace. For list elements, it may be
+<code>null</code>.</p>
+</dd>
+<dt class="hdlist1"><code>newtext</code>, <code>newelem</code></dt>
+<dd>
+<p>The replacement text or element. For list elements, it may be <code>null</code>.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The text or list with all replacements applied.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-reverse">reverse tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string reverse(string text)
+tool list T reverse&lt;T&gt;(list T $list)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the reverse of the given string or list.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>text</code>, <code>list</code></dt>
+<dd>
+<p>The string or list.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The reverse string or list.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-round">round tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool long round(double x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given double number rounded to the closest whole long number, with
+ties being rounded toward positive infinity.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The rounded number.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the operation results in overflow.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-rtrim">rtrim tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string rtrim(string text)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given text with whitespace at the right/end of the text removed.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>text</code></dt>
+<dd>
+<p>The text.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The text with whitespace at the right/end of the text removed.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-size">size tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int size(string x)
+tool int size&lt;T&gt;(list T x)
+tool int size&lt;T&gt;(set T x)
+tool int size&lt;K,V&gt;(map(K:V) x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the size (number of characters, elements, or entries) of the given
+string, list, set, or map.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list or set.</p>
+</dd>
+<dt class="hdlist1"><code>K</code></dt>
+<dd>
+<p>The type of the keys of the map.</p>
+</dd>
+<dt class="hdlist1"><code>V</code></dt>
+<dd>
+<p>The type of the values of the map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The string, list, set, or map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The size.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-sorted">sorted tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool list T sorted&lt;T&gt;(list T $list)
+tool list T sorted&lt;T&gt;(set T $set)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given list, or the given set as a list, with the elements sorted in
+ascending order.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the list or set.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>list</code></dt>
+<dd>
+<p>The list.</p>
+</dd>
+<dt class="hdlist1"><code>set</code></dt>
+<dd>
+<p>The set.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The sorted list.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-split">split tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool list string split(string text, string? separator = null, bool removeEmpty = true)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Splits the given text at all non-overlapping occurrences of the given
+separator.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>text</code></dt>
+<dd>
+<p>The text to split.</p>
+</dd>
+<dt class="hdlist1"><code>separator</code></dt>
+<dd>
+<p>The separator text. May be empty or <code>null</code> to split on whitespace.</p>
+</dd>
+<dt class="hdlist1"><code>removeEmpty</code></dt>
+<dd>
+<p>Whether to remove empty parts (in case the text starts or ends with the
+separator, or in case the text contains consecutive separators), or not.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The parts of the original text resulting from splitting the original text at
+the separators.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-sqrt">sqrt tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool double sqrt(double x)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the square root of a double number.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>x</code></dt>
+<dd>
+<p>The double number.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The square root.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the double number is negative.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-startswith">startswith tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool startswith(string whole, string prefix)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether the first given string starts with the second given string. For
+an empty prefix, always returns <code>true</code>.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>whole</code></dt>
+<dd>
+<p>The first given string.</p>
+</dd>
+<dt class="hdlist1"><code>prefix</code></dt>
+<dd>
+<p>The second given string.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the first given string starts with the second given string,
+<code>false</code> otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-str">str tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string str(object? value)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Converts the given value into a textual representation, closely resembling the
+ToolDef syntax.</p>
+</div>
+<div class="paragraph">
+<p>Values of type <code>string</code> as returned as provided. Values of type <code>string</code>
+included in containers such as lists are escaped and surrounded by double
+quotes, as in the ToolDef syntax.</p>
+</div>
+<div class="paragraph">
+<p>See also the <a href="#lang-ref-builtins-data-fmt">fmt</a> tool, as <code>str(value)</code> is
+equal to <code>fmt("%s", value)</code>.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>value</code></dt>
+<dd>
+<p>The value to convert to a textual representation.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The textual representation.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-strdup">strdup tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string strdup(string text, int count)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Duplicates a string a given number of times.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>text</code></dt>
+<dd>
+<p>The string to duplicate.</p>
+</dd>
+<dt class="hdlist1"><code>count</code></dt>
+<dd>
+<p>The number of times that the input string should occur in the output.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The concatenation of <code>count</code> times the <code>text</code>.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the count is negative.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-subset">subset tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool subset&lt;T&gt;(set T part, set T whole)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns whether the first given set is a subset (proper subset or equal) of the
+second given set.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>T</code></dt>
+<dd>
+<p>The type of the elements of the sets.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>part</code></dt>
+<dd>
+<p>The first set.</p>
+</dd>
+<dt class="hdlist1"><code>whole</code></dt>
+<dd>
+<p>The second set.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the first given set is a subset of the second given set, <code>false</code>
+otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-trim">trim tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string trim(string text)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given text with whitespace at the left/start and right/end of the
+text removed.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>text</code></dt>
+<dd>
+<p>The text.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The text with whitespace at the left/start and right/end of the text removed.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-upper">upper tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string upper(string text)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the given text, converted to upper case. Uses a US English locale.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>text</code></dt>
+<dd>
+<p>The text.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The text, in upper case.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-data-values">values tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool set V values&lt;K,V&gt;(map(K:V) $map)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns a set with the values of the given map.</p>
+</div>
+<div class="paragraph">
+<p><em>Type parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>K</code></dt>
+<dd>
+<p>The type of the keys of the map.</p>
+</dd>
+<dt class="hdlist1"><code>V</code></dt>
+<dd>
+<p>The type of the values of the map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>map</code></dt>
+<dd>
+<p>The map.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The set with the values of the map.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-builtins-io">Built-in I/O tools</h4>
+<div class="paragraph">
+<p>This page describes the built-in I/O tools:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-ref-builtins-io-out">out</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-io-err">err</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-io-outln">outln</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-io-errln">errln</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-io-out">out tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool out(string pattern, object?... args)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Prints <a href="#lang-ref-builtins-data-fmt">formatted text</a> (based on a
+pattern and arguments) to the standard output stream (stdout).</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>pattern</code></dt>
+<dd>
+<p>The format pattern.</p>
+</dd>
+<dt class="hdlist1"><code>args</code></dt>
+<dd>
+<p>The arguments.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the format pattern is invalid.</p>
+</li>
+<li>
+<p>If the format pattern and arguments don&#8217;t match.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-io-err">err tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool err(string pattern, object?... args)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Prints <a href="#lang-ref-builtins-data-fmt">formatted text</a> (based on a
+pattern and arguments) to the standard error stream (stderr).</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>pattern</code></dt>
+<dd>
+<p>The format pattern.</p>
+</dd>
+<dt class="hdlist1"><code>args</code></dt>
+<dd>
+<p>The arguments.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the format pattern is invalid.</p>
+</li>
+<li>
+<p>If the format pattern and arguments don&#8217;t match.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-io-outln">outln tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool outln(string pattern = "", object?... args)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Prints <a href="#lang-ref-builtins-data-fmt">formatted text</a> (based on a
+pattern and arguments) to the standard output stream (stdout), printing an
+additional new line at the end.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>pattern</code></dt>
+<dd>
+<p>The format pattern.</p>
+</dd>
+<dt class="hdlist1"><code>args</code></dt>
+<dd>
+<p>The arguments.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the format pattern is invalid.</p>
+</li>
+<li>
+<p>If the format pattern and arguments don&#8217;t match.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-io-errln">errln tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool errln(string pattern = "", object?... args)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Prints <a href="#lang-ref-builtins-data-fmt">formatted text</a> (based on a
+pattern and arguments) to the standard error stream (stderr), printing an
+additional new line at the end.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>pattern</code></dt>
+<dd>
+<p>The format pattern.</p>
+</dd>
+<dt class="hdlist1"><code>args</code></dt>
+<dd>
+<p>The arguments.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the format pattern is invalid.</p>
+</li>
+<li>
+<p>If the format pattern and arguments don&#8217;t match.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-builtins-generic">Built-in generic tools</h4>
+<div class="paragraph">
+<p>This page describes the built-in generic tools:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-ref-builtins-generic-app">app</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-generic-exec">exec</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-generic-tooldef">tooldef</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-generic-app">app tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int app(string? plugin, string classname, string... args,        string stdin = "-", string stdout = "-", string stderr = "-", bool appendOut = false, bool appendErr = false, bool errToOut = false, bool ignoreNonZeroExitCode = false)
+tool int app(string? plugin, string classname, list string args = [], string stdin = "-", string stdout = "-", string stderr = "-", bool appendOut = false, bool appendErr = false, bool errToOut = false, bool ignoreNonZeroExitCode = false)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Executes an application framework application.</p>
+</div>
+<div class="paragraph">
+<p>The application is specified as a Java class that extends the
+<code>org.eclipse.escet.common.app.framework.Application</code> class. It should have a constructor
+that accepts one parameter, of type <code>org.eclipse.escet.common.app.framework.io.AppStreams</code>.</p>
+</div>
+<div class="paragraph">
+<p>The application is started within the current Java interpreter, in a new
+thread. If executed from Eclipse, the class is loaded using the class loader
+of the given bundle (if provided), otherwise, it is loaded using the default
+class loader. In the latter case, the class should be in the class path.</p>
+</div>
+<div class="paragraph">
+<p>Note that this tool is only machine independent and platform independent, as
+long as the applications that are executed, are machine independent and
+platform independent as well.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>plugin</code></dt>
+<dd>
+<p>The name of the plug-in (OSGi bundle) in which to resolve the application
+class. If the Java application is executed from Eclipse, then the class is
+loaded by the class loader of this bundle, otherwise it is resolved using the
+default class loader. May be <code>null</code> to always use the default class loader.</p>
+</dd>
+<dt class="hdlist1"><code>classname</code></dt>
+<dd>
+<p>The absolute name of the Java class to execute as application.</p>
+</dd>
+<dt class="hdlist1"><code>args</code></dt>
+<dd>
+<p>The command line arguments of the application to execute. Each argument
+string is parsed to zero or more actual arguments. It is possible to use a
+single string with all arguments (where the arguments themselves are
+separated by spaces), comma separated strings for each of the arguments (each
+string has one argument), or a mix of those.</p>
+<div class="paragraph">
+<p>In argument strings, individual arguments are separated by whitespace
+(spaces, tabs, new lines, etc). The whitespace itself is ignored, and only
+serves as separation. To include whitespace in an argument, the argument (or
+a part of it), may be quoted, by putting it between double quotes (<code>"</code>) or
+single quotes (<code>'</code>). Characters may be escaped by prefixing them with a
+backslash (<code>\</code>). This is particularly useful for single/double quotes, and
+escape characters, and can also be used to escape spaces. Escapes work the
+same inside of quoted parts as they do outside of quoted parts.</p>
+</div>
+</dd>
+<dt class="hdlist1"><code>stdin</code></dt>
+<dd>
+<p>Specify whether to have a standard input (stdin) stream and where the input
+comes from. Use <code>""</code> to not have a stdin stream, <code>"-"</code> to use the stdin
+stream of the ToolDef interpreter, or otherwise an absolute or relative local
+file system path of the file from which to read the standard input. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>stdout</code></dt>
+<dd>
+<p>Specify whether to have a standard output (stdout) stream and where to write
+the standard output. Use <code>""</code> to not have a stdout stream, <code>"-"</code> to use
+the stdout stream of the ToolDef interpreter, or otherwise an absolute or
+relative local file system path of the file to which to write the standard
+output. May contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>stderr</code></dt>
+<dd>
+<p>Specify whether to have a standard error (stderr) stream and where to write
+the standard error output. Use <code>""</code> to not have a stderr stream, <code>"-"</code>
+to use the stderr stream of the ToolDef interpreter, or otherwise an absolute
+or relative local file system path of the file to which to write the standard
+error output. May contain both <code>\</code> and <code>/</code> as path separators. Is ignored
+when the standard error stream is redirected to the standard output stream.</p>
+</dd>
+<dt class="hdlist1"><code>appendOut</code></dt>
+<dd>
+<p>Whether to append to the stdout file (<code>true</code>) or overwrite it (<code>false</code>).
+Is ignored when standard output is not written to a file.</p>
+</dd>
+<dt class="hdlist1"><code>appendErr</code></dt>
+<dd>
+<p>Whether to append to the stderr file (<code>true</code>) or overwrite it (<code>false</code>).
+Is ignored if standard error output is not written to a file. Is also ignored
+when standard error stream is redirected to the standard output stream.</p>
+</dd>
+<dt class="hdlist1"><code>errToOut</code></dt>
+<dd>
+<p>Whether to redirect the standard error stream to the standard output stream
+(<code>true</code>) or use separate streams (<code>false</code>).</p>
+</dd>
+<dt class="hdlist1"><code>ignoreNonZeroExitCode</code></dt>
+<dd>
+<p>Whether to ignore non-zero exit codes (<code>true</code>) or consider them as errors
+(<code>false</code>).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The application exit code. See the application framework documentation for a
+description of the exit codes.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the class loader can not be obtained.</p>
+</li>
+<li>
+<p>If the class can not be found or loaded.</p>
+</li>
+<li>
+<p>If the class is not an application framework application.</p>
+</li>
+<li>
+<p>If an appropriate constructor is not available.</p>
+</li>
+<li>
+<p>If an instance of the application class can not be constructed.</p>
+</li>
+<li>
+<p>If parsing of the command line arguments fails.</p>
+</li>
+<li>
+<p>If the application fails to execute due to its thread being interrupted.</p>
+</li>
+<li>
+<p>If the application exits with a non-zero exit code and non-zero exit codes
+are not ignored.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-generic-exec">exec tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int exec(string cmd, string... args,        string stdin = "", string stdout = "-", string stderr = "-", bool appendOut = false, bool appendErr = false, bool errToOut = false, bool ignoreNonZeroExitCode = false)
+tool int exec(string cmd, list string args = [], string stdin = "", string stdout = "-", string stderr = "-", bool appendOut = false, bool appendErr = false, bool errToOut = false, bool ignoreNonZeroExitCode = false)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Executes a system command or external application as a sub process.</p>
+</div>
+<div class="paragraph">
+<p>This tool should be avoided if possible, as it is in general not guaranteed to
+be cross platform and machine independent. Commands and external applications
+may not be available on all systems, or may have different behavior on
+different systems.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>cmd</code></dt>
+<dd>
+<p>The name of the command or the absolute or relative local file system path of
+the external application to execute, using platform specific new line
+characters.</p>
+</dd>
+<dt class="hdlist1"><code>args</code></dt>
+<dd>
+<p>The command line arguments of the command or external application to execute.
+Each argument string is parsed to zero or more actual arguments. It is
+possible to use a single string with all arguments (where the arguments
+themselves are separated by spaces), comma separated strings for each of the
+arguments (each string has one argument), or a mix of those.</p>
+<div class="paragraph">
+<p>In argument strings, individual arguments are separated by whitespace
+(spaces, tabs, new lines, etc). The whitespace itself is ignored, and only
+serves as separation. To include whitespace in an argument, the argument (or
+a part of it), may be quoted, by putting it between double quotes (<code>"</code>) or
+single quotes (<code>'</code>). Characters may be escaped by prefixing them with a
+backslash (<code>\</code>). This is particularly useful for single/double quotes, and
+escape characters, and can also be used to escape spaces. Escapes work the
+same inside of quoted parts as they do outside of quoted parts.</p>
+</div>
+</dd>
+<dt class="hdlist1"><code>stdin</code></dt>
+<dd>
+<p>Specify whether to have a standard input (stdin) stream and where the input
+comes from. Use <code>""</code> to not have a stdin stream, <code>"-"</code> to use the stdin
+stream of the ToolDef interpreter, or otherwise an absolute or relative local
+file system path of the file from which to read the standard input. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>stdout</code></dt>
+<dd>
+<p>Specify whether to have a standard output (stdout) stream and where to write
+the standard output. Use <code>""</code> to not have a stdout stream, <code>"-"</code> to use
+the stdout stream of the ToolDef interpreter, or otherwise an absolute or
+relative local file system path of the file to which to write the standard
+output. May contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>stderr</code></dt>
+<dd>
+<p>Specify whether to have a standard error (stderr) stream and where to write
+the standard error output. Use <code>""</code> to not have a stderr stream, <code>"-"</code>
+to use the stderr stream of the ToolDef interpreter, or otherwise an absolute
+or relative local file system path of the file to which to write the standard
+error output. May contain both <code>\</code> and <code>/</code> as path separators. Is ignored
+when the standard error stream is redirected to the standard output stream.</p>
+</dd>
+<dt class="hdlist1"><code>appendOut</code></dt>
+<dd>
+<p>Whether to append to the stdout file (<code>true</code>) or overwrite it (<code>false</code>).
+Is ignored when standard output is not written to a file.</p>
+</dd>
+<dt class="hdlist1"><code>appendErr</code></dt>
+<dd>
+<p>Whether to append to the stderr file (<code>true</code>) or overwrite it (<code>false</code>).
+Is ignored if standard error output is not written to a file. Is also ignored
+when standard error stream is redirected to the standard output stream.</p>
+</dd>
+<dt class="hdlist1"><code>errToOut</code></dt>
+<dd>
+<p>Whether to redirect the standard error stream to the standard output stream
+(<code>true</code>) or use separate streams (<code>false</code>).</p>
+</dd>
+<dt class="hdlist1"><code>ignoreNonZeroExitCode</code></dt>
+<dd>
+<p>Whether to ignore non-zero exit codes (<code>true</code>) or consider them as errors
+(<code>false</code>).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The exit code resulting from the execution of the command or external
+application.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If parsing of the command line arguments fails.</p>
+</li>
+<li>
+<p>If ToolDef fails to execution the command or external application.</p>
+</li>
+<li>
+<p>If execution results in a non-zero exit code and non-zero exit codes are not
+ignored.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-generic-tooldef">tooldef tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool int tooldef(string... args,        string stdin = "-", string stdout = "-", string stderr = "-", bool appendOut = false, bool appendErr = false, bool errToOut = false, bool ignoreNonZeroExitCode = false)
+tool int tooldef(list string args = [], string stdin = "-", string stdout = "-", string stderr = "-", bool appendOut = false, bool appendErr = false, bool errToOut = false, bool ignoreNonZeroExitCode = false)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Executes a ToolDef script. Waits for that script to finish its execution before
+continuing with the current script.</p>
+</div>
+<div class="paragraph">
+<p>The script is executed within the current Java interpreter, in a new thread,
+using a new ToolDef interpreter.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>args</code></dt>
+<dd>
+<p>The command line arguments for the ToolDef interpreter, including the path to
+the script to execute. Each argument string is parsed to zero or more actual
+arguments. It is possible to use a single string with all arguments (where
+the arguments themselves are separated by spaces), comma separated strings
+for each of the arguments (each string has one argument), or a mix of those.</p>
+<div class="paragraph">
+<p>In argument strings, individual arguments are separated by whitespace
+(spaces, tabs, new lines, etc). The whitespace itself is ignored, and only
+serves as separation. To include whitespace in an argument, the argument (or
+a part of it), may be quoted, by putting it between double quotes (<code>"</code>) or
+single quotes (<code>'</code>). Characters may be escaped by prefixing them with a
+backslash (<code>\</code>). This is particularly useful for single/double quotes, and
+escape characters, and can also be used to escape spaces. Escapes work the
+same inside of quoted parts as they do outside of quoted parts.</p>
+</div>
+</dd>
+<dt class="hdlist1"><code>stdin</code></dt>
+<dd>
+<p>Specify whether to have a standard input (stdin) stream and where the input
+comes from. Use <code>""</code> to not have a stdin stream, <code>"-"</code> to use the stdin
+stream of the ToolDef interpreter, or otherwise an absolute or relative local
+file system path of the file from which to read the standard input. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>stdout</code></dt>
+<dd>
+<p>Specify whether to have a standard output (stdout) stream and where to write
+the standard output. Use <code>""</code> to not have a stdout stream, <code>"-"</code> to use
+the stdout stream of the ToolDef interpreter, or otherwise an absolute or
+relative local file system path of the file to which to write the standard
+output. May contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>stderr</code></dt>
+<dd>
+<p>Specify whether to have a standard error (stderr) stream and where to write
+the standard error output. Use <code>""</code> to not have a stderr stream, <code>"-"</code>
+to use the stderr stream of the ToolDef interpreter, or otherwise an absolute
+or relative local file system path of the file to which to write the standard
+error output. May contain both <code>\</code> and <code>/</code> as path separators. Is ignored
+when the standard error stream is redirected to the standard output stream.</p>
+</dd>
+<dt class="hdlist1"><code>appendOut</code></dt>
+<dd>
+<p>Whether to append to the stdout file (<code>true</code>) or overwrite it (<code>false</code>).
+Is ignored when standard output is not written to a file.</p>
+</dd>
+<dt class="hdlist1"><code>appendErr</code></dt>
+<dd>
+<p>Whether to append to the stderr file (<code>true</code>) or overwrite it (<code>false</code>).
+Is ignored if standard error output is not written to a file. Is also ignored
+when standard error stream is redirected to the standard output stream.</p>
+</dd>
+<dt class="hdlist1"><code>errToOut</code></dt>
+<dd>
+<p>Whether to redirect the standard error stream to the standard output stream
+(<code>true</code>) or use separate streams (<code>false</code>).</p>
+</dd>
+<dt class="hdlist1"><code>ignoreNonZeroExitCode</code></dt>
+<dd>
+<p>Whether to ignore non-zero exit codes (<code>true</code>) or consider them as errors
+(<code>false</code>).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The ToolDef interpreter exit code, i.e. the exit code of the script.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If parsing of the command line arguments fails.</p>
+</li>
+<li>
+<p>If the application fails to execute due to its thread being interrupted.</p>
+</li>
+<li>
+<p>If execution results in a non-zero exit code and non-zero exit codes are not
+ignored.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-builtins-path">Built-in path tools</h4>
+<div class="paragraph">
+<p>This page describes the built-in I/O tools:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-ref-builtins-path-abspath">abspath</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-path-basename">basename</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-path-chdir">chdir</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-path-chfileext">chfileext</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-path-curdir">curdir</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-path-dirname">dirname</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-path-fileext">fileext</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-path-hasfileext">hasfileext</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-path-pathjoin">pathjoin</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-path-scriptpath">scriptpath</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-path-abspath">abspath tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string abspath(string path)
+tool string abspath(string path, string workdir)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns an absolute local file system path, given an absolute or relative local
+file system path.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path. May contain both <code>\</code> and
+<code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>workdir</code></dt>
+<dd>
+<p>The optional absolute local file system path of the working directory against
+which to resolve relative paths. May contain both <code>\</code> and <code>/</code> as path
+separators. If not specified, relative paths are resolved against the
+<a href="#lang-ref-builtins-path-curdir">current working directory</a>.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The absolute local file system path. The path contains separators for the
+current platform.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-path-basename">basename tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string basename(string path)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the base name of the given absolute or relative local file system path.
+The base name of a file or directory is the name of that file or directory. In
+other words, returns the last part of the given path.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path to the file or directory for
+which to return the base name. May contain both <code>\</code> and <code>/</code> as path
+separators. Must not end with <code>\</code> or <code>/</code>.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The base name.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the path ends with <code>\</code> or <code>/</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-path-chdir">chdir tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool chdir(string path)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Changes the <a href="#lang-ref-builtins-path-curdir">current working directory</a> to
+the directory referred to by the given path.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path to the new current working
+directory. Relative paths are resolved against the
+<a href="#lang-ref-builtins-path-curdir">current working directory</a>. May contain
+both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the given path does not exist.</p>
+</li>
+<li>
+<p>If the given path refers to a file rather than a directory.</p>
+</li>
+<li>
+<p>If it can not be determined whether the given path refers to a file or a
+directory.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-path-chfileext">chfileext tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string chfileext(string path, string? oldext = null, string? newext = null)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Modifies a path such that it ends with a new extension, removing an old
+extension if it exists.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path to modify. May contain both
+<code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>oldext</code></dt>
+<dd>
+<p>The old extension that can be removed (case insensitive, no . at the
+start). Use <code>null</code> to not remove an old extension.</p>
+</dd>
+<dt class="hdlist1"><code>newext</code></dt>
+<dd>
+<p>The new extension to use (case sensitive, no . at the start). Use
+<code>null</code> to not add a new extension.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The changed path, ending with the new extension (if any).</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-path-curdir">curdir tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string curdir()</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the script execution&#8217;s current working directory, as an absolute local
+file system path. The path contains separators for the current platform.</p>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The script execution&#8217;s current working directory.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-path-dirname">dirname tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string dirname(string path)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the absolute directory path of the directory that contains the given
+file or directory.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute local file system path that refers to a file or directory. May
+contain both <code>\</code> and <code>/</code> as path separators. Must not end with <code>\</code> or <code>/</code>.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The absolute directory path of the directory that contains the given file or
+directory. May contain both <code>\</code> and <code>/</code> as path separators.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the given path is not an absolute local file system path.</p>
+</li>
+<li>
+<p>If the given path ends with <code>\</code> or <code>/</code>.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-path-fileext">fileext tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string fileext(string path)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the file extension of the given file, or <code>""</code> if the file has no file
+extension.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path to the file. May contain both
+<code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The file extension, or <code>""</code>.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-path-hasfileext">hasfileext tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool hasfileext(string path, string ext)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Does the given file have the given file extension?</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path to the file. May contain both
+<code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>ext</code></dt>
+<dd>
+<p>The file extension to check for (case sensitive, no <code>.</code> at the start).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the  file has the given file extension, <code>false</code> otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-path-pathjoin">pathjoin tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string pathjoin(string... paths)
+tool string pathjoin(list string paths)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Joins paths together. If no paths are given, an empty string is returned. If
+one path is given, the path is returned.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>paths</code></dt>
+<dd>
+<p>The paths to join together. The first path may be an absolute or relative
+local file system path. The remaining paths must be relative local file
+system paths. All paths may contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The joined path. The path contains separators for the current platform.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-path-scriptpath">scriptpath tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool string scriptpath()</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the absolute local file system path to the script being executed. The
+path contains separators for the current platform.</p>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The absolute local file system path to the script being executed.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="lang-ref-builtins-file">Built-in file tools</h4>
+<div class="paragraph">
+<p>This page describes the built-in I/O tools:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#lang-ref-builtins-file-cpfile">cpfile</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-cpdir">cpdir</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-diff">diff</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-exists">exists</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-filenewer">filenewer</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-filesize">filesize</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-find">find</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-isdir">isdir</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-isfile">isfile</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-mkdir">mkdir</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-mvfile">mvfile</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-mvdir">mvdir</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-readlines">readlines</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-rmfile">rmfile</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-rmdir">rmdir</a></p>
+</li>
+<li>
+<p><a href="#lang-ref-builtins-file-writefile">writefile</a></p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-cpfile">cpfile tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool cpfile(string source, string target, bool overwrite = false)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Copies a file from a source location to a target location.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>source</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the source file. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>target</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the target file. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>overwrite</code></dt>
+<dd>
+<p>Whether to overwrite the target file if it already exists.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the source file does not exist.</p>
+</li>
+<li>
+<p>If the source is a directory rather than a file.</p>
+</li>
+<li>
+<p>If it can not be determined whether the source path refers to a file or a
+directory.</p>
+</li>
+<li>
+<p>If the target file exists and overwriting is not allowed.</p>
+</li>
+<li>
+<p>If the target file exists and overwriting is allowed, but the target refers
+to a directory rather than a file.</p>
+</li>
+<li>
+<p>If the target file exists and overwriting is allowed, but it can not be
+determined whether the target path refers to a file or a directory.</p>
+</li>
+<li>
+<p>If copying the file failed due to an I/O error.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-cpdir">cpdir tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool cpdir(string source, string target)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Copies a directory from a source location to a target location. All files and
+directories in the source directory are copied recursively.</p>
+</div>
+<div class="paragraph">
+<p>If the operation fails, part of the operation may have already been performed.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>source</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the source directory. All
+files and directories in the source directory are copied recursively. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>target</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the target directory. This
+is the directory in which the contents of the source directory are copied.
+The source directory itself is not copied, only the files and directories
+contained in the source directory. May contain both <code>\</code> and <code>/</code> as path
+separators.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the source directory does not exist.</p>
+</li>
+<li>
+<p>If the source is a file rather than a directory.</p>
+</li>
+<li>
+<p>If it can not be determined whether the source path refers to a file or a
+directory.</p>
+</li>
+<li>
+<p>If the target directory already exists.</p>
+</li>
+<li>
+<p>If the target directory doesn&#8217;t exist, but one of the ancestors is not a
+directory.</p>
+</li>
+<li>
+<p>If walking the directory (recursively) fails.</p>
+</li>
+<li>
+<p>If walking the directory (recursively) encounters a file system cycle (due to
+symbolic links).</p>
+</li>
+<li>
+<p>If a file or (sub-)directory could not be copied due to an I/O error.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-diff">diff tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool diff(string file1, string file2, string output = "-", bool missingAsEmpty = false, bool warnOnDiff = false, bool failOnDiff = false)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Computes the differences between two files.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>file1</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the first file. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>file2</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the second file. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>output</code></dt>
+<dd>
+<p>Specify whether/where to write a unified diff if the files differ. Use <code>""</code>
+to not write a unified diff, <code>"-"</code> to write the unified diff to the
+standard output stream (stdout), or otherwise an absolute or relative local
+file system path of the file to which to write the unified diff. May contain
+both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>missingAsEmpty</code></dt>
+<dd>
+<p>Treat a missing first/second file as empty (<code>true</code>) or as an error
+(<code>false</code>).</p>
+</dd>
+<dt class="hdlist1"><code>warnOnDiff</code></dt>
+<dd>
+<p>Emit a warning for differing files (<code>true</code>) or not (<code>false</code>). If a
+warning is emitted to the standard error stream (stderr), the unified diff
+(if enabled) is printed first.</p>
+</dd>
+<dt class="hdlist1"><code>failOnDiff</code></dt>
+<dd>
+<p>Treat differing files as an error (<code>true</code>) or not (<code>false</code>). If an error
+is emitted, the unified diff (if enabled) and warning (if enabled) are
+printed first.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the files differ, <code>false</code> otherwise.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If either the first or second file doesn&#8217;t exist and <code>missingAsEmpty</code> is
+disabled.</p>
+</li>
+<li>
+<p>If the first or second file is not a file but a directory.</p>
+</li>
+<li>
+<p>If it can not be determined whether the first or second path refers to a file
+or a directory.</p>
+</li>
+<li>
+<p>If an I/O error occurs.</p>
+</li>
+<li>
+<p>If the <code>out</code> file exists but is a directory rather than a regular file.</p>
+</li>
+<li>
+<p>If the <code>out</code> file does not exist but cannot be created.</p>
+</li>
+<li>
+<p>If the <code>out</code> file cannot be opened for writing for any other reason.</p>
+</li>
+<li>
+<p>If an I/O error occurs while writing to the <code>out</code> file.</p>
+</li>
+<li>
+<p>If the <code>out</code> file can not be closed.</p>
+</li>
+<li>
+<p>If the files differ and <code>failOnDiff</code> is enabled.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-exists">exists tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool exists(string path)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Does a file or directory with the given path exist?</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the file or directory. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the file or directory exists, <code>false</code> otherwise.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-filenewer">filenewer tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool filenewer(string path, string refpath,       bool allowNonExisting = false, bool sameAsNewer = true)
+tool bool filenewer(string path, string... refpaths,   bool allowNonExisting = false, bool sameAsNewer = true)
+tool bool filenewer(string path, list string refpaths, bool allowNonExisting = false, bool sameAsNewer = true)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Checks whether a file is newer (was modified at a later date/time) than some
+reference file(s).</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the file for which to
+check whether it is newer than the reference file(s). May contain both <code>\</code>
+and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>refpath</code>, <code>refpaths</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the reference file(s). May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>allowNonExisting</code></dt>
+<dd>
+<p>Whether to allow the first file to not exist (<code>true</code>) or consider it an
+error if the first file does not exist (<code>false</code>).</p>
+</dd>
+<dt class="hdlist1"><code>sameAsNewer</code></dt>
+<dd>
+<p>Whether to treat files with the same last change date as being the same
+(<code>false</code>) or as newer (<code>true</code>).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>false</code> if the first file does not exist (if allowed by enabling
+<code>allowNonExisting</code>), if the first file is older than any the reference files,
+or if the first file has the same last change date as any of the reference
+files and <code>sameAsNewer</code> is disabled. <code>true</code> if the first file is newer than
+all of the reference files, if the first file has the same last change date as
+some the reference files and <code>sameAsNewer</code> is enabled and is newer than all
+of the other reference files, or if the first file has the same last change
+date as all the reference files and <code>sameAsNewer</code> is enabled.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the first file does not exist and <code>allowNonExisting</code> is disabled.</p>
+</li>
+<li>
+<p>If any of the reference files does not exist.</p>
+</li>
+<li>
+<p>If any of the files is a directory rather than a file.</p>
+</li>
+<li>
+<p>If for any of the paths it can not be determined whether the path refers to a
+file or a directory.</p>
+</li>
+<li>
+<p>If the last change date/time of any of the files can not be determined.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-filesize">filesize tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool long filesize(string path, bool missingAsZero = false)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Returns the size of the file, in bytes.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the file. May contain both
+<code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>missingAsZero</code></dt>
+<dd>
+<p>Whether to return 0 if the file does not exist (<code>true</code>) or consider it
+an error if the file does not exist (<code>false</code>).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The size of the file in bytes, or <code>0</code> if the file is missing and
+<code>missingAsZero</code> is enabled.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the file does not exist and <code>missingAsZero</code> is disabled.</p>
+</li>
+<li>
+<p>If the file is a directory rather than a file.</p>
+</li>
+<li>
+<p>If it can not be determined whether the path refers to a file or a directory.</p>
+</li>
+<li>
+<p>If the size of the file can not be determined due to an I/O error.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-find">find tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool list string find(string path, string pattern = "*", bool recursive = true, bool files = true, bool dirs = true)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Searches a directory for files and/or directories matching a pattern.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the directory in which to
+search. The directory itself is never returned. May contain both <code>\</code> and
+<code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>pattern</code></dt>
+<dd>
+<p>The pattern to use to match files/directories. Is a
+<a href="https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob">Java NIO glob</a>
+pattern, that is matched against single file names or single directory names,
+and never against paths. Pattern <code>"*"</code> matches all files and directories.</p>
+</dd>
+<dt class="hdlist1"><code>recursive</code></dt>
+<dd>
+<p>Whether to recursively look in sub-directories.</p>
+</dd>
+<dt class="hdlist1"><code>files</code></dt>
+<dd>
+<p>Whether to match files.</p>
+</dd>
+<dt class="hdlist1"><code>dirs</code></dt>
+<dd>
+<p>Whether to match directories.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The local file system paths of the matched files and directories, relative
+against the given root directory from which searching started.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the given directory is not found.</p>
+</li>
+<li>
+<p>If the given directory is a file rather than a directory.</p>
+</li>
+<li>
+<p>If the can not be determined whether the given path refers to a file or a
+directory.</p>
+</li>
+<li>
+<p>If the pattern is invalid.</p>
+</li>
+<li>
+<p>If walking the directory (recursively) fails.</p>
+</li>
+<li>
+<p>If walking the directory (recursively) encounters a file system cycle (due to
+symbolic links).</p>
+</li>
+<li>
+<p>If the operation fails due to an I/O error.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-isdir">isdir tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool isdir(string path)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Does a directory with the given path exist?</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the directory. May contain
+both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the directory exists, <code>false</code> if it doesn&#8217;t exist or is not a
+directory.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-isfile">isfile tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool isfile(string path)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Does a file with the given path exist?</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the file. May contain
+both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the file exists, <code>false</code> if it doesn&#8217;t exist or is not a file.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-mkdir">mkdir tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool mkdir(string path, bool force = false, bool parents = true)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Creates the given directory, and optionally its parents as needed.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the directory to create.
+May contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>force</code></dt>
+<dd>
+<p>Whether to skip creating the directory if it already exists (<code>true</code>) or
+fail if it already exists (<code>false</code>).</p>
+</dd>
+<dt class="hdlist1"><code>parents</code></dt>
+<dd>
+<p>Whether to allow creating parents as needed (<code>true</code>) or fail if the parent
+directory does not exist (<code>false</code>).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the directory already exists and <code>force</code> is disabled.</p>
+</li>
+<li>
+<p>If creating the directory or any of its parents fails, due to an I/O error.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-mvfile">mvfile tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool mvfile(string source, string target, bool overwrite = false)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Moves a file from a source location to a target location. This can be used to
+rename a file and/or move it to another directory.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>source</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the source file. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>target</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the target file. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>overwrite</code></dt>
+<dd>
+<p>Whether to overwrite the target file if it already exists.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the source file does not exist.</p>
+</li>
+<li>
+<p>If the source is a directory rather than a file.</p>
+</li>
+<li>
+<p>If it can not be determined whether the source path refers to a file or a
+directory.</p>
+</li>
+<li>
+<p>If the target file exist and overwriting is not allowed.</p>
+</li>
+<li>
+<p>If the target file exists and overwriting is allowed, but the target refers
+to a directory rather than a file.</p>
+</li>
+<li>
+<p>If the target file exists and overwriting is allowed, but it can not be
+determined whether the target path refers to a file or a directory.</p>
+</li>
+<li>
+<p>If moving the file fails due to an I/O error.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-mvdir">mvdir tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool mvdir(string source, string target)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Moves a directory from a source location to a target location. The directory
+and all files and directories in it are moved recursively.</p>
+</div>
+<div class="paragraph">
+<p>The operation is implemented as a copy from source to target, followed by a
+remove of the source. If the operation fails, part of the operation may have
+already been performed.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>source</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the source directory. The
+directory itself and all files and directories in it are moved recursively.
+May contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>target</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the target directory. This
+is the directory into which the contents of the source directory are moved.
+May contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the source directory does not exist.</p>
+</li>
+<li>
+<p>If the source is a file rather than a directory.</p>
+</li>
+<li>
+<p>If it can not be determined whether the source path refers to a file or a
+directory.</p>
+</li>
+<li>
+<p>If the target directory already exists.</p>
+</li>
+<li>
+<p>If the target directory doesn&#8217;t exist but one of the ancestors is not a
+directory.</p>
+</li>
+<li>
+<p>If walking the directory (recursively) fails.</p>
+</li>
+<li>
+<p>If walking the directory (recursively) encounters a file system cycle (due to
+symbolic links).</p>
+</li>
+<li>
+<p>If a file or (sub-)directory can not be copied or removed, due to an I/O
+error.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-readlines">readlines tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool list string readlines(string path)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Read lines of text from a file.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the file to read. May
+contain both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p>The lines of text from the file.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the file does not exist.</p>
+</li>
+<li>
+<p>If the path refers to a directory rather than a file.</p>
+</li>
+<li>
+<p>If it can not be determined whether the path refers to a file or a directory.</p>
+</li>
+<li>
+<p>If for some other reason can not be opened for reading.</p>
+</li>
+<li>
+<p>If an I/O error occurs.</p>
+</li>
+<li>
+<p>If the file can not be closed.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-rmfile">rmfile tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool rmfile(string path, bool force = false)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Removes a file.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the file. May contain both
+<code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>force</code></dt>
+<dd>
+<p>Whether to ignore non-existing files (<code>true</code>) or consider it an error
+(<code>false</code>).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the file was removed, <code>false</code> if it could not be removed because
+it did not exist and force is enabled.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the file does not exist and <code>force</code> is disabled.</p>
+</li>
+<li>
+<p>If the file is a directory rather than a file.</p>
+</li>
+<li>
+<p>If it can not be determined whether the path refers to a file or a directory.</p>
+</li>
+<li>
+<p>If an I/O error occurs.</p>
+</li>
+<li>
+<p>If the file can not be removed for some other reason.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-rmdir">rmdir tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool bool rmdir(string path, bool force = false)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Removes a directory, recursively.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the directory. May contain
+both <code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>force</code></dt>
+<dd>
+<p>Whether to ignore non-existing directories (<code>true</code>) or consider it an error
+(<code>false</code>).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Returns</em></p>
+</div>
+<div class="paragraph">
+<p><code>true</code> if the directory was removed, <code>false</code> if it could not be removed
+because it did not exist and <code>force</code> is enabled.</p>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the directory does not exist and <code>force</code> is disabled.</p>
+</li>
+<li>
+<p>If the directory is a file rather than a directory.</p>
+</li>
+<li>
+<p>If it can not be determined whether the path refers to a file or a directory.</p>
+</li>
+<li>
+<p>If an I/O error occurs.</p>
+</li>
+<li>
+<p>If walking the directory (recursively) fails.</p>
+</li>
+<li>
+<p>If walking the directory (recursively) encounters a file system cycle (due to
+symbolic links).</p>
+</li>
+<li>
+<p>If the directory or one of its sub-files or sub-directories can not be
+removed for some other reason.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="lang-ref-builtins-file-writefile">writefile tool</h5>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-tooldef" data-lang="tooldef">tool writefile(string path, string text,       bool append = false)
+tool writefile(string path, list string lines, bool append = false)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Writes text to a file.</p>
+</div>
+<div class="paragraph">
+<p><em>Parameters</em></p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>path</code></dt>
+<dd>
+<p>The absolute or relative local file system path of the file. May contain both
+<code>\</code> and <code>/</code> as path separators.</p>
+</dd>
+<dt class="hdlist1"><code>text</code>, <code>lines</code></dt>
+<dd>
+<p>The text or lines of text to write to the file.</p>
+</dd>
+<dt class="hdlist1"><code>append</code></dt>
+<dd>
+<p>Whether to append the lines text to the file if it already exists (<code>true</code>),
+or overwrite the file if it already exists (<code>false</code>).</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p><em>Runtime errors</em></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If the path exists but is a directory rather than a regular file.</p>
+</li>
+<li>
+<p>If the file does not exist, but cannot be created.</p>
+</li>
+<li>
+<p>If the file can not be opened for writing for any other reason.</p>
+</li>
+<li>
+<p>If writing to the file fails due to an I/O error.</p>
+</li>
+<li>
+<p>If closing the file fails.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="tools-chapter-index">Tooling</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Below you can find general information on how to use the ToolDef tooling,
+both on the command line, and in the <a href="https://eclipse.org">Eclipse</a> IDE.</p>
+</div>
+<div class="paragraph">
+<p>To start using the ToolDef tooling, create a <code>.tooldef</code> file. See the
+<a href="#lang-ref-chapter-index">language reference</a> documentation for more
+information on the syntax.</p>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+<div class="sect2">
+<h3 id="tools-command-line">Command line</h3>
+<div class="paragraph">
+<p>To execute a ToolDef script on the command line, use the <code>tooldef</code>
+executable. To start executing a ToolDef script, enter
+something like this on the command line:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-shell" data-lang="shell">tooldef some_script.tooldef</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+
+Additional options are available, to influence how the script is executed. For
+details, execute the ToolDef interpreter with the <code>--help</code> or <code>-h</code> command
+line option:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="highlight"><code class="language-shell" data-lang="shell">tooldef --help</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>
+</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="tools-eclipse-ide">Eclipse IDE</h3>
+<div class="paragraph">
+<p>
+
+To execute a ToolDef script in the Eclipse IDE, right click the file or an
+open text editor for the script, and choose <b class="menuref">Execute ToolDef</b>.
+Alternatively, choose <b class="menuref">Execute ToolDef&#8230;&#8203;</b> to first shown an option
+dialog, where several options that influence how the script is executed, before
+actually executing the script.</p>
+</div>
+<div class="paragraph">
+<p>It is also possible to start executing a script by pressing <kbd>F10</kbd>, while
+a <code>.tooldef</code> file is selected or an open text for such a file has the focus.
+Finally, clicking the corresponding toolbar icon
+(<span class="image"><img src="./tools/tooldef_icon.png" alt="tooldef icon"></span>) has the same effect.</p>
+</div>
+<div class="paragraph">
+<p>Execution of ToolDef script can be manually terminated by means of the
+termination features of the <em>Applications</em> view.</p>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="release-notes-chapter-index">ToolDef release notes</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The release notes for the releases of ToolDef and the associated tools, as
+part of the Eclipse ESCET project, are listed below in reverse chronological
+order.</p>
+</div>
+<div class="paragraph">
+<p>The release notes may refer to issues, the details for which can be found
+at the Eclipse ESCET
+<a href="https://gitlab.eclipse.org/eclipse/escet/escet/-/issues">GitLab issues page</a>.</p>
+</div>
+<div class="paragraph">
+<p>See also the Eclipse ESCET
+<a href="https://www.eclipse.org/escet/escet/#release-notes-chapter-index">toolkit release notes</a>
+covering those aspects that are common to the various Eclipse ESCET tools.</p>
+</div>
+<div class="sect2">
+<h3 id="version-0-2">Version 0.2</h3>
+<div class="paragraph">
+<p>TBD</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="version-0-1">Version 0.1</h3>
+<div class="paragraph">
+<p>The first release of ToolDef as part of the Eclipse ESCET project.
+This release is based on the initial contribution by the Eindhoven University
+of Technology (TU/e).</p>
+</div>
+<div class="paragraph">
+<p>Most notable changes compared to the last TU/e release:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>We no longer use separate language and tool versions. The <code>.tooldef2</code> file
+extension has been changed to <code>.tooldef</code> as part of this change.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p></p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="legal-chapter-index">Legal</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The material in this documentation is
+Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation.</p>
+</div>
+<div class="paragraph">
+<p>Eclipse ESCET and ESCET are trademarks of the Eclipse Foundation.
+Eclipse, and the Eclipse Logo are registered trademarks of the
+Eclipse Foundation. Other names may be trademarks of their
+respective owners.</p>
+</div>
+<div class="paragraph">
+<p><strong>License</strong></p>
+</div>
+<div class="paragraph">
+<p>The Eclipse Foundation makes available all content in this document
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the MIT License. A copy of the MIT License
+is available at <a href="https://opensource.org/licenses/MIT" class="bare">https://opensource.org/licenses/MIT</a>. For purposes of the
+MIT License, "Software" will mean the Content.</p>
+</div>
+<div class="paragraph">
+<p>If you did not receive this Content directly from the Eclipse Foundation,
+the Content is being redistributed by another party ("Redistributor") and
+different terms and conditions may apply to your use of any object code in
+the Content. Check the Redistributor&#8217;s license that was provided with the
+Content. If no such license exists, contact the Redistributor. Unless
+otherwise indicated below, the terms and conditions of the MIT License
+still apply to any source code in the Content and such source code may be
+obtained at <a href="http://www.eclipse.org" class="bare">http://www.eclipse.org</a>.</p>
+</div>
+</div>
+</div>
+</div>
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+  messageStyle: "none",
+  tex2jax: {
+    inlineMath: [["\\(", "\\)"]],
+    displayMath: [["\\[", "\\]"]],
+    ignoreClass: "nostem|nolatexmath"
+  },
+  asciimath2jax: {
+    delimiters: [["\\$", "\\$"]],
+    ignoreClass: "nostem|noasciimath"
+  },
+  TeX: { equationNumbers: { autoNumber: "none" } }
+})
+MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
+  MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) {
+    if ((node = data.script.parentNode) && (node = node.parentNode) && node.classList.contains("stemblock")) {
+      data.math.root.display = "block"
+    }
+    return data
+  })
+})
+</script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
+<!--
+  Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+  See the NOTICE file(s) distributed with this work for additional
+  information regarding copyright ownership.
+
+  This program and the accompanying materials are made available under the terms
+  of the MIT License which is available at https://opensource.org/licenses/MIT
+
+  SPDX-License-Identifier: MIT
+-->
+
+<div id="footer">
+<div id="footer-text">
+<a href="https://www.eclipse.org">Eclipse Home</a>
+|
+<a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a>
+|
+<a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a>
+|
+<a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a>
+|
+<a href="https://www.eclipse.org/legal">Eclipse Legal</a>
+</div>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/v0.2-M1/tooldef/lang-ref/syntax/tooldef.bnf b/v0.2-M1/tooldef/lang-ref/syntax/tooldef.bnf
new file mode 100644
index 0000000..e6d0694
--- /dev/null
+++ b/v0.2-M1/tooldef/lang-ref/syntax/tooldef.bnf
@@ -0,0 +1,328 @@
+Script : /* empty */
+       | Decls
+       ;
+
+Decls : Decl
+      | Decls Decl
+      ;
+
+Decl : Import
+     | "type" TypeDecls ";"
+     | "tool" IDENTIFIERTK OptTypeParams ToolParameters ":" OptStatements "end"
+     | "tool" Types IDENTIFIERTK OptTypeParams ToolParameters ":" OptStatements "end"
+     | Statement
+     ;
+
+Import : "import" STRINGTK ";"
+       | "import" STRINGTK "as" IDENTIFIERTK ";"
+       | "import" Name ";"
+       | "import" Name "as" IDENTIFIERTK ";"
+       | "import" Name ":" Name ";"
+       | "import" Name ":" Name "as" IDENTIFIERTK ";"
+       | "from" STRINGTK "import" ImportParts ";"
+       ;
+
+ImportParts : "*"
+            | IDENTIFIERTK
+            | IDENTIFIERTK "as" IDENTIFIERTK
+            | ImportParts "," "*"
+            | ImportParts "," IDENTIFIERTK
+            | ImportParts "," IDENTIFIERTK "as" IDENTIFIERTK
+            ;
+
+TypeDecls : TypeDecl
+          | TypeDecls "," TypeDecl
+          ;
+
+TypeDecl : IDENTIFIERTK "=" Type
+         ;
+
+OptTypeParams : /* empty */
+              | "<" Names ">"
+              ;
+
+ToolParameters : "(" ")"
+               | "(" ToolParams ")"
+               ;
+
+ToolParams : Type ToolParam
+           | Type "..." ToolParam
+           | ToolParams "," Type ToolParam
+           | ToolParams "," Type "..." ToolParam
+           ;
+
+ToolParam : IDENTIFIERTK
+          | IDENTIFIERTK "=" Expression
+          ;
+
+OptStatements : /* empty */
+              | OptStatements Statement
+              ;
+
+Statement : Type VarDecls ";"
+          | "while" Expression ":" OptStatements "end"
+          | "while" Expression "::" Statement
+          | "for" AddressableDecls "in" Expression ":" OptStatements "end"
+          | "for" AddressableDecls "in" Expression "::" Statement
+          | "if" Expression ":" OptStatements OptElifStatements OptElseStatement "end"
+          | "if" Expression "::" Statement
+          | "break" ";"
+          | "continue" ";"
+          | Addressables "=" Expressions ";"
+          | "return" ";"
+          | "return" Expressions ";"
+          | ToolInvokeExpression ";"
+          | "exit" ";"
+          | "exit" Expression ";"
+          ;
+
+VarDecls : VarDecl
+         | VarDecls "," VarDecl
+         ;
+
+VarDecl : IDENTIFIERTK
+        | IDENTIFIERTK "=" Expression
+        ;
+
+OptElifStatements : /* empty */
+                  | OptElifStatements "elif" Expression ":" OptStatements
+                  ;
+
+OptElseStatement : /* empty */
+                 | "else" OptStatements
+                 ;
+
+AddressableDecls : AddressableDecl
+                 | AddressableDecls "," AddressableDecl
+                 ;
+
+AddressableDecl : IDENTIFIERTK
+                | "(" AddressableDecl "," AddressableDecls ")"
+                ;
+
+Addressables : Addressable
+             | Addressables "," Addressable
+             ;
+
+Addressable : IDENTIFIERTK
+            | IDENTIFIERTK Projections
+            | "(" Addressable "," Addressables ")"
+            ;
+
+Projections : Projection
+            | Projections Projection
+            ;
+
+Projection : "[" Expression "]"
+           ;
+
+Types : Type
+      | Types "," Type
+      ;
+
+Type : "bool"
+     | "bool" "?"
+     | "int"
+     | "int" "?"
+     | "long"
+     | "long" "?"
+     | "double"
+     | "double" "?"
+     | "string"
+     | "string" "?"
+     | "list" Type
+     | "list" "?" Type
+     | "set" Type
+     | "set" "?" Type
+     | "map" "(" Type ":" Type ")"
+     | "map" "?" "(" Type ":" Type ")"
+     | "tuple" "(" Type "," Types ")"
+     | "tuple" "?" "(" Type "," Types ")"
+     | "object"
+     | "object" "?"
+     | Name
+     ;
+
+Expressions : Expression
+            | Expressions "," Expression
+            ;
+
+OptExpression : /* empty */
+              | Expression
+              ;
+
+Expression : AndExpression
+           | Expression "or" AndExpression
+           ;
+
+AndExpression : CompareExpression
+              | AndExpression "and" CompareExpression
+              ;
+
+CompareExpression : AddExpression
+                  | CompareExpression "<" AddExpression
+                  | CompareExpression "<=" AddExpression
+                  | CompareExpression "==" AddExpression
+                  | CompareExpression "!=" AddExpression
+                  | CompareExpression ">=" AddExpression
+                  | CompareExpression ">" AddExpression
+                  ;
+
+AddExpression : MulExpression
+              | AddExpression "-" MulExpression
+              | AddExpression "+" MulExpression
+              ;
+
+MulExpression : UnaryExpression
+              | MulExpression "*" UnaryExpression
+              | MulExpression "/" UnaryExpression
+              | MulExpression "div" UnaryExpression
+              | MulExpression "mod" UnaryExpression
+              ;
+
+UnaryExpression : ProjExpression
+                | "-" UnaryExpression
+                | "+" UnaryExpression
+                | "not" UnaryExpression
+                ;
+
+ProjExpression : ExpressionFactor
+               | ProjExpression "[" Expression "]"
+               | ProjExpression "[" OptExpression ":" OptExpression "]"
+               ;
+
+ExpressionFactor : "true"
+                 | "false"
+                 | NUMBERTK
+                 | DOUBLETK
+                 | "null"
+                 | STRINGTK
+                 | "<" Type ">" ExpressionFactor
+                 | "[" "]"
+                 | "[" Expressions OptComma "]"
+                 | "{" "}"
+                 | "{" Expressions OptComma "}"
+                 | "{" MapEntries OptComma "}"
+                 | "(" Expression "," Expressions OptComma ")"
+                 | "(" Expression ")"
+                 | ToolInvokeExpression
+                 | Name
+                 ;
+
+MapEntries : Expression ":" Expression
+           | MapEntries "," Expression ":" Expression
+           ;
+
+ToolInvokeExpression : ToolRef "(" ToolArgs OptComma ")"
+                     | ToolRef "(" ")"
+                     ;
+
+ToolRef : BuiltInTool
+        | Name
+        ;
+
+BuiltInTool : BuiltInIoTool
+            | BuiltInGenericTool
+            | BuiltInPathTool
+            | BuiltInFileTool
+            | BuiltInDataTool
+            ;
+
+ToolArgs : Expression
+         | IDENTIFIERTK "=" Expression
+         | ToolArgs "," Expression
+         | ToolArgs "," IDENTIFIERTK "=" Expression
+         ;
+
+Names : Name
+      | Names "," Name
+      ;
+
+Name : IDENTIFIERTK
+     | RELATIVENAMETK
+     ;
+
+OptComma : /* empty */
+         | ","
+         ;
+
+BuiltInIoTool : "err"
+              | "errln"
+              | "out"
+              | "outln"
+              ;
+
+BuiltInGenericTool : "app"
+                   | "exec"
+                   | "tooldef"
+                   ;
+
+BuiltInPathTool : "abspath"
+                | "basename"
+                | "chdir"
+                | "chfileext"
+                | "curdir"
+                | "dirname"
+                | "fileext"
+                | "hasfileext"
+                | "pathjoin"
+                | "scriptpath"
+                ;
+
+BuiltInFileTool : "cpdir"
+                | "cpfile"
+                | "diff"
+                | "exists"
+                | "filenewer"
+                | "filesize"
+                | "find"
+                | "isdir"
+                | "isfile"
+                | "mkdir"
+                | "mvdir"
+                | "mvfile"
+                | "readlines"
+                | "rmdir"
+                | "rmfile"
+                | "writefile"
+                ;
+
+BuiltInDataTool : "abs"
+                | "ceil"
+                | "contains"
+                | "del"
+                | "delidx"
+                | "empty"
+                | "endswith"
+                | "entries"
+                | "enumerate"
+                | "floor"
+                | "fmt"
+                | "indexof"
+                | "join"
+                | "keys"
+                | "lastindexof"
+                | "ln"
+                | "log"
+                | "lower"
+                | "ltrim"
+                | "max"
+                | "min"
+                | "pow"
+                | "range"
+                | "replace"
+                | "reverse"
+                | "round"
+                | "rtrim"
+                | "size"
+                | "sorted"
+                | "split"
+                | "sqrt"
+                | "startswith"
+                | "str"
+                | "strdup"
+                | "subset"
+                | "trim"
+                | "upper"
+                | "values"
+                ;
diff --git a/v0.2-M1/tooldef/screenshot_cmdline.png b/v0.2-M1/tooldef/screenshot_cmdline.png
new file mode 100644
index 0000000..8bbdcbf
--- /dev/null
+++ b/v0.2-M1/tooldef/screenshot_cmdline.png
Binary files differ
diff --git a/v0.2-M1/tooldef/screenshot_ide.png b/v0.2-M1/tooldef/screenshot_ide.png
new file mode 100644
index 0000000..5747e64
--- /dev/null
+++ b/v0.2-M1/tooldef/screenshot_ide.png
Binary files differ
diff --git a/v0.2-M1/tooldef/tools/tooldef_icon.png b/v0.2-M1/tooldef/tools/tooldef_icon.png
new file mode 100644
index 0000000..d394f09
--- /dev/null
+++ b/v0.2-M1/tooldef/tools/tooldef_icon.png
Binary files differ