mlw_wp.mli 2.39 KB
Newer Older
Andrei Paskevich's avatar
Andrei Paskevich committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(**************************************************************************)
(*                                                                        *)
(*  Copyright (C) 2010-2012                                               *)
(*    François Bobot                                                      *)
(*    Jean-Christophe Filliâtre                                           *)
(*    Claude Marché                                                       *)
(*    Guillaume Melquiond                                                 *)
(*    Andrei Paskevich                                                    *)
(*                                                                        *)
(*  This software is free software; you can redistribute it and/or        *)
(*  modify it under the terms of the GNU Library General Public           *)
(*  License version 2.1, with the special exception on linking            *)
(*  described in file LICENSE.                                            *)
(*                                                                        *)
(*  This software is distributed in the hope that it will be useful,      *)
(*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *)
(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  *)
(*                                                                        *)
(**************************************************************************)

21
open Theory
22
23
open Mlw_ty
open Mlw_ty.T
24
open Mlw_decl
25
open Mlw_expr
Andrei Paskevich's avatar
Andrei Paskevich committed
26
27
28
29
30
31
32

(** WP-only builtins *)

val ts_mark : Ty.tysymbol
val ty_mark : Ty.ty

val fs_at  : Term.lsymbol
33
34
35
36
val fs_old : Term.lsymbol

val th_mark_at  : Theory.theory
val th_mark_old : Theory.theory
Andrei Paskevich's avatar
Andrei Paskevich committed
37

38
val e_now : expr
Andrei Paskevich's avatar
Andrei Paskevich committed
39

40
val pv_old : pvsymbol
41
val remove_old : Term.term -> Term.term
42

43
44
45
val full_invariant :
  Decl.known_map -> Mlw_decl.known_map -> Term.vsymbol -> ity -> Term.term

46
47
(** Weakest preconditions *)

48
val wp_val: Env.env -> known_map -> theory_uc -> let_sym  -> theory_uc
49
val wp_let: Env.env -> known_map -> theory_uc -> let_defn -> theory_uc
50
val wp_rec: Env.env -> known_map -> theory_uc -> fun_defn list -> theory_uc
51
52
53
54
55
56
57
58


(** Efficient weakest preconditions *)

val fast_wp: Debug.flag

val fast_wp_val: Env.env -> known_map -> theory_uc -> let_sym  -> theory_uc
val fast_wp_let: Env.env -> known_map -> theory_uc -> let_defn -> theory_uc
59
val fast_wp_rec: Env.env -> known_map -> theory_uc -> fun_defn list -> theory_uc
60