Set standard visible website to release v0.2.

Signed-off-by: Dennis Hendriks <dh_tue@hotmail.com>
diff --git a/chi/eclipse-escet-incubation-chi-manual.pdf b/chi/eclipse-escet-incubation-chi-manual.pdf
index bfd1a2d..f86a0bb 100644
--- a/chi/eclipse-escet-incubation-chi-manual.pdf
+++ b/chi/eclipse-escet-incubation-chi-manual.pdf
Binary files differ
diff --git a/chi/index.html b/chi/index.html
index 995b81e..f14798f 100644
--- a/chi/index.html
+++ b/chi/index.html
@@ -486,7 +486,7 @@
 <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.1.0.20210305-171633</span>
+<span id="revnumber">version v0.2</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -530,6 +530,7 @@
 </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>
@@ -541,17 +542,13 @@
 <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>
+<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>
+<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>
@@ -561,9 +558,7 @@
 </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>
+<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>
@@ -579,8 +574,7 @@
 <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.
+You can <a href="eclipse-escet-incubation-chi-manual.pdf">download this manual</a> as a PDF as well.
 </td>
 </tr>
 </table>
@@ -589,34 +583,28 @@
 <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>
+<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>
+<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>
+<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>
+<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>
@@ -636,14 +624,12 @@
 </dd>
 <dt class="hdlist1">Tool manual</dt>
 <dd>
-<p>The <a href="#tool-chapter-tool-manual">Tool manual</a>
-describes the Chi simulator software.
+<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>
+<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>
@@ -668,13 +654,12 @@
 <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>
+<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>
+<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>
@@ -689,8 +674,7 @@
 </div>
 </li>
 <li>
-<p><em>Programming</em>: How to specify parallel executing processes using the Chi
-language.</p>
+<p><em>Programming</em>: How to specify parallel executing processes using the Chi language.</p>
 <div class="ulist">
 <ul>
 <li>
@@ -725,8 +709,7 @@
 </div>
 </li>
 <li>
-<p><em>Visualization</em>: Making an animated graphical display of a system with the
-Chi simulator.</p>
+<p><em>Visualization</em>: Making an animated graphical display of a system with the Chi simulator.</p>
 <div class="ulist">
 <ul>
 <li>
@@ -743,19 +726,12 @@
 <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>
+<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.
+<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">
@@ -767,8 +743,7 @@
 <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>
+<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>
@@ -778,44 +753,29 @@
 <div class="paragraph">
 <p>
 
-The operation of a system can be described, e.g. in terms of or operating
-processes.</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>
+<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>
+<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.
+<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>
+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.
+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>
+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>
@@ -837,31 +797,22 @@
 </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>
+<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>
+<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>
+<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>
+<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>
@@ -869,48 +820,36 @@
 <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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<p>Input and output facilities from and to the file system exists to support large simulation experiments.</p>
 </li>
 </ul>
 </div>
@@ -937,8 +876,7 @@
 </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>
+<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>
@@ -961,8 +899,7 @@
 </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>
+<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>
@@ -980,12 +917,10 @@
 <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.
+<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>
+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">
@@ -996,16 +931,14 @@
 </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>
+<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>
+<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">
@@ -1019,22 +952,17 @@
 </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>.
+<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.
+<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.
+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.
+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">
@@ -1049,8 +977,7 @@
 <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>
+<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>
@@ -1078,12 +1005,10 @@
 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.
+<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>
+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>
@@ -1120,15 +1045,12 @@
 <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>
+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>
+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>
@@ -1180,8 +1102,7 @@
 </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>
+<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>
@@ -1192,17 +1113,13 @@
 <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>
+<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>
+<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>
+<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>
@@ -1215,10 +1132,9 @@
 </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>
+<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>
@@ -1231,14 +1147,13 @@
 <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>
+<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>
@@ -1311,25 +1226,20 @@
 </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>
+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>
+<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>
+<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>
@@ -1339,20 +1249,14 @@
 
 
 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>
+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>
+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>
@@ -1405,11 +1309,8 @@
 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>.
+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">
@@ -1426,19 +1327,16 @@
 
 
 
-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>
+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>
+<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">
@@ -1459,8 +1357,7 @@
 </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>).
+<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">
@@ -1470,12 +1367,10 @@
 </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>
+<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>
+<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">
@@ -1486,8 +1381,7 @@
 </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>
+<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>
@@ -1500,64 +1394,50 @@
 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.
+<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>
+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.
+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.
+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>
+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.
+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>
+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>
+<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>
@@ -1572,9 +1452,7 @@
 <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>
+<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>
@@ -1593,8 +1471,7 @@
 <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>
+(Here the type <code>string</code> is needed to determine the type of the elements of the empty set.)</p>
 </li>
 </ul>
 </div>
@@ -1605,14 +1482,13 @@
 <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>
+<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>
+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">
@@ -1621,15 +1497,13 @@
 </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>
+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 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">
@@ -1642,13 +1516,10 @@
 <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>
+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">
@@ -1668,18 +1539,16 @@
 <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>
+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.
+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>
@@ -1698,10 +1567,8 @@
 
 
 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>
+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">
@@ -1711,20 +1578,18 @@
 </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>
+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.
+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>
+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">
@@ -1740,8 +1605,7 @@
 
 
 
-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>.
+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">
@@ -1754,8 +1618,7 @@
 <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>
+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">
@@ -1764,9 +1627,8 @@
 </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>
+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">
@@ -1782,8 +1644,7 @@
 
 
 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).
+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>
@@ -1795,17 +1656,15 @@
 </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>
+<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>
+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">
@@ -1821,9 +1680,8 @@
 </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 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>
@@ -1867,8 +1725,7 @@
 </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.
+<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>
@@ -1878,8 +1735,7 @@
 </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>
+<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>
@@ -1891,8 +1747,7 @@
 <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>
+<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>
@@ -1927,9 +1782,8 @@
 </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>
+<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">
@@ -1937,13 +1791,12 @@
 </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>
+<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>
+<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">
@@ -1951,8 +1804,7 @@
 </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.
+<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">
@@ -1962,10 +1814,9 @@
 </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.
+<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">
@@ -1992,10 +1843,8 @@
 <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.
+<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">
@@ -2048,8 +1897,8 @@
 </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>
+<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">
@@ -2060,8 +1909,8 @@
 <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.
+<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">
@@ -2072,8 +1921,7 @@
 </div>
 </div>
 <div class="paragraph">
-<p>Subtracting keys that do not exist in the left dictionary is allowed and has
-no effect.</p>
+<p>Subtracting keys that do not exist in the left dictionary is allowed and has no effect.</p>
 </div>
 <div class="paragraph">
 <p></p>
@@ -2083,13 +1931,11 @@
 <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>
+<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>
+<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">
@@ -2110,8 +1956,7 @@
 <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>
+<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">
@@ -2120,14 +1965,9 @@
 </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.
+<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.
+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">
@@ -2197,14 +2037,11 @@
 <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>
+<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>
+<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>
@@ -2222,16 +2059,10 @@
 </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>
+<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>
@@ -2244,8 +2075,7 @@
 </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>
+Independent assignments can also be combined in a multi-assignment, for example:</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -2253,13 +2083,11 @@
 </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>
+<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>
+<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">
@@ -2289,8 +2117,8 @@
 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.
+<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">
@@ -2303,13 +2131,11 @@
 </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>
+<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>
+<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">
@@ -2330,16 +2156,14 @@
 </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>
+<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>
+<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">
@@ -2356,19 +2180,15 @@
 </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>
+<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>
+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>
@@ -2378,9 +2198,8 @@
 <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>
+<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">
@@ -2392,14 +2211,11 @@
 </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>
+<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>
@@ -2413,14 +2229,11 @@
 </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>
+<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>
+<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">
@@ -2435,9 +2248,7 @@
 </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>
+<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">
@@ -2461,9 +2272,9 @@
 <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>
+<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">
@@ -2477,14 +2288,11 @@
 <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>
+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>
+<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">
@@ -2498,15 +2306,14 @@
 </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>
+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>
+<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>
@@ -2514,18 +2321,15 @@
 
 
 . 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.
+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>
+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">
@@ -2533,8 +2337,7 @@
 <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.
+<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">
@@ -2589,14 +2392,9 @@
 <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.
+<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">
@@ -2612,31 +2410,25 @@
 </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>
+<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.
+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>).
+<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">
@@ -2646,19 +2438,15 @@
 </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>
+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 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>
+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>
@@ -2693,8 +2481,7 @@
 </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>
+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>
@@ -2706,14 +2493,11 @@
 <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>
+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>
+<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">
@@ -2724,12 +2508,9 @@
 </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>
+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>
@@ -2737,32 +2518,26 @@
 <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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -2771,9 +2546,8 @@
 <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>
+<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">
@@ -2781,15 +2555,13 @@
 </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>
+<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>
+<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">
@@ -2807,8 +2579,7 @@
 </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>.
+<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>
@@ -2829,12 +2600,9 @@
 <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.
+<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>
@@ -2854,8 +2622,7 @@
 </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>
+<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>
@@ -2863,8 +2630,7 @@
 <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>
+<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>
@@ -2896,8 +2662,9 @@
 </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>
+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>
@@ -2907,7 +2674,8 @@
 <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>
+<p>Data also can be read from files.
+An example fragment:</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -2924,21 +2692,15 @@
 </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>
+<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>
+<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">
@@ -2948,36 +2710,29 @@
 </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>
+<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>
+<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>
+<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>
+<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>.
+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">
@@ -2987,10 +2742,9 @@
 </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>
+<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">
@@ -3012,16 +2766,14 @@
 </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>
+<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>
+<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>
@@ -3033,21 +2785,20 @@
 <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>
+<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>
+<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>
+<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">
@@ -3057,15 +2808,17 @@
 </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>
+<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>
+<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">
@@ -3078,10 +2831,8 @@
 <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.
+<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">
@@ -3093,8 +2844,7 @@
 </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>
+<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">
@@ -3102,14 +2852,9 @@
 </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>
+<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>
@@ -3166,12 +2911,9 @@
 </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.
+<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">
@@ -3225,8 +2967,7 @@
 </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>
+<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>
@@ -3251,16 +2992,13 @@
 </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>.
+<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>
+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>
+If the file is still open after execution of the program, the file is closed automatically.</p>
 </div>
 </div>
 </div>
@@ -3271,25 +3009,17 @@
 
 
 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>
+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).
+<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">
@@ -3303,26 +3033,20 @@
 </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.
+<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>
+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>
+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>
@@ -3331,33 +3055,22 @@
 <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>
+<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>
+<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>
+<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>
@@ -3381,8 +3094,7 @@
 </div>
 </div>
 <div class="paragraph">
-<p>This distribution returns the integer value <code>7</code> with each <code>sample u</code>
-operation.</p>
+<p>This distribution returns the integer value <code>7</code> with each <code>sample u</code> operation.</p>
 </div>
 <div class="paragraph">
 <p>
@@ -3392,10 +3104,8 @@
 <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>
+<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>
@@ -3594,10 +3304,7 @@
 <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>
+<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>
@@ -3606,39 +3313,27 @@
 <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>
+<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>
+<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>
+<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">
@@ -3646,25 +3341,21 @@
 <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>
+<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>
+<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>
+<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>
+<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):
@@ -3681,12 +3372,12 @@
 </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>
+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():
@@ -3733,8 +3424,7 @@
 <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>
+<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>
@@ -3754,49 +3444,33 @@
 
 
 
-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>
+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.
+<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>
+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>
+<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.
+<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>
+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>
@@ -3815,12 +3489,8 @@
 </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.
+<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>
@@ -3832,12 +3502,9 @@
 <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>
+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>
@@ -3858,9 +3525,7 @@
 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>
+(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">
@@ -3878,22 +3543,19 @@
 </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>
+<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>
+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>
+<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">
@@ -3916,8 +3578,7 @@
 <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>
+The concept of 'a process in a process' is very useful in keeping the model structured.</p>
 </div>
 <div class="paragraph">
 <p>
@@ -3927,8 +3588,8 @@
 <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.
+<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">
@@ -3940,8 +3601,7 @@
 </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>
+<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">
@@ -3953,10 +3613,7 @@
 </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>
+<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>
@@ -3968,19 +3625,15 @@
 
 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.
+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>
+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>
+<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">
@@ -3989,13 +3642,12 @@
 <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.
+<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.
+<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>
@@ -4025,19 +3677,14 @@
 </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>
+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>.
+<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>.
+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>
@@ -4047,25 +3694,18 @@
 <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>
+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>.
+<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 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">
@@ -4094,23 +3734,18 @@
 </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>
+<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>
+<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>.
+<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">
@@ -4120,8 +3755,7 @@
 <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>.
+<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">
@@ -4159,15 +3793,10 @@
 <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 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">
@@ -4180,21 +3809,18 @@
 </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>
+<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>
+<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>
+<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">
@@ -4204,41 +3830,28 @@
 </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>
+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.
+<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.
+<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>
+<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>
+<p>To communicate with several other processes but without non-determinism, unique channels must be used.</p>
 </div>
 </div>
 <div class="sect3">
@@ -4247,8 +3860,7 @@
 <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).
+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>
@@ -4259,27 +3871,21 @@
 <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.
+<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.
+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>
+<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>
+<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>
@@ -4291,8 +3897,7 @@
 </ul>
 </div>
 <div class="paragraph">
-<p>In the text all three conventions are used, depending on the structure of
-the model.</p>
+<p>In the text all three conventions are used, depending on the structure of the model.</p>
 </div>
 </div>
 <div class="sect3">
@@ -4333,20 +3938,15 @@
 </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>
+<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">
@@ -4356,8 +3956,7 @@
 <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>
+<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(...):
@@ -4372,23 +3971,21 @@
 </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>
+<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>
+<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>
+<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>
+<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>
+<p>Specify the model <code>SixChildren</code>.
+Simulate the model.</p>
 </li>
 </ol>
 </div>
@@ -4403,25 +4000,16 @@
 <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>
+<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>
+<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>
+<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">
@@ -4431,16 +4019,13 @@
 </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>
+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>
+<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">
@@ -4449,33 +4034,25 @@
 <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>
+<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.
+<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.
+<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.
+<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">
@@ -4502,14 +4079,11 @@
 <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>
+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.
+<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">
@@ -4532,51 +4106,40 @@
 </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.
+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>
+<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>
+<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>
+<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>
+<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>
+<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.
+<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>
+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.
+<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">
@@ -4593,12 +4156,10 @@
 </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>
+<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.
+<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">
@@ -4614,25 +4175,17 @@
 </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>
+<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>
+<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>
+<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">
@@ -4646,14 +4199,9 @@
 </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>
+<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>
@@ -4676,11 +4224,8 @@
 </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>
+<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">
@@ -4706,8 +4251,7 @@
 </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>.
+<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">
@@ -4728,9 +4272,8 @@
 </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>
+<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">
@@ -4738,15 +4281,11 @@
 <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.
+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">
@@ -4774,13 +4313,12 @@
 <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.
+<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>
+<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">
@@ -4788,8 +4326,7 @@
 </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.
+<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">
@@ -4798,16 +4335,12 @@
 </div>
 </div>
 <div class="paragraph">
-<p>Variable <code>xs[0]</code> contains the high priority items, <code>xs[1]</code> the normal
-priority items.
+<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.
+<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">
@@ -4831,19 +4364,16 @@
 </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>
+<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>
+<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>
+<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">
@@ -4851,8 +4381,7 @@
 <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>
+<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">
@@ -4860,10 +4389,9 @@
 <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>
+<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">
@@ -4913,31 +4441,26 @@
 </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>
+<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>
+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>
+<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>
+<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>
@@ -4950,27 +4473,19 @@
 <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.
+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>
+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>
+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>
@@ -4984,17 +4499,15 @@
 <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>
+<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>
+<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">
@@ -5002,19 +4515,15 @@
 </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>
+<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.
+<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).
+<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">
@@ -5032,9 +4541,8 @@
 </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>
+<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>
@@ -5054,9 +4562,8 @@
 <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>
+<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>
@@ -5069,30 +4576,19 @@
 </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>
+<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>
+<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.
+<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">
@@ -5102,18 +4598,12 @@
 <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>
+<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.
+<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">
@@ -5136,8 +4626,7 @@
 <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>
+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>.
@@ -5153,12 +4642,10 @@
 </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>
+<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>
+<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">
@@ -5172,12 +4659,10 @@
 </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>
+<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>
+<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">
@@ -5191,19 +4676,15 @@
 </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>
+<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.
+<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">
@@ -5229,10 +4710,8 @@
 </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>
+<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">
@@ -5247,11 +4726,8 @@
 </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>
+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">
@@ -5267,14 +4743,11 @@
 </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>
+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>
+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>
@@ -5287,17 +4760,14 @@
 <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.
+<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.
+<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>
@@ -5323,17 +4793,14 @@
 </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>
+<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).
+<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">
@@ -5343,21 +4810,15 @@
 <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>
+<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>
+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">
@@ -5372,13 +4833,10 @@
 </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.
+<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">
@@ -5407,15 +4865,12 @@
 </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.
+<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.
+<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">
@@ -5440,17 +4895,14 @@
 </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.
+<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>
+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>
+<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">
@@ -5476,12 +4928,10 @@
 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>
+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>
+<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">
@@ -5490,9 +4940,9 @@
 <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.
+<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">
@@ -5512,27 +4962,21 @@
 </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>
+<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>
+<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>
+<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">
@@ -5541,8 +4985,7 @@
 <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>
+<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">
@@ -5557,15 +5000,12 @@
 </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>
+<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>
+<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">
@@ -5589,13 +5029,12 @@
 </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>
+<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">
@@ -5609,15 +5048,12 @@
 </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>
+<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>
+<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">
@@ -5625,30 +5061,22 @@
 <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>
+<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>
+<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>.
+<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>
+<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>
@@ -5673,14 +5101,10 @@
 <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>
+<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>
@@ -5695,11 +5119,11 @@
 
 
 
-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.
+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>
@@ -5724,8 +5148,8 @@
 <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.
+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>
@@ -5741,8 +5165,7 @@
 </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.
+<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>
@@ -5758,18 +5181,15 @@
 <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.
+<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>
+<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">
@@ -5791,13 +5211,10 @@
 </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>
+<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>
@@ -5807,12 +5224,9 @@
 <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>
+<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">
@@ -5851,8 +5265,7 @@
 </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>
+<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">
@@ -5860,9 +5273,7 @@
 <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>
+<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>
@@ -5874,9 +5285,7 @@
 </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>
+<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">
@@ -5889,7 +5298,8 @@
 <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>
+<p>Are there differences in behavior between both systems?
+Why (not)?</p>
 </li>
 </ol>
 </div>
@@ -5901,19 +5311,16 @@
 <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>
+<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>
+<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>
+<p>For systems that have simple cyclic behavior, the simulation can be 'exhaustive', for example:</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -5942,9 +5349,8 @@
 </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>
+<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>
@@ -5954,16 +5360,12 @@
 <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>
+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>
+<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">
@@ -5985,32 +5387,27 @@
 </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>
+<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>
+<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>
+<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).
+<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">
@@ -6027,28 +5424,21 @@
 </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>
+<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>
+<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>
@@ -6057,57 +5447,43 @@
 <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>
+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>.
+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>
+<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>
+<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>
+<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.
+<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">
@@ -6145,12 +5521,8 @@
 </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>
+<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">
@@ -6158,32 +5530,26 @@
 </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>
+<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>
+<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>
+<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.
+<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">
@@ -6206,24 +5572,19 @@
 </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>
+<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>
+<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>
+<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>
@@ -6233,11 +5594,8 @@
 <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>
+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>
@@ -6245,15 +5603,10 @@
 <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>
+<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>
+<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>
@@ -6261,8 +5614,7 @@
 <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>
+<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">
@@ -6295,122 +5647,90 @@
 </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.
+<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>
+<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>
+<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>
+<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>
+<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>
+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>
+<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>
+<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>
+<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>
+<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>
+<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>).
+<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>
+<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>
+<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>
+<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>
@@ -6457,8 +5777,7 @@
 <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>
+<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">
@@ -6467,10 +5786,9 @@
 </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>
+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>
@@ -6483,8 +5801,7 @@
 <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).
+<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">
@@ -6493,9 +5810,8 @@
 </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.
+<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">
@@ -6505,8 +5821,8 @@
 </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>
+<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>
@@ -6521,9 +5837,7 @@
 </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>
+<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>
@@ -6533,8 +5847,8 @@
 <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>
+<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">
@@ -6542,8 +5856,7 @@
 </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>.
+<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">
@@ -6556,12 +5869,10 @@
 </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>
+<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>
+<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">
@@ -6581,15 +5892,12 @@
 <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>
+<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>
+<p>The syntax of constant definitions is as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -6607,10 +5915,9 @@
 </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>
+<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>
@@ -6624,8 +5931,9 @@
 <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>
+<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">
@@ -6633,14 +5941,12 @@
 </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.
+<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>
+<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>
@@ -6655,27 +5961,18 @@
 </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>
+<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>
+<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>
+<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>
+<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>
@@ -6685,13 +5982,14 @@
 <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>
+<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>
+<p>Like the process, a model also has a definition.
+It is defined below.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -6699,18 +5997,10 @@
 </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>
+<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>
@@ -6721,18 +6011,16 @@
 <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>
+<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>
+<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>
+<p>The syntax of a function definition is as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -6740,39 +6028,33 @@
 </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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -6786,9 +6068,8 @@
 <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>
+<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">
@@ -6796,34 +6077,24 @@
 </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>
+<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>
+<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>
+<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>
+<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">
@@ -6846,30 +6117,23 @@
 </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>
+<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>
+<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>
+<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">
@@ -6877,17 +6141,14 @@
 </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>
+<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>
+<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>
+<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">
@@ -6901,12 +6162,10 @@
 </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>
+<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>
@@ -6917,10 +6176,10 @@
 
 
 
-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>
+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">
@@ -6928,23 +6187,15 @@
 </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>
+<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>
+<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>
+<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">
@@ -6954,40 +6205,30 @@
 <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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<p>The syntax diagram of <code>Body</code> states that statements are separated from each other with a semicolon (<code>;</code>).
+The compiler allows more freedom.
+Semicolons may be omitted before and after a <code>end</code> keyword, and a semicolon may be added after the last statement.</p>
 </div>
 <div class="paragraph">
 <p>
@@ -6997,8 +6238,7 @@
 <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>
+<p>Local variables are introduced in a process or function using the following syntax.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -7006,16 +6246,12 @@
 </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>
+<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 semicolon 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>
+<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>
@@ -7026,7 +6262,7 @@
 <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>
+Its syntax is as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -7034,16 +6270,13 @@
 </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>
+<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>
+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">
@@ -7051,26 +6284,18 @@
 </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>
+<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>
+<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>
@@ -7087,17 +6312,13 @@
 </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>
+<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>
+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">
@@ -7108,11 +6329,10 @@
 </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>
+<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>
@@ -7125,21 +6345,17 @@
 </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>
+<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>
+<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">
@@ -7147,8 +6363,8 @@
 </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>
+<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">
@@ -7164,23 +6380,19 @@
 </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>
+<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>
+<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>
+<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>
+xs[0], xs[x] = 0, 1 # Allowed if x != 0.</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -7191,7 +6403,7 @@
 <div class="sect3">
 <h4 id="ref-iterative-statements">Iterative statements</h4>
 <div class="paragraph">
-<p>The iterative statements are</p>
+<p>The iterative statements are shown below.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -7199,14 +6411,11 @@
 </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>
+<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>
+<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>
@@ -7221,17 +6430,13 @@
 </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>
+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>
+<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>
@@ -7247,13 +6452,11 @@
 </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>
+<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>
@@ -7268,8 +6471,7 @@
 </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>
+<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">
@@ -7285,9 +6487,10 @@
 </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>
+<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">
@@ -7299,11 +6502,8 @@
 </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>
+<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>
@@ -7311,8 +6511,7 @@
 <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>
+<p>Variable <code>x</code> is declared implicitly, no need to write a full variable declaration for it.</p>
 </li>
 </ul>
 </div>
@@ -7325,21 +6524,17 @@
 <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>
+<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>
+<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>
+<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">
@@ -7351,9 +6546,8 @@
 </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>
+<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>
@@ -7369,8 +6563,7 @@
 </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.
+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">
@@ -7390,9 +6583,8 @@
 </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>
+<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>
@@ -7402,10 +6594,8 @@
 <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>
+<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">
@@ -7429,12 +6619,9 @@
 </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>
+<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>
@@ -7447,15 +6634,14 @@
 <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>
+<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>
+<p>The syntax of the choice statement is as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -7464,22 +6650,17 @@
 </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>
+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>
+<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>
+<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>
@@ -7492,8 +6673,8 @@
 </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>
+<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>
@@ -7510,14 +6691,14 @@
 </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>
+<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>
+<p>The essential points of this statement are:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -7525,18 +6706,15 @@
 <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>
+<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>
+<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>
+<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>
@@ -7547,8 +6725,7 @@
 <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>
+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">
@@ -7556,9 +6733,7 @@
 </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>
+<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>
@@ -7569,8 +6744,7 @@
 <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>
+<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">
@@ -7578,9 +6752,8 @@
 </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.
+<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">
@@ -7594,21 +6767,13 @@
 </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>
+<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>
+<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>
@@ -7623,25 +6788,17 @@
 </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>
+<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>
+<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>
@@ -7658,21 +6815,15 @@
 </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>
+<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>
+<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>
+<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>
@@ -7683,9 +6834,8 @@
 <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>
+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 as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -7693,8 +6843,8 @@
 </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.
+<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">
@@ -7707,9 +6857,7 @@
 </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).
+<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">
@@ -7721,31 +6869,21 @@
 <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>
+<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).
+<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>
+<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>
+<p>Setting up a communication channel between two processes is often done in the following way:</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -7756,12 +6894,11 @@
 </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>
+<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>
+<p>The communication statements are as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -7769,10 +6906,8 @@
 </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>
+<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>
@@ -7782,8 +6917,7 @@
 <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>.
+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">
@@ -7792,12 +6926,8 @@
 </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.
+<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">
@@ -7809,10 +6939,8 @@
 </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>
+<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>
@@ -7823,8 +6951,7 @@
 <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>.
+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">
@@ -7833,11 +6960,8 @@
 </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>.
+<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">
@@ -7852,11 +6976,8 @@
 </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>
+<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>
@@ -7866,16 +6987,14 @@
 <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.
+<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>
+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>
+<p>It has the following syntax:</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -7883,15 +7002,12 @@
 </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>
+<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>
+<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>
@@ -7902,14 +7018,12 @@
 </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>
+<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>
+<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">
@@ -7917,21 +7031,14 @@
 </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>
+<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>
+<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>
@@ -7952,13 +7059,9 @@
 </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>
+<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>
@@ -7978,17 +7081,11 @@
 </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>
+<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>
+<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>
@@ -8007,13 +7104,9 @@
 </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>
+<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>
@@ -8035,10 +7128,8 @@
 </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>
+<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>
@@ -8053,12 +7144,8 @@
 </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>
+<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>
@@ -8068,9 +7155,8 @@
 <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>
+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">
@@ -8078,10 +7164,9 @@
 </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.
+<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">
@@ -8101,7 +7186,7 @@
 <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>
+It has the following syntax:</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -8109,16 +7194,14 @@
 </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>
+<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>
+<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>
@@ -8151,14 +7234,11 @@
 </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>
+<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>
@@ -8166,31 +7246,27 @@
 <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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -8251,19 +7327,15 @@
 </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>
+<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>
+<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>
+<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>
@@ -8273,7 +7345,7 @@
 <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>
+It has the following syntax:</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -8281,16 +7353,12 @@
 </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>
+<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>
+<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>
@@ -8311,8 +7379,8 @@
 <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>
+<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>.
+It has the following syntax:</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -8320,21 +7388,18 @@
 </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>
+<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>
+<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>
+<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>
@@ -8349,10 +7414,8 @@
 </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>
+<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">
@@ -8365,8 +7428,7 @@
 </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>
+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>
@@ -8390,21 +7452,18 @@
 <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.
+<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>
+<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>
+<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.
@@ -8420,88 +7479,63 @@
 </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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -8513,7 +7547,7 @@
 <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>
+<p>Enumeration values may be used as literal value in an expression.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -8521,8 +7555,7 @@
 </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>
+<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>
@@ -8562,8 +7595,7 @@
 </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).
+<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">
@@ -8583,7 +7615,7 @@
 <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>
+<p>The literal values for the boolean data type are as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -8591,8 +7623,7 @@
 </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>
+<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>
@@ -8622,8 +7653,7 @@
 </tbody>
 </table>
 <div class="paragraph">
-<p>The <code>and</code>, the <code>or</code>, and the equality tests are available for boolean
-values.</p>
+<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>
@@ -8681,7 +7711,7 @@
 <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>
+<p>The syntax of an integer literal number is (at character level) as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -8695,16 +7725,13 @@
 <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.
+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>
+<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>
@@ -8740,8 +7767,8 @@
 </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>
+<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>
@@ -8858,13 +7885,11 @@
 </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>
+<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>
@@ -8923,9 +7948,8 @@
 </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.
+<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">
@@ -8935,8 +7959,7 @@
 <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.
+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>
@@ -8950,9 +7973,8 @@
 <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>
+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 as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -8960,11 +7982,10 @@
 </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>
+<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>
+<p>The syntax of a literal real number (at character level) is as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -8978,16 +7999,15 @@
 <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.
+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>
+<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">
@@ -8997,12 +8017,11 @@
 </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>
+<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>
+<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>
@@ -9035,12 +8054,12 @@
 </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>
+<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>
+<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>
@@ -9140,18 +8159,16 @@
 </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>
+<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>
+<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>
+<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>
@@ -9161,8 +8178,9 @@
 <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>
+<p>Strings are sequences of characters.
+Their most frequent use is to construct text to output to the screen.
+A string literal is defined as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -9176,22 +8194,18 @@
 <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.
+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>
+<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>
@@ -9290,19 +8304,14 @@
 <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>.
+<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">
@@ -9322,12 +8331,10 @@
 <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>
+<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>
+<p>Note that length of the string is not the same as the number of characters needed for writing the string literal, as shown in the following example.</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -9343,12 +8350,11 @@
 <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>
+<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>
+<p>The most elementary list expression is a literal list.
+It has the following syntax.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -9356,15 +8362,13 @@
 </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>
+<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>
+<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>
@@ -9378,15 +8382,14 @@
 </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>
+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>
+<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>
+<p>Lists have no unary operators, the binary operators of lists are shown below.</p>
 </div>
 <table class="tableblock frame-all grid-all stretch">
 <colgroup>
@@ -9465,12 +8468,9 @@
 </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.
+<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">
@@ -9488,13 +8488,12 @@
 </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>
+<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">
@@ -9513,23 +8512,15 @@
 </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>
+<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>
+<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>
@@ -9544,13 +8535,10 @@
 </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>
+<p>With the latter example, note 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>
+<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">
@@ -9560,9 +8548,9 @@
 </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.
+<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>
@@ -9577,9 +8565,8 @@
 </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.
+<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">
@@ -9592,8 +8579,7 @@
 </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>
+<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>
@@ -9603,7 +8589,7 @@
 <div class="sect3">
 <h4 id="ref-set-expression">Set expressions</h4>
 <div class="paragraph">
-<p>Literal sets are written like</p>
+<p>Literal sets are written as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -9611,16 +8597,15 @@
 </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>
+<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>
+<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">
@@ -9628,18 +8613,17 @@
 </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>
+<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>
+<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>
+<p>Like lists, sets have no unary operators.
+They do have binary operators though.
+The operators are as follows.</p>
 </div>
 <table class="tableblock frame-all grid-all stretch">
 <colgroup>
@@ -9711,13 +8695,11 @@
 </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.
+<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>
+<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">
@@ -9730,8 +8712,8 @@
 </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.
+<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>
@@ -9748,8 +8730,7 @@
 </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>
+<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>
@@ -9759,7 +8740,7 @@
 <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>
+<p>Literal dictionaries are written using the syntax shown below.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -9767,9 +8748,7 @@
 </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.
+<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">
@@ -9780,13 +8759,12 @@
 </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>
+<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>
+<p>The binary operators of dictionaries are as follows.</p>
 </div>
 <table class="tableblock frame-all grid-all stretch">
 <colgroup>
@@ -9872,9 +8850,9 @@
 </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>
+<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">
@@ -9887,9 +8865,8 @@
 </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>.
+<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">
@@ -9901,10 +8878,7 @@
 </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>
+<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">
@@ -9916,13 +8890,11 @@
 </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>
+<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>
+<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">
@@ -9936,8 +8908,7 @@
 </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>
+<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>
@@ -9947,8 +8918,8 @@
 <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>
+<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 as shown below.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -9956,10 +8927,9 @@
 </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>
+<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">
@@ -9970,15 +8940,11 @@
 </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>
+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>
+<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">
@@ -9989,12 +8955,11 @@
 </div>
 </div>
 <div class="paragraph">
-<p>In the latter case, only the assigned field changes, all other fields keep the
-same value.</p>
+<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>
+<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">
@@ -10006,15 +8971,12 @@
 </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>
+<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>
+<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>
@@ -10027,8 +8989,7 @@
 </div>
 </div>
 <div class="paragraph">
-<p>The latter works due to the intermediate tuple that is created as part in the
-assignment.</p>
+<p>The latter works due to the intermediate tuple that is created as part in the assignment.</p>
 </div>
 <div class="paragraph">
 <p>
@@ -10038,17 +8999,13 @@
 <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>
+<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>
+<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>
+<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>
@@ -10085,11 +9042,8 @@
 </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>
+<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>
@@ -10099,8 +9053,8 @@
 <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>
+<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>
@@ -10110,24 +9064,17 @@
 </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>
+<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>
+<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>
+<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>
@@ -10137,14 +9084,13 @@
 <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>
+<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>
+<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>
@@ -10154,8 +9100,8 @@
 <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>
+<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>
@@ -10167,8 +9113,7 @@
 </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>
+<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>
@@ -10177,8 +9122,8 @@
 <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>
+<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>
@@ -10221,8 +9166,7 @@
 </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>
+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>
@@ -10233,18 +9177,14 @@
 <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>
+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>
+<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>
+<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>
@@ -10306,10 +9246,9 @@
 <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.)
+<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">
@@ -10332,10 +9271,9 @@
 </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>
+<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>
@@ -10345,16 +9283,15 @@
 <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>
+<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>
+<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>
+<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">
@@ -10376,22 +9313,19 @@
 </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>
+<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>
+<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>
+<p>The syntax of a matrix literal value is as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -10400,13 +9334,11 @@
 </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>
+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.
+<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">
@@ -10416,22 +9348,20 @@
 </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>
+<p><code>m</code> is a matrix with two rows and three columns.
+A comma separates two columns from each other, a semicolon 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>
+<p>The syntax demands at least one semicolon 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>
+<p>A cast expression converts a value from one type to another.
+The syntax of a cast expression is as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -10452,9 +9382,7 @@
 </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>
+<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">
@@ -10464,13 +9392,11 @@
 </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>
+<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>
+<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>
@@ -10544,32 +9470,27 @@
 </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.
+<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>
+<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>
+<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>
+<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>
+<p>A function call starts a function to compute its result value from the input parameters.
+The syntax is as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -10577,32 +9498,26 @@
 </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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -10655,9 +9570,8 @@
 </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>
+<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>
@@ -10709,7 +9623,7 @@
 <div class="sect3">
 <h4 id="ref-integer-stdlib">Integer functions</h4>
 <div class="paragraph">
-<p>The following standard library functions on integers exist</p>
+<p>The following standard library functions on integers exist:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -10722,8 +9636,7 @@
 <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>
+<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>
@@ -10748,7 +9661,7 @@
 <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>
+<p>The following standard library functions on real numbers exist:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -10761,29 +9674,27 @@
 <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>
+<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>
+<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>
+<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>
+<p>Conversion from real number to integer can be performed in three different ways.</p>
 </div>
 <div class="ulist">
 <ul>
@@ -10970,24 +9881,21 @@
 <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>
+<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>
+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>
+<p>For getting information about the number of elements in a list, the following functions are available.</p>
 </div>
 <div class="ulist">
 <ul>
@@ -10995,8 +9903,7 @@
 <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>
+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>
@@ -11008,93 +9915,78 @@
 </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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -11114,18 +10006,15 @@
 <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>
+<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>
+<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>
@@ -11138,16 +10027,14 @@
 <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>
+<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>
+<p>For getting information about the number of elements in a set, the following functions are available.</p>
 </div>
 <div class="ulist">
 <ul>
@@ -11155,8 +10042,7 @@
 <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>
+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>
@@ -11168,25 +10054,21 @@
 </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>
+<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>
+<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>
+<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>
@@ -11199,45 +10081,36 @@
 <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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -11250,56 +10123,48 @@
 <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.
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -11316,9 +10181,8 @@
 <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>
+<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>
@@ -11335,42 +10199,37 @@
 <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>
+<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>
+<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>
+<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>
+<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.
+<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>
+<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>
@@ -11409,35 +10268,29 @@
 </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>
+<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>
+<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>
+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>
+<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>
+<p>Alternatively, you may want to use the forward slash <code>/</code> instead as path component separator.</p>
 </div>
 </li>
 </ul>
@@ -11484,17 +10337,12 @@
 </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>
+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>
+<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>
@@ -11502,9 +10350,7 @@
 <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>
+<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>
@@ -12312,16 +11158,10 @@
 <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>
+<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>
+<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>
@@ -12332,7 +11172,7 @@
 <div class="paragraph">
 <p>
 A type defines the set of possible values of an expression or a variable.
-Its syntax is</p>
+Its syntax is defined as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -12346,37 +11186,33 @@
 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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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">
@@ -12390,13 +11226,11 @@
 </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>
+<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>
+<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">
@@ -12410,8 +11244,7 @@
 </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>
+<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>
@@ -12420,8 +11253,8 @@
 <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>
+<p>The elementary types do not depend on other types to define their set of allowed values.
+They have the following syntax:</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -12429,9 +11262,8 @@
 </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.
+<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">
@@ -12441,12 +11273,9 @@
 <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>).
+<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">
@@ -12457,9 +11286,8 @@
 <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.
+<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">
@@ -12470,11 +11298,9 @@
 <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.
+<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">
@@ -12485,9 +11311,8 @@
 <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).
+<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">
@@ -12498,10 +11323,9 @@
 <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>.
+<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">
@@ -12512,8 +11336,8 @@
 <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.
+<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">
@@ -12524,10 +11348,9 @@
 <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>
+<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>
@@ -12537,11 +11360,9 @@
 <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>
+<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>
@@ -12551,19 +11372,18 @@
 <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>
+<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>
+<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>
+<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>
@@ -12576,9 +11396,8 @@
 <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>
+<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 as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -12586,9 +11405,7 @@
 </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>
+<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>
@@ -12597,8 +11414,8 @@
 <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>
+<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>
@@ -12609,14 +11426,11 @@
 </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>
+<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>
+<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>
@@ -12628,8 +11442,7 @@
 </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>
+<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>
@@ -12639,8 +11452,8 @@
 <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>
+<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>
@@ -12651,8 +11464,8 @@
 </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.
+<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">
@@ -12661,8 +11474,7 @@
 </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>
+<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>
@@ -12672,9 +11484,9 @@
 <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>
+<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>
@@ -12685,9 +11497,9 @@
 </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>
+<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">
@@ -12696,8 +11508,7 @@
 </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>
+<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>
@@ -12708,8 +11519,8 @@
 <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>
+<p>A tuple contains a fixed number of values of (possibly) different types.
+It has the following syntax:</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -12717,10 +11528,9 @@
 </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.
+<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">
@@ -12735,9 +11545,8 @@
 </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.
+<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">
@@ -12749,7 +11558,7 @@
 <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>
+The syntax of the channel type is as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -12757,26 +11566,19 @@
 </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>
+<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>
+<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>
@@ -12786,7 +11588,8 @@
 <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>
+<p>The distribution type represents a stochastic distribution.
+It has the following syntax:</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -12794,10 +11597,9 @@
 </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>
+<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>
@@ -12807,7 +11609,8 @@
 <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>
+<p>The function type can hold a function.
+Its syntax is as follows.</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -12815,11 +11618,8 @@
 </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>
+<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>
@@ -12829,9 +11629,8 @@
 <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>
+<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.
+It has the following syntax:</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -12839,8 +11638,7 @@
 </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.
+<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>
@@ -12848,90 +11646,75 @@
 <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>
+<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>
+<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.
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -12939,14 +11722,12 @@
 </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>
+<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>
+<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>
@@ -12959,112 +11740,90 @@
 <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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -13080,16 +11839,13 @@
 <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>
+<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>
+<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>
@@ -13120,34 +11876,26 @@
 </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>
+<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>
+<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>
+<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>
+<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">
@@ -13156,58 +11904,45 @@
 </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>
+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>
+<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>
+<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>
+<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>
+<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.
+<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>
+<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">
@@ -13215,23 +11950,16 @@
 </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>
+<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>
+<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">
@@ -13245,12 +11973,10 @@
 <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>
+<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>
+<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>
@@ -13258,33 +11984,26 @@
 </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>
+<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>
+<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>
+<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>
+<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>
@@ -13313,16 +12032,15 @@
 <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>
+<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>
+<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>
@@ -13334,9 +12052,7 @@
 <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>).
+<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>
@@ -13350,29 +12066,26 @@
 <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>
+<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>
+<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>
+<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>
+<p>Whether or not to write the compiled Java simulator classes (default is <code>off</code>).</p>
 </div>
 </li>
 </ul>
@@ -13388,21 +12101,32 @@
 <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>
+<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>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>
+<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>Improvements and fixes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Chi simulator no longer crashes when using the Eclipse Compiler for Java (ecj) as Java compiler (issue #46).</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 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>
+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>
@@ -13424,34 +12148,27 @@
 <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>
+<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>
+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>
+<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>
+<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>
diff --git a/chi/reference-manual/rail_diagrams/Makefile b/chi/reference-manual/rail_diagrams/Makefile
index d7a39c3..56f18d0 100644
--- a/chi/reference-manual/rail_diagrams/Makefile
+++ b/chi/reference-manual/rail_diagrams/Makefile
@@ -10,7 +10,7 @@
 # SPDX-License-Identifier: MIT
 ################################################################################
 #
-# Makefile for creating the reference manual rail road images
+# Makefile for creating the reference manual railroad images
 #
 LATEX=latex
 DVIPS=dvips
diff --git a/cif/eclipse-escet-incubation-cif-manual.pdf b/cif/eclipse-escet-incubation-cif-manual.pdf
index 0357826..c9cb255 100644
--- a/cif/eclipse-escet-incubation-cif-manual.pdf
+++ b/cif/eclipse-escet-incubation-cif-manual.pdf
Binary files differ
diff --git a/cif/index.html b/cif/index.html
index 5c6c5bb..5118715 100644
--- a/cif/index.html
+++ b/cif/index.html
@@ -486,7 +486,7 @@
 <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.1.0.20210318-080652</span>
+<span id="revnumber">version v0.2</span>
 </div>
 <div id="toc" class="toc2">
 <div id="toctitle">Table of Contents</div>
@@ -672,6 +672,7 @@
 <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>
@@ -688,18 +689,12 @@
 <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>
+<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>
+<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>
@@ -709,9 +704,7 @@
 </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>
+<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>
@@ -727,8 +720,7 @@
 <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.
+You can <a href="eclipse-escet-incubation-cif-manual.pdf">download this manual</a> as a PDF as well.
 </td>
 </tr>
 </table>
@@ -778,37 +770,28 @@
 <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>
+<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>
+<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>
+<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>
+<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>
+<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>
+<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>
@@ -816,20 +799,18 @@
 <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>
+<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>
+<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>
+<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>
@@ -842,19 +823,17 @@
 <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>
+<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>
+<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>
@@ -862,17 +841,14 @@
 </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>
+<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>
+<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">
@@ -915,8 +891,7 @@
 </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>
+<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>
@@ -945,9 +920,7 @@
 </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>
+<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>
@@ -966,13 +939,11 @@
 </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>
+<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>
+<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>
@@ -984,8 +955,7 @@
 </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>
+<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>
@@ -993,13 +963,11 @@
 </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>
+<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>
+<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>
@@ -1022,13 +990,11 @@
 <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>
+<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>
+<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>
@@ -1122,14 +1088,11 @@
 </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>
+<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>
+<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>
@@ -1156,8 +1119,7 @@
 </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>
+<p>Explains how channel communication can be combined with event synchronization, further restricting the communication.</p>
 </dd>
 </dl>
 </div>
@@ -1176,8 +1138,7 @@
 </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>
+<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>
@@ -1216,9 +1177,7 @@
 </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>
+<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>
@@ -1230,8 +1189,7 @@
 </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>
+<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>
@@ -1242,18 +1200,15 @@
 <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>
+<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>
+<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>
+<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>
@@ -1264,32 +1219,27 @@
 <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>
+<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>
+<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>
+<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>
+<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>
+<p>This documentation is currently not part of the language tutorial, but of the simulator tool documentation.</p>
 </div>
 </dd>
 </dl>
@@ -1307,10 +1257,10 @@
 </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>
+<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">
@@ -1327,8 +1277,7 @@
 </div>
 </div>
 <div class="paragraph">
-<p>The automaton is named <code>lamp</code>, and not surprisingly represents the (discrete)
-behavior of a lamp.</p>
+<p>The automaton is named <code>lamp</code>, and not surprisingly represents the (discrete) behavior of a lamp.</p>
 </div>
 <div class="paragraph">
 <p>
@@ -1336,71 +1285,65 @@
 </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>
+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>
+<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>
+<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>
+<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>
+<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>
+<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>
+The power of events is that they synchronize.
+To illustrate this, consider the following CIF specification:</p>
 </div>
 <div class="listingblock">
 <div class="content">
@@ -1417,14 +1360,11 @@
 </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>
+<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">
@@ -1441,19 +1381,15 @@
 </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.
+<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>
+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>
+<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>
@@ -1461,132 +1397,86 @@
 <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>
+<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>
+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>
+<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>
+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>
+<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>
+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.