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
2ac4fb7b
Commit
2ac4fb7b
authored
9 months ago
by
Thibault Martin
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] Pass kf to acsl_default
parent
bf97b494
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/kernel_internals/typing/populate_spec.ml
+15
-15
15 additions, 15 deletions
src/kernel_internals/typing/populate_spec.ml
with
15 additions
and
15 deletions
src/kernel_internals/typing/populate_spec.ml
+
15
−
15
View file @
2ac4fb7b
...
@@ -201,7 +201,7 @@ sig
...
@@ -201,7 +201,7 @@ sig
val
get_clauses
:
spec
->
behaviors
->
clause
list
option
val
get_clauses
:
spec
->
behaviors
->
clause
list
option
(* Generate a default clause in ACSL mode. *)
(* Generate a default clause in ACSL mode. *)
val
acsl_default
:
unit
->
clause
val
acsl_default
:
kernel_function
->
clause
(* Generate a default clause in Safe mode. *)
(* Generate a default clause in Safe mode. *)
val
safe_default
:
kernel_function
->
clause
val
safe_default
:
kernel_function
->
clause
(* Generate a default clause in Frama_C mode. *)
(* Generate a default clause in Frama_C mode. *)
...
@@ -225,7 +225,7 @@ struct
...
@@ -225,7 +225,7 @@ struct
(* Either combine existing clauses or generate new ones depending on the
(* Either combine existing clauses or generate new ones depending on the
selected mode and original specification. *)
selected mode and original specification. *)
let
combine_or_default
mode
kf
spec
table
=
let
combine_or_default
mode
kf
spec
table
=
if
mode
=
ACSL
then
false
,
G
.
acsl_default
()
if
mode
=
ACSL
then
false
,
G
.
acsl_default
kf
else
else
let
clauses_opt
=
G
.
get_clauses
spec
table
in
let
clauses_opt
=
G
.
get_clauses
spec
table
in
match
mode
,
clauses_opt
with
match
mode
,
clauses_opt
with
...
@@ -298,7 +298,7 @@ struct
...
@@ -298,7 +298,7 @@ struct
let
get_clauses
=
get_clauses_generic
let
get_clauses
=
get_clauses_generic
let
acsl_default
()
=
let
acsl_default
_kf
=
[
Exits
,
Logic_const
.(
new_predicate
pfalse
)
]
[
Exits
,
Logic_const
.(
new_predicate
pfalse
)
]
let
safe_default
kf
=
let
safe_default
kf
=
...
@@ -306,8 +306,8 @@ struct
...
@@ -306,8 +306,8 @@ struct
then
[
Exits
,
Logic_const
.(
new_predicate
pfalse
)
]
then
[
Exits
,
Logic_const
.(
new_predicate
pfalse
)
]
else
[]
else
[]
let
frama_c_default
_
kf
=
let
frama_c_default
kf
=
acsl_default
()
acsl_default
kf
let
combine_default
(
clauses
:
clause
list
)
=
let
combine_default
(
clauses
:
clause
list
)
=
let
collect
acc
clauses
=
List
.
rev_append
(
List
.
rev
clauses
)
acc
in
let
collect
acc
clauses
=
List
.
rev_append
(
List
.
rev
clauses
)
acc
in
...
@@ -388,7 +388,7 @@ struct
...
@@ -388,7 +388,7 @@ struct
let
get_clauses
=
get_clauses_generic
let
get_clauses
=
get_clauses_generic
let
acsl_default
()
=
let
acsl_default
_kf
=
WritesAny
WritesAny
let
safe_default
kf
=
let
safe_default
kf
=
...
@@ -511,15 +511,15 @@ struct
...
@@ -511,15 +511,15 @@ struct
let
get_clauses
=
get_clauses_generic
let
get_clauses
=
get_clauses_generic
let
acsl_default
()
=
[]
let
acsl_default
_kf
=
[]
let
safe_default
kf
=
let
safe_default
kf
=
if
Kernel_function
.
has_definition
kf
if
Kernel_function
.
has_definition
kf
then
[]
then
[]
else
[
Logic_const
.(
new_predicate
pfalse
)
]
else
[
Logic_const
.(
new_predicate
pfalse
)
]
let
frama_c_default
_
kf
=
let
frama_c_default
kf
=
acsl_default
()
acsl_default
kf
let
combine_default
(
clauses
:
clause
list
)
=
let
combine_default
(
clauses
:
clause
list
)
=
let
flatten_require
clause
=
let
flatten_require
clause
=
...
@@ -584,7 +584,7 @@ struct
...
@@ -584,7 +584,7 @@ struct
let
get_clauses
=
get_clauses_generic
let
get_clauses
=
get_clauses_generic
let
acsl_default
()
=
let
acsl_default
_kf
=
FreeAlloc
([]
,
[]
)
FreeAlloc
([]
,
[]
)
let
safe_default
kf
=
let
safe_default
kf
=
...
@@ -592,8 +592,8 @@ struct
...
@@ -592,8 +592,8 @@ struct
then
FreeAlloc
([]
,
[]
)
then
FreeAlloc
([]
,
[]
)
else
FreeAllocAny
else
FreeAllocAny
let
frama_c_default
_
kf
=
let
frama_c_default
kf
=
acsl_default
()
acsl_default
kf
let
combine_default
clauses
=
let
combine_default
clauses
=
(* Note: combination is made on a set of behaviors in the sens of
(* Note: combination is made on a set of behaviors in the sens of
...
@@ -679,7 +679,7 @@ struct
...
@@ -679,7 +679,7 @@ struct
let
get_clauses
_spec
_table
=
None
let
get_clauses
_spec
_table
=
None
let
acsl_default
()
=
let
acsl_default
_kf
=
Some
(
Logic_const
.(
new_predicate
ptrue
))
Some
(
Logic_const
.(
new_predicate
ptrue
))
let
safe_default
kf
=
let
safe_default
kf
=
...
@@ -687,8 +687,8 @@ struct
...
@@ -687,8 +687,8 @@ struct
then
Some
(
Logic_const
.(
new_predicate
ptrue
))
then
Some
(
Logic_const
.(
new_predicate
ptrue
))
else
Some
(
Logic_const
.(
new_predicate
pfalse
))
else
Some
(
Logic_const
.(
new_predicate
pfalse
))
let
frama_c_default
_
kf
=
let
frama_c_default
kf
=
acsl_default
()
acsl_default
kf
let
combine_default
_clauses
=
let
combine_default
_clauses
=
assert
false
assert
false
...
...
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