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
c4026863
Commit
c4026863
authored
1 year ago
by
David Bühler
Committed by
Andre Maroneze
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] Adds a test of printing domains states.
parent
70bbfd97
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/value/domains.i
+10
-1
10 additions, 1 deletion
tests/value/domains.i
tests/value/oracle/domains.res.oracle
+117
-3
117 additions, 3 deletions
tests/value/oracle/domains.res.oracle
tests/value/oracle/domains_dump_0
+70
-0
70 additions, 0 deletions
tests/value/oracle/domains_dump_0
with
197 additions
and
4 deletions
tests/value/domains.i
+
10
−
1
View file @
c4026863
/* run.config
LOG: domains_dump_0
STDOPT: #"-eva-domains sign,equality,bitwise,symbolic-locations,gauges,octagon,multidim -eva-msg-key=d-equality,d-symbolic-locations,d-gauges,d-octagon,d-multidim,d-bitwise,d-sign -eva-warn-key experimental=inactive"
*/
/* run.config*
STDOPT: #"-eva-domains sign,equality,bitwise,symbolic-locations,gauges,octagon,multidim"
DONTRUN: avoids duplication of domains_dump oracle
*/
volatile
int
nondet
;
...
...
@@ -41,4 +45,9 @@ void main (int a) {
/* Tests the bitwise domain: a == 8, no division by zero. */
a = (a | 8) & 8;
r = 10 / a;
/* Tests printing of domains. */
Frama_C_domain_show_each(a, i, j, k, r);
Frama_C_dump_each();
Frama_C_dump_each_file_domains_dump();
}
This diff is collapsed.
Click to expand it.
tests/value/oracle/domains.res.oracle
+
117
−
3
View file @
c4026863
[kernel] Parsing domains.i (no preprocessing)
[eva:experimental] Warning: The multidim domain is experimental.
[eva] Analyzing a complete application starting at main
[eva] Computing initial state
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
nondet ∈ [--..--]
[eva:partition] domains.i:12: starting to merge loop iterations
[eva:partition] domains.i:30: starting to merge loop iterations
[eva:partition] domains.i:16: starting to merge loop iterations
[eva:partition] domains.i:34: starting to merge loop iterations
[eva] domains.i:50:
Frama_C_domain_show_each:
a : # cvalue: {8}
# equality:
# symbolic-locations: (not implemented)
# octagon: (not implemented)
# gauges: (not implemented)
# sign: +
# bitwise: (not implemented)
# multidim: {8}
i : # cvalue: [1..99]
# equality:
# symbolic-locations: (not implemented)
# octagon: (not implemented)
# gauges: (not implemented)
# sign: +
# bitwise: (not implemented)
# multidim: [1..99]
j : # cvalue: [10..210]
# equality:
# symbolic-locations: (not implemented)
# octagon: (not implemented)
# gauges: (not implemented)
# sign: +
# bitwise: (not implemented)
# multidim: [10..210]
k : # cvalue: [2..100]
# equality: {k = ((i - j) + 1) + j}
# symbolic-locations: (not implemented)
# octagon: (not implemented)
# gauges: (not implemented)
# sign: -0+
# bitwise: (not implemented)
# multidim: [2..100]
r : # cvalue: {1}
# equality:
# symbolic-locations: (not implemented)
# octagon: (not implemented)
# gauges: (not implemented)
# sign: 0+
# bitwise: (not implemented)
# multidim: {1}
[eva] domains.i:51:
Frama_C_dump_each:
# cvalue:
nondet ∈ [--..--]
a ∈ {8}
i ∈ [1..99]
j ∈ [10..210]
k ∈ [2..100]
r ∈ {1}
t[0..63] ∈ [--..--] or UNINITIALIZED
[64] ∈ [--..--]
[65..99] ∈ [--..--] or UNINITIALIZED
b1 ∈ {0; 1}
b2 ∈ {0; 1}
# equality:
{k = ((i - j) + 1) + j}
# symbolic-locations:
V: {[ t[i] -> [-2147483648..2147483647]
t[i] / i -> [-2147483648..2147483647]
i - j -> [-209..89]
t[k - 1] -> [-2147483648..2147483647] ]}
Z: {[ t[i] -> i; t[1..99]
t[i] / i -> i; t[1..99]
i - j -> i; j
t[k - 1] -> k; t[1..99] ]}
I: {[ i -> {t[i], t[i] / i, i - j}
j -> {i - j}
k -> {t[k - 1]}
t -> {t[i], t[i] / i, t[k - 1]} ]}
S: {[ i -> {t[i], t[i] / i, i - j}
j -> {i - j}
k -> {t[k - 1]}
t -> {t[i], t[i] / i, t[k - 1]} ]}
# octagon:
{[ i + j ∈ [11..309]
j + k ∈ [12..310]
j - k ∈ [-90..208]
]}
# gauges:
V: [{[ a -> {8}
i -> [-2147483648..2147483647]
j -> [10..210]
k -> [-2147483847..2147483848]
r -> {1}
b1 -> {0; 1}
b2 -> {0; 1} ]}]
# sign:
{[ a -> +
i -> +
j -> +
r -> 0+ ]}
# bitwise:
a[bits 0 to 2] ∈ {0}
[bits 3 to 3] ∈ {1}
[bits 4 to 31] ∈ {0}
# multidim:
({[ a -> ({8}, {})
i -> ([1..99], {t})
j -> ([10..210], {})
k -> ([2..100], {t})
r -> ({1}, {})
t -> ({
[0 .. k - 2] = [-2147483648..2147483647],
[k - 1] = [-2147483648..2147483647],
[k .. 99] = [-2147483648..2147483647]
},
{})
b1 -> ({0; 1}, {})
b2 -> ({0; 1}, {}) ]},
None)
==END OF DUMP==
[eva] domains.i:52: Dumping state in file 'domains_dump_0'
[eva] Recording results for main
[eva] Done for function main
[eva] ====== VALUES COMPUTED ======
...
...
This diff is collapsed.
Click to expand it.
tests/value/oracle/domains_dump_0
0 → 100644
+
70
−
0
View file @
c4026863
DUMPING STATE at file domains.i line 52
# cvalue:
nondet ∈ [--..--]
a ∈ {8}
i ∈ [1..99]
j ∈ [10..210]
k ∈ [2..100]
r ∈ {1}
t[0..63] ∈ [--..--] or UNINITIALIZED
[64] ∈ [--..--]
[65..99] ∈ [--..--] or UNINITIALIZED
b1 ∈ {0; 1}
b2 ∈ {0; 1}
# equality:
{k = ((i - j) + 1) + j}
# symbolic-locations:
V: {[ t[i] -> [-2147483648..2147483647]
t[i] / i -> [-2147483648..2147483647]
i - j -> [-209..89]
t[k - 1] -> [-2147483648..2147483647] ]}
Z: {[ t[i] -> i; t[1..99]
t[i] / i -> i; t[1..99]
i - j -> i; j
t[k - 1] -> k; t[1..99] ]}
I: {[ i -> {t[i], t[i] / i, i - j}
j -> {i - j}
k -> {t[k - 1]}
t -> {t[i], t[i] / i, t[k - 1]} ]}
S: {[ i -> {t[i], t[i] / i, i - j}
j -> {i - j}
k -> {t[k - 1]}
t -> {t[i], t[i] / i, t[k - 1]} ]}
# octagon:
{[ i + j ∈ [11..309]
j + k ∈ [12..310]
j - k ∈ [-90..208]
]}
# gauges:
V: [{[ a -> {8}
i -> [-2147483648..2147483647]
j -> [10..210]
k -> [-2147483847..2147483848]
r -> {1}
b1 -> {0; 1}
b2 -> {0; 1} ]}]
# sign:
{[ a -> +
i -> +
j -> +
r -> 0+ ]}
# bitwise:
a[bits 0 to 2] ∈ {0}
[bits 3 to 3] ∈ {1}
[bits 4 to 31] ∈ {0}
# multidim:
({[ a -> ({8}, {})
i -> ([1..99], {t})
j -> ([10..210], {})
k -> ([2..100], {t})
r -> ({1}, {})
t -> ({
[0 .. k - 2] = [-2147483648..2147483647],
[k - 1] = [-2147483648..2147483647],
[k .. 99] = [-2147483648..2147483647]
},
{})
b1 -> ({0; 1}, {})
b2 -> ({0; 1}, {}) ]},
None)
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