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
24c9bdf3
Commit
24c9bdf3
authored
10 months ago
by
Kilyan Le Gallic
Committed by
Loïc Correnson
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Populated and print pf reverse tables, to be refactored
parent
96690ed5
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
+23
-7
23 additions, 7 deletions
src/plugins/wp/Why3Import.ml
with
23 additions
and
7 deletions
src/plugins/wp/Why3Import.ml
+
23
−
7
View file @
24c9bdf3
...
...
@@ -154,7 +154,6 @@ let add_builtins env =
(* -------------------------------------------------------------------------- *)
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
...
...
@@ -186,11 +185,17 @@ and lti_of_ts (env : env) (ts : W.Ty.tysymbol) : C.logic_type_info =
lt_attr
=
[]
;
}
in
W
.
Ty
.
Hts
.
add
env
.
tenv
ts
lti
;
Logic_type_info
.
Hashtbl
.
add
env
.
ltits
lti
ts
;
let
cwmod
=
Datatype
.
String
.
Hashtbl
.
find
env
.
menv
@@
recover_module
ts
.
ts_name
in
Datatype
.
String
.
Hashtbl
.
replace
env
.
menv
(
recover_module
ts
.
ts_name
)
{
cwmod
with
types
=
cwmod
.
types
@
[
lti
]};
lti
try
begin
let
_
=
(
Logic_type_info
.
Hashtbl
.
find
env
.
ltits
lti
)
in
lti
end
with
Not_found
->
Logic_type_info
.
Hashtbl
.
add
env
.
ltits
lti
ts
;
lti
(* -------------------------------------------------------------------------- *)
...
...
@@ -228,7 +233,10 @@ let li_of_ls (env:env) (ls : W.Term.lsymbol) : C.logic_info =
let
cwmod
=
Datatype
.
String
.
Hashtbl
.
find
env
.
menv
@@
recover_module
ls
.
ls_name
in
Datatype
.
String
.
Hashtbl
.
replace
env
.
menv
(
recover_module
ls
.
ls_name
)
{
cwmod
with
logics
=
cwmod
.
logics
@
[
li
]};
li
try
begin
let
_
=
(
Logic_info
.
Hashtbl
.
find
env
.
lils
li
)
in
li
end
with
Not_found
->
Logic_info
.
Hashtbl
.
add
env
.
lils
li
ls
;
li
(* -------------------------------------------------------------------------- *)
...
...
@@ -310,12 +318,20 @@ let () =
Datatype
.
String
.
Hashtbl
.
iter
(
fun
(
s
)
(
why3mod
)
->
L
.
result
"@[Module %s at %s@]"
s
(
String
.
concat
"::"
why3mod
.
paths
);
List
.
iter
(
fun
(
li
)
->
L
.
result
"Logic : @[<hov
2
>%a@]"
pp_li
li
)
L
.
result
"Logic : @[<hov
1
>%a@]"
pp_li
li
)
why3mod
.
logics
;
List
.
iter
(
fun
(
lti
)
->
L
.
result
"Type : @[<hov
2
>%a@]"
pp_lti
lti
)
L
.
result
"Type : @[<hov
1
>%a@]"
pp_lti
lti
)
why3mod
.
types
;
)
env
.
menv
)
env
.
menv
;
Logic_type_info
.
Hashtbl
.
iter
(
fun
(
lti
)
(
ts
)
->
L
.
result
"Logic type info : %a is associated to ts : %a "
pp_lti
lti
pp_tys
ts
)
env
.
ltits
;
Logic_info
.
Hashtbl
.
iter
(
fun
(
li
)
(
ls
)
->
L
.
result
"Logic info %a is associated to ls : %a "
pp_li
li
pp_ls
ls
)
env
.
lils
;
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