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
d9baaf60
Commit
d9baaf60
authored
1 year ago
by
Kilyan Le Gallic
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Use of builtin iter function for debug output
parent
7510d2df
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
+4
-6
4 additions, 6 deletions
src/plugins/wp/Why3Import.ml
with
4 additions
and
6 deletions
src/plugins/wp/Why3Import.ml
+
4
−
6
View file @
d9baaf60
...
@@ -64,7 +64,6 @@ let rec lt_of_ty (tenv : tenv) (tvs : tvars) (ty: W.Ty.ty) : C.logic_type =
...
@@ -64,7 +64,6 @@ let rec lt_of_ty (tenv : tenv) (tvs : tvars) (ty: W.Ty.ty) : C.logic_type =
|
Tyapp
(
s
,
ts
)
->
C
.
Ltype
(
ls_of_ts
tenv
s
,
List
.
map
(
lt_of_ty
tenv
tvs
)
ts
)
|
Tyapp
(
s
,
ts
)
->
C
.
Ltype
(
ls_of_ts
tenv
s
,
List
.
map
(
lt_of_ty
tenv
tvs
)
ts
)
and
ls_of_ts
(
tenv
:
tenv
)
(
ts
:
W
.
Ty
.
tysymbol
)
:
C
.
logic_type_info
=
and
ls_of_ts
(
tenv
:
tenv
)
(
ts
:
W
.
Ty
.
tysymbol
)
:
C
.
logic_type_info
=
try
W
.
Ty
.
Hts
.
find
tenv
ts
with
Not_found
->
try
W
.
Ty
.
Hts
.
find
tenv
ts
with
Not_found
->
let
temp_env
:
uid_tvars
=
let
temp_env
:
uid_tvars
=
List
.
fold_left
List
.
fold_left
...
@@ -92,10 +91,6 @@ and lt_def_of_ts (tenv:tenv) (ts : W.Ty.tysymbol) (temp_env : uid_tvars) =
...
@@ -92,10 +91,6 @@ and lt_def_of_ts (tenv:tenv) (ts : W.Ty.tysymbol) (temp_env : uid_tvars) =
|
NoDef
|
Range
_
|
Float
_
->
None
|
NoDef
|
Range
_
|
Float
_
->
None
|
Alias
ty
->
|
Alias
ty
->
let
tvars
=
let
tvars
=
(* List.fold_left
(fun (tvs: tvars) (tv: W.Ty.tvsymbol) ->
W.Ty.Mtv.add tv (C.Lvar tv.tv_name.id_string) tvs
) W.Ty.Mtv.empty ts.ts_args *)
W
.
Ty
.
Mtv
.
map
(
fun
aleph_name
->
C
.
Lvar
aleph_name
)
temp_env
W
.
Ty
.
Mtv
.
map
(
fun
aleph_name
->
C
.
Lvar
aleph_name
)
temp_env
in
in
Some
(
C
.
LTsyn
(
lt_of_ty
tenv
tvars
ty
))
Some
(
C
.
LTsyn
(
lt_of_ty
tenv
tvars
ty
))
...
@@ -144,8 +139,11 @@ let () =
...
@@ -144,8 +139,11 @@ let () =
let
env
=
create_why3_env
@@
L
.
Library
.
get
()
in
let
env
=
create_why3_env
@@
L
.
Library
.
get
()
in
let
tenv
:
tenv
=
W
.
Ty
.
Hts
.
create
3
in
let
tenv
:
tenv
=
W
.
Ty
.
Hts
.
create
3
in
List
.
iter
(
import_theory
env
tenv
)
@@
L
.
Import
.
get
()
;
List
.
iter
(
import_theory
env
tenv
)
@@
L
.
Import
.
get
()
;
Seq
.
iter
(
fun
(
lti
:
C
.
logic_type_info
)
->
L
.
debug
"LTI %a"
pp_lti
lti
)
(
W
.
Ty
.
Hts
.
to_seq_values
tenv
);
L
.
debug
~
level
:
0
"Length of type environment : %d "
(
W
.
Ty
.
Hts
.
length
tenv
);
L
.
debug
~
level
:
0
"Length of type environment : %d "
(
W
.
Ty
.
Hts
.
length
tenv
);
W
.
Ty
.
Hts
.
iter
(
fun
(
ty
)
(
lti
)
->
L
.
debug
~
level
:
0
"TY %a"
pp_id
ty
.
ts_name
;
L
.
debug
~
level
:
0
"LTI %a"
pp_lti
lti
;
)
tenv
end
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