X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fbasic_rg%2Fbrg.ml;fp=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fbasic_rg%2Fbrg.ml;h=0000000000000000000000000000000000000000;hb=95872555aaa040a22ad2d93cb1278f79e20da70c;hp=be4e6f9b97269bfb262229981cdae00c9e167c4e;hpb=4025c3f5b36025380dcad84bb7a97045d08652f6;p=helm.git diff --git a/helm/software/lambda-delta/src/basic_rg/brg.ml b/helm/software/lambda-delta/src/basic_rg/brg.ml deleted file mode 100644 index be4e6f9b9..000000000 --- a/helm/software/lambda-delta/src/basic_rg/brg.ml +++ /dev/null @@ -1,74 +0,0 @@ -(* - ||M|| This file is part of HELM, an Hypertextual, Electronic - ||A|| Library of Mathematics, developed at the Computer Science - ||T|| Department, University of Bologna, Italy. - ||I|| - ||T|| HELM is free software; you can redistribute it and/or - ||A|| modify it under the terms of the GNU General Public License - \ / version 2 or (at your option) any later version. - \ / This software is distributed as is, NO WARRANTY. - V_______________________________________________________________ *) - -(* kernel version: basic, relative, global *) -(* note : ufficial basic lambda-delta *) - -module E = Entity -module N = Level - -type uri = E.uri -type attrs = E.attrs - -type bind = Void (* *) - | Abst of N.level * term (* level, type *) - | Abbr of term (* body *) - -and term = Sort of attrs * int (* attrs, hierarchy index *) - | LRef of attrs * int (* attrs, position index *) - | GRef of attrs * uri (* attrs, reference *) - | Cast of attrs * term * term (* attrs, type, term *) - | Appl of attrs * term * term (* attrs, argument, function *) - | Bind of attrs * bind * term (* attrs, binder, scope *) - -type entity = term E.entity (* attrs, uri, binder *) - -type lenv = Null -(* Cons: tail, relative local environment, attrs, binder *) - | Cons of lenv * lenv * attrs * bind - -(* Currified constructors ***************************************************) - -let abst n w = Abst (n, w) - -let abbr v = Abbr v - -let lref a i = LRef (a, i) - -let cast a u t = Cast (a, u, t) - -let appl a u t = Appl (a, u, t) - -let bind a b t = Bind (a, b, t) - -let bind_abst n a u t = Bind (a, Abst (n, u), t) - -let bind_abbr a v t = Bind (a, Abbr v, t) - -let bind_void a t = Bind (a, Void, t) - -(* local environment handling functions *************************************) - -let empty = Null - -let push e c a b = Cons (e, c, a, b) - -let rec get i = function - | Null -> Null, Null, [], Void - | Cons (e, c, a, b) when i = 0 -> e, c, a, b - | Cons (e, _, _, _) -> get (pred i) e - -let get e i = get i e - -(* used in BrgOutput.pp_lenv *) -let rec fold_right f map e x = match e with - | Null -> f x - | Cons (e, c, a, b) -> fold_right (map f e c a b) map e x