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
fd973425
Commit
fd973425
authored
2 years ago
by
Andre Maroneze
Committed by
Allan Blanchard
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[E-ACSL] prepare for future RteGen as optional dependence
parent
e3648f09
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/plugins/e-acsl/src/analyses/rte.ml
+6
-33
6 additions, 33 deletions
src/plugins/e-acsl/src/analyses/rte.ml
src/plugins/e-acsl/src/analyses/rte.mli
+4
-0
4 additions, 0 deletions
src/plugins/e-acsl/src/analyses/rte.mli
src/plugins/e-acsl/src/main.ml
+1
-1
1 addition, 1 deletion
src/plugins/e-acsl/src/main.ml
with
11 additions
and
34 deletions
src/plugins/e-acsl/src/analyses/rte.ml
+
6
−
33
View file @
fd973425
...
...
@@ -20,45 +20,18 @@
(* *)
(**************************************************************************)
(* ************************************************************************** *)
(** {2 Generic code} *)
(* ************************************************************************** *)
let
warn_rte
warn
exn
=
if
warn
then
Options
.
warning
"@[@[cannot run RTE:@ %s.@]@ \
Ignoring potential runtime errors in annotations."
(
Printexc
.
to_string
exn
)
(* ************************************************************************** *)
(** {2 Exported code} *)
(* ************************************************************************** *)
open
Cil_datatype
let
stmt
?
warn
:_
kf
stmt
=
RteGen
.
Visit
.
get_annotations_stmt
kf
stmt
let
stmt
?
(
warn
=
true
)
=
try
Dynamic
.
get
~
plugin
:
"RteGen"
"stmt_annotations"
(
Datatype
.
func2
Kernel_function
.
ty
Stmt
.
ty
(
let
module
L
=
Datatype
.
List
(
Code_annotation
)
in
L
.
ty
))
with
Failure
_
|
Dynamic
.
Unbound_value
_
|
Dynamic
.
Incompatible_type
_
as
exn
->
warn_rte
warn
exn
;
fun
_
_
->
[]
let
exp
?
warn
:_
kf
stmt
e
=
RteGen
.
Visit
.
get_annotations_exp
kf
stmt
e
let
exp
?
(
warn
=
true
)
=
try
Dynamic
.
get
~
plugin
:
"RteGen"
"exp_annotations"
(
Datatype
.
func3
Kernel_function
.
ty
Stmt
.
ty
Exp
.
ty
(
let
module
L
=
Datatype
.
List
(
Code_annotation
)
in
L
.
ty
))
with
Failure
_
|
Dynamic
.
Unbound_value
_
|
Dynamic
.
Incompatible_type
_
as
exn
->
warn_rte
warn
exn
;
fun
_
_
_
->
[]
let
get_state_selection_with_dependencies
()
=
State_selection
.
with_dependencies
RteGen
.
Api
.
self
(*
Local Variables:
...
...
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/src/analyses/rte.mli
+
4
−
0
View file @
fd973425
...
...
@@ -30,6 +30,10 @@ val stmt: ?warn:bool -> kernel_function -> stmt -> code_annotation list
val
exp
:
?
warn
:
bool
->
kernel_function
->
stmt
->
exp
->
code_annotation
list
(** RTEs of a given exp, as a list of code annotations. *)
val
get_state_selection_with_dependencies
:
unit
->
State_selection
.
t
(** Equivalent to [State_selection.with_dependencies RteGen.Api.self]
if the RTE plug-in is enabled, empty otherwise. *)
(*
Local Variables:
compile-command: "make -C ../../../../.."
...
...
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/src/main.ml
+
1
−
1
View file @
fd973425
...
...
@@ -77,7 +77,7 @@ let generate_code =
redoing the RTE management system *)
let
selection
=
State_selection
.
union
(
S
tate_selection
.
with_dependencies
RteGen
.
Api
.
self
)
(
Rte
.
get_s
tate_selection
_
with_dependencies
()
)
(
State_selection
.
with_dependencies
Options
.
Run
.
self
)
in
Project
.
clear
~
selection
~
project
:
copied_prj
()
;
...
...
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