Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
126
Issues
126
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
e59abf8f
Commit
e59abf8f
authored
Jun 19, 2015
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mlw: rename Mdecl and Wmodule to avoid name clashes
parent
dfd0187f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
132 additions
and
127 deletions
+132
-127
Makefile.in
Makefile.in
+1
-1
src/mlw/pdecl.ml
src/mlw/pdecl.ml
+50
-45
src/mlw/pdecl.mli
src/mlw/pdecl.mli
+26
-26
src/mlw/pmodule.ml
src/mlw/pmodule.ml
+28
-28
src/mlw/pmodule.mli
src/mlw/pmodule.mli
+27
-27
No files found.
Makefile.in
View file @
e59abf8f
...
...
@@ -152,7 +152,7 @@ LIB_DRIVER = call_provers driver_ast driver_parser driver_lexer driver \
whyconf autodetection
\
parse_smtv2_model_parser parse_smtv2_model_lexer parse_smtv2_model
LIB_MLW
=
ity
expr
dexpr
mdecl w
module
LIB_MLW
=
ity
expr
dexpr
pdecl p
module
LIB_PARSER
=
ptree glob parser typing lexer
...
...
src/mlw/
m
decl.ml
→
src/mlw/
p
decl.ml
View file @
e59abf8f
...
...
@@ -142,21 +142,21 @@ let create_rec_variant_decl s cl =
(** {2 Module declarations} *)
type
m
decl
=
{
md_node
:
m
decl_node
;
m
d_pure
:
Decl
.
decl
list
;
m
d_syms
:
Sid
.
t
;
m
d_news
:
Sid
.
t
;
m
d_tag
:
int
;
type
p
decl
=
{
pd_node
:
p
decl_node
;
p
d_pure
:
Decl
.
decl
list
;
p
d_syms
:
Sid
.
t
;
p
d_news
:
Sid
.
t
;
p
d_tag
:
int
;
}
and
m
decl_node
=
|
M
Dtype
of
its_defn
list
|
M
Dlet
of
let_defn
|
M
Dexn
of
xsymbol
|
M
Dpure
and
p
decl_node
=
|
P
Dtype
of
its_defn
list
|
P
Dlet
of
let_defn
|
P
Dexn
of
xsymbol
|
P
Dpure
let
md_equal
:
mdecl
->
m
decl
->
bool
=
(
==
)
let
pd_equal
:
pdecl
->
p
decl
->
bool
=
(
==
)
let
get_news
node
pure
=
let
news_id
s
id
=
Sid
.
add_new
(
Decl
.
ClashIdent
id
)
id
s
in
...
...
@@ -164,19 +164,19 @@ let get_news node pure =
let
news_pure
news
d
=
Sid
.
union
news
d
.
Decl
.
d_news
in
let
news
=
List
.
fold_left
news_pure
Sid
.
empty
pure
in
match
node
with
|
M
Dtype
dl
->
|
P
Dtype
dl
->
let
news_itd
news
d
=
let
news
=
news_id
news
d
.
itd_its
.
its_ts
.
ts_name
in
let
news
=
List
.
fold_left
news_rs
news
d
.
itd_fields
in
List
.
fold_left
news_rs
news
d
.
itd_constructors
in
List
.
fold_left
news_itd
news
dl
|
M
Dlet
(
LDvar
(
v
,_
))
->
news_id
news
v
.
pv_vs
.
vs_name
|
M
Dlet
(
LDsym
(
s
,_
))
->
news_id
news
s
.
rs_name
|
M
Dlet
(
LDrec
rdl
)
->
|
P
Dlet
(
LDvar
(
v
,_
))
->
news_id
news
v
.
pv_vs
.
vs_name
|
P
Dlet
(
LDsym
(
s
,_
))
->
news_id
news
s
.
rs_name
|
P
Dlet
(
LDrec
rdl
)
->
let
news_rd
news
d
=
news_id
news
d
.
rec_sym
.
rs_name
in
List
.
fold_left
news_rd
news
rdl
|
M
Dexn
xs
->
news_id
news
xs
.
xs_name
|
M
Dpure
->
news
|
P
Dexn
xs
->
news_id
news
xs
.
xs_name
|
P
Dpure
->
news
let
get_syms
node
pure
=
let
syms_ts
s
ts
=
Sid
.
add
ts
.
ts_name
s
in
...
...
@@ -269,7 +269,7 @@ let get_syms node pure =
Sid
.
union
syms
(
List
.
fold_left
del_rd
dsms
rdl
)
in
match
node
with
|
M
Dtype
dl
->
|
P
Dtype
dl
->
let
syms_itd
syms
d
=
(* the syms of the invariants are already in [pure] *)
let
syms
=
Opt
.
fold
syms_ity
syms
d
.
itd_its
.
its_def
in
...
...
@@ -278,7 +278,7 @@ let get_syms node pure =
let
syms
=
List
.
fold_left
add_fd
syms
d
.
itd_fields
in
List
.
fold_left
add_cs
syms
d
.
itd_constructors
in
List
.
fold_left
syms_itd
syms
dl
|
M
Dlet
ld
->
|
P
Dlet
ld
->
let
syms
=
syms_let_defn
syms
ld
in
let
vars
=
match
ld
with
|
LDvar
(
_
,
e
)
->
e
.
e_effect
.
eff_reads
...
...
@@ -286,62 +286,67 @@ let get_syms node pure =
|
LDrec
rdl
->
List
.
fold_left
(
fun
s
rd
->
Spv
.
union
s
(
cty_reads
rd
.
rec_fun
.
c_cty
))
Spv
.
empty
rdl
in
Spv
.
fold
(
fun
v
s
->
Sid
.
add
v
.
pv_vs
.
vs_name
s
)
vars
syms
|
M
Dexn
xs
->
syms_ity
syms
xs
.
xs_ity
|
M
Dpure
->
syms
|
P
Dexn
xs
->
syms_ity
syms
xs
.
xs_ity
|
P
Dpure
->
syms
let
mk_decl
=
let
r
=
ref
0
in
fun
node
pure
->
{
md_node
=
node
;
m
d_pure
=
pure
;
m
d_syms
=
get_syms
node
pure
;
m
d_news
=
get_news
node
pure
;
m
d_tag
=
(
incr
r
;
!
r
)
}
{
pd_node
=
node
;
p
d_pure
=
pure
;
p
d_syms
=
get_syms
node
pure
;
p
d_news
=
get_news
node
pure
;
p
d_tag
=
(
incr
r
;
!
r
)
}
let
create_type_decl
dl
=
let
ldl
=
assert
false
(* TODO *)
in
mk_decl
(
M
Dtype
dl
)
ldl
mk_decl
(
P
Dtype
dl
)
ldl
let
create_let_decl
ld
=
let
_
=
M
Dlet
ld
in
assert
false
(* TODO *)
let
create_let_decl
ld
=
let
_
=
P
Dlet
ld
in
assert
false
(* TODO *)
let
create_exn_decl
xs
=
let
_
=
MDexn
xs
in
assert
false
(* TODO *)
let
create_exn_decl
xs
=
if
not
(
ity_closed
xs
.
xs_ity
)
then
Loc
.
errorm
?
loc
:
xs
.
xs_name
.
id_loc
"Top-level exception %a has a polymorphic type"
print_xs
xs
;
if
not
xs
.
xs_ity
.
ity_pure
then
Loc
.
errorm
?
loc
:
xs
.
xs_name
.
id_loc
"The type of top-level exception %a has mutable components"
print_xs
xs
;
mk_decl
(
PDexn
xs
)
[]
let
create_pure_decl
_d
=
let
_
=
MDpure
in
assert
false
(* TODO *)
let
create_pure_decl
d
=
mk_decl
PDpure
[
d
]
(** {2 Built-in decls} *)
let
md_int
=
mk_decl
(
M
Dtype
[
mk_itd
its_int
[]
[]
[]
])
[(
*
TODO
*
)]
let
md_real
=
mk_decl
(
M
Dtype
[
mk_itd
its_real
[]
[]
[]
])
[(
*
TODO
*
)]
let
md_unit
=
mk_decl
(
M
Dtype
[
mk_itd
its_unit
[]
[]
[]
])
[(
*
TODO
*
)]
let
md_func
=
mk_decl
(
M
Dtype
[
mk_itd
its_func
[]
[]
[]
])
[(
*
TODO
*
)]
let
md_pred
=
mk_decl
(
M
Dtype
[
mk_itd
its_pred
[]
[]
[]
])
[(
*
TODO
*
)]
let
pd_int
=
mk_decl
(
P
Dtype
[
mk_itd
its_int
[]
[]
[]
])
[(
*
TODO
*
)]
let
pd_real
=
mk_decl
(
P
Dtype
[
mk_itd
its_real
[]
[]
[]
])
[(
*
TODO
*
)]
let
pd_unit
=
mk_decl
(
P
Dtype
[
mk_itd
its_unit
[]
[]
[]
])
[(
*
TODO
*
)]
let
pd_func
=
mk_decl
(
P
Dtype
[
mk_itd
its_func
[]
[]
[]
])
[(
*
TODO
*
)]
let
pd_pred
=
mk_decl
(
P
Dtype
[
mk_itd
its_pred
[]
[]
[]
])
[(
*
TODO
*
)]
let
md_equ
=
mk_decl
M
Dpure
[(
*
TODO
*
)]
let
pd_equ
=
mk_decl
P
Dpure
[(
*
TODO
*
)]
let
m
d_bool
=
mk_decl
(
MDtype
[
mk_itd
its_bool
[]
[
rs_true
;
rs_false
]
[]
])
[(
*
TODO
*
)]
let
p
d_bool
=
mk_decl
(
PDtype
[
mk_itd
its_bool
[]
[
rs_true
;
rs_false
]
[]
])
[(
*
TODO
*
)]
let
m
d_tuple
_n
=
assert
false
(*TODO*)
let
p
d_tuple
_n
=
assert
false
(*TODO*)
let
md_func_app
=
mk_decl
(
M
Dlet
ld_func_app
)
[(
*
TODO
*
)]
let
pd_func_app
=
mk_decl
(
P
Dlet
ld_func_app
)
[(
*
TODO
*
)]
(** {2 Known identifiers} *)
type
known_map
=
m
decl
Mid
.
t
type
known_map
=
p
decl
Mid
.
t
let
known_id
kn
id
=
if
not
(
Mid
.
mem
id
kn
)
then
raise
(
Decl
.
UnknownIdent
id
)
let
merge_known
kn1
kn2
=
let
check_known
id
decl1
decl2
=
if
m
d_equal
decl1
decl2
then
Some
decl1
if
p
d_equal
decl1
decl2
then
Some
decl1
else
raise
(
Decl
.
RedeclaredIdent
id
)
in
Mid
.
union
check_known
kn1
kn2
let
known_add_decl
kn0
d
=
let
kn
=
Mid
.
map
(
Util
.
const
d
)
d
.
m
d_news
in
let
kn
=
Mid
.
map
(
Util
.
const
d
)
d
.
p
d_news
in
let
check
id
decl0
_
=
if
m
d_equal
decl0
d
if
p
d_equal
decl0
d
then
raise
(
Decl
.
KnownIdent
id
)
else
raise
(
Decl
.
RedeclaredIdent
id
)
in
let
kn
=
Mid
.
union
check
kn0
kn
in
let
unk
=
Mid
.
set_diff
d
.
m
d_syms
kn
in
let
unk
=
Mid
.
set_diff
d
.
p
d_syms
kn
in
if
Sid
.
is_empty
unk
then
kn
else
raise
(
Decl
.
UnknownIdent
(
Sid
.
choose
unk
))
src/mlw/
m
decl.mli
→
src/mlw/
p
decl.mli
View file @
e59abf8f
...
...
@@ -41,44 +41,44 @@ val create_rec_variant_decl : itysymbol ->
(** {2 Module declarations} *)
type
m
decl
=
private
{
md_node
:
m
decl_node
;
m
d_pure
:
Decl
.
decl
list
;
m
d_syms
:
Sid
.
t
;
m
d_news
:
Sid
.
t
;
m
d_tag
:
int
;
type
p
decl
=
private
{
pd_node
:
p
decl_node
;
p
d_pure
:
Decl
.
decl
list
;
p
d_syms
:
Sid
.
t
;
p
d_news
:
Sid
.
t
;
p
d_tag
:
int
;
}
and
m
decl_node
=
private
|
M
Dtype
of
its_defn
list
|
M
Dlet
of
let_defn
|
M
Dexn
of
xsymbol
|
M
Dpure
and
p
decl_node
=
private
|
P
Dtype
of
its_defn
list
|
P
Dlet
of
let_defn
|
P
Dexn
of
xsymbol
|
P
Dpure
val
create_type_decl
:
its_defn
list
->
m
decl
val
create_type_decl
:
its_defn
list
->
p
decl
val
create_let_decl
:
let_defn
->
m
decl
val
create_let_decl
:
let_defn
->
p
decl
val
create_exn_decl
:
xsymbol
->
m
decl
val
create_exn_decl
:
xsymbol
->
p
decl
val
create_pure_decl
:
Decl
.
decl
->
m
decl
val
create_pure_decl
:
Decl
.
decl
->
p
decl
(** {2 Built-in decls} *)
val
md_int
:
m
decl
val
md_real
:
m
decl
val
md_equ
:
m
decl
val
md_bool
:
m
decl
val
md_unit
:
m
decl
val
md_tuple
:
int
->
m
decl
val
md_func
:
m
decl
val
md_pred
:
m
decl
val
md_func_app
:
m
decl
val
pd_int
:
p
decl
val
pd_real
:
p
decl
val
pd_equ
:
p
decl
val
pd_bool
:
p
decl
val
pd_unit
:
p
decl
val
pd_tuple
:
int
->
p
decl
val
pd_func
:
p
decl
val
pd_pred
:
p
decl
val
pd_func_app
:
p
decl
(** {2 Known identifiers} *)
type
known_map
=
m
decl
Mid
.
t
type
known_map
=
p
decl
Mid
.
t
val
known_id
:
known_map
->
ident
->
unit
val
known_add_decl
:
known_map
->
m
decl
->
known_map
val
known_add_decl
:
known_map
->
p
decl
->
known_map
val
merge_known
:
known_map
->
known_map
->
known_map
src/mlw/
w
module.ml
→
src/mlw/
p
module.ml
View file @
e59abf8f
...
...
@@ -15,7 +15,7 @@ open Ty
open
Theory
open
Ity
open
Expr
open
M
decl
open
P
decl
(** *)
...
...
@@ -89,22 +89,22 @@ let ns_find_xs ns s = match ns_find_prog_symbol ns s with
(** {2 Module} *)
type
w
module
=
{
mod_theory
:
theory
;
(* pure theory *)
mod_decls
:
mdecl
list
;
(* module declarations *)
mod_export
:
namespace
;
(* exported namespace *)
mod_known
:
known_map
;
(* known identifiers *)
mod_local
:
Sid
.
t
;
(* locally declared idents *)
mod_used
:
Sid
.
t
;
(* used modules *)
type
p
module
=
{
mod_theory
:
theory
;
(* pure theory *)
mod_decls
:
pdecl
list
;
(* module declarations *)
mod_export
:
namespace
;
(* exported namespace *)
mod_known
:
known_map
;
(* known identifiers *)
mod_local
:
Sid
.
t
;
(* locally declared idents *)
mod_used
:
Sid
.
t
;
(* used modules *)
}
(** {2 Module under construction} *)
type
w
module_uc
=
{
type
p
module_uc
=
{
muc_theory
:
theory_uc
;
muc_name
:
string
;
muc_path
:
string
list
;
muc_decls
:
m
decl
list
;
muc_decls
:
p
decl
list
;
muc_prefix
:
string
list
;
muc_import
:
namespace
list
;
muc_export
:
namespace
list
;
...
...
@@ -162,10 +162,10 @@ let close_namespace uc ~import =
let
i1
=
add_ns
false
s
e0
i1
in
let
e1
=
add_ns
true
s
e0
e1
in
{
uc
with
muc_theory
=
th
;
muc_theory
=
th
;
muc_prefix
=
prf
;
muc_import
=
i1
::
sti
;
muc_export
=
e1
::
ste
;
}
muc_import
=
i1
::
sti
;
muc_export
=
e1
::
ste
;
}
|
_
->
assert
false
...
...
@@ -219,17 +219,17 @@ let add_symbol add id v uc =
let
add_meta
uc
m
al
=
{
uc
with
muc_theory
=
Theory
.
add_meta
uc
.
muc_theory
m
al
}
let
add_
m
decl
~
wp
uc
d
=
let
add_
p
decl
~
wp
uc
d
=
let
uc
=
{
uc
with
muc_decls
=
d
::
uc
.
muc_decls
;
muc_known
=
known_add_decl
uc
.
muc_known
d
;
muc_local
=
Sid
.
union
uc
.
muc_local
d
.
m
d_news
}
in
muc_local
=
Sid
.
union
uc
.
muc_local
d
.
p
d_news
}
in
(* TODO
let uc = pdecl_ns uc d in
let uc = pdecl_vc ~wp uc d in
*)
ignore
wp
;
(* TODO *)
let
th
=
List
.
fold_left
Theory
.
add_decl
uc
.
muc_theory
d
.
m
d_pure
in
let
th
=
List
.
fold_left
Theory
.
add_decl
uc
.
muc_theory
d
.
p
d_pure
in
{
uc
with
muc_theory
=
th
}
(** {2 Builtin symbols} *)
...
...
@@ -239,11 +239,11 @@ let builtin_module =
let
ns
=
add_ts
true
its_int
.
its_ts
.
ts_name
.
id_string
its_int
ns
in
let
ns
=
add_ts
true
its_real
.
its_ts
.
ts_name
.
id_string
its_real
ns
in
let
kn
=
Mid
.
empty
in
let
kn
=
known_add_decl
kn
m
d_int
in
let
kn
=
known_add_decl
kn
m
d_real
in
let
kn
=
known_add_decl
kn
m
d_equ
in
{
let
kn
=
known_add_decl
kn
p
d_int
in
let
kn
=
known_add_decl
kn
p
d_real
in
let
kn
=
known_add_decl
kn
p
d_equ
in
{
mod_theory
=
builtin_theory
;
mod_decls
=
[
md_int
;
md_real
;
m
d_equ
];
mod_decls
=
[
pd_int
;
pd_real
;
p
d_equ
];
mod_export
=
ns
;
mod_known
=
kn
;
mod_local
=
builtin_theory
.
th_local
;
...
...
@@ -251,16 +251,16 @@ let builtin_module =
let
bool_module
=
let
uc
=
empty_module
None
(
id_fresh
"Bool"
)
[
"why3"
;
"Bool"
]
in
let
uc
=
add_
mdecl
~
wp
:
false
uc
m
d_bool
in
let
uc
=
add_
pdecl
~
wp
:
false
uc
p
d_bool
in
let
md
=
close_module
uc
in
{
md
with
mod_theory
=
bool_theory
}
let
highord_module
=
let
uc
=
empty_module
None
(
id_fresh
"HighOrd"
)
[
"why3"
;
"HighOrd"
]
in
let
uc
=
use_export
uc
bool_module
in
let
uc
=
add_
mdecl
~
wp
:
false
uc
m
d_func
in
let
uc
=
add_
mdecl
~
wp
:
false
uc
m
d_pred
in
let
uc
=
add_
mdecl
~
wp
:
false
uc
m
d_func_app
in
let
uc
=
add_
pdecl
~
wp
:
false
uc
p
d_func
in
let
uc
=
add_
pdecl
~
wp
:
false
uc
p
d_pred
in
let
uc
=
add_
pdecl
~
wp
:
false
uc
p
d_func_app
in
let
md
=
close_module
uc
in
{
md
with
mod_theory
=
highord_theory
}
...
...
@@ -272,12 +272,12 @@ let tuple_module_name s = Theory.tuple_theory_name s
let unit_module =
let uc = empty_module None (id_fresh "Unit") ["why3";"Unit"] in
let uc = use_export uc (tuple_module 0) in
let uc = add_
mdecl ~wp:false uc m
d_unit in
let uc = add_
pdecl ~wp:false uc p
d_unit in
let md = close_module uc in
{ md with mod_theory = unit_theory }
*)
let
add_
m
decl_with_tuples
_uc
_md
=
assert
false
(*TODO*)
let
add_
p
decl_with_tuples
_uc
_md
=
assert
false
(*TODO*)
let
create_module
env
?
(
path
=
[]
)
n
=
let
m
=
empty_module
(
Some
env
)
n
path
in
...
...
@@ -291,12 +291,12 @@ let create_module env ?(path=[]) n =
(** {2 WhyML language} *)
type
mlw_file
=
w
module
Mstr
.
t
*
theory
Mstr
.
t
type
mlw_file
=
p
module
Mstr
.
t
*
theory
Mstr
.
t
let
mlw_language
=
(
Env
.
register_language
Env
.
base_language
snd
:
mlw_file
Env
.
language
)
(* TODO
(* TODO
let () = Env.add_builtin mlw_language (function
| [s] when s = mod_prelude.mod_theory.th_name.id_string ->
Mstr.singleton s mod_prelude,
...
...
src/mlw/
w
module.mli
→
src/mlw/
p
module.mli
View file @
e59abf8f
...
...
@@ -14,7 +14,7 @@ open Ident
open
Theory
open
Ity
open
Expr
open
M
decl
open
P
decl
(** *)
...
...
@@ -41,22 +41,22 @@ val ns_find_ns : namespace -> string list -> namespace
(** {2 Module} *)
type
w
module
=
private
{
mod_theory
:
theory
;
(* pure theory *)
mod_decls
:
mdecl
list
;
(* module declarations *)
mod_export
:
namespace
;
(* exported namespace *)
mod_known
:
known_map
;
(* known identifiers *)
mod_local
:
Sid
.
t
;
(* locally declared idents *)
mod_used
:
Sid
.
t
;
(* used modules *)
type
p
module
=
private
{
mod_theory
:
theory
;
(* pure theory *)
mod_decls
:
pdecl
list
;
(* module declarations *)
mod_export
:
namespace
;
(* exported namespace *)
mod_known
:
known_map
;
(* known identifiers *)
mod_local
:
Sid
.
t
;
(* locally declared idents *)
mod_used
:
Sid
.
t
;
(* used modules *)
}
(** {2 Module under construction} *)
type
w
module_uc
=
private
{
type
p
module_uc
=
private
{
muc_theory
:
theory_uc
;
muc_name
:
string
;
muc_path
:
string
list
;
muc_decls
:
m
decl
list
;
muc_decls
:
p
decl
list
;
muc_prefix
:
string
list
;
muc_import
:
namespace
list
;
muc_export
:
namespace
list
;
...
...
@@ -66,11 +66,11 @@ type wmodule_uc = private {
muc_env
:
Env
.
env
option
;
}
val
create_module
:
Env
.
env
->
?
path
:
string
list
->
preid
->
w
module_uc
val
close_module
:
wmodule_uc
->
w
module
val
create_module
:
Env
.
env
->
?
path
:
string
list
->
preid
->
p
module_uc
val
close_module
:
pmodule_uc
->
p
module
val
open_namespace
:
wmodule_uc
->
string
->
w
module_uc
val
close_namespace
:
wmodule_uc
->
import
:
bool
->
w
module_uc
val
open_namespace
:
pmodule_uc
->
string
->
p
module_uc
val
close_namespace
:
pmodule_uc
->
import
:
bool
->
p
module_uc
val
restore_path
:
ident
->
string
list
*
string
*
string
list
(** [restore_path id] returns the triple (library path, module,
...
...
@@ -80,50 +80,50 @@ val restore_path : ident -> string list * string * string list
If [id] is a module name, the third component is an empty list.
Raises Not_found if the ident was never declared in/as a module. *)
val
restore_module
:
theory
->
w
module
val
restore_module
:
theory
->
p
module
(** retrieves a module from its underlying theory
raises [Not_found] if no such module exists *)
(** {2 Use and clone} *)
val
use_export
:
wmodule_uc
->
wmodule
->
w
module_uc
val
use_export
:
pmodule_uc
->
pmodule
->
p
module_uc
(** {2 Logic decls} *)
val
add_meta
:
wmodule_uc
->
meta
->
meta_arg
list
->
w
module_uc
val
add_meta
:
pmodule_uc
->
meta
->
meta_arg
list
->
p
module_uc
(** {2 Program decls} *)
val
add_
mdecl
:
wp
:
bool
->
wmodule_uc
->
mdecl
->
w
module_uc
(** [add_
m
decl ~wp m d] adds declaration [d] in module [m].
val
add_
pdecl
:
wp
:
bool
->
pmodule_uc
->
pdecl
->
p
module_uc
(** [add_
p
decl ~wp m d] adds declaration [d] in module [m].
If [wp] is [true], VC is computed and added to [m]. *)
(** {2 Builtin symbols} *)
val
builtin_module
:
w
module
val
builtin_module
:
p
module
val
bool_module
:
w
module
val
bool_module
:
p
module
(* TODO
val unit_module :
w
module
val unit_module :
p
module
*)
val
highord_module
:
w
module
val
highord_module
:
p
module
val
tuple_module
:
int
->
w
module
val
tuple_module
:
int
->
p
module
val
tuple_module_name
:
string
->
int
option
val
add_
mdecl_with_tuples
:
wmodule_uc
->
mdecl
->
w
module_uc
val
add_
pdecl_with_tuples
:
pmodule_uc
->
pdecl
->
p
module_uc
(** {2 WhyML language} *)
open
Env
type
mlw_file
=
w
module
Mstr
.
t
*
theory
Mstr
.
t
type
mlw_file
=
p
module
Mstr
.
t
*
theory
Mstr
.
t
val
mlw_language
:
mlw_file
language
exception
ModuleNotFound
of
pathname
*
string
val
read_module
:
env
->
pathname
->
string
->
w
module
val
read_module
:
env
->
pathname
->
string
->
p
module
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment