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
Yixuan Chen
Iris
Commits
5f393110
Commit
5f393110
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
make some nested function calls in heap_lang/ more readable
parent
41a4028c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
heap_lang/heap_lang.v
+5
-5
5 additions, 5 deletions
heap_lang/heap_lang.v
heap_lang/lifting.v
+2
-2
2 additions, 2 deletions
heap_lang/lifting.v
with
7 additions
and
7 deletions
heap_lang/heap_lang.v
+
5
−
5
View file @
5f393110
...
...
@@ -165,11 +165,11 @@ Definition un_op_eval (op : un_op) (l : base_lit) : option base_lit :=
Definition
bin_op_eval
(
op
:
bin_op
)
(
l1
l2
:
base_lit
)
:
option
base_lit
:=
match
op
,
l1
,
l2
with
|
PlusOp
,
LitNat
n1
,
LitNat
n2
=>
Some
(
LitNat
(
n1
+
n2
)
)
|
MinusOp
,
LitNat
n1
,
LitNat
n2
=>
Some
(
LitNat
(
n1
-
n2
)
)
|
LeOp
,
LitNat
n1
,
LitNat
n2
=>
Some
(
LitBool
(
bool_decide
(
n1
≤
n2
)
))
|
LtOp
,
LitNat
n1
,
LitNat
n2
=>
Some
(
LitBool
(
bool_decide
(
n1
<
n2
)
))
|
EqOp
,
LitNat
n1
,
LitNat
n2
=>
Some
(
LitBool
(
bool_decide
(
n1
=
n2
)
))
|
PlusOp
,
LitNat
n1
,
LitNat
n2
=>
Some
$
LitNat
(
n1
+
n2
)
|
MinusOp
,
LitNat
n1
,
LitNat
n2
=>
Some
$
LitNat
(
n1
-
n2
)
|
LeOp
,
LitNat
n1
,
LitNat
n2
=>
Some
$
LitBool
$
bool_decide
(
n1
≤
n2
)
|
LtOp
,
LitNat
n1
,
LitNat
n2
=>
Some
$
LitBool
$
bool_decide
(
n1
<
n2
)
|
EqOp
,
LitNat
n1
,
LitNat
n2
=>
Some
$
LitBool
$
bool_decide
(
n1
=
n2
)
|
_,
_,
_
=>
None
end
.
...
...
This diff is collapsed.
Click to expand it.
heap_lang/lifting.v
+
2
−
2
View file @
5f393110
...
...
@@ -130,7 +130,7 @@ Qed.
Lemma
wp_fst
E
e1
v1
e2
v2
Q
:
to_val
e1
=
Some
v1
→
to_val
e2
=
Some
v2
→
▷
Q
v1
⊑
wp
E
(
Fst
(
Pair
e1
e2
)
)
Q
.
▷
Q
v1
⊑
wp
E
(
Fst
$
Pair
e1
e2
)
Q
.
Proof
.
intros
.
rewrite
-
(
wp_lift_pure_det_step
(
Fst
_)
e1
None
)
?right_id
//
;
last
by
intros
;
inv_step
;
eauto
.
...
...
@@ -139,7 +139,7 @@ Qed.
Lemma
wp_snd
E
e1
v1
e2
v2
Q
:
to_val
e1
=
Some
v1
→
to_val
e2
=
Some
v2
→
▷
Q
v2
⊑
wp
E
(
Snd
(
Pair
e1
e2
)
)
Q
.
▷
Q
v2
⊑
wp
E
(
Snd
$
Pair
e1
e2
)
Q
.
Proof
.
intros
.
rewrite
-
(
wp_lift_pure_det_step
(
Snd
_)
e2
None
)
?right_id
//
;
last
by
intros
;
inv_step
;
eauto
.
...
...
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