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
875b043e
Commit
875b043e
authored
10 months ago
by
Kilyan Le Gallic
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Printing functions parameters, additionnal debug info at level 2/3
parent
28e54817
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/wp/Why3Import.ml
+17
-5
17 additions, 5 deletions
src/plugins/wp/Why3Import.ml
with
17 additions
and
5 deletions
src/plugins/wp/Why3Import.ml
+
17
−
5
View file @
875b043e
...
...
@@ -92,9 +92,15 @@ let pp_lti fmt (lti : C.logic_type_info) =
let
pp_li
fmt
(
li
:
C
.
logic_info
)
=
Cpp
.
pp_logic_info
fmt
li
(* -------------------------------------------------------------------------- *)
(* --- Types --- *)
(* -------------------------------------------------------------------------- *)
(* For debug only*)
let
pp_lvs
fmt
(
lvs
:
C
.
logic_var
list
)
=
List
.
iter
(
fun
(
lv
:
C
.
logic_var
)
->
Cpp
.
pp_logic_var
fmt
lv
;
Cpp
.
pp_logic_type
fmt
lv
.
lv_type
)
lvs
;
(* -------------------------------------------------------------------------- *)
(* --- Types --- *)
(* -------------------------------------------------------------------------- *)
type
tenv
=
C
.
logic_type_info
W
.
Ty
.
Hts
.
t
type
lenv
=
C
.
logic_info
W
.
Term
.
Hls
.
t
...
...
@@ -114,10 +120,15 @@ let _populate_tenv_builtin (tenv:tenv) =
(* -------------------------------------------------------------------------- *)
let
tvars_of_txs
(
txs
:
W
.
Ty
.
tvsymbol
list
)
:
string
list
*
tvars
=
L
.
debug
~
level
:
3
"Called tvars_of_txs"
;
List
.
iter
(
fun
(
tv
:
W
.
Ty
.
tvsymbol
)
->
L
.
debug
~
level
:
3
"Name of : %a"
pp_id
tv
.
tv_name
)
txs
;
List
.
fold_right
(
fun
(
tv
:
W
.
Ty
.
tvsymbol
)
(
txs
,
tvs
)
->
let
x
=
tv
.
tv_name
.
id_string
in
x
::
txs
,
W
.
Ty
.
Mtv
.
add
tv
(
C
.
Lvar
x
)
tvs
match
x
with
|
"int"
->
x
::
txs
,
W
.
Ty
.
Mtv
.
add
tv
(
C
.
Linteger
)
tvs
|
_
->
x
::
txs
,
W
.
Ty
.
Mtv
.
add
tv
(
C
.
Lvar
x
)
tvs
)
txs
([]
,
W
.
Ty
.
Mtv
.
empty
)
...
...
@@ -241,7 +252,8 @@ let () =
)
tenv
;
W
.
Term
.
Hls
.
iter
(
fun
(
ls
)
(
li
)
->
L
.
debug
~
level
:
1
"Why3 logic symbol : %a"
pp_ls
ls
;
L
.
debug
~
level
:
1
"Corresponding CIL logic info %a"
pp_li
li
;
L
.
debug
~
level
:
1
"Corresponding CIL logic info : %a"
pp_li
li
;
L
.
debug
~
level
:
1
"Associated parameters : %a"
pp_lvs
li
.
l_profile
;
)
lenv
end
...
...
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