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
dd2b190b
Commit
dd2b190b
authored
3 years ago
by
Basile Desloges
Browse files
Options
Downloads
Patches
Plain Diff
[eacsl] Function to retrieve the RTL replacement of a libc function
parent
f6bba646
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/e-acsl/src/project_initializer/rtl.ml
+11
-0
11 additions, 0 deletions
src/plugins/e-acsl/src/project_initializer/rtl.ml
src/plugins/e-acsl/src/project_initializer/rtl.mli
+3
-0
3 additions, 0 deletions
src/plugins/e-acsl/src/project_initializer/rtl.mli
with
14 additions
and
0 deletions
src/plugins/e-acsl/src/project_initializer/rtl.ml
+
11
−
0
View file @
dd2b190b
...
...
@@ -55,6 +55,7 @@ module Symbols: sig
val
mem_vi
:
string
->
bool
exception
Unregistered
of
string
val
find_vi
:
string
->
varinfo
(* may raise Unregistered *)
val
libc_replacement
:
varinfo
->
varinfo
(* val debug: unit -> unit*)
end
=
struct
...
...
@@ -77,6 +78,16 @@ end = struct
try
Datatype
.
String
.
Hashtbl
.
find
vars
s
with
Not_found
->
raise
(
Unregistered
s
)
let
libc_replacement
fvi
=
let
name
=
Functions
.
RTL
.
libc_replacement_name
fvi
.
vname
in
try
find_vi
name
with
Unregistered
_
->
Options
.
fatal
"Unable to find RTL function '%s' to replace libc function '%s'"
name
fvi
.
vname
(*
let debug () =
Global.Hashtbl.iter
...
...
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/src/project_initializer/rtl.mli
+
3
−
0
View file @
dd2b190b
...
...
@@ -39,6 +39,9 @@ module Symbols: sig
val
find_vi
:
string
->
varinfo
(** @raise Unregistered if the given name is not part of the RTL. *)
val
libc_replacement
:
varinfo
->
varinfo
(** Given the varinfo of a C library function with an RTL replacement, return
the varinfo of the RTL function that replaces it. *)
end
(*
...
...
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