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
9cdbc8d9
Commit
9cdbc8d9
authored
1 year ago
by
Thibault Martin
Committed by
Allan Blanchard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Use Term compare function
parent
f425dd10
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/kernel_internals/typing/populate_spec.ml
+9
-6
9 additions, 6 deletions
src/kernel_internals/typing/populate_spec.ml
with
9 additions
and
6 deletions
src/kernel_internals/typing/populate_spec.ml
+
9
−
6
View file @
9cdbc8d9
...
@@ -92,6 +92,9 @@ let get_custom_mode mode =
...
@@ -92,6 +92,9 @@ let get_custom_mode mode =
|
None
->
Kernel
.
abort
"Mode %s is not registered"
mode
|
None
->
Kernel
.
abort
"Mode %s is not registered"
mode
|
Some
custom_mode
->
custom_mode
|
Some
custom_mode
->
custom_mode
let
compare_it
it1
it2
=
Cil_datatype
.
Term
.
compare
it1
.
it_content
it2
.
it_content
module
type
Generator
=
module
type
Generator
=
sig
sig
...
@@ -250,11 +253,11 @@ struct
...
@@ -250,11 +253,11 @@ struct
|
FromAny
,
_
->
1
|
FromAny
,
_
->
1
|
_
,
FromAny
->
-
1
|
_
,
FromAny
->
-
1
|
From
l1
,
From
l2
->
|
From
l1
,
From
l2
->
Extlib
.
list_compare
Cil_datatype
.
Identified_term
.
compare
l1
l2
Extlib
.
list_compare
compare
_it
l1
l2
let
compare_from
(
f1
,
d1
)
(
f2
,
d2
)
=
let
compare_from
(
f1
,
d1
)
(
f2
,
d2
)
=
let
r
=
Cil_datatype
.
Identified_term
.
compare
f1
f2
in
let
r
=
compare
_it
f1
f2
in
if
r
<>
0
then
compare_deps
d1
d2
else
r
if
r
<>
0
then
r
else
compare_deps
d1
d2
let
combine_default
clauses
=
let
combine_default
clauses
=
(* Note: combination is made on a set of complete behaviors in the sens of
(* Note: combination is made on a set of complete behaviors in the sens of
...
@@ -265,7 +268,7 @@ struct
...
@@ -265,7 +268,7 @@ struct
in
in
let
deps
=
function
let
deps
=
function
|
FromAny
->
FromAny
|
FromAny
->
FromAny
|
From
l
->
From
(
List
.
sort_uniq
Cil_datatype
.
Identified_term
.
compare
l
)
|
From
l
->
From
(
List
.
sort_uniq
compare
_it
l
)
in
in
let
froms
=
let
froms
=
List
.
map
(
fun
(
e
,
ds
)
->
e
,
deps
ds
)
@@
List
.
fold_left
collect
[]
clauses
List
.
map
(
fun
(
e
,
ds
)
->
e
,
deps
ds
)
@@
List
.
fold_left
collect
[]
clauses
...
@@ -413,8 +416,8 @@ struct
...
@@ -413,8 +416,8 @@ struct
|
_
->
assert
false
|
_
->
assert
false
in
in
let
f
,
a
=
List
.
fold_left
collect
([]
,
[]
)
clauses
in
let
f
,
a
=
List
.
fold_left
collect
([]
,
[]
)
clauses
in
let
f
=
List
.
sort_uniq
Cil_datatype
.
Identified_term
.
compare
f
in
let
f
=
List
.
sort_uniq
compare
_it
f
in
let
a
=
List
.
sort_uniq
Cil_datatype
.
Identified_term
.
compare
a
in
let
a
=
List
.
sort_uniq
compare
_it
a
in
FreeAlloc
(
f
,
a
)
FreeAlloc
(
f
,
a
)
let
custom_default
mode
kf
spec
=
let
custom_default
mode
kf
spec
=
...
...
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