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
54a7dd39
Commit
54a7dd39
authored
10 months ago
by
Kilyan Le Gallic
Committed by
Loïc Correnson
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Fixed module local env
parent
b2636218
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
+19
-8
19 additions, 8 deletions
src/plugins/wp/Why3Import.ml
with
19 additions
and
8 deletions
src/plugins/wp/Why3Import.ml
+
19
−
8
View file @
54a7dd39
...
...
@@ -109,9 +109,9 @@ type env = {
wenv
:
W
.
Env
.
env
;
tenv
:
C
.
logic_type_info
W
.
Ty
.
Hts
.
t
;
lenv
:
C
.
logic_info
W
.
Term
.
Hls
.
t
;
_
lils
:
W
.
Term
.
lsymbol
Logic_info
.
Hashtbl
.
t
;
_
ltits
:
W
.
Ty
.
tysymbol
Logic_type_info
.
Hashtbl
.
t
;
_menv
:
C
.
global
Datatype
.
String
.
Hashtbl
.
t
lils
:
W
.
Term
.
lsymbol
Logic_info
.
Hashtbl
.
t
;
ltits
:
W
.
Ty
.
tysymbol
Logic_type_info
.
Hashtbl
.
t
;
_menv
:
(
list
C
.
global
_annotation
)
Datatype
.
String
.
Hashtbl
.
t
}
...
...
@@ -177,7 +177,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
;
Logic_type_info
.
Hashtbl
.
add
env
.
ltits
lti
ts
;
let
_gtype
:
C
.
typeinfo
=
C
.{
torig_name
=
ts
.
ts_name
.
id_string
;
}
(* Datatype.String.Hashtbl.add env._menv (construct_acsl_name ts.ts_name)
C.GType (
C.{
torig_name = ts.ts_name.id_string;
tname = ts.ts_name.id_string;
}
); *)
lti
...
...
@@ -212,7 +222,8 @@ let li_of_ls (env:env) (ls : W.Term.lsymbol) : C.logic_info =
l_profile
;
l_body
=
C
.
LBnone
;
}
in
W
.
Term
.
Hls
.
add
env
.
lenv
ls
li
;
Logic_info
.
Hashtbl
.
add
env
._
lils
li
ls
;
Logic_info
.
Hashtbl
.
add
env
.
lils
li
ls
;
li
...
...
@@ -275,10 +286,10 @@ let () =
let
wenv
=
create_why3_env
@@
libs
in
let
tenv
=
W
.
Ty
.
Hts
.
create
0
in
let
lenv
=
W
.
Term
.
Hls
.
create
0
in
let
_
lils
=
Logic_info
.
Hashtbl
.
create
0
in
let
_
ltits
=
Logic_type_info
.
Hashtbl
.
create
0
in
let
lils
=
Logic_info
.
Hashtbl
.
create
0
in
let
ltits
=
Logic_type_info
.
Hashtbl
.
create
0
in
let
_menv
=
Datatype
.
String
.
Hashtbl
.
create
0
in
let
env
:
env
=
{
wenv
;
tenv
;
lenv
;
_
lils
;
_
ltits
;
_menv
}
in
let
env
:
env
=
{
wenv
;
tenv
;
lenv
;
lils
;
ltits
;
_menv
}
in
add_builtins
env
;
List
.
iter
(
import_theory
env
)
@@
imports
;
W
.
Ty
.
Hts
.
iter
(
fun
(
tys
)
(
lti
)
->
...
...
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