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
5a1d9712
Commit
5a1d9712
authored
8 months ago
by
Kilyan Le Gallic
Committed by
Allan Blanchard
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Added sort of functions parameters and return type in driver import
parent
64c75f6e
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
+12
-1
12 additions, 1 deletion
src/plugins/wp/Why3Import.ml
with
12 additions
and
1 deletion
src/plugins/wp/Why3Import.ml
+
12
−
1
View file @
5a1d9712
...
...
@@ -249,6 +249,15 @@ let kind_of_lt (lt : C.logic_type) : LB.kind =
let
kind_of_lv
(
lv
:
C
.
logic_var
)
:
LB
.
kind
=
kind_of_lt
lv
.
lv_type
let
sort_of_lt
(
lt
:
C
.
logic_type
)
:
Qed
.
Logic
.
sort
=
match
lt
with
|
C
.
Linteger
->
Qed
.
Logic
.
Sint
|
C
.
Lreal
->
Qed
.
Logic
.
Sreal
|
_
->
Qed
.
Logic
.
Sdata
let
sort_of_lv
(
lv
:
C
.
logic_var
)
:
Qed
.
Logic
.
sort
=
sort_of_lt
lv
.
lv_type
(* -------------------------------------------------------------------------- *)
(* --- Theory --- *)
(* -------------------------------------------------------------------------- *)
...
...
@@ -339,8 +348,10 @@ let loader (ctxt: Logic_typing.module_builder) (_: C.location) (m: string list)
ctxt
.
add_logic_function
loc
li
;
let
ls
=
Logic_info
.
Hashtbl
.
find
env
.
lils
li
in
let
(
package
,
theory
,
name
)
=
T
.
restore_path
ls
.
ls_name
in
let
params
=
List
.
map
(
sort_of_lv
)
li
.
l_profile
in
let
result
=
sort_of_lt
@@
Option
.
get
(
li
.
l_type
)
in
LB
.
add_builtin
thname
(
List
.
map
(
kind_of_lv
)
li
.
l_profile
)
@@
Lang
.
imported_f
~
package
~
theory
~
name
()
;
Lang
.
imported_f
~
package
~
theory
~
name
~
params
~
result
()
;
)
current_module
.
logics
;
L
.
result
"Successfully imported theory at %s"
@@
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