Commit 1e4d1295 authored by Andrei Paskevich's avatar Andrei Paskevich

WhyML: remove Dtre and Dty, superceded by Dexpr

parent 78882882
......@@ -129,12 +129,12 @@ LIB_TRANSFORM = simplify_formula inlining split_goal induction \
eval_match instantiate_predicate smoke_detector
LIB_PRINTER = alt_ergo why3printer smtv1 smtv2 coq pvs \
simplify gappa cvc3 yices mathematica
simplify gappa cvc3 yices mathematica
LIB_SESSION = xml termcode session session_tools session_scheduler
LIB_WHYML = mlw_ty mlw_expr mlw_decl mlw_pretty mlw_wp mlw_module \
mlw_dtree mlw_dty mlw_dexpr mlw_typing mlw_driver mlw_ocaml \
mlw_dexpr mlw_typing mlw_driver mlw_ocaml \
mlw_main mlw_interp
LIBMODULES = $(addprefix src/util/, $(LIB_UTIL)) \
......
(********************************************************************)
(* *)
(* The Why3 Verification Platform / The Why3 Development Team *)
(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *)
(* *)
(* This software is distributed under the terms of the GNU Lesser *)
(* General Public License version 2.1, with the special exception *)
(* on linking described in file LICENSE. *)
(* *)
(********************************************************************)
open Mlw_ty
open Mlw_expr
open Mlw_dty
type loc = Loc.position
type ident = Ptree.ident
type ghost = bool
type dpre = Ptree.lexpr list
type dpost = (Ptree.pattern * Ptree.lexpr) list
type dxpost = dpost Mexn.t
type dreads = Ptree.qualid list
type dwrites = Ptree.lexpr list
type dvariant = Ptree.lexpr * Term.lsymbol option
type dinvariant = Ptree.lexpr list
type dspec = {
ds_pre : dpre;
ds_post : dpost;
ds_xpost : dxpost;
ds_reads : dreads;
ds_writes : dwrites;
ds_variant : dvariant list;
}
type dbinder = ident * ghost * dity
type dtype_v =
| DSpecV of dity
| DSpecA of dbinder list * dtype_c
and dtype_c = dtype_v * dspec
type dexpr = {
de_desc : dexpr_desc;
de_type : dvty;
de_lab : Ident.Slab.t;
de_loc : loc;
}
and dexpr_desc =
| DEconstant of Number.constant
| DElocal of string
| DEglobal_pv of pvsymbol
| DEglobal_ps of psymbol
| DEglobal_pl of plsymbol
| DEglobal_ls of Term.lsymbol
| DEapply of dexpr * dexpr list
| DEfun of dbinder list * dtriple
| DElet of ident * ghost * dexpr * dexpr
| DEletrec of drecfun list * dexpr
| DEassign of plsymbol * dexpr * dexpr
| DEif of dexpr * dexpr * dexpr
| DEloop of dvariant list * dinvariant * dexpr
| DElazy of Ptree.lazy_op * dexpr * dexpr
| DEnot of dexpr
| DEmatch of dexpr * (pre_ppattern * dexpr) list
| DEabsurd
| DEraise of xsymbol * dexpr
| DEtry of dexpr * (xsymbol * pre_ppattern * dexpr) list
| DEfor of ident * dexpr * Ptree.for_direction * dexpr * dinvariant * dexpr
| DEassert of Ptree.assertion_kind * Ptree.lexpr
| DEabstract of dtriple
| DEmark of ident * dexpr
| DEghost of dexpr
| DEany of dtype_c
and drecfun = ident * ghost * dvty * dbinder list * dtriple
and dtriple = dexpr * dspec
This diff is collapsed.
(********************************************************************)
(* *)
(* The Why3 Verification Platform / The Why3 Development Team *)
(* Copyright 2010-2013 -- INRIA - CNRS - Paris-Sud University *)
(* *)
(* This software is distributed under the terms of the GNU Lesser *)
(* General Public License version 2.1, with the special exception *)
(* on linking described in file LICENSE. *)
(* *)
(********************************************************************)
(* destructive types for program type inference *)
open Ident
open Ty
open Term
open Mlw_ty
open Mlw_ty.T
open Mlw_expr
open Mlw_module
type dreg
type dity
type dvty = dity list * dity (* A -> B -> C == ([A;B],C) *)
type tvars (* a set of type variables *)
val empty_tvars: tvars
val add_dity: tvars -> dity -> tvars
val add_dvty: tvars -> dvty -> tvars
val create_type_variable: unit -> dity
val create_user_type_variable: Ptree.ident -> (* opaque *) bool -> dity
val its_app: itysymbol -> dity list -> dity
val ts_app: tysymbol -> dity list -> dity
val opaque_tvs: Stv.t -> dity -> Stv.t
val is_chainable: dvty -> bool
(* non-bool * non-bool -> bool *)
val free_user_vars: tvars -> dvty -> Stv.t
(* user type variables not bound in the context *)
exception DTypeMismatch of dity * dity
val unify: ?weak:bool -> dity -> dity -> unit
(* when [weak] is true, don't unify regions *)
val ity_of_dity: dity -> ity
(* only use once all unification is done *)
val specialize_scheme: tvars -> dvty -> dvty
val specialize_lsymbol: lsymbol -> dvty
val specialize_pvsymbol: pvsymbol -> dity
val specialize_psymbol: psymbol -> dvty
val specialize_plsymbol: plsymbol -> dvty
val specialize_xsymbol: xsymbol -> dity
val print_dity : Format.formatter -> dity -> unit
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment