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
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
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
Charles Southerland
frama-c
Commits
e4378372
Commit
e4378372
authored
4 years ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[wp] few typos
parent
9137703d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/wp/Factory.ml
+8
-9
8 additions, 9 deletions
src/plugins/wp/Factory.ml
with
8 additions
and
9 deletions
src/plugins/wp/Factory.ml
+
8
−
9
View file @
e4378372
...
...
@@ -104,6 +104,9 @@ let describe s =
(* --- Variable Proxy --- *)
(* -------------------------------------------------------------------------- *)
let
validity
x
=
if
RefUsage
.
is_nullable
x
then
MemoryContext
.
Nullable
else
Valid
module
type
Proxy
=
sig
val
datatype
:
string
val
param
:
Cil_types
.
varinfo
->
MemoryContext
.
param
...
...
@@ -111,10 +114,6 @@ module type Proxy = sig
(
Cil_types
.
varinfo
->
unit
)
->
unit
end
let
nullable_status
x
=
if
RefUsage
.
is_nullable
x
then
MemoryContext
.
Nullable
else
Valid
module
MakeVarUsage
(
V
:
Proxy
)
:
MemVar
.
VarUsage
=
struct
let
datatype
=
"VarUsage."
^
V
.
datatype
...
...
@@ -128,7 +127,7 @@ struct
let
module
S
=
Datatype
.
String
.
Set
in
let
open
MemoryContext
in
if
S
.
mem
x
.
vname
(
get_addr
()
)
then
ByAddr
else
if
S
.
mem
x
.
vname
(
get_ctxt
()
)
then
InContext
(
nullable_status
x
)
else
if
S
.
mem
x
.
vname
(
get_ctxt
()
)
then
InContext
(
validity
x
)
else
if
S
.
mem
x
.
vname
(
get_refs
()
)
then
ByRef
else
if
S
.
mem
x
.
vname
(
get_vars
()
)
then
ByValue
else
V
.
param
x
...
...
@@ -186,19 +185,19 @@ let refusage_param ~byref ~context x =
|
RefUsage
.
NoAccess
->
MemoryContext
.
NotUsed
|
RefUsage
.
ByAddr
->
MemoryContext
.
ByAddr
|
RefUsage
.
ByValue
->
if
context
&&
is_formal_ptr
x
then
MemoryContext
.
InContext
(
nullable_status
x
)
if
context
&&
is_formal_ptr
x
then
MemoryContext
.
InContext
(
validity
x
)
else
if
is_ptr
x
&&
not
(
is_fun_ptr
x
)
then
MemoryContext
.
ByShift
else
MemoryContext
.
ByValue
|
RefUsage
.
ByRef
->
if
byref
then
if
RefUsage
.
is_nullable
x
then
MemoryContext
.
InContext
Nullable
if
RefUsage
.
is_nullable
x
then
MemoryContext
.
InContext
Nullable
else
MemoryContext
.
ByRef
else
MemoryContext
.
ByValue
|
RefUsage
.
ByArray
->
if
context
&&
is_formal_ptr
x
then
MemoryContext
.
InArray
(
nullable_status
x
)
then
MemoryContext
.
InArray
(
validity
x
)
else
MemoryContext
.
ByShift
let
refusage_iter
?
kf
~
init
f
=
RefUsage
.
iter
?
kf
~
init
(
fun
x
_usage
->
f
x
)
...
...
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