inlining.mli 1.94 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
(**************************************************************************)
(*                                                                        *)
(*  Copyright (C) 2010-                                                   *)
(*    Francois Bobot                                                      *)
(*    Jean-Christophe Filliatre                                           *)
(*    Johannes Kanig                                                      *)
(*    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.                  *)
(*                                                                        *)
(**************************************************************************)
Francois Bobot's avatar
Francois Bobot committed
19 20


Francois Bobot's avatar
Francois Bobot committed
21 22
(* Inline the definition not recursive *)

Francois Bobot's avatar
Francois Bobot committed
23 24
val t :
  isnotinlinedt:(Term.term -> bool) ->
25
  isnotinlinedf:(Term.fmla -> bool) -> 
26
  Transform.ctxt_t
Francois Bobot's avatar
Francois Bobot committed
27 28 29 30


(* Inline them all *)

31
val all : unit -> Transform.ctxt_t
Francois Bobot's avatar
Francois Bobot committed
32 33 34 35

(* Inline only the trivial definition :
   logic c : t = a
   logic f(x : t,...., ) : t = g(y : t2,...) *)
36
val trivial : unit -> Transform.ctxt_t
Francois Bobot's avatar
Francois Bobot committed
37 38 39 40 41 42 43 44 45 46 47 48


(* Function to use in other transformations if inlining is needed *)

type env

val empty_env : env

(*val add_decl : env -> Theory.decl -> env *)

val replacet : env -> Term.term -> Term.term 
val replacep : env -> Term.fmla -> Term.fmla