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
64c75f6e
Commit
64c75f6e
authored
8 months ago
by
Kilyan Le Gallic
Committed by
Allan Blanchard
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Fixed type import to driver, removed unused pretty printer
parent
9cec9c54
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
+3
-27
3 additions, 27 deletions
src/plugins/wp/Why3Import.ml
with
3 additions
and
27 deletions
src/plugins/wp/Why3Import.ml
+
3
−
27
View file @
64c75f6e
...
@@ -60,7 +60,6 @@ let of_infix s =
...
@@ -60,7 +60,6 @@ let of_infix s =
let
construct_acsl_name
(
id
:
W
.
Ident
.
ident
)
=
let
construct_acsl_name
(
id
:
W
.
Ident
.
ident
)
=
let
(
paths
,
name
,
scopes
)
=
T
.
restore_path
id
in
let
(
paths
,
name
,
scopes
)
=
T
.
restore_path
id
in
List
.
iter
(
L
.
result
"scope :::: %s"
)
scopes
;
match
List
.
rev
scopes
with
match
List
.
rev
scopes
with
|
(
t
::
q
)
->
|
(
t
::
q
)
->
String
.
concat
"::"
(
paths
@
name
::
List
.
rev_append
q
[
of_infix
t
])
String
.
concat
"::"
(
paths
@
name
::
List
.
rev_append
q
[
of_infix
t
])
...
@@ -70,14 +69,6 @@ let construct_acsl_name (id : W.Ident.ident) =
...
@@ -70,14 +69,6 @@ let construct_acsl_name (id : W.Ident.ident) =
let
pp_id
fmt
(
id
:
W
.
Ident
.
ident
)
=
let
pp_id
fmt
(
id
:
W
.
Ident
.
ident
)
=
Format
.
pp_print_string
fmt
id
.
id_string
Format
.
pp_print_string
fmt
id
.
id_string
(* For debug only*)
let
_pp_tys
fmt
(
tys
:
W
.
Ty
.
tysymbol
)
=
W
.
Pretty
.
print_ty_decl
fmt
tys
(* For debug only*)
let
_pp_ls
fmt
ls
=
W
.
Pretty
.
print_ls
fmt
ls
(* For debug only*)
(* For debug only*)
let
pp_id_loc
fmt
(
id
:
W
.
Ident
.
ident
)
=
let
pp_id_loc
fmt
(
id
:
W
.
Ident
.
ident
)
=
match
id
.
id_loc
with
match
id
.
id_loc
with
...
@@ -92,13 +83,6 @@ let pp_lti fmt (lti : C.logic_type_info) =
...
@@ -92,13 +83,6 @@ let pp_lti fmt (lti : C.logic_type_info) =
let
pp_li
fmt
(
li
:
C
.
logic_info
)
=
let
pp_li
fmt
(
li
:
C
.
logic_info
)
=
Cpp
.
pp_logic_info
fmt
li
Cpp
.
pp_logic_info
fmt
li
(* For debug only*)
let
_pp_lvs
fmt
(
lvs
:
C
.
logic_var
list
)
=
List
.
iter
(
fun
(
lv
:
C
.
logic_var
)
->
Format
.
fprintf
fmt
"@ %a: %a"
Cpp
.
pp_logic_var
lv
Cpp
.
pp_logic_type
lv
.
lv_type
)
lvs
(* -------------------------------------------------------------------------*)
(* -------------------------------------------------------------------------*)
(* --- Types - *)
(* --- Types - *)
(* -------------------------------------------------------------------------*)
(* -------------------------------------------------------------------------*)
...
@@ -181,12 +165,6 @@ let convert_location (wloc : Why3.Loc.position option) : C.location =
...
@@ -181,12 +165,6 @@ let convert_location (wloc : Why3.Loc.position option) : C.location =
(
Position
.
unknown
,
Position
.
unknown
)
(
Position
.
unknown
,
Position
.
unknown
)
(* For debug use only *)
let
_pp_cil_loc
fmt
(
id
:
W
.
Ident
.
ident
)
=
Cpp
.
pp_location
fmt
@@
convert_location
id
.
id_loc
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
(* --- Type conversion --- *)
(* --- Type conversion --- *)
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
...
@@ -354,17 +332,15 @@ let loader (ctxt: Logic_typing.module_builder) (_: C.location) (m: string list)
...
@@ -354,17 +332,15 @@ let loader (ctxt: Logic_typing.module_builder) (_: C.location) (m: string list)
List
.
iter
(
fun
(
lti
,
loc
)
->
List
.
iter
(
fun
(
lti
,
loc
)
->
ctxt
.
add_logic_type
loc
lti
;
ctxt
.
add_logic_type
loc
lti
;
let
ty
=
Logic_type_info
.
Hashtbl
.
find
env
.
ltits
lti
in
let
ty
=
Logic_type_info
.
Hashtbl
.
find
env
.
ltits
lti
in
let
(
_
,
theory
,
_
)
=
T
.
restore_path
ty
.
ts_name
in
let
(
package
,
theory
,
name
)
=
T
.
restore_path
ty
.
ts_name
in
LB
.
add_type
thname
~
library
:
theory
()
;
LB
.
add_
builtin_
type
thname
@@
Lang
.
imported_t
~
package
~
theory
~
name
;
)
current_module
.
types
;
)
current_module
.
types
;
List
.
iter
(
fun
(
li
,
loc
)
->
List
.
iter
(
fun
(
li
,
loc
)
->
ctxt
.
add_logic_function
loc
li
;
ctxt
.
add_logic_function
loc
li
;
L
.
result
"%s"
li
.
l_var_info
.
lv_name
;
let
ls
=
Logic_info
.
Hashtbl
.
find
env
.
lils
li
in
let
ls
=
Logic_info
.
Hashtbl
.
find
env
.
lils
li
in
let
(
package
,
theory
,
name
)
=
T
.
restore_path
ls
.
ls_name
in
let
(
package
,
theory
,
name
)
=
T
.
restore_path
ls
.
ls_name
in
LB
.
add_builtin
thname
(
List
.
map
(
kind_of_lv
)
li
.
l_profile
)
@@
LB
.
add_builtin
thname
(
List
.
map
(
kind_of_lv
)
li
.
l_profile
)
@@
Lang
.
imported_f
~
package
:
package
~
theory
:
theory
~
name
:
name
()
;
Lang
.
imported_f
~
package
~
theory
~
name
()
;
)
current_module
.
logics
;
)
current_module
.
logics
;
L
.
result
"Successfully imported theory at %s"
L
.
result
"Successfully imported theory at %s"
@@
String
.
concat
"::"
current_module
.
paths
;
@@
String
.
concat
"::"
current_module
.
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