]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/basic_ag/bag.ml
- we now add the kernel options in the preamble of the URI hierarchy
[helm.git] / helm / software / lambda-delta / basic_ag / bag.ml
index b04fc5ab6aa84edc4be107a60cb8dca852f0e7ab..1aa9b62e749a79b5f2494ce0d09b67932235584f 100644 (file)
@@ -12,8 +12,8 @@
 (* kernel version: basic, absolute, global *)
 (* note          : experimental *) 
 
-type uri = NUri.uri
-type id = Aut.id
+type uri = Entity.uri
+type id = Entity.id
 
 type bind = Void         (* exclusion *)
           | Abst of term (* abstraction *)
@@ -22,17 +22,21 @@ 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 item = obj option
+type lenv = (int * id * bind) list (* location, name, binder *) 
 
-type context = (int * id * bind) list (* location, name, binder *) 
+type message = (lenv, term) Log.item list
 
-type message = (context, term) Log.item list
+(* helpers ******************************************************************)
+
+let mk_uri si root s =
+   let kernel = if si then "bag-si" else "bag" in
+   String.concat "/" ["ld:"; kernel; root; s ^ ".ld"]
 
 (* Currified constructors ***************************************************)
 
@@ -60,9 +64,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