Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
gpfsl
Commits
cee441f9
Commit
cee441f9
authored
Oct 07, 2021
by
Hai Dang
Browse files
Add some comments
parent
23ad44c1
Changes
2
Show whitespace changes
Inline
Side-by-side
theories/examples/graph/graph.v
View file @
cee441f9
...
...
@@ -25,13 +25,14 @@ Definition pair_in_set `{Countable A} (Ps : gset (A * A)) (S : gset A) : Prop
Definition
pair_in_bound
(
Ps
:
gset
(
event_id
*
event_id
))
(
n
:
event_id
)
:
Prop
:
=
set_Forall
(
λ
p
,
p
.
1
<
n
∧
p
.
2
<
n
)%
nat
Ps
.
(* We don't need so ⊆ (po ∪ com)+ because we don't have po. The view inclusion
relation includes po, among other relations. *)
Record
graph
{
A
:
Type
}
:
=
mkGraph
{
Es
:
event_list
A
;
com
:
gset
(
event_id
*
event_id
)
;
so
:
gset
(
event_id
*
event_id
)
;
gcons_com_included_dec
:
bool_decide
(
pair_in_bound
com
(
length
Es
))
;
gcons_so_included_dec
:
bool_decide
(
pair_in_bound
so
(
length
Es
))
;
(* TODO: so ⊆ (po ∪ com)+ ? *)
}.
Global
Arguments
graph
:
clear
implicits
.
...
...
theories/examples/queue/proof_per_elem_graph.v
View file @
cee441f9
...
...
@@ -57,6 +57,7 @@ Definition QueuePerElem γg : vProp :=
∃
G
M
,
msq
.(
QueueLocal
)
(
N
.@
"que"
)
γ
g
q
G
M
∗
inv
(
N
.@
"iinv"
)
(
QueuePerElemInv
γ
g
).
(* TODO: we can prove logically-atomic spec here. *)
Lemma
per_elem_enqueue
(
DISJ
:
N
##
histN
)
γ
g
(
x
:
Z
)
tid
(
NZ
:
0
<
x
)
:
{{{
QueuePerElem
γ
g
∗
▷
P
x
}}}
msq
.(
enqueue
)
[
#
q
;
#
x
]
@
tid
;
⊤
...
...
Write
Preview
Supports
Markdown
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