Added notation for branching

parent 5f52db46
......@@ -90,4 +90,8 @@ Section branching_specs.
- wp_pures. iApply ("HΦ'"). eauto with iFrame.
Qed.
End branching_specs.
\ No newline at end of file
End branching_specs.
Notation "'branch:' c @ s 'left' e1 'right' e2" :=
(branch c s (λ: <>, e1)%E (λ: <>, e2)%E #())
(at level 200, c, s, e1, e2 at level 200) : expr_scope.
......@@ -11,9 +11,9 @@ Section BranchingExamples.
Definition branch_example b : expr :=
(let: "c" := new_chan #() in
select "c" #Left #b;;
Fork((branch "c" #Right
(λ: <>, send "c" #Right #5)
(λ: <>, #())) #());;
Fork(branch: "c" @ #Right
left send "c" #Right #5
right #());;
(if: #b then recv "c" #Left else #()))%E.
End BranchingExamples.
\ No newline at end of file
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