X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Flambda-delta%2Fcommon%2Fentity.ml;h=d6314150b935e77fca6d6bedbeb7a58c04548cbb;hb=0e6bf0ef18e3879a359b2b6f63d600c20102f0ab;hp=3aa1ef6b59cfb086430cd408d734d64ccc36898b;hpb=f7bb626faf6b9d89c0ee5ac48b1d97c69d189f8a;p=helm.git diff --git a/helm/software/lambda-delta/common/entity.ml b/helm/software/lambda-delta/common/entity.ml index 3aa1ef6b5..d6314150b 100644 --- a/helm/software/lambda-delta/common/entity.ml +++ b/helm/software/lambda-delta/common/entity.ml @@ -21,13 +21,24 @@ type attrs = attr list (* attributes *) type 'term bind = Abst of 'term (* declaration: domain *) | Abbr of 'term (* definition: body *) + | Void (* exclusion *) type 'term entity = attrs * uri * 'term bind (* attrs, name, binder *) -type uri_generator = string -> string (* this could be in CPS *) +type uri_generator = string -> string + +type status = { + g: Hierarchy.graph; (* sort hierarchy parameter *) + delta: bool; (* global delta-expansion *) + rt: bool; (* reference typing *) + si: bool; (* sort inclusion *) + expand: bool (* always expand global definitions *) +} (* helpers ******************************************************************) +let common f (a, u, _) = f a u + let rec name err f = function | Name (n, r) :: _ -> f n r | _ :: tl -> name err f tl @@ -82,3 +93,9 @@ let xlate f xlate_term = function let f t = f (a, uri, Abst t) in xlate_term f t | a, uri, Abbr t -> let f t = f (a, uri, Abbr t) in xlate_term f t + | _, _, Void -> + assert false + +let initial_status g expand si = { + g = g; delta = false; rt = false; si = si; expand = expand +}