Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
a8f7f36f
Commit
a8f7f36f
authored
4 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] Sign values: implements the forward bitwise complement operator.
parent
48b0000b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/value/values/sign_value.ml
+10
-1
10 additions, 1 deletion
src/plugins/value/values/sign_value.ml
with
10 additions
and
1 deletion
src/plugins/value/values/sign_value.ml
+
10
−
1
View file @
a8f7f36f
...
...
@@ -132,9 +132,18 @@ let assume_comparable _ v1 v2 = `Unknown (v1, v2)
let
neg_unop
v
=
{
v
with
neg
=
v
.
pos
;
pos
=
v
.
neg
}
let
forward_unop
_
op
v
=
let
bitwise_not
typ
v
=
match
Cil
.
unrollType
typ
with
|
TInt
(
ikind
,
_
)
|
TEnum
({
ekind
=
ikind
}
,
_
)
->
if
Cil
.
isSigned
ikind
then
{
pos
=
v
.
neg
;
neg
=
v
.
pos
||
v
.
zero
;
zero
=
v
.
neg
}
else
{
pos
=
v
.
pos
||
v
.
zero
;
neg
=
false
;
zero
=
v
.
pos
}
|
_
->
top
let
forward_unop
typ
op
v
=
match
op
with
|
Neg
->
`Value
(
neg_unop
v
)
|
BNot
->
`Value
(
bitwise_not
typ
v
)
|
_
->
`Value
top
let
plus
v1
v2
=
...
...
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