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
Dmitry Khalanskiy
Iris
Commits
e9f37915
Commit
e9f37915
authored
Aug 29, 2018
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change prophecy notation
parent
d2cb8da5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
theories/heap_lang/lib/coin_flip.v
theories/heap_lang/lib/coin_flip.v
+6
-6
theories/heap_lang/notation.v
theories/heap_lang/notation.v
+1
-2
theories/program_logic/language.v
theories/program_logic/language.v
+3
-2
No files found.
theories/heap_lang/lib/coin_flip.v
View file @
e9f37915
...
...
@@ -24,11 +24,11 @@ Definition earlyChoice: val :=
Definition
lateChoice
:
val
:
=
λ
:
"x"
,
let
:
"p"
:
=
n
ew
p
roph
ecy
in
let
:
"p"
:
=
N
ew
P
roph
in
"x"
<-
#
0
;;
let
:
"r"
:
=
rand
#()
in
resolve
"p"
to
"r"
;;
"r"
.
resolve
_proph
:
"p"
to
:
"r"
;;
"r"
.
Section
coinflip
.
Context
`
{!
heapG
Σ
}
(
N
:
namespace
).
...
...
@@ -84,9 +84,9 @@ Section coinflip.
wp_store
.
iMod
(
"Hclose"
$!
(
val_to_bool
v
)
with
"[Hl]"
)
as
"HΦ"
;
first
by
eauto
.
iModIntro
.
wp_seq
.
wp_apply
rand_spec
;
try
done
.
iIntros
(
b'
)
"_"
.
wp_let
.
wp_bind
(
resolve
_
to
_
)%
E
.
iA
pply
(
wp_resolve_proph
with
"Hp"
).
iNext
.
iIntros
(->).
wp_seq
.
done
.
iIntros
(
b'
)
"_"
.
wp_let
.
wp_a
pply
(
wp_resolve_proph
with
"Hp"
).
iIntros
(->).
wp_seq
.
done
.
Qed
.
End
coinflip
.
theories/heap_lang/notation.v
View file @
e9f37915
...
...
@@ -158,5 +158,4 @@ Notation "'match:' e0 'with' 'SOME' x => e2 | 'NONE' => e1 'end'" :=
(
Match
e0
BAnon
e1
x
%
bind
e2
)
(
e0
,
e1
,
x
,
e2
at
level
200
,
only
parsing
)
:
expr_scope
.
Notation
"'new' 'prophecy'"
:
=
NewProph
(
at
level
100
)
:
expr_scope
.
Notation
"'resolve' p 'to' v"
:
=
(
ResolveProph
p
v
)
(
at
level
100
)
:
expr_scope
.
Notation
"'resolve_proph:' p 'to:' v"
:
=
(
ResolveProph
p
v
)
(
at
level
100
)
:
expr_scope
.
theories/program_logic/language.v
View file @
e9f37915
...
...
@@ -5,8 +5,9 @@ Section language_mixin.
Context
{
expr
val
state
observation
:
Type
}.
Context
(
of_val
:
val
→
expr
).
Context
(
to_val
:
expr
→
option
val
).
(** We annotate the reduction relation with observations [κ], which we will use in the definition
of weakest preconditions to keep track of creating and resolving prophecy variables. *)
(** We annotate the reduction relation with observations [κ], which we will
use in the definition of weakest preconditions to predict future
observations and assert correctness of the predictions. *)
Context
(
prim_step
:
expr
→
state
→
option
observation
→
expr
→
state
→
list
expr
→
Prop
).
Record
LanguageMixin
:
=
{
...
...
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