resource main()
  op swap(var x: int)
  process p1
     ...
    call swap(y)
     ...
  end
  process p2
     ...
    call swap(z)
     ...
  end
  process q
     ...
    in swap(x1) -> in swap(x2) -> x1 :=: x2 ni ni
     ...
  end
end
