Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
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
Simcha van Collem
Iris
Commits
8d0e07ef
Commit
8d0e07ef
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add the code of the join-existentials example
parent
8d638edc
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
_CoqProject
+1
-0
1 addition, 0 deletions
_CoqProject
examples/joining_extistentials.v
+7
-0
7 additions, 0 deletions
examples/joining_extistentials.v
heap_lang/lang.v
+6
-2
6 additions, 2 deletions
heap_lang/lang.v
heap_lang/notation.v
+1
-0
1 addition, 0 deletions
heap_lang/notation.v
with
15 additions
and
2 deletions
_CoqProject
+
1
−
0
View file @
8d0e07ef
...
...
@@ -95,3 +95,4 @@ barrier/specification.v
barrier/protocol.v
barrier/proof.v
barrier/client.v
examples/joining_existentials.v
This diff is collapsed.
Click to expand it.
examples/joining_extistentials.v
0 → 100644
+
7
−
0
View file @
8d0e07ef
From
iris
.
program_logic
Require
Import
saved_one_shot
.
From
iris
.
barrier
Require
Import
proof
specification
.
From
iris
.
heap_lang
Require
Import
notation
par
.
Definition
client
(
eM
eW1
eW2
:
expr
[])
:
expr
[]
:=
(
let
:
"b"
:=
newbarrier
#
()
in
(
^^
eM
;;
^
signal
'
"b"
)
||
((
^
wait
'
"b"
;;
^^
eW1
)
||
(
^
wait
'
"b"
;;
^^
eW2
)))
.
This diff is collapsed.
Click to expand it.
heap_lang/lang.v
+
6
−
2
View file @
8d0e07ef
...
...
@@ -228,6 +228,10 @@ Program Fixpoint wexpr {X Y} (H : X `included` Y) (e : expr X) : expr Y :=
end
.
Solve
Obligations
with
set_solver
.
Program
Definition
wexpr'
{
X
}
(
e
:
expr
[])
:
expr
X
:=
wexpr
_
e
.
Solve
Obligations
with
set_solver
.
Definition
of_val'
{
X
}
(
v
:
val
)
:
expr
X
:=
wexpr
(
included_nil
_)
(
of_val
v
)
.
Lemma
wsubst_rec_true_prf
{
X
Y
x
}
(
H
:
X
`
included
`
x
::
Y
)
{
f
y
}
...
...
@@ -242,7 +246,7 @@ Proof. move: Hfy=>/not_and_l [/dec_stable|/dec_stable]; set_solver. Qed.
Program
Fixpoint
wsubst
{
X
Y
}
(
x
:
string
)
(
es
:
expr
[])
(
H
:
X
`
included
`
x
::
Y
)
(
e
:
expr
X
)
:
expr
Y
:=
match
e
return
expr
Y
with
|
Var
y
_
=>
if
decide
(
x
=
y
)
then
wexpr
_
es
else
@
Var
_
y
_
|
Var
y
_
=>
if
decide
(
x
=
y
)
then
wexpr
'
es
else
@
Var
_
y
_
|
Rec
f
y
e
=>
Rec
f
y
$
match
decide
(
BNamed
x
≠
f
∧
BNamed
x
≠
y
)
return
_
with
|
left
Hfy
=>
wsubst
x
es
(
wsubst_rec_true_prf
H
Hfy
)
e
...
...
@@ -390,7 +394,7 @@ Lemma wexpr_wsubst X Y Z x es (H1: X `included` x::Y) (H2: Y `included` Z) H3 e:
Proof
.
revert
Y
Z
H1
H2
H3
.
induction
e
;
intros
;
repeat
(
case_decide
||
simplify_eq
/=
);
auto
using
var_proof_irrel
,
wexpr_wexpr
with
f_equal
.
unfold
wexpr'
;
auto
using
var_proof_irrel
,
wexpr_wexpr
with
f_equal
.
Qed
.
Lemma
wsubst_wexpr
X
Y
Z
x
es
(
H1
:
X
`
included
`
Y
)
(
H2
:
Y
`
included
`
x
::
Z
)
H3
e
:
wsubst
x
es
H2
(
wexpr
H1
e
)
=
wsubst
x
es
H3
e
.
...
...
This diff is collapsed.
Click to expand it.
heap_lang/notation.v
+
1
−
0
View file @
8d0e07ef
...
...
@@ -28,6 +28,7 @@ Notation "% l" := (Loc l) (at level 8, format "% l") : expr_scope.
Notation
"' x"
:=
(
Var
x
)
(
at
level
8
,
format
"' x"
)
:
expr_scope
.
Notation
"^ v"
:=
(
of_val'
v
%
V
)
(
at
level
8
,
format
"^ v"
)
:
expr_scope
.
Notation
"^^ e"
:=
(
wexpr'
e
%
E
)
(
at
level
8
,
format
"^^ e"
)
:
expr_scope
.
(** Syntax inspired by Coq/Ocaml. Constructions with higher precedence come
first. *)
...
...
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