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
b21e4dc1
Commit
b21e4dc1
authored
1 year ago
by
Kilyan Le Gallic
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Better PoC and working theory/module opening, TBD user inputs
parent
7efbf34f
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
+9
-9
9 additions, 9 deletions
src/plugins/wp/Why3Import.ml
with
9 additions
and
9 deletions
src/plugins/wp/Why3Import.ml
+
9
−
9
View file @
b21e4dc1
...
...
@@ -22,6 +22,7 @@
module
L
=
Wp_parameters
module
P
=
Why3
.
Pmodule
module
T
=
Why3
.
Theory
module
F
=
Filepath
.
Normalized
module
W
=
Why3
module
WConf
=
Why3
.
Whyconf
...
...
@@ -33,11 +34,11 @@ let create_why3_env =
W
.
Env
.
create_env
(
WConf
.
loadpath
(
WConf
.
get_main
(
WConf
.
read_config
None
)))
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) =
try W.Wstdlib.Mstr.find tymap tys
with Not_found ->
let ty = tys.tysymbol in
tymap
<-
Mty
.
add
tys
.
tysymbol
tymap
;
tymap <- Mty.add tys.tysymbol tymap;
*)
let
()
=
...
...
@@ -54,21 +55,20 @@ let () =
L
.
debug
~
level
:
0
" + THY %s@."
thy
)
thys
;
let
libs
=
L
.
Library
.
get
()
in
let
_
libs
=
L
.
Library
.
get
()
in
let
thys
=
L
.
Import
.
get
()
in
let
env
=
create_why3_env
()
in
List
.
iter
(
fun
thy
->
let
ns
=
(
P
.
read_
module
env
(
F
.
to_string_list
libs
)
thy
)
.
mod
_export
in
let
_t
=
List
.
map
(
fun
(
ity
:
W
.
Ity
.
itysymbol
)
->
ity
.
its_ts
)
(
W
.
Wstdlib
.
Mstr
.
values
(
ns
.
ns_ts
))
in
let
_
ns
=
(
W
.
Env
.
read_
theory
env
[
"summodule"
]
"Sum"
)
.
th
_export
in
let
_t
=
(
W
.
Wstdlib
.
Mstr
.
values
(
_
ns
.
ns_ts
))
in
List
.
iter
(
fun
_ty
->
match
W
.
Ty
.
ts_hash
_ty
with
|
1
->
L
.
debug
"NoDef %s@."
thy
|
_
->
L
.
debug
"Otr %s@."
thy
L
.
debug
"J'ai un TySymbol"
;
)
_t
;
)
thys
;
(* let _ns = (P.read_module env (F.to_string_list libs) (List.hd thys)).mod_export in
(* let env = create_why3_env () in
let _ns = (W.Env.read_theory env ["summodule"] "Sum") in
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