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
f5ee5c32
Commit
f5ee5c32
authored
5 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] Evaluation: renames low_context into fast_eval_context.
parent
ab47ec39
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/value/engine/evaluation.ml
+8
-8
8 additions, 8 deletions
src/plugins/value/engine/evaluation.ml
with
8 additions
and
8 deletions
src/plugins/value/engine/evaluation.ml
+
8
−
8
View file @
f5ee5c32
...
...
@@ -1120,7 +1120,7 @@ module Make
(* Context for a fast forward evaluation with minimal precision:
no subdivisions and no calls to the oracle. *)
let
low
_context
state
=
let
fast_eval
_context
state
=
let
remaining_fuel
=
no_fuel
in
let
subdivision
=
0
in
{
state
;
subdivision
;
remaining_fuel
;
oracle
}
...
...
@@ -1160,7 +1160,7 @@ module Make
let
evaluate_for_reduction
state
expr
=
try
`Value
(
Cache
.
find'
!
cache
expr
)
with
Not_found
->
fst
(
forward_eval
(
low
_context
state
)
expr
)
>>-:
fun
_
->
fst
(
forward_eval
(
fast_eval
_context
state
)
expr
)
>>-:
fun
_
->
try
Cache
.
find'
!
cache
expr
with
Not_found
->
assert
false
...
...
@@ -1352,7 +1352,7 @@ module Make
|
_
->
let
reduce_valid_index
=
true
in
let
typ_lval
=
Cil
.
typeOf_pointed
(
Cil
.
typeOf
expr
)
in
let
context
=
low
_context
state
in
let
context
=
fast_eval
_context
state
in
fst
(
eval_offset
context
~
reduce_valid_index
typ_lval
offset
)
>>-
fun
(
loc_offset
,
_
,
_
)
->
find_val
expr
>>-
fun
value
->
...
...
@@ -1369,7 +1369,7 @@ module Make
|
Index
(
exp
,
remaining
)
->
find_val
exp
>>-
fun
v
->
let
typ_pointed
=
Cil
.
typeOf_array_elem
typ
in
let
context
=
low
_context
state
in
let
context
=
fast_eval
_context
state
in
fst
(
eval_offset
context
~
reduce_valid_index
:
true
typ_pointed
remaining
)
>>-
fun
(
rem
,
_
,
_
)
->
Loc
.
backward_index
typ_pointed
v
rem
loc_offset
>>-
fun
(
v'
,
rem'
)
->
...
...
@@ -1410,7 +1410,7 @@ module Make
match
expr
.
enode
with
|
Lval
lval
->
second_eval_lval
state
lval
value
|
_
->
fst
(
internal_forward_eval
(
low
_context
state
)
expr
)
fst
(
internal_forward_eval
(
fast_eval
_context
state
)
expr
)
>>-:
fun
(
v
,
_
,
_
)
->
v
in
new_value
>>-
fun
evaled
->
...
...
@@ -1435,7 +1435,7 @@ module Make
then
let
for_writing
=
false
and
reduction
=
true
and
context
=
low
_context
state
in
and
context
=
fast_eval
_context
state
in
fst
(
reduced_lval_to_loc
context
~
for_writing
~
reduction
lval
)
>>-:
fun
(
loc
,
_
,
_
,
_
)
->
(* TODO: Loc.narrow *)
...
...
@@ -1448,7 +1448,7 @@ module Make
else
`Value
()
in
evaloc
>>-
fun
()
->
fst
(
eval_lval
(
low
_context
state
)
lval
)
>>-
fun
(
record
,
_
,
_
)
->
fst
(
eval_lval
(
fast_eval
_context
state
)
lval
)
>>-
fun
(
record
,
_
,
_
)
->
record
.
value
.
v
and
recursive_descent
state
expr
=
...
...
@@ -1565,7 +1565,7 @@ module Make
(* Avoids reduce_by_cond_enumerate on volatile expressions. *)
if
volatile
then
`Value
!
cache
else
let
context
=
low
_context
state
in
let
context
=
fast_eval
_context
state
in
Subdivided_Evaluation
.
reduce_by_enumeration
context
!
cache
expr
false
let
assume
?
valuation
:
(
valuation
=
Cache
.
empty
)
state
expr
value
=
...
...
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