Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Tej Chajed
iris
Commits
2b300ebb
Commit
2b300ebb
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
use the heap_lang to show that we can actually instantiate IParam :)
parent
9f597f7b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
barrier/heap_lang.v
+10
-9
10 additions, 9 deletions
barrier/heap_lang.v
iris/language.v
+1
-0
1 addition, 0 deletions
iris/language.v
iris/parameter.v
+3
-4
3 additions, 4 deletions
iris/parameter.v
with
14 additions
and
13 deletions
channel
/heap_lang.v
→
barrier
/heap_lang.v
+
10
−
9
View file @
2b300ebb
Require
Import
Autosubst
.
Autosubst
.
Require
Import
Autosubst
.
Autosubst
.
Require
Import
prelude
.
option
prelude
.
gmap
iris
.
language
.
Require
Import
prelude
.
option
prelude
.
gmap
iris
.
language
iris
.
parameter
.
Set
Bullet
Behavior
"Strict Subproofs"
.
Set
Bullet
Behavior
"Strict Subproofs"
.
...
@@ -318,7 +318,7 @@ Proof.
...
@@ -318,7 +318,7 @@ Proof.
exists
K''
;
by
eauto
using
f_equal
,
f_equal2
,
f_equal3
,
v2e_inj
.
exists
K''
;
by
eauto
using
f_equal
,
f_equal2
,
f_equal3
,
v2e_inj
.
intros
Hfill
Hred
Hnval
.
intros
Hfill
Hred
Hnval
.
Time
revert
K'
Hfill
;
induction
K
=>
K'
/=
Hfill
;
revert
K'
Hfill
;
induction
K
=>
K'
/=
Hfill
;
first
(
now
eexists
;
reflexivity
);
first
(
now
eexists
;
reflexivity
);
(
destruct
K'
;
simpl
;
(
destruct
K'
;
simpl
;
(* The first case is: K' is EmpyCtx. *)
(* The first case is: K' is EmpyCtx. *)
...
@@ -408,12 +408,7 @@ Section Language.
...
@@ -408,12 +408,7 @@ Section Language.
Definition
ectx_step
e1
σ1
e2
σ2
(
ef
:
option
expr
)
:=
Definition
ectx_step
e1
σ1
e2
σ2
(
ef
:
option
expr
)
:=
exists
K
e1'
e2'
,
e1
=
fill
K
e1'
/\
e2
=
fill
K
e2'
/\
prim_step
e1'
σ1
e2'
σ2
ef
.
exists
K
e1'
e2'
,
e1
=
fill
K
e1'
/\
e2
=
fill
K
e2'
/\
prim_step
e1'
σ1
e2'
σ2
ef
.
Instance
heap_lang
:
Language
expr
value
state
:=
{|
Instance
heap_lang
:
Language
expr
value
state
:=
Build_Language
v2e
e2v
atomic
ectx_step
.
of_val
:=
v2e
;
to_val
:=
e2v
;
atomic
:=
atomic
;
prim_step
:=
ectx_step
|}
.
Proof
.
Proof
.
-
exact
v2v
.
-
exact
v2v
.
-
exact
e2e
.
-
exact
e2e
.
...
@@ -431,7 +426,7 @@ Section Language.
...
@@ -431,7 +426,7 @@ Section Language.
Lemma
fill_is_ctx
K
:
is_ctx
(
fill
K
)
.
Lemma
fill_is_ctx
K
:
is_ctx
(
fill
K
)
.
Proof
.
Proof
.
split
.
split
.
-
intros
?
[
v
Hval
]
.
eapply
fill_value
.
eassumption
.
-
intros
?
H
n
val
.
by
eapply
fill_
not_
value
.
-
intros
?
?
?
?
?
(
K'
&
e1'
&
e2'
&
Heq1
&
Heq2
&
Hstep
)
.
-
intros
?
?
?
?
?
(
K'
&
e1'
&
e2'
&
Heq1
&
Heq2
&
Hstep
)
.
exists
(
comp_ctx
K
K'
),
e1'
,
e2'
.
rewrite
-!
fill_comp
Heq1
Heq2
.
exists
(
comp_ctx
K
K'
),
e1'
,
e2'
.
rewrite
-!
fill_comp
Heq1
Heq2
.
split
;
last
split
;
reflexivity
||
assumption
.
split
;
last
split
;
reflexivity
||
assumption
.
...
@@ -445,3 +440,9 @@ Section Language.
...
@@ -445,3 +440,9 @@ Section Language.
Qed
.
Qed
.
End
Language
.
End
Language
.
(* This is just to demonstrate that we can instantiate IParam. *)
Module
IParam
.
Definition
Σ
:=
IParamConst
heap_lang
unitRA
.
Print
Assumptions
Σ
.
End
IParam
.
This diff is collapsed.
Click to expand it.
iris/language.v
+
1
−
0
View file @
2b300ebb
...
@@ -14,6 +14,7 @@ Class Language (E V St : Type) := {
...
@@ -14,6 +14,7 @@ Class Language (E V St : Type) := {
prim_step
e1
σ1
e2
σ2
ef
→
prim_step
e1
σ1
e2
σ2
ef
→
is_Some
(
to_val
e2
)
is_Some
(
to_val
e2
)
}
.
}
.
Arguments
Build_Language
{_
_
_}
_
_
_
_
{_
_
_
_
_}
.
Section
language
.
Section
language
.
Context
`{
Language
E
V
St
}
.
Context
`{
Language
E
V
St
}
.
...
...
This diff is collapsed.
Click to expand it.
iris/parameter.v
+
3
−
4
View file @
2b300ebb
...
@@ -17,7 +17,7 @@ Record iParam := IParam {
...
@@ -17,7 +17,7 @@ Record iParam := IParam {
icmra_map
(
g
◎
f
)
x
≡
icmra_map
g
(
icmra_map
f
x
);
icmra_map
(
g
◎
f
)
x
≡
icmra_map
g
(
icmra_map
f
x
);
icmra_map_mono
{
A
B
}
(
f
:
A
-
n
>
B
)
:
CMRAMonotone
(
icmra_map
f
)
icmra_map_mono
{
A
B
}
(
f
:
A
-
n
>
B
)
:
CMRAMonotone
(
icmra_map
f
)
}
.
}
.
Arguments
IParam
_
_
_
_
_
{_
_}
_
{_
_
_
_}
.
Arguments
IParam
{
_
_
_
}
_
_
{_
_}
_
{_
_
_
_}
.
Existing
Instances
ilanguage
.
Existing
Instances
ilanguage
.
Existing
Instances
icmra_empty
icmra_empty_spec
icmra_map_ne
icmra_map_mono
.
Existing
Instances
icmra_empty
icmra_empty_spec
icmra_map_ne
icmra_map_mono
.
...
@@ -27,13 +27,12 @@ Proof.
...
@@ -27,13 +27,12 @@ Proof.
by
intros
?;
apply
equiv_dist
=>
n
;
apply
icmra_map_ne
=>
?;
apply
equiv_dist
.
by
intros
?;
apply
equiv_dist
=>
n
;
apply
icmra_map_ne
=>
?;
apply
equiv_dist
.
Qed
.
Qed
.
Definition
IParamConst
(
iexpr
ival
istate
:
Type
)
Definition
IParamConst
{
iexpr
ival
istate
:
Type
}
(
ilanguage
:
Language
iexpr
ival
istate
)
(
ilanguage
:
Language
iexpr
ival
istate
)
(
icmra
:
cmraT
)
{
icmra_empty
:
Empty
icmra
}
(
icmra
:
cmraT
)
{
icmra_empty
:
Empty
icmra
}
{
icmra_empty_spec
:
RAIdentity
icmra
}:
{
icmra_empty_spec
:
RAIdentity
icmra
}:
iParam
.
iParam
.
eapply
(
IParam
iexpr
ival
istate
ilanguage
eapply
(
IParam
ilanguage
(
fun
_
=>
icmra
)
(
fun
_
_
_
=>
cid
))
.
(
fun
_
=>
icmra
)
(
fun
_
_
_
=>
cid
))
.
Unshelve
.
Unshelve
.
-
by
intros
.
-
by
intros
.
-
by
intros
.
-
by
intros
.
...
...
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