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
25aa0207
Commit
25aa0207
authored
1 year ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
More automation
parent
f14549a3
No related branches found
Branches containing commit
No related tags found
1 merge request
!39
Multiparty synchronous
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/channel/multi_proto_consistency_examples.v
+101
-1
101 additions, 1 deletion
theories/channel/multi_proto_consistency_examples.v
with
101 additions
and
1 deletion
theories/channel/multi_proto_consistency_examples.v
+
101
−
1
View file @
25aa0207
...
...
@@ -49,6 +49,9 @@ Proof.
iNext
.
iRewrite
-
"Hp1"
.
done
.
Qed
.
(* TODO: Improve automation *)
(* Could clean up repeated inserts to save traverses *)
(* Need bug fixin (see example 5) *)
Tactic
Notation
"iProto_consistent_take_step"
:=
let
i
:=
fresh
in
let
j
:=
fresh
in
...
...
@@ -66,6 +69,8 @@ Tactic Notation "iProto_consistent_take_step" :=
repeat
(
rewrite
lookup_total_insert_ne
;
[|
lia
]);
try
(
by
rewrite
lookup_total_empty
iProto_end_message_equivI
)]);
repeat
(
rewrite
lookup_total_insert_ne
;
[|
lia
]);
try
rewrite
lookup_total_empty
;
try
(
by
iProto_end_message_equivI
);
rewrite
lookup_total_insert
;
iDestruct
(
iProto_message_equivI
with
"Hm2"
)
as
"[%Heq2 Hm2']"
;
simplify_eq
;
...
...
@@ -75,7 +80,15 @@ Tactic Notation "iProto_consistent_take_step" :=
iSplitL
;
[
iFrame
"#"
|];
iSplitL
;
[
iPureIntro
;
tc_solve
|];
iSplitL
;
[
iPureIntro
;
tc_solve
|];
simpl
;
iClear
"#"
;
clear
m1
m2
)
.
simpl
;
iClear
"#"
;
clear
m1
m2
);
try
(
repeat
(
rewrite
(
insert_commute
_
_
i
);
[|
done
]);
rewrite
insert_insert
;
repeat
(
rewrite
(
insert_commute
_
_
j
);
[|
done
]);
rewrite
insert_insert
)
.
Tactic
Notation
"clean_map"
constr
(
i
)
:=
repeat
(
rewrite
(
insert_commute
_
_
i
);
[|
done
]);
rewrite
(
insert_insert
_
i
)
.
Definition
iProto_example1
{
Σ
}
:
gmap
nat
(
iProto
Σ
)
:=
∅.
...
...
@@ -228,3 +241,90 @@ Section proof.
Qed
.
End
proof
.
Section
example5
.
Context
`{
!
heapGS
Σ
}
.
Definition
iProto_example5
:
gmap
nat
(
iProto
Σ
)
:=
<
[
0
:=
(
<
(
Send
,
1
)
@
(
x
:
Z
)
>
MSG
#
x
;
<
(
Send
,
2
)
>
MSG
#
x
;
<
(
Recv
,
3
)
>
MSG
#
x
;
<
(
Recv
,
4
)
>
MSG
#
x
;
END
)
%
proto
]
>
(
<
[
1
:=
(
<
(
Recv
,
0
)
@
(
x
:
Z
)
>
MSG
#
x
;
<
(
Send
,
3
)
>
MSG
#
x
;
END
)
%
proto
]
>
(
<
[
2
:=
(
<
(
Recv
,
0
)
@
(
x
:
Z
)
>
MSG
#
x
;
<
(
Send
,
4
)
>
MSG
#
x
;
END
)
%
proto
]
>
(
<
[
3
:=
(
<
(
Recv
,
1
)
@
(
x
:
Z
)
>
MSG
#
x
;
<
(
Send
,
0
)
>
MSG
#
x
;
END
)
%
proto
]
>
(
<
[
4
:=
(
<
(
Recv
,
2
)
@
(
x
:
Z
)
>
MSG
#
x
;
<
(
Send
,
0
)
>
MSG
#
x
;
END
)
%
proto
]
>
∅
))))
.
Lemma
iProto_example5_consistent
:
⊢
iProto_consistent
iProto_example5
.
Proof
.
rewrite
/
iProto_example5
.
iProto_consistent_take_step
.
iIntros
(
x
)
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
0
.
clean_map
1
.
iProto_consistent_take_step
.
-
iIntros
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
0
.
clean_map
2
.
iProto_consistent_take_step
.
+
iIntros
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
1
.
clean_map
3
.
iProto_consistent_take_step
.
*
iIntros
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
2
.
clean_map
4
.
iProto_consistent_take_step
.
iIntros
"_"
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
0
.
clean_map
3
.
iProto_consistent_take_step
.
iIntros
"_"
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
iProto_consistent_take_step
.
*
iIntros
"_"
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
3
.
clean_map
0
.
iProto_consistent_take_step
.
iIntros
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
2
.
clean_map
4
.
iProto_consistent_take_step
.
iIntros
"_"
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
4
.
clean_map
0
.
iProto_consistent_take_step
.
+
iIntros
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
2
.
clean_map
4
.
iProto_consistent_take_step
.
iIntros
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
1
.
clean_map
3
.
iProto_consistent_take_step
.
iIntros
"_"
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
3
.
clean_map
0
.
iProto_consistent_take_step
.
iIntros
"_"
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
4
.
clean_map
0
.
iProto_consistent_take_step
.
-
iIntros
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
1
.
clean_map
3
.
iProto_consistent_take_step
.
iIntros
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
0
.
clean_map
2
.
iProto_consistent_take_step
.
+
iIntros
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
2
.
clean_map
4
.
iProto_consistent_take_step
.
iIntros
"_"
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
3
.
clean_map
0
.
iProto_consistent_take_step
.
iIntros
"_"
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
4
.
clean_map
0
.
iProto_consistent_take_step
.
+
iIntros
"_"
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
3
.
clean_map
0
.
iProto_consistent_take_step
.
iIntros
"_"
.
iExists
_
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
2
.
clean_map
4
.
iProto_consistent_take_step
.
iIntros
"_"
.
iSplit
;
[
done
|]
.
iSplit
;
[
done
|]
.
iNext
.
clean_map
4
.
clean_map
0
.
iProto_consistent_take_step
.
Qed
.
End
example5
.
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