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
63dbc98b
Commit
63dbc98b
authored
12 years ago
by
Julien Signoles
Browse files
Options
Downloads
Patches
Plain Diff
[E-ACSL] export a simple version of predicate_to_exp
parent
75521ab4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/plugins/e-acsl/main.ml
+9
-0
9 additions, 0 deletions
src/plugins/e-acsl/main.ml
src/plugins/e-acsl/translate.ml
+7
-0
7 additions, 0 deletions
src/plugins/e-acsl/translate.ml
src/plugins/e-acsl/translate.mli
+2
-0
2 additions, 0 deletions
src/plugins/e-acsl/translate.mli
with
18 additions
and
0 deletions
src/plugins/e-acsl/main.ml
+
9
−
0
View file @
63dbc98b
...
...
@@ -70,6 +70,15 @@ let generate_code =
(
Datatype
.
func
Datatype
.
string
Project
.
ty
)
generate_code
let
predicate_to_exp
=
Dynamic
.
register
~
plugin
:
"e-acsl"
~
journalize
:
false
"predicate_to_exp"
(
Datatype
.
func2
Kernel_function
.
ty
Cil_datatype
.
Predicate_named
.
ty
Cil_datatype
.
Exp
.
ty
)
Translate
.
predicate_to_exp
let
add_e_acsl_library
()
=
if
Options
.
must_visit
()
then
begin
Kernel
.
CppExtraArgs
.
add
(
Pretty_utils
.
sfprintf
" -I%s/libc"
Config
.
datadir
);
...
...
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/translate.ml
+
7
−
0
View file @
63dbc98b
...
...
@@ -606,6 +606,13 @@ let () =
Quantif
.
term_to_exp_ref
:=
term_to_exp
;
Quantif
.
named_predicate_to_exp_ref
:=
named_predicate_to_exp
let
predicate_to_exp
kf
p
=
Typing
.
type_named_predicate
~
must_clear
:
true
p
;
let
empty_env
=
Env
.
empty
(
new
Visitor
.
frama_c_copy
Project_skeleton
.
dummy
)
in
let
e
,
_
=
named_predicate_to_exp
kf
empty_env
p
in
assert
(
Typ
.
equal
(
Cil
.
typeOf
e
)
Cil
.
intType
);
e
(* ************************************************************************** *)
(* [translate_*] translates a given ACSL annotation into the corresponding C
statement (if any) for runtime assertion checking *)
...
...
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/translate.mli
+
2
−
0
View file @
63dbc98b
...
...
@@ -33,6 +33,8 @@ val translate_pre_code_annotation:
val
translate_post_code_annotation
:
kernel_function
->
Env
.
t
->
code_annotation
->
Env
.
t
val
predicate_to_exp
:
kernel_function
->
predicate
named
->
exp
(*
Local Variables:
compile-command: "make"
...
...
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