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
6a700dd4
Commit
6a700dd4
authored
3 years ago
by
Valentin Perrelle
Committed by
David Bühler
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] Add a test for interprocedural splits
parent
d0006075
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
tests/value/oracle/partitioning-interproc.2.res.oracle
+36
-0
36 additions, 0 deletions
tests/value/oracle/partitioning-interproc.2.res.oracle
tests/value/partitioning-interproc.c
+22
-1
22 additions, 1 deletion
tests/value/partitioning-interproc.c
with
58 additions
and
1 deletion
tests/value/oracle/partitioning-interproc.2.res.oracle
0 → 100644
+
36
−
0
View file @
6a700dd4
[kernel] Parsing tests/value/partitioning-interproc.c (with preprocessing)
[eva] Analyzing a complete application starting at fabs_splits_test
[eva] Computing initial state
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
[eva] computing for function fabs_splits <- fabs_splits_test.
Called from tests/value/partitioning-interproc.c:71.
[eva] Recording results for fabs_splits
[eva] Done for function fabs_splits
[eva] Recording results for fabs_splits_test
[eva] done for function fabs_splits_test
[eva] ====== VALUES COMPUTED ======
[eva:final-states] Values at end of function fabs_splits:
__retres ∈ [0. .. 1.79769313486e+308]
[eva:final-states] Values at end of function fabs_splits_test:
x ∈ [-1. .. 1.]
[from] Computing for function fabs_splits
[from] Done for function fabs_splits
[from] Computing for function fabs_splits_test
[from] Done for function fabs_splits_test
[from] ====== DEPENDENCIES COMPUTED ======
These dependencies hold at termination for the executions that terminate:
[from] Function fabs_splits:
\result FROM x
[from] Function fabs_splits_test:
NO EFFECTS
[from] ====== END OF DEPENDENCIES ======
[inout] Out (internal) for function fabs_splits:
__retres
[inout] Inputs for function fabs_splits:
\nothing
[inout] Out (internal) for function fabs_splits_test:
x; tmp
[inout] Inputs for function fabs_splits_test:
\nothing
This diff is collapsed.
Click to expand it.
tests/value/partitioning-interproc.c
+
22
−
1
View file @
6a700dd4
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
GCC:
GCC:
STDOPT: #"-main cassign_test -eva-partition-history 1 -eva-interprocedural-partitioning-keep-history"
STDOPT: #"-main cassign_test -eva-partition-history 1 -eva-interprocedural-partitioning-keep-history"
STDOPT: #"-main fabs_test -eva-partition-history 1 -eva-domains equality -eva-interprocedural-partitioning-keep-history"
STDOPT: #"-main fabs_test -eva-partition-history 1 -eva-domains equality -eva-interprocedural-partitioning-keep-history"
STDOPT: #"-main fabs_splits_test -eva-partition-history 1 -eva-domains equality -eva-interprocedural-partitioning-keep-splits"
*/
*/
#include
"__fc_builtin.h"
#include
"__fc_builtin.h"
int
cassign
(
int
*
p
)
int
cassign
(
int
*
p
)
...
@@ -51,3 +51,24 @@ void fabs_test(double x)
...
@@ -51,3 +51,24 @@ void fabs_test(double x)
x
=
x
<
0
?
-
1
.
0
:
1
.
0
;
x
=
x
<
0
?
-
1
.
0
:
1
.
0
;
}
}
}
}
double
fabs_splits
(
double
x
)
{
//@ split x > 0.0;
//@ split x < 0.0;
if
(
x
==
0
.
0
)
{
return
0
.
0
;
}
else
if
(
x
>
0
.
0
)
{
return
x
;
}
else
{
return
-
x
;
}
}
void
fabs_splits_test
(
double
x
)
{
if
(
fabs_splits
(
x
)
>
1
.
0
)
{
x
=
x
<
0
?
-
1
.
0
:
1
.
0
;
}
}
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