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
f53898bc
Commit
f53898bc
authored
12 years ago
by
Julien Signoles
Browse files
Options
Downloads
Patches
Plain Diff
[E-ACSL] fixed bug #1321 about handling -then-on
parent
13e3eb92
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/plugins/e-acsl/main.ml
+51
-11
51 additions, 11 deletions
src/plugins/e-acsl/main.ml
with
51 additions
and
11 deletions
src/plugins/e-acsl/main.ml
+
51
−
11
View file @
f53898bc
...
@@ -81,29 +81,69 @@ let predicate_to_exp =
...
@@ -81,29 +81,69 @@ let predicate_to_exp =
Kernel_function
.
ty
Cil_datatype
.
Predicate_named
.
ty
Cil_datatype
.
Exp
.
ty
)
Kernel_function
.
ty
Cil_datatype
.
Predicate_named
.
ty
Cil_datatype
.
Exp
.
ty
)
Translate
.
predicate_to_exp
Translate
.
predicate_to_exp
let
add_e_acsl_library
()
=
let
analyzed_project
=
ref
None
let
add_e_acsl_library
_files
=
analyzed_project
:=
None
;
if
Options
.
must_visit
()
&&
not
(
Resulting_projects
.
is_computed
()
)
then
begin
if
Options
.
must_visit
()
&&
not
(
Resulting_projects
.
is_computed
()
)
then
begin
Kernel
.
CppExtraArgs
.
add
(
Pretty_utils
.
sfprintf
" -I%s/libc"
Config
.
datadir
);
let
extend
()
=
Kernel
.
Keep_unused_specified_functions
.
off
()
;
Kernel
.
CppExtraArgs
.
add
let
register
s
=
(
Pretty_utils
.
sfprintf
" -I%s/libc"
Config
.
datadir
);
File
.
pre_register
Kernel
.
Keep_unused_specified_functions
.
off
()
;
(
File
.
NeedCPP
let
register
s
=
(
s
,
File
.
pre_register
File
.
get_preprocessor_command
()
(
File
.
NeedCPP
^
Pretty_utils
.
sfprintf
" -I%s"
(
Options
.
Share
.
dir
~
error
:
true
()
)))
(
s
,
File
.
get_preprocessor_command
()
^
Pretty_utils
.
sfprintf
" -I%s"
(
Options
.
Share
.
dir
~
error
:
true
()
)))
in
List
.
iter
register
(
Misc
.
library_files
()
)
in
in
List
.
iter
register
(
Misc
.
library_files
()
)
if
Ast
.
is_computed
()
then
begin
(* do not modify the existing project: work on a copy.
Must also extend the current AST with the E-ACSL's library files. *)
let
name
=
Project
.
get_name
(
Project
.
current
()
)
in
let
tmpfile
=
Extlib
.
temp_file_cleanup_at_exit
(
"e_acsl_"
^
name
)
".i"
in
let
cout
=
open_out
tmpfile
in
let
fmt
=
Format
.
formatter_of_out_channel
cout
in
File
.
pretty_ast
~
fmt
()
;
let
selection
=
State_selection
.
diff
State_selection
.
full
(
State_selection
.
with_dependencies
Ast
.
self
)
in
let
prj
=
Project
.
create_by_copy
~
selection
(
Pretty_utils
.
sfprintf
"%s for E-ACSL"
name
)
in
Project
.
on
prj
(
fun
()
->
Kernel
.
Files
.
set
[
tmpfile
];
extend
()
)
()
;
analyzed_project
:=
Some
prj
end
else
extend
()
end
end
let
()
=
Cmdline
.
run_after_configuring_stage
add_e_acsl_library
let
()
=
Cmdline
.
run_after_configuring_stage
add_e_acsl_library
let
main
()
=
let
analyze
()
=
if
Options
.
must_visit
()
then
Pre_analysis
.
init_mpz
()
;
if
Options
.
must_visit
()
then
Pre_analysis
.
init_mpz
()
;
if
Options
.
Run
.
get
()
then
if
Options
.
Run
.
get
()
then
ignore
(
generate_code
(
Options
.
Project_name
.
get
()
))
ignore
(
generate_code
(
Options
.
Project_name
.
get
()
))
else
else
if
Options
.
Check
.
get
()
then
ignore
(
check
()
)
if
Options
.
Check
.
get
()
then
ignore
(
check
()
)
let
main
()
=
match
!
analyzed_project
with
|
None
->
analyze
()
|
Some
project
->
Project
.
on
project
analyze
()
;
Project
.
remove
~
project
()
let
()
=
Db
.
Main
.
extend
main
let
()
=
Db
.
Main
.
extend
main
(*
(*
...
...
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