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
2065e993
Commit
2065e993
authored
8 months ago
by
Kilyan Le Gallic
Committed by
Allan Blanchard
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Moved kind and sort functions to be localized
parent
af2780be
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
+18
-17
18 additions, 17 deletions
src/plugins/wp/Why3Import.ml
with
18 additions
and
17 deletions
src/plugins/wp/Why3Import.ml
+
18
−
17
View file @
2065e993
...
...
@@ -241,23 +241,6 @@ let li_of_ls (env:env) (menv : menv) (ls : W.Term.lsymbol) : C.logic_info =
Logic_info
.
Hashtbl
.
add
env
.
lils
li
ls
;
li
let
kind_of_lt
(
lt
:
C
.
logic_type
)
:
LB
.
kind
=
match
lt
with
|
C
.
Linteger
->
LB
.
Z
|
C
.
Lreal
->
LB
.
R
|
_
->
LB
.
A
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 --- *)
...
...
@@ -302,6 +285,24 @@ let parse_theory (env) (theory_name) (theory_path) (menv)=
L
.
error
"Library %s not found"
theory_name
let
register_builtin
env
thname
=
let
kind_of_lt
(
lt
:
C
.
logic_type
)
:
LB
.
kind
=
match
lt
with
|
C
.
Linteger
->
LB
.
Z
|
C
.
Lreal
->
LB
.
R
|
_
->
LB
.
A
in
let
kind_of_lv
(
lv
:
C
.
logic_var
)
:
LB
.
kind
=
kind_of_lt
lv
.
lv_type
in
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
in
let
sort_of_lv
(
lv
:
C
.
logic_var
)
:
Qed
.
Logic
.
sort
=
sort_of_lt
lv
.
lv_type
in
begin
let
current_module
=
Datatype
.
String
.
Hashtbl
.
find
env
.
menv
thname
in
List
.
iter
(
fun
(
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