Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
Iris
Commits
3b93f77c
Commit
3b93f77c
authored
May 03, 2018
by
Robbert Krebbers
Browse files
Merge branch 'master' into gen_proofmode
parents
8a0ff185
1ab890fc
Pipeline
#8385
passed with stage
in 15 minutes and 14 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
opam
View file @
3b93f77c
...
...
@@ -11,5 +11,5 @@ install: [make "install"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris"]
depends: [
"coq" { (>= "8.7.1" & < "8.9~") | (= "dev") }
"coq-stdpp" { (= "dev.2018-04-2
1
.1.
49a03d40
") | (= "dev") }
"coq-stdpp" { (= "dev.2018-04-2
7
.1.
32c8182a
") | (= "dev") }
]
theories/heap_lang/lang.v
View file @
3b93f77c
...
...
@@ -351,10 +351,11 @@ Definition bin_op_eval_bool (op : bin_op) (b1 b2 : bool) : option base_lit :=
end
.
Definition
bin_op_eval
(
op
:
bin_op
)
(
v1
v2
:
val
)
:
option
val
:
=
if
decide
(
op
=
EqOp
)
then
Some
$
LitV
$
LitBool
$
bool_decide
(
v1
=
v2
)
else
match
v1
,
v2
with
|
LitV
(
LitInt
n1
),
LitV
(
LitInt
n2
)
=>
Some
$
LitV
$
bin_op_eval_int
op
n1
n2
|
LitV
(
LitBool
b1
),
LitV
(
LitBool
b2
)
=>
LitV
<$>
bin_op_eval_bool
op
b1
b2
|
v1
,
v2
=>
guard
(
op
=
EqOp
)
;
Some
$
LitV
$
LitBool
$
bool_decide
(
v1
=
v2
)
|
_
,
_
=>
None
end
.
Inductive
head_step
:
expr
→
state
→
expr
→
state
→
list
(
expr
)
→
Prop
:
=
...
...
theories/tests/heap_lang.v
View file @
3b93f77c
...
...
@@ -71,6 +71,11 @@ Section LiftingTests.
wp_load
.
wp_op
.
wp_faa
.
do
2
wp_load
.
wp_op
.
done
.
Qed
.
Definition
heap_e6
:
val
:
=
λ
:
"v"
,
"v"
=
"v"
.
Lemma
heap_e6_spec
(
v
:
val
)
:
(
WP
heap_e6
v
{{
w
,
⌜
w
=
#
true
⌝
}})%
I
.
Proof
.
wp_lam
.
wp_op
.
by
case_bool_decide
.
Qed
.
Definition
FindPred
:
val
:
=
rec
:
"pred"
"x"
"y"
:
=
let
:
"yp"
:
=
"y"
+
#
1
in
...
...
Write
Preview
Supports
Markdown
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