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
3c0b34de
Commit
3c0b34de
authored
1 year ago
by
Kilyan Le Gallic
Committed by
Loïc Correnson
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Cache pattern for theory retrieval, to be corrected
parent
450dbec0
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
+15
-2
15 additions, 2 deletions
src/plugins/wp/Why3Import.ml
with
15 additions
and
2 deletions
src/plugins/wp/Why3Import.ml
+
15
−
2
View file @
3c0b34de
...
...
@@ -59,6 +59,17 @@ let extract_theory_path struc_theories =
let ty = tys.tysymbol in
tymap <- Mty.add tys.tysymbol tymap; *)
let
get_name_from_ident
(
ident
)
=
let
ident_printer
=
W
.
Ident
.
create_ident_printer
[]
in
W
.
Ident
.
id_unique
(
ident_printer
)
ident
let
get_theory_from_user
(
env
)
(
path
)
(
name
)
(
map
)
=
let
theory
=
W
.
Env
.
read_theory
env
([
String
.
concat
"."
path
])
name
in
let
theory_uid
=
(
get_name_from_ident
(
theory
.
th_name
))
in
try
W
.
Wstdlib
.
Mstr
.
find
theory_uid
map
in
map
with
Not_found
->
W
.
Wstdlib
.
Mstr
.
add
(
theory_uid
)
(
theory
)
map
let
()
=
Boot
.
Main
.
extend
...
...
@@ -91,6 +102,7 @@ let () =
let
libs
=
L
.
Library
.
get
()
in
let
thys
=
L
.
Import
.
get
()
in
let
theories_map
:
W
.
Theory
.
theory
W
.
Wstdlib
.
Mstr
.
t
=
W
.
Wstdlib
.
Mstr
.
empty
in
let
env
=
create_why3_env
(
F
.
to_string_list
libs
)
()
in
let
loadpath
=
W
.
Env
.
get_loadpath
env
in
List
.
iter
...
...
@@ -100,8 +112,9 @@ let () =
List
.
iter
(
fun
(
thy_n
,
thy_p
)
->
try
let
_ns
=
(
W
.
Env
.
read_theory
env
([
String
.
concat
"."
thy_p
])
(
thy_n
))
in
W
.
Pretty
.
print_theory
Format
.
std_formatter
_ns
;
let
theory
=
(
W
.
Env
.
read_theory
env
([
String
.
concat
"."
thy_p
])
(
thy_n
))
in
in
W
.
Pretty
.
print_theory
Format
.
std_formatter
theory
;
L
.
debug
~
level
:
0
"INTHY %s"
thy_n
;
with
W
.
Env
.
LibraryNotFound
paths
->
...
...
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