Commit f4375990 authored by Florian Schießl's avatar Florian Schießl
Browse files

add documentation for `where` and an example

parent c17bf766
Pipeline #7420 passed with stages
in 2 minutes and 8 seconds
......@@ -251,6 +251,10 @@
<td><code>X</code></td>
<td>behaves like <code>P</code> if <code>X</code> was defined before as <code>X := P</code></td>
</tr>
<tr>
<td><code>when (e) P</code></td>
<td>behaves like <code>P</code> if <code>e</code> evaluates to true.</td>
</tr>
</table>
<p>A CCS action is any combination of letters starting with a lower-case letter. Some of them have a special meaning:</p>
<table class="table table-striped table-hover">
......@@ -275,6 +279,9 @@
<p>Process definitions may contain an arbitrary number of variables in square brackets, which must be given when a process is called.</p>
<p>Here's an example for a valid CCS term:</p>
<pre:for:copying data="'X := a.Y\nY := a.0 + b.(i.0 | a.0)\n\nX'"></pre:for:copying>
<p>Here's an example for a CCS process which uses <code>when</code>:</p>
<pre:for:copying data="'Check[x] := out?n.( when (n<=x) lessequal!.0 + when (n > x) greaterthen!.0)'"></pre:for:copying>
<p>It listens for integers on the <code>out</code> channel and emits <code>lessequal!</code> or <code>greaterthen!</code> depending on it's argument <code>x</code> and the received value <code>n</code>.</p>
<p>For more examples, <a href="#/new/ccs">create a new CCS file</a> and select a template.</p>
<a id="actions"></a><h2>Actions</h2>
......@@ -359,4 +366,4 @@
</tr>
</table>
</div>
</div>
\ No newline at end of file
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment