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
Rice Wine
Iris
Commits
700646bc
Commit
700646bc
authored
Dec 05, 2017
by
Robbert Krebbers
Browse files
Add bitwise negation on integers.
parent
c57f36f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/heap_lang/lang.v
View file @
700646bc
...
...
@@ -317,6 +317,7 @@ Definition subst' (mx : binder) (es : expr) : expr → expr :=
Definition
un_op_eval
(
op
:
un_op
)
(
v
:
val
)
:
option
val
:
=
match
op
,
v
with
|
NegOp
,
LitV
(
LitBool
b
)
=>
Some
$
LitV
$
LitBool
(
negb
b
)
|
NegOp
,
LitV
(
LitInt
n
)
=>
Some
$
LitV
$
LitInt
(
Z
.
lnot
n
)
|
MinusUnOp
,
LitV
(
LitInt
n
)
=>
Some
$
LitV
$
LitInt
(-
n
)
|
_
,
_
=>
None
end
.
...
...
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