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
501146b0
Commit
501146b0
authored
1 year ago
by
Kilyan Le Gallic
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Create dynamically envrionment from user provided parameters
parent
b21e4dc1
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
+32
-13
32 additions, 13 deletions
src/plugins/wp/Why3Import.ml
with
32 additions
and
13 deletions
src/plugins/wp/Why3Import.ml
+
32
−
13
View file @
501146b0
...
@@ -29,9 +29,11 @@ module WConf = Why3.Whyconf
...
@@ -29,9 +29,11 @@ module WConf = Why3.Whyconf
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
let
create_why3_env
=
let
create_why3_env
loadpath
=
begin
fun
()
->
begin
fun
()
->
W
.
Env
.
create_env
(
WConf
.
loadpath
(
WConf
.
get_main
(
WConf
.
read_config
None
)))
let
main
=
WConf
.
get_main
(
WConf
.
read_config
None
)
in
let
loadpathes
=
(
WConf
.
loadpath
(
main
))
@
loadpath
in
W
.
Env
.
create_env
loadpathes
end
end
(* let rec get_ty_symbols_from_ty (tys : W.Ty.tysymbol) (tymap) =
(* let rec get_ty_symbols_from_ty (tys : W.Ty.tysymbol) (tymap) =
...
@@ -54,19 +56,36 @@ let () =
...
@@ -54,19 +56,36 @@ let () =
(
fun
thy
->
(
fun
thy
->
L
.
debug
~
level
:
0
" + THY %s@."
thy
L
.
debug
~
level
:
0
" + THY %s@."
thy
)
thys
;
)
thys
;
let
loadpath
=
(
WConf
.
loadpath
(
WConf
.
get_main
(
WConf
.
read_config
None
)))
in
List
.
iter
(
fun
lpath
->
L
.
debug
~
level
:
0
" Loadpath %s@."
lpath
)
loadpath
;
let
_libs
=
L
.
Library
.
get
()
in
let
libs
=
L
.
Library
.
get
()
in
let
thys
=
L
.
Import
.
get
()
in
let
_thys
=
L
.
Import
.
get
()
in
let
env
=
create_why3_env
()
in
let
env
=
create_why3_env
(
F
.
to_string_list
libs
)
()
in
let
loadpath
=
W
.
Env
.
get_loadpath
env
in
List
.
iter
List
.
iter
(
fun
thy
->
(
fun
lpath
->
let
_ns
=
(
W
.
Env
.
read_theory
env
[
"summodule"
]
"Sum"
)
.
th_export
in
L
.
debug
~
level
:
0
" Loadpath %s@."
lpath
let
_t
=
(
W
.
Wstdlib
.
Mstr
.
values
(
_ns
.
ns_ts
))
in
)
loadpath
;
List
.
iter
(
(* List.iter
fun
_ty
->
(fun _thy ->
L
.
debug
"J'ai un TySymbol"
;
try let _ns = (W.Env.read_theory env ["vlist"] "NexistePas") in
)
_t
;
W.Pretty.print_theory Format.std_formatter _ns;
)
thys
;
with W.Env.LibraryNotFound paths ->
List.iter (
fun path ->
L.debug ~level:0 "[ %s @.]" path;
) paths;
(* let _ns = (W.Env.read_theory env (F.to_string_list libs) thy).th_export in *)
(* let _t = (W.Wstdlib.Mstr.values (_ns.ns_ts)) in
L.debug "Nombres de itys trucs : %d" (List.length _t); *)
) thys ; *)
(* let env = create_why3_env () in
(* let env = create_why3_env () in
let _ns = (W.Env.read_theory env ["summodule"] "Sum") in
let _ns = (W.Env.read_theory env ["summodule"] "Sum") in
L.debug ""; *)
L.debug ""; *)
...
...
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