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
Gaëtan Gilbert
Iris
Commits
e9f37915
Commit
e9f37915
authored
6 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
change prophecy notation
parent
d2cb8da5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
theories/heap_lang/lib/coin_flip.v
+6
-6
6 additions, 6 deletions
theories/heap_lang/lib/coin_flip.v
theories/heap_lang/notation.v
+1
-2
1 addition, 2 deletions
theories/heap_lang/notation.v
theories/program_logic/language.v
+3
-2
3 additions, 2 deletions
theories/program_logic/language.v
with
10 additions
and
10 deletions
theories/heap_lang/lib/coin_flip.v
+
6
−
6
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
.
This diff is collapsed.
Click to expand it.
theories/heap_lang/notation.v
+
1
−
2
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
.
This diff is collapsed.
Click to expand it.
theories/program_logic/language.v
+
3
−
2
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
:=
{
...
...
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