X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fbasic_ag%2Fbag.ml;h=8a07f55a819fd4696ccfabd61f683c2c68f67c47;hb=34c2ba63c8eb5fccfd9a1fb8ac1df5895c8b58b3;hp=624b47cbb38e1106f78725524126cf2bbc73e793;hpb=13c3708fc59d999727ee214e8ece1f03661a9737;p=helm.git diff --git a/helm/software/lambda-delta/basic_ag/bag.ml b/helm/software/lambda-delta/basic_ag/bag.ml index 624b47cbb..8a07f55a8 100644 --- a/helm/software/lambda-delta/basic_ag/bag.ml +++ b/helm/software/lambda-delta/basic_ag/bag.ml @@ -9,8 +9,11 @@ \ / This software is distributed as is, NO WARRANTY. V_______________________________________________________________ *) -type uri = NUri.uri -type id = Aut.id +(* kernel version: basic, absolute, global *) +(* note : experimental *) + +type uri = Entity.uri +type id = Entity.id type bind = Void (* exclusion *) | Abst of term (* abstraction *) @@ -19,17 +22,20 @@ type bind = Void (* exclusion *) and term = Sort of int (* hierarchy index *) | LRef of int (* location *) | GRef of uri (* reference *) - | Cast of term * term (* type, term *) + | Cast of term * term (* domain, element *) | Appl of term * term (* argument, function *) | Bind of int * id * bind * term (* location, name, binder, scope *) -type obj = int * uri * bind (* age, uri, binder, contents *) +type entity = term Entity.entity (* attrs, uri, binder *) + +type lenv = (int * id * bind) list (* location, name, binder *) -type item = obj option +type message = (lenv, term) Log.item list -type context = (int * id * bind) list (* location, name, binder *) +(* helpers ******************************************************************) -type message = (context, term) Log.item list +let mk_uri root s = + String.concat "/" ["ld:"; "bag"; root; s ^ ".ld"] (* Currified constructors ***************************************************) @@ -57,9 +63,9 @@ let new_location () = let loc = !location in incr location; loc let locations () = !location -(* context handling functions ***********************************************) +(* local environment handling functions *************************************) -let empty_context = [] +let empty_lenv = [] let push msg f es l id b = let rec does_not_occur loc = function