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
Pierre Roux
Iris
Commits
a85a8e2f
Commit
a85a8e2f
authored
6 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
fix yet another case of broken heap_lang notation
parent
7badb484
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tests/heap_lang2.ref
+12
-0
12 additions, 0 deletions
tests/heap_lang2.ref
tests/heap_lang2.v
+20
-0
20 additions, 0 deletions
tests/heap_lang2.v
theories/heap_lang/lang.v
+14
-0
14 additions, 0 deletions
theories/heap_lang/lang.v
theories/heap_lang/notation.v
+2
-10
2 additions, 10 deletions
theories/heap_lang/notation.v
with
48 additions
and
10 deletions
tests/heap_lang2.ref
0 → 100644
+
12
−
0
View file @
a85a8e2f
1 subgoal
Σ : gFunctors
H : heapG Σ
fun1, fun2, fun3 : expr
============================
--------------------------------------∗
WP let: "val1" := fun1 #() in
let: "val2" := fun2 "val1" in
let: "val3" := fun3 "val2" in if: "val1" = "val2" then "val" else "val3"
{{ _, True }}
This diff is collapsed.
Click to expand it.
tests/heap_lang2.v
0 → 100644
+
20
−
0
View file @
a85a8e2f
(* Test yet another way of importing heap_lang modules that used to break
printing *)
From
iris
.
heap_lang
Require
Export
lifting
notation
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
Set
Default
Proof
Using
"Type"
.
Section
printing_tests
.
Context
`{
heapG
Σ
}
.
Lemma
wp_print_long_expr
(
fun1
fun2
fun3
:
expr
)
:
True
-∗
WP
let
:
"val1"
:=
fun1
#
()
in
let
:
"val2"
:=
fun2
"val1"
in
let
:
"val3"
:=
fun3
"val2"
in
if
:
"val1"
=
"val2"
then
"val"
else
"val3"
{{
_,
True
}}
.
Proof
.
iIntros
"_"
.
Show
.
Abort
.
End
printing_tests
.
This diff is collapsed.
Click to expand it.
theories/heap_lang/lang.v
+
14
−
0
View file @
a85a8e2f
...
...
@@ -4,6 +4,9 @@ From stdpp Require Export strings.
From
stdpp
Require
Import
gmap
.
Set
Default
Proof
Using
"Type"
.
Delimit
Scope
expr_scope
with
E
.
Delimit
Scope
val_scope
with
V
.
Module
heap_lang
.
Open
Scope
Z_scope
.
...
...
@@ -529,3 +532,14 @@ Canonical Structure heap_lang := LanguageOfEctx heap_ectx_lang.
(* Prefer heap_lang names over ectx_language names. *)
Export
heap_lang
.
(** Define some derived forms. *)
Notation
Lam
x
e
:=
(
Rec
BAnon
x
e
)
(
only
parsing
)
.
Notation
Let
x
e1
e2
:=
(
App
(
Lam
x
e2
)
e1
)
(
only
parsing
)
.
Notation
Seq
e1
e2
:=
(
Let
BAnon
e1
e2
)
(
only
parsing
)
.
Notation
LamV
x
e
:=
(
RecV
BAnon
x
e
)
(
only
parsing
)
.
Notation
LetCtx
x
e2
:=
(
AppRCtx
(
LamV
x
e2
))
(
only
parsing
)
.
Notation
SeqCtx
e2
:=
(
LetCtx
BAnon
e2
)
(
only
parsing
)
.
Notation
Match
e0
x1
e1
x2
e2
:=
(
Case
e0
(
Lam
x1
e1
)
(
Lam
x2
e2
))
(
only
parsing
)
.
Notation
Skip
:=
(
Seq
(
Lit
LitUnit
)
(
Lit
LitUnit
))
.
This diff is collapsed.
Click to expand it.
theories/heap_lang/notation.v
+
2
−
10
View file @
a85a8e2f
...
...
@@ -2,16 +2,8 @@ From iris.program_logic Require Import language.
From
iris
.
heap_lang
Require
Export
lang
tactics
.
Set
Default
Proof
Using
"Type"
.
(** Define some derived forms. Happens in the same file because the order of
this and the following notations being defined is very relevant. *)
Notation
Lam
x
e
:=
(
Rec
BAnon
x
e
)
.
Notation
Let
x
e1
e2
:=
(
App
(
Lam
x
e2
)
e1
)
.
Notation
Seq
e1
e2
:=
(
Let
BAnon
e1
e2
)
.
Notation
LamV
x
e
:=
(
RecV
BAnon
x
e
)
.
Notation
LetCtx
x
e2
:=
(
AppRCtx
(
LamV
x
e2
))
.
Notation
SeqCtx
e2
:=
(
LetCtx
BAnon
e2
)
.
Notation
Skip
:=
(
Seq
(
Lit
LitUnit
)
(
Lit
LitUnit
))
.
Notation
Match
e0
x1
e1
x2
e2
:=
(
Case
e0
(
Lam
x1
e1
)
(
Lam
x2
e2
))
.
Delimit
Scope
expr_scope
with
E
.
Delimit
Scope
val_scope
with
V
.
Coercion
LitInt
:
Z
>->
base_lit
.
Coercion
LitBool
:
bool
>->
base_lit
.
...
...
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