Pipe-calculus: Difference between revisions

Line 67: Line 67:
<math>
<math>
\def\seq{\mathrel{;}}
\def\seq{\mathrel{;}}
\def\pipe{\rhd}
\def\sync{\mathsf{sync}~}
\def\sync{\mathsf{sync}~}
\def\null{\textbf{0}}
\def\null{\textbf{0}}
\def\fail{\textbf{fail}}
\def\fail{\textbf{fail}}
\def\pass{\textbf{pass}}
\def\pto{\mathrel{\to\mkern-18mu\vcenter{\hbox{$\scriptscriptstyle|$}\mkern11mu}}}
\def\pto{\mathrel{\to\mkern-18mu\vcenter{\hbox{$\scriptscriptstyle|$}\mkern11mu}}}
\def\nto{\to}
\def\nto{\to}
Line 84: Line 86:
& \mbox{Choices}~      & c, d & ::= s \mathsf{|} c \mid \fail \\
& \mbox{Choices}~      & c, d & ::= s \mathsf{|} c \mid \fail \\


& \mbox{Pipelines}~    & p, q & ::= c \rhd p \mid c \\
& \mbox{Pipelines}~    & p, q & ::= c \pipe p \mid \pass \\
\end{alignat}
\end{alignat}
</math>
</math>
Line 100: Line 102:
'''Nondeterministic choice''' is an enumeration of alternatives. <math>\textbf{fail}</math> denotes the lack of choices, or intuitively a failure to find any viable alternative.
'''Nondeterministic choice''' is an enumeration of alternatives. <math>\textbf{fail}</math> denotes the lack of choices, or intuitively a failure to find any viable alternative.


The '''pipe''' operator connects a number of choices into '''pipelines'''.
The '''pipe''' operator connects choices into '''pipelines'''.
<math>\pass</math> denotes a passive pipeline that transfers its input unchanged to the output.  


For better readability, let's define some syntax sugar that will be used throughout this article. Extend the syntax of sequences as follows.
For better readability, let's define some syntax sugar that will be used throughout this article. Extend the syntax of sequences as follows.
283

edits