Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Simon Spies
Iris
Commits
36e4c4a1
Commit
36e4c4a1
authored
Jun 26, 2018
by
Marianna Rapoport
Committed by
Ralf Jung
Oct 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
splitting up prophecy into separate file
parent
544400fd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
19 deletions
+31
-19
theories/heap_lang/lib/coin-flip.v
theories/heap_lang/lib/coin-flip.v
+4
-19
theories/heap_lang/prophecy.v
theories/heap_lang/prophecy.v
+27
-0
No files found.
theories/heap_lang/lib/coin-flip.v
View file @
36e4c4a1
...
...
@@ -4,6 +4,7 @@ From iris.program_logic Require Export atomic.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
par
.
From
iris
.
bi
.
lib
Require
Import
fractional
.
From
iris
.
heap_lang
Require
Import
prophecy
.
Set
Default
Proof
Using
"Type"
.
(** Nondeterminism and Speculation:
...
...
@@ -82,25 +83,9 @@ Section coinflip.
End
coinflip
.
Section
prophecy
.
Section
coinflip_with_
prophecy
.
Context
`
{!
heapG
Σ
}
(
N
:
namespace
).
Record
prophecy
{
Σ
}
`
{!
heapG
Σ
}
:
=
Prophecy
{
(* -- operations -- *)
new_prophecy
:
val
;
resolve_prophecy
:
val
;
(* -- predicates -- *)
is_prophecy
:
proph
->
val
->
iProp
Σ
;
(* -- general properties -- *)
new_prophecy_spec
:
{{{
True
}}}
new_prophecy
#()
{{{
p
,
RET
#
p
;
∃
v
,
is_prophecy
p
v
}}}
;
resolve_prophecy_spec
p
v
e
w
:
IntoVal
e
w
->
{{{
is_prophecy
p
v
}}}
resolve_prophecy
#
p
e
{{{
RET
w
;
⌜
v
=
w
⌝
}}}
}.
Context
`
{
pr
:
prophecy
}.
Context
`
{!
heapG
Σ
}
`
{
pr
:
prophecy
}
(
N
:
namespace
).
Definition
val_to_bool
v
:
bool
:
=
match
v
with
...
...
@@ -136,4 +121,4 @@ Section prophecy.
iNext
.
iIntros
(->).
done
.
Qed
.
End
prophecy
.
End
coinflip_with_
prophecy
.
theories/heap_lang/prophecy.v
0 → 100644
View file @
36e4c4a1
From
iris
.
heap_lang
Require
Export
lifting
notation
.
From
iris
.
base_logic
.
lib
Require
Export
invariants
.
From
iris
.
program_logic
Require
Export
atomic
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
par
.
From
iris
.
bi
.
lib
Require
Import
fractional
.
Set
Default
Proof
Using
"Type"
.
Section
prophecy
.
Context
`
{!
heapG
Σ
}
(
N
:
namespace
).
Record
prophecy
{
Σ
}
`
{!
heapG
Σ
}
:
=
Prophecy
{
(* -- operations -- *)
new_prophecy
:
val
;
resolve_prophecy
:
val
;
(* -- predicates -- *)
is_prophecy
:
proph
->
val
->
iProp
Σ
;
(* -- general properties -- *)
new_prophecy_spec
:
{{{
True
}}}
new_prophecy
#()
{{{
p
,
RET
#
p
;
∃
v
,
is_prophecy
p
v
}}}
;
resolve_prophecy_spec
p
v
e
w
:
IntoVal
e
w
->
{{{
is_prophecy
p
v
}}}
resolve_prophecy
#
p
e
{{{
RET
w
;
⌜
v
=
w
⌝
}}}
}.
End
prophecy
.
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