Pipe-calculus: Difference between revisions

Line 164: Line 164:
==== Exclusive choice ====
==== Exclusive choice ====


One can make choices mutually exclusive by limiting themeselves to trees of choices where each leaf of the tree is one of the forms <math>a^+ . s</math> and <math>a^- . s</math> [and all atoms are different]. This is an example of guarded choice[]. It allows for the encoding of sum types and the corresponding <math>case</math> expressions in strongly typed functional languages.
Given a set of distinct atoms <math>{ a_1,...a_n }</math> and process terms <math>s_1,...s_n, t_1,...t_n</math>, all subterms of <math>a_1^+ . s_1 \mid ... \mid a_n^+ . s_n  \mid a_1^- . t_1 \mid ... \mid a_n^- . t_n</math> are ''exclusive'' choices, since all possible interaction leaves at most one active branch.
 
This form is called synchronization-guarded choice[]. It allows for the encoding of sum types and the corresponding <math>case</math> expressions in strongly typed functional languages.


=== Pipeline ===
=== Pipeline ===
283

edits