Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lambda-rust
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
Model registry
Operate
Environments
Monitor
Service Desk
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
Iris
lambda-rust
Commits
1a544253
Commit
1a544253
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Fix a broken notation.
parent
51564167
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
theories/lang/lang.v
+1
-0
1 addition, 0 deletions
theories/lang/lang.v
theories/lang/lib/lock.v
+2
-5
2 additions, 5 deletions
theories/lang/lib/lock.v
theories/lang/notation.v
+1
-0
1 addition, 0 deletions
theories/lang/notation.v
with
4 additions
and
5 deletions
theories/lang/lang.v
+
1
−
0
View file @
1a544253
...
@@ -20,6 +20,7 @@ Inductive binder := BAnon | BNamed : string → binder.
...
@@ -20,6 +20,7 @@ Inductive binder := BAnon | BNamed : string → binder.
Delimit
Scope
lrust_binder_scope
with
RustB
.
Delimit
Scope
lrust_binder_scope
with
RustB
.
Bind
Scope
lrust_binder_scope
with
binder
.
Bind
Scope
lrust_binder_scope
with
binder
.
Notation
"[ ]"
:=
(
@
nil
binder
)
:
lrust_binder_scope
.
Notation
"a :: b"
:=
(
@
cons
binder
a
%
RustB
b
%
RustB
)
Notation
"a :: b"
:=
(
@
cons
binder
a
%
RustB
b
%
RustB
)
(
at
level
60
,
right
associativity
)
:
lrust_binder_scope
.
(
at
level
60
,
right
associativity
)
:
lrust_binder_scope
.
Notation
"[ x1 ; x2 ; .. ; xn ]"
:=
Notation
"[ x1 ; x2 ; .. ; xn ]"
:=
...
...
This diff is collapsed.
Click to expand it.
theories/lang/lib/lock.v
+
2
−
5
View file @
1a544253
...
@@ -2,8 +2,7 @@ From iris.program_logic Require Import weakestpre.
...
@@ -2,8 +2,7 @@ From iris.program_logic Require Import weakestpre.
From
iris
.
base_logic
.
lib
Require
Import
invariants
.
From
iris
.
base_logic
.
lib
Require
Import
invariants
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
algebra
Require
Import
excl
.
From
iris
.
algebra
Require
Import
excl
.
From
lrust
.
lang
Require
Import
proofmode
notation
.
From
lrust
.
lang
Require
Import
lang
proofmode
notation
.
From
lrust
.
lang
Require
Export
lang
.
Set
Default
Proof
Using
"Type"
.
Set
Default
Proof
Using
"Type"
.
Definition
newlock
:
val
:=
λ
:
[],
let
:
"l"
:=
Alloc
#
1
in
"l"
<-
#
false
;;
"l"
.
Definition
newlock
:
val
:=
λ
:
[],
let
:
"l"
:=
Alloc
#
1
in
"l"
<-
#
false
;;
"l"
.
...
@@ -54,14 +53,12 @@ Section proof.
...
@@ -54,14 +53,12 @@ Section proof.
{
iNext
.
iExists
false
.
by
iFrame
.
}
{
iNext
.
iExists
false
.
by
iFrame
.
}
eauto
.
eauto
.
Qed
.
Qed
.
Lemma
newlock_spec
(
R
:
iProp
Σ
)
:
Lemma
newlock_spec
(
R
:
iProp
Σ
)
:
{{{
▷
R
}}}
newlock
[]
{{{
l
γ
,
RET
#
l
;
is_lock
γ
l
R
}}}
.
{{{
▷
R
}}}
newlock
[]
{{{
l
γ
,
RET
#
l
;
is_lock
γ
l
R
}}}
.
Proof
.
Proof
.
iIntros
(
Φ
)
"HR HΦ"
.
rewrite
-
wp_fupd
/
newlock
/=
.
iIntros
(
Φ
)
"HR HΦ"
.
iApply
wp_fupd
.
wp_seq
.
wp_alloc
l
vl
as
"Hl"
"H†"
.
inv_vec
vl
=>
x
.
wp_seq
.
wp_alloc
l
vl
as
"Hl"
"H†"
.
inv_vec
vl
=>
x
.
(* FIXME: Something is wrong with the printing of the expression here *)
rewrite
heap_mapsto_vec_singleton
.
(* FIXME shouldn't this also compute now, like bigops do? *)
rewrite
heap_mapsto_vec_singleton
.
(* FIXME shouldn't this also compute now, like bigops do? *)
wp_let
.
wp_write
.
wp_let
.
wp_write
.
iMod
(
newlock_inplace
with
"[HR] Hl"
)
as
(
γ
)
"?"
.
iMod
(
newlock_inplace
with
"[HR] Hl"
)
as
(
γ
)
"?"
.
...
...
This diff is collapsed.
Click to expand it.
theories/lang/notation.v
+
1
−
0
View file @
1a544253
...
@@ -12,6 +12,7 @@ Coercion Var : string >-> expr.
...
@@ -12,6 +12,7 @@ Coercion Var : string >-> expr.
Coercion
BNamed
:
string
>->
binder
.
Coercion
BNamed
:
string
>->
binder
.
Notation
"<>"
:=
BAnon
:
lrust_binder_scope
.
Notation
"<>"
:=
BAnon
:
lrust_binder_scope
.
Notation
"[ ]"
:=
(
@
nil
expr
)
:
expr_scope
.
Notation
"[ x ]"
:=
(
@
cons
expr
x
%
E
(
@
nil
expr
))
:
expr_scope
.
Notation
"[ x ]"
:=
(
@
cons
expr
x
%
E
(
@
nil
expr
))
:
expr_scope
.
Notation
"[ x1 ; x2 ; .. ; xn ]"
:=
Notation
"[ x1 ; x2 ; .. ; xn ]"
:=
(
@
cons
expr
x1
%
E
(
@
cons
expr
x2
%
E
(
@
cons
expr
x1
%
E
(
@
cons
expr
x2
%
E
...
...
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