(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
(** This file defines a lot of different notions of names used pervasively in thekernelaswellasinotherplaces.Theessentialdatatypesexportedby thisAPIare:
(** Representation and operations on identifiers. *)
module Id : sig type t (** Values of this type represent (Rocq) identifiers. *)
val equal : t -> t -> bool (** Equality over identifiers. *)
val compare : t -> t -> int (** Comparison over identifiers. *)
val hash : t -> int (** Hash over identifiers. *)
val is_valid : string -> bool (** Check that a string may be converted to an identifier. *)
val is_valid_ident_part : string -> bool (** Check that a string is a valid part of an identifier *)
val of_bytes : bytes -> t val of_string : string -> t (** Converts a string into an identifier.
@raise UserError if the string is invalid as an identifier. *)
val of_string_soft : string -> t (** Same as {!of_string} except that any string made of supported UTF-8 characters is accepted.
@raise UserError if the string is invalid as an UTF-8 string. *)
val to_string : t -> string (** Converts a identifier into an string. *)
valprint : t -> Pp.t (** Pretty-printer. *)
module Set : Set.ExtS withtype elt = t (** Finite sets of identifiers. *)
module Map : Map.ExtS withtype key = t and module Set := Set (** Finite maps of identifiers. *)
module Pred : Predicate.S withtype elt = t (** Predicates over identifiers. *)
module List : List.MonoS withtype elt = t (** Operations over lists of identifiers. *)
val hcons : t Hashcons.f (** Hashconsing of identifiers. *)
end
(** Representation and operations on identifiers that are allowed to be anonymous
(i.e. "_" in concrete syntax). *)
module Name : sig type t = Anonymous (** anonymous identifier *)
| Name of Id.t (** non-anonymous identifier *)
val mk_name : Id.t -> t (** constructor *)
val is_anonymous : t -> bool (** Return [true] iff a given name is [Anonymous]. *)
val is_name : t -> bool (** Return [true] iff a given name is [Name _]. *)
val compare : t -> t -> int (** Comparison over names. *)
val equal : t -> t -> bool (** Equality over names. *)
val hash : t -> int (** Hash over names. *)
val hcons : t Hashcons.f (** Hashconsing over names. *)
valprint : t -> Pp.t (** Pretty-printer (print "_" for [Anonymous]. *)
end
(** {6 Type aliases} *)
type name = Name.t = Anonymous | Name of Id.t
[@@ocaml.deprecated "(8.8) Use Name.t"]
type variable = Id.t
(** {6 Directory paths = section names paths } *)
module DirPath : sig type t (** Type of directory paths. Essentially a list of module identifiers. The
order is reversed to improve sharing. E.g. A.B.C is ["C";"B";"A"] *)
val equal : t -> t -> bool (** Equality over directory paths. *)
val compare : t -> t -> int (** Comparison over directory paths. *)
val hash : t -> int (** Hash over directory paths. *)
val make : Id.t list -> t (** Create a directory path. (The list must be reversed). *)
val repr : t -> Id.t list (** Represent a directory path. (The result list is reversed). *)
val empty : t (** The empty directory path. *)
val is_empty : t -> bool (** Test whether a directory path is empty. *)
val dummy : t (** Used in [Safe_typing.empty_environment] and similar *)
val hcons : t Hashcons.f (** Hashconsing of directory paths. *)
val to_string : t -> string (** Print non-empty directory paths as ["root.module.submodule"] *)
module type EqType = sig type t val compare : t -> t -> int val equal : t -> t -> bool val hash : t -> int end
module type QNameS = sig type t (** A type of reference that implements an implicit quotient by containing twodifferentnames.Thefirstoneistheusername,i.e.whattheuser seeswhenprinting.Thesecondoneisthecanonicalname,whichisthe actualabsolutenameofthereference.
module CanOrd : EqType withtype t = t (** Equality functions over the canonical name. Their use should be
restricted to the kernel. *)
module UserOrd : EqType withtype t = t (** Equality functions over the user name. *)
module SyntacticOrd : EqType withtype t = t (** Equality functions using both names, for low-level uses. *)
val canonize : t -> t (** Returns the canonical version of the name *) end
(** {6 Constant Names } *)
module Constant: sig type t
(** Constructors *)
val make : KerName.t -> KerName.t -> t (** Builds a constant name from a user and a canonical kernel name. *)
val make1 : KerName.t -> t (** Special case of [make] where the user name is canonical. *)
val make2 : ModPath.t -> Label.t -> t (** Shortcut for [(make1 (KerName.make ...))] *)
(** Projections *)
val user : t -> KerName.t val canonical : t -> KerName.t
val modpath : t -> ModPath.t (** Shortcut for [KerName.modpath (user ...)] *)
val label : t -> Label.t (** Shortcut for [KerName.label (user ...)] *)
(** Comparisons *)
include QNameS withtype t := t
val equal : t -> t -> bool [@@ocaml.deprecated "(8.13) Use QConstant.equal"] (** Default comparison, alias for [CanOrd.equal] *)
val hash : t -> int [@@ocaml.deprecated "(8.13) Use QConstant.hash"] (** Hashing function *)
val change_label : t -> Label.t -> t (** Builds a new constant name with a different label *)
(** Displaying *)
val to_string : t -> string (** Encode as a string (not to be used for user-facing messages). *)
valprint : t -> Pp.t (** Print internal representation (not to be used for user-facing messages). *)
val debug_to_string : t -> string (** Same as [to_string], but outputs extra information related to debug. *)
val debug_print : t -> Pp.t (** Same as [print], but outputs extra information related to debug. *)
end
(** The [*_env] modules consider an order on user part of names
the others consider an order on canonical part of names*)
module Cpred : Predicate.S withtype elt = Constant.t
module Cset : CSig.USetS withtype elt = Constant.t
module Cset_env : CSig.USetS withtype elt = Constant.t
module Cmap : Map.UExtS withtype key = Constant.t and module Set := Cset (** A map whose keys are constants (values of the {!Constant.t} type).
Keys are ordered wrt. "canonical form" of the constant. *)
module Cmap_env : Map.UExtS withtype key = Constant.t and module Set := Cset_env (** A map whose keys are constants (values of the {!Constant.t} type).
Keys are ordered wrt. "user form" of the constant. *)
(** {6 Inductive names} *)
module MutInd : sig type t
(** Constructors *)
val make : KerName.t -> KerName.t -> t (** Builds a mutual inductive name from a user and a canonical kernel name. *)
val make1 : KerName.t -> t (** Special case of [make] where the user name is canonical. *)
val make2 : ModPath.t -> Label.t -> t (** Shortcut for [(make1 (KerName.make ...))] *)
(** Projections *)
val user : t -> KerName.t val canonical : t -> KerName.t
val modpath : t -> ModPath.t (** Shortcut for [KerName.modpath (user ...)] *)
val label : t -> Label.t (** Shortcut for [KerName.label (user ...)] *)
(** Comparisons *)
include QNameS withtype t := t
val equal : t -> t -> bool [@@ocaml.deprecated "(8.13) Use QMutInd.equal"] (** Default comparison, alias for [CanOrd.equal] *)
val hash : t -> int [@@ocaml.deprecated "(8.13) Use QMutInd.hash"]
(** Displaying *)
val to_string : t -> string (** Encode as a string (not to be used for user-facing messages). *)
valprint : t -> Pp.t (** Print internal representation (not to be used for user-facing messages). *)
val debug_to_string : t -> string (** Same as [to_string], but outputs extra information related to debug. *)
val debug_print : t -> Pp.t (** Same as [print], but outputs extra information related to debug. *)
module Ind : sig (** Designation of a (particular) inductive type. *) type t = MutInd.t (* the name of the inductive type *)
* int (* the position of this inductive type withintheblockofmutually-recursiveinductivetypes.
BEWARE: indexing starts from 0. *) val modpath : t -> ModPath.t
include QNameS withtype t := t
end
type inductive = Ind.t
module Construct : sig (** Designation of a (particular) constructor of a (particular) inductive type. *) type t = Ind.t (* designates the inductive type *)
* int (* the index of the constructor
BEWARE: indexing starts from 1. *)
val ith_mutual_inductive : inductive -> int -> inductive val ith_constructor_of_inductive : inductive -> int -> constructor val inductive_of_constructor : constructor -> inductive val index_of_constructor : constructor -> int
(** {6 Hash-consing } *)
val hcons_con : Constant.t Hashcons.f val hcons_mind : MutInd.t Hashcons.f val hcons_ind : inductive Hashcons.f val hcons_construct : constructor Hashcons.f
(******)
type'a tableKey =
| ConstKey of'a
| VarKey of Id.t
| RelKey of Int.t
type inv_rel_key = int (** index in the [rel_context] part of environment startingbytheend,{einverse}
of de Bruijn indice *)
val eq_table_key : ('a -> 'a -> bool) -> 'a tableKey -> 'a tableKey -> bool val hash_table_key : ('a -> int) -> 'a tableKey -> int val eq_constant_key : Constant.t -> Constant.t -> bool
(** equalities on constant and inductive names (for the checker) *)
val eq_ind_chk : inductive -> inductive -> bool
(** {5 Module paths} *)
type module_path = ModPath.t =
| MPfile of DirPath.t
| MPbound of MBId.t
| MPdot of ModPath.t * Label.t
[@@ocaml.deprecated "(8.8) Alias type"]
module Projection : sig
module Repr : sig type t
val make : inductive -> proj_npars:int -> proj_arg:int -> Label.t -> t
include QNameS withtype t := t
val constant : t -> Constant.t (** Don't use this if you don't have to. *)
val inductive : t -> inductive val mind : t -> MutInd.t val npars : t -> int val arg : t -> int val label : t -> Label.t
val equal : t -> t -> bool [@@ocaml.deprecated "(8.13) Use QProjection.equal"] val hash : t -> int [@@ocaml.deprecated "(8.13) Use QProjection.hash"] val compare : t -> t -> int [@@ocaml.deprecated "(8.13) Use QProjection.compare"]
valmap : (MutInd.t -> MutInd.t) -> t -> t val map_npars : (int -> int) -> t -> t
val to_string : t -> string (** Encode as a string (not to be used for user-facing messages). *)
valprint : t -> Pp.t (** Print internal representation (not to be used for user-facing messages). *)
end type t (* = Repr.t * bool *)
val make : Repr.t -> bool -> t val repr : t -> Repr.t
include QNameS withtype t := t
val constant : t -> Constant.t val mind : t -> MutInd.t val inductive : t -> inductive val npars : t -> int val arg : t -> int val label : t -> Label.t val unfolded : t -> bool val unfold : t -> t
val equal : t -> t -> bool
[@@ocaml.deprecated "(8.13) Use QProjection.equal"] val hash : t -> int
[@@ocaml.deprecated "(8.13) Use QProjection.hash"] val hcons : t Hashcons.f (** Hashconsing of projections. *)
val repr_equal : t -> t -> bool
[@@ocaml.deprecated "(8.13) Use an explicit projection of Repr"] (** Ignoring the unfolding boolean. *)
val compare : t -> t -> int
[@@ocaml.deprecated "(8.13) Use QProjection.compare"]
valmap : (MutInd.t -> MutInd.t) -> t -> t val map_npars : (int -> int) -> t -> t
val to_string : t -> string (** Encode as a string (not to be used for user-facing messages). *)
valprint : t -> Pp.t (** Print internal representation (not to be used for user-facing messages). *)
val debug_to_string : t -> string (** Same as [to_string], but outputs extra information related to debug. *)
val debug_print : t -> Pp.t (** Same as [print], but outputs extra information related to debug. *)
(** {6 Global reference is a kernel side type for all references together } *)
module GlobRef : sig
type t =
| VarRef of variable (** A reference to the section-context. *)
| ConstRef of Constant.t (** A reference to the environment. *)
| IndRef of inductive (** A reference to an inductive type. *)
| ConstructRef of constructor (** A reference to a constructor of an inductive type. *)
val equal : t -> t -> bool
[@@ocaml.deprecated "(8.18) Use QGlobRef.equal"]
val is_bound : t -> bool
include QNameS withtype t := t
module Set_env : CSig.USetS withtype elt = t
module Map_env : Map.UExtS withtype key = t and module Set := Set_env
module Set : CSig.USetS withtype elt = t
module Map : Map.UExtS withtype key = t and module Set := Set
valprint : t -> Pp.t (** Print internal representation (not to be used for user-facing messages). *)
end
(** Located identifiers and objects with syntax. *)
type lident = Id.t CAst.t type lname = Name.t CAst.t type lstring = string CAst.t
val lident_eq : lident -> lident -> bool
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.17Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.