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
848c5f40
Commit
848c5f40
authored
4 years ago
by
Julien Signoles
Browse files
Options
Downloads
Patches
Plain Diff
[eva] better exception handling in Db.Value
parent
3a391deb
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/kernel_services/plugin_entry_points/db.ml
+14
-2
14 additions, 2 deletions
src/kernel_services/plugin_entry_points/db.ml
with
14 additions
and
2 deletions
src/kernel_services/plugin_entry_points/db.ml
+
14
−
2
View file @
848c5f40
...
...
@@ -526,8 +526,20 @@ module Value = struct
let
add_formals_to_state
=
mk_fun
"add_formals_to_state"
let
get_fundec_from_stmt
stmt
=
let
kf
=
try
Kernel_function
.
find_englobing_kf
stmt
with
Not_found
->
Kernel
.
fatal
"Unknown statement '%a'"
Printer
.
pp_stmt
stmt
in
try
Kernel_function
.
get_definition
kf
with
Kernel_function
.
No_Definition
->
Kernel
.
fatal
"No definition for function %a"
Kernel_function
.
pretty
kf
let
noassert_get_stmt_state
~
after
s
=
if
!
no_results
(
Kernel_function
.(
get_definition
(
find_englobing_kf
s
)
))
if
!
no_results
(
get_fundec_from_stmt
s
)
then
Cvalue
.
Model
.
top
else
let
(
find
,
add
)
,
find_by_callstack
=
...
...
@@ -586,7 +598,7 @@ module Value = struct
exception
Is_reachable
let
is_reachable_stmt
stmt
=
if
!
no_results
(
Kernel_function
.(
get_definition
(
find_englobing_kf
stmt
)
))
if
!
no_results
(
get_fundec_from_stmt
stmt
)
then
true
else
let
ho
=
try
Some
(
Table_By_Callstack
.
find
stmt
)
with
Not_found
->
None
in
...
...
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