Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
118
Issues
118
List
Boards
Labels
Service Desk
Milestones
Merge Requests
20
Merge Requests
20
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Iris
Commits
6fbaaf9d
Commit
6fbaaf9d
authored
Jan 20, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'mpi/v2.0' into v2.0
parents
b52453c9
8513ff5e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
12 deletions
+49
-12
SConstruct
SConstruct
+1
-1
barrier/heap_lang.v
barrier/heap_lang.v
+10
-9
iris/language.v
iris/language.v
+1
-0
iris/parameter.v
iris/parameter.v
+16
-2
modures/cmra.v
modures/cmra.v
+3
-0
modures/ra.v
modures/ra.v
+18
-0
No files found.
SConstruct
View file @
6fbaaf9d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# This file is distributed under the terms of the BSD license.
# This file is distributed under the terms of the BSD license.
import
os
,
glob
,
string
import
os
,
glob
,
string
modules
=
[
"prelude"
,
"modures"
,
"iris"
]
modules
=
[
"prelude"
,
"modures"
,
"iris"
,
"barrier"
]
Rs
=
'-Q . ""'
Rs
=
'-Q . ""'
env
=
DefaultEnvironment
(
ENV
=
os
.
environ
,
tools
=
[
'default'
,
'Coq'
],
COQFLAGS
=
Rs
)
env
=
DefaultEnvironment
(
ENV
=
os
.
environ
,
tools
=
[
'default'
,
'Coq'
],
COQFLAGS
=
Rs
)
...
...
channel
/heap_lang.v
→
barrier
/heap_lang.v
View file @
6fbaaf9d
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
?
Hnval
.
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
.
iris/language.v
View file @
6fbaaf9d
...
@@ -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
}.
...
...
iris/parameter.v
View file @
6fbaaf9d
Require
Export
modures
.
cmra
iris
.
language
.
Require
Export
modures
.
cmra
iris
.
language
.
Set
Bullet
Behavior
"Strict Subproofs"
.
Record
iParam
:
=
IParam
{
Record
iParam
:
=
IParam
{
iexpr
:
Type
;
iexpr
:
Type
;
ival
:
Type
;
ival
:
Type
;
istate
:
Type
;
istate
:
Type
;
icmra
:
cofeT
→
cmraT
;
ilanguage
:
Language
iexpr
ival
istate
;
ilanguage
:
Language
iexpr
ival
istate
;
icmra
:
cofeT
→
cmraT
;
icmra_empty
A
:
Empty
(
icmra
A
)
;
icmra_empty
A
:
Empty
(
icmra
A
)
;
icmra_empty_spec
A
:
RAIdentity
(
icmra
A
)
;
icmra_empty_spec
A
:
RAIdentity
(
icmra
A
)
;
icmra_empty_timeless
A
:
Timeless
(
∅
:
icmra
A
)
;
icmra_empty_timeless
A
:
Timeless
(
∅
:
icmra
A
)
;
...
@@ -16,6 +18,7 @@ Record iParam := IParam {
...
@@ -16,6 +18,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
{
_
_
_
}
ilanguage
icmra
{
_
_
_
}
_
{
_
_
_
_
}.
Existing
Instances
ilanguage
.
Existing
Instances
ilanguage
.
Existing
Instances
icmra_empty
icmra_empty_spec
icmra_empty_timeless
.
Existing
Instances
icmra_empty
icmra_empty_spec
icmra_empty_timeless
.
Existing
Instances
icmra_map_ne
icmra_map_mono
.
Existing
Instances
icmra_map_ne
icmra_map_mono
.
...
@@ -26,4 +29,15 @@ Proof.
...
@@ -26,4 +29,15 @@ 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
.
Canonical
Structure
istateC
Σ
:
=
leibnizC
(
istate
Σ
).
Definition
IParamConst
{
iexpr
ival
istate
:
Type
}
\ No newline at end of file
(
ilanguage
:
Language
iexpr
ival
istate
)
(
icmra
:
cmraT
)
{
icmra_empty
:
Empty
icmra
}
{
icmra_empty_spec
:
RAIdentity
icmra
}
{
icmra_empty_timeless
:
Timeless
(
∅
:
icmra
)}
:
iParam
.
eapply
(
IParam
ilanguage
(
fun
_
=>
icmra
)
(
fun
_
_
_
=>
cid
)).
Unshelve
.
-
by
intros
.
-
by
intros
.
Defined
.
Canonical
Structure
istateC
Σ
:
=
leibnizC
(
istate
Σ
).
modures/cmra.v
View file @
6fbaaf9d
...
@@ -307,6 +307,9 @@ Section discrete.
...
@@ -307,6 +307,9 @@ Section discrete.
End
discrete
.
End
discrete
.
Arguments
discreteRA
_
{
_
_
_
_
_
_
}.
Arguments
discreteRA
_
{
_
_
_
_
_
_
}.
(** CMRA for the unit type *)
Canonical
Structure
unitRA
:
cmraT
:
=
discreteRA
().
(** Product *)
(** Product *)
Section
prod
.
Section
prod
.
Context
{
A
B
:
cmraT
}.
Context
{
A
B
:
cmraT
}.
...
...
modures/ra.v
View file @
6fbaaf9d
...
@@ -238,3 +238,21 @@ Ltac solve_included :=
...
@@ -238,3 +238,21 @@ Ltac solve_included :=
ra_reflection
.
quote
;
ra_reflection
.
quote
;
apply
ra_reflection
.
flatten_correct
,
(
bool_decide_unpack
_
)
;
apply
ra_reflection
.
flatten_correct
,
(
bool_decide_unpack
_
)
;
vm_compute
;
apply
I
.
vm_compute
;
apply
I
.
(** An RA for the unit type *)
Instance
unit_valid
:
Valid
()
:
=
λ
x
,
True
.
Instance
unit_unit
:
Unit
()
:
=
λ
x
,
x
.
Instance
unit_op
:
Op
()
:
=
λ
x
y
,
tt
.
Instance
unit_minus
:
Minus
()
:
=
λ
x
y
,
tt
.
Instance
unit_ra
:
RA
().
Proof
.
split
;
done
.
Qed
.
Instance
unit_empty
:
Empty
()
:
=
tt
.
Instance
unit_empty_ra
:
RAIdentity
().
Proof
.
split
;
done
.
Qed
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment