Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Actris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iris
Actris
Commits
88379326
Commit
88379326
authored
1 year ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
Also smuggle on return
parent
179c1a13
No related branches found
No related tags found
1 merge request
!39
Multiparty synchronous
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
multi_actris/examples/basics.v
+9
-7
9 additions, 7 deletions
multi_actris/examples/basics.v
with
9 additions
and
7 deletions
multi_actris/examples/basics.v
+
9
−
7
View file @
88379326
...
...
@@ -250,20 +250,21 @@ Definition smuggle_ref_prog : val :=
let
:
"c0"
:=
get_chan
"cs"
#
0
in
let
:
"c1"
:=
get_chan
"cs"
#
1
in
let
:
"c2"
:=
get_chan
"cs"
#
2
in
Fork
(
send
"c1"
#
2
(
recv
"c1"
#
0
));;
Fork
(
let
:
"l"
:=
recv
"c2"
#
1
in
"l"
<-
!
"l"
+
#
2
;;
send
"c2"
#
0
#
());;
Fork
(
send
"c1"
#
2
(
recv
"c1"
#
0
)
;;
send
"c1"
#
0
(
recv
"c1"
#
2
)
);;
Fork
(
let
:
"l"
:=
recv
"c2"
#
1
in
"l"
<-
!
"l"
+
#
2
;;
send
"c2"
#
1
#
());;
let
:
"l"
:=
ref
#
40
in
send
"c0"
#
1
"l"
;;
recv
"c0"
#
2
;;
!
"l"
.
send
"c0"
#
1
"l"
;;
recv
"c0"
#
1
;;
!
"l"
.
Section
smuggle_ref
.
Context
`{
!
heapGS
Σ
,
!
chanG
Σ
}
.
Definition
iProto_smuggle_ref
:
gmap
nat
(
iProto
Σ
)
:=
<
[
0
:=
(
<
(
Send
,
1
)
@
(
l
:
loc
)
(
x
:
Z
)
>
MSG
#
l
{{
l
↦
#
x
}}
;
<
(
Recv
,
2
)
>
MSG
#
()
{{
l
↦
#
(
x
+
2
)
}}
;
END
)
%
proto
]
>
(
<
[
1
:=
(
<
(
Recv
,
0
)
@
(
v
:
val
)
>
MSG
v
;
<
(
Send
,
2
)
>
MSG
v
;
END
)
%
proto
]
>
<
(
Recv
,
1
)
>
MSG
#
()
{{
l
↦
#
(
x
+
2
)
}}
;
END
)
%
proto
]
>
(
<
[
1
:=
(
<
(
Recv
,
0
)
@
(
v
:
val
)
>
MSG
v
;
<
(
Send
,
2
)
>
MSG
v
;
<
(
Recv
,
2
)
>
MSG
#
();
<
(
Send
,
0
)
>
MSG
#
()
;
END
)
%
proto
]
>
(
<
[
2
:=
(
<
(
Recv
,
1
)
@
(
l
:
loc
)
(
x
:
Z
)
>
MSG
#
l
{{
l
↦
#
x
}}
;
<
(
Send
,
0
)
>
MSG
#
()
{{
l
↦
#
(
x
+
2
)
}}
;
END
)
%
proto
]
>
∅
))
.
<
(
Send
,
1
)
>
MSG
#
()
{{
l
↦
#
(
x
+
2
)
}}
;
END
)
%
proto
]
>
∅
))
.
Lemma
iProto_smuggle_ref_consistent
:
⊢
iProto_consistent
iProto_smuggle_ref
.
...
...
@@ -286,7 +287,8 @@ Section smuggle_ref.
wp_smart_apply
(
get_chan_spec
_
2
with
"Hcs"
);
[
set_solver
|]
.
iIntros
(
c2
)
"[Hc2 Hcs]"
.
wp_smart_apply
(
wp_fork
with
"[Hc1]"
)
.
{
iIntros
"!>"
.
wp_recv
(
v
)
as
"_"
.
by
wp_send
with
"[//]"
.
}
{
iIntros
"!>"
.
wp_recv
(
v
)
as
"_"
.
wp_send
with
"[//]"
.
wp_recv
as
"_"
.
by
wp_send
with
"[//]"
.
}
wp_smart_apply
(
wp_fork
with
"[Hc2]"
)
.
{
iIntros
"!>"
.
wp_recv
(
l
x
)
as
"Hl"
.
wp_load
.
wp_store
.
by
wp_send
with
"[$Hl]"
.
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment