Syntax sugar (Pipe-calculus): Difference between revisions

Line 5: Line 5:
<math>
<math>
\def\seq{\mathrel{;}}
\def\seq{\mathrel{;}}
\def\succeed{\textbf{succeed}}
\def\alt{\mid}
\def\alt{\mid}
\def\fail{\textbf{fail}}
\def\pipe{\rhd}
\def\pipe{\rhd}
\def\pass{\textbf{pass}}
\def\pass{\textbf{pass}}
Line 22: Line 20:


<math>
<math>
\mathsf{let}~x = s~\mathsf{in}~t \rew \out s . \fail \pipe \in x . t
\mathsf{let}~x = s~\mathsf{in}~t \rew \out s . \bot \pipe \in x . t
</math>
</math>


According to the defined [[Pipe-calculus#Normal_forms|rewriting relation]], this can be rewritten as follows.
Using the defined [[Pipe-calculus#Normal_forms|rewriting relation]], this can be rewritten as follows.


<math>\out s . \fail \pipe \in x . t \rew \fail \pipe t[s/x] \rew t[s/x]</math>.
<math>\out s . \bot \pipe \in x . t \rew \bot \pipe t[s/x] \rew t[s/x]</math>.


== Arrow Syntax ==
== Arrow Syntax ==
283

edits