Commit 266aa412 authored by AVANZINI Martin's avatar AVANZINI Martin
Browse files

coupon example sec 8.2

parent 1f0e2943
......@@ -1244,14 +1244,14 @@ queuingNetwork = do
, (5, l2 .= l2 + 2)
, (3, do {l1 .= l1 + 2; l2 .= l2 + 1}) ]
-- consume (l1 + l2)
nondet[ consume l1,consume l2 ]
-- ite (l1 .>= l2) (consume l1) (consume l2)
-- nondet[ consume l1,consume l2 ]
ite (l1 .>= l2) (consume l1) (consume l2)
p0 = choice [ (1 , p1), (98, skip) ]
assume (l1 .>= 0 .&& l2 .>= 0) skip
n .= n -1
-- ite (l1 .>= 1) (l1 .= l1 - 1) skip
-- ite (l2 .>= 1) (l2 .= l2 - 1) skip
ite (l1 .>= 1) (l1 .= l1 - 1) skip
ite (l2 .>= 1) (l2 .= l2 - 1) skip
p0
queuingNetwork' :: Program
......@@ -1266,4 +1266,3 @@ queuingNetwork' = do
n .= n -1
ite (l1 .>= 1) (l1 .= l1 - 1) skip
consume l1
Supports Markdown
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