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
2d4cfd1d
Commit
2d4cfd1d
authored
3 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] Fixes dynamic split when the first split fails.
parent
ee0eed83
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/plugins/value/partitioning/partition.ml
+19
-5
19 additions, 5 deletions
src/plugins/value/partitioning/partition.ml
with
19 additions
and
5 deletions
src/plugins/value/partitioning/partition.ml
+
19
−
5
View file @
2d4cfd1d
...
@@ -104,7 +104,7 @@ type key = {
...
@@ -104,7 +104,7 @@ type key = {
branches
:
branch
list
;
branches
:
branch
list
;
loops
:
(
int
*
int
)
list
;
(* current iteration / max unrolling *)
loops
:
(
int
*
int
)
list
;
(* current iteration / max unrolling *)
static_split
:
(
Integer
.
t
*
split_monitor
)
SplitMap
.
t
;
(* exp->value*monitor *)
static_split
:
(
Integer
.
t
*
split_monitor
)
SplitMap
.
t
;
(* exp->value*monitor *)
dynamic_split
:
(
Integer
.
t
*
split_monitor
)
SplitMap
.
t
;
(* exp->value*monitor *)
dynamic_split
:
(
Integer
.
t
option
*
split_monitor
)
SplitMap
.
t
;
(* exp->value*monitor *)
}
}
module
Key
=
module
Key
=
...
@@ -127,10 +127,13 @@ struct
...
@@ -127,10 +127,13 @@ struct
let
compare_split
(
i1
,_
m1
)
(
i2
,_
m2
)
=
let
compare_split
(
i1
,_
m1
)
(
i2
,_
m2
)
=
Integer
.
compare
i1
i2
Integer
.
compare
i1
i2
in
in
let
compare_optsplit
(
i1
,_
m1
)
(
i2
,_
m2
)
=
Option
.
compare
Integer
.
compare
i1
i2
in
Option
.
compare
IntPair
.
compare
k1
.
ration_stamp
k2
.
ration_stamp
Option
.
compare
IntPair
.
compare
k1
.
ration_stamp
k2
.
ration_stamp
<?>
(
LoopList
.
compare
,
k1
.
loops
,
k2
.
loops
)
<?>
(
LoopList
.
compare
,
k1
.
loops
,
k2
.
loops
)
<?>
(
SplitMap
.
compare
compare_split
,
k1
.
static_split
,
k2
.
static_split
)
<?>
(
SplitMap
.
compare
compare_split
,
k1
.
static_split
,
k2
.
static_split
)
<?>
(
SplitMap
.
compare
compare_split
,
k1
.
dynamic_split
,
k2
.
dynamic_split
)
<?>
(
SplitMap
.
compare
compare_
opt
split
,
k1
.
dynamic_split
,
k2
.
dynamic_split
)
<?>
(
BranchList
.
compare
,
k1
.
branches
,
k2
.
branches
)
<?>
(
BranchList
.
compare
,
k1
.
branches
,
k2
.
branches
)
let
pretty
fmt
key
=
let
pretty
fmt
key
=
...
@@ -151,7 +154,13 @@ struct
...
@@ -151,7 +154,13 @@ struct
SplitTerm
.
pretty
t
SplitTerm
.
pretty
t
(
Integer
.
pretty
~
hexa
:
false
)
i
)
(
Integer
.
pretty
~
hexa
:
false
)
i
)
fmt
fmt
(
SplitMap
.
bindings
key
.
static_split
@
SplitMap
.
bindings
key
.
dynamic_split
)
(
SplitMap
.
bindings
key
.
static_split
);
Pretty_utils
.
pp_list
~
pre
:
"{@["
~
sep
:
" ;@ "
~
suf
:
"@]}"
(
fun
fmt
(
t
,
(
i
,_
m
))
->
Format
.
fprintf
fmt
"%a:%a"
SplitTerm
.
pretty
t
(
Pretty_utils
.
pp_opt
(
Integer
.
pretty
~
hexa
:
false
))
i
)
fmt
(
SplitMap
.
bindings
key
.
dynamic_split
)
let
exceed_rationing
key
=
key
.
ration_stamp
=
None
let
exceed_rationing
key
=
key
.
ration_stamp
=
None
end
end
...
@@ -392,13 +401,13 @@ struct
...
@@ -392,13 +401,13 @@ struct
let
split_state
~
monitor
(
kind
:
split_kind
)
(
term
:
split_term
)
let
split_state
~
monitor
(
kind
:
split_kind
)
(
term
:
split_term
)
(
key
:
key
)
(
state
:
state
)
:
(
key
*
state
)
list
=
(
key
:
key
)
(
state
:
state
)
:
(
key
*
state
)
list
=
let
add
value
map
=
SplitMap
.
add
term
(
value
,
monitor
)
map
in
try
try
let
add
value
map
=
SplitMap
.
add
term
(
value
,
monitor
)
map
in
let
update_key
(
v
,
x
)
=
let
update_key
(
v
,
x
)
=
let
k
=
let
k
=
match
kind
with
match
kind
with
|
Static
->
{
key
with
static_split
=
add
v
key
.
static_split
}
|
Static
->
{
key
with
static_split
=
add
v
key
.
static_split
}
|
Dynamic
->
{
key
with
dynamic_split
=
add
v
key
.
dynamic_split
}
|
Dynamic
->
{
key
with
dynamic_split
=
add
(
Some
v
)
key
.
dynamic_split
}
in
in
(
k
,
x
)
(
k
,
x
)
in
in
...
@@ -409,6 +418,11 @@ struct
...
@@ -409,6 +418,11 @@ struct
in
in
List
.
map
update_key
states
List
.
map
update_key
states
with
Operation_failed
->
with
Operation_failed
->
let
key
=
match
kind
with
|
Static
->
key
|
Dynamic
->
{
key
with
dynamic_split
=
add
None
key
.
dynamic_split
}
in
[(
key
,
state
)]
[(
key
,
state
)]
let
split
~
monitor
(
kind
:
split_kind
)
(
term
:
split_term
)
(
p
:
t
)
=
let
split
~
monitor
(
kind
:
split_kind
)
(
term
:
split_term
)
(
p
:
t
)
=
...
...
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