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
William Mansky
Iris
Commits
d994e178
Commit
d994e178
authored
10 years ago
by
David Swasey
Browse files
Options
Downloads
Patches
Plain Diff
ra_res_ex renamed ex.
parent
c1329cc0
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
iris_check.v
+1
-1
1 addition, 1 deletion
iris_check.v
iris_core.v
+1
-2
1 addition, 2 deletions
iris_core.v
lib/ModuRes/RA.v
+10
-10
10 additions, 10 deletions
lib/ModuRes/RA.v
with
12 additions
and
13 deletions
iris_check.v
+
1
−
1
View file @
d994e178
...
...
@@ -166,7 +166,7 @@ Module StupidLang : CORE_LANG.
End
StupidLang
.
Module
TrivialRA
:
RA_T
.
Definition
res
:=
ra_res_
ex
unit
.
Definition
res
:=
ex
unit
.
Instance
res_type
:
Setoid
res
:=
_
.
Instance
res_op
:
RA_op
res
:=
_
.
Instance
res_unit
:
RA_unit
res
:=
_
.
...
...
This diff is collapsed.
Click to expand it.
iris_core.v
+
1
−
2
View file @
d994e178
...
...
@@ -5,14 +5,13 @@ Require Import ModuRes.RA ModuRes.UPred ModuRes.BI ModuRes.PreoMet ModuRes.Finma
Set
Bullet
Behavior
"Strict Subproofs"
.
(* Because Coq has a restriction of how to apply functors, we have to hack a bit here.
PDS: "a bit"?! Hahaha.
The hack that involves least work, is to duplicate the definition of our final
resource type, as a module type (which is how we can use it, circumventing the
Coq restrictions) and as a module (to show the type can be instantiated). *)
Module
Type
IRIS_RES
(
RL
:
RA_T
)
(
C
:
CORE_LANG
)
<:
RA_T
.
Instance
state_type
:
Setoid
C
.
state
:=
discreteType
.
Definition
res
:=
(
ra_res_
ex
C
.
state
*
RL
.
res
)
%
type
.
Definition
res
:=
(
ex
C
.
state
*
RL
.
res
)
%
type
.
Instance
res_type
:
Setoid
res
:=
_
.
Instance
res_op
:
RA_op
res
:=
_
.
Instance
res_unit
:
RA_unit
res
:=
_
.
...
...
This diff is collapsed.
Click to expand it.
lib/ModuRes/RA.v
+
10
−
10
View file @
d994e178
...
...
@@ -171,14 +171,14 @@ End Order.
Section
Exclusive
.
Context
(
T
:
Type
)
`{
eqT
:
Setoid
T
}
.
Inductive
ra_res_
ex
:
Type
:=
|
ex_own
:
T
->
ra_res_
ex
|
ex_unit
:
ra_res_
ex
|
ex_bot
:
ra_res_
ex
.
Inductive
ex
:
Type
:=
|
ex_own
:
T
->
ex
|
ex_unit
:
ex
|
ex_bot
:
ex
.
Implicit
Types
(
r
s
:
ra_res_
ex
)
.
Implicit
Types
(
r
s
:
ex
)
.
Definition
ra_res_
ex_eq
r
s
:
Prop
:=
Definition
ex_eq
r
s
:
Prop
:=
match
r
,
s
with
|
ex_own
t1
,
ex_own
t2
=>
t1
==
t2
|
ex_unit
,
ex_unit
=>
True
...
...
@@ -186,7 +186,7 @@ Section Exclusive.
|
_,
_
=>
False
end
.
Global
Instance
ra_eq
_eq
uiv
:
Equivalence
ra_res_
ex_eq
.
Global
Instance
ra_equiv
_ex
:
Equivalence
ex_eq
.
Proof
.
split
.
-
intros
[
t
|
|];
simpl
;
now
auto
.
...
...
@@ -195,8 +195,8 @@ Section Exclusive.
+
intros
?
?
.
etransitivity
;
eassumption
.
Qed
.
Global
Program
Instance
ra_type_ex
:
Setoid
ra_res_
ex
:=
mkType
ra_res_
ex_eq
.
Global
Program
Instance
ra_type_ex
:
Setoid
ex
:=
mkType
ex_eq
.
Global
Instance
ra_unit_ex
:
RA_unit
_
:=
ex_unit
.
Global
Instance
ra_op_ex
:
RA_op
_
:=
...
...
@@ -213,7 +213,7 @@ Section Exclusive.
|
_
=>
True
end
.
Global
Instance
ra_ex
:
RA
ra_res_
ex
.
Global
Instance
ra_ex
:
RA
ex
.
Proof
.
split
.
-
intros
[
t1
|
|]
[
t2
|
|]
Heqt
[
t'1
|
|]
[
t'2
|
|]
Heqt'
;
simpl
;
now
auto
.
...
...
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