package nuscr
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c5a419fd1fdea78fb63b3a3c335b0e6b0f2b08d65b79870565bdcc0f997bc728
sha512=83ef593ed514eeef1b10069af54562833d617d1c338c5adaf82ee5c3ea7ec4569b3643fcbb237b3cb79ce2f579094cbd17217efa5f4e522bd20f67e1df3a7dbd
doc/nuscr.lib/Nuscrlib/Ltype/index.html
Module Nuscrlib.Ltype
Local type management
type t = | RecvL of Gtype.message * Names.RoleName.t * t(*
*)RecvL (msg, name, t)waits for messagemsgfromnameand continues ast| SendL of Gtype.message * Names.RoleName.t * t(*
*)SendL (msg, name, t)sends messagemsgtonameand continues ast| ChoiceL of Names.RoleName.t * t Base.list(*
*)ChoiceL (name, ts)is a choice (internal or external) fromnamebetween thets| TVarL of Names.TypeVariableName.t * Expr.t Base.list(*
*)TVarL (type_var, exprs)is a type variable, scoped inside a recursion.type_varis the name of the type variable,exprsare expressions supplied into paramterised recursion, used in RefinementTypes extension. Otherwise an empty list is supplied when that feature is not used.| MuL of Names.TypeVariableName.t * (Base.bool * Gtype.rec_var) Base.list * t(*
*)MuL (type_var, rec_vars, l)is a recursive type, corresponding to the syntax `\mu t. L`, where t is represented bytype_varand L is represented byt.rec_varsare recursion parameters, where the first component represents whether the variable is a silent variable (with multiplicity 0). These parameters are used in RefinementTypes extension for parameterised recursion, an empty list is supplied when that feature is not used.| EndL(*Empty type
*)| InviteCreateL of Names.RoleName.t Base.list * Names.RoleName.t Base.list * Names.ProtocolName.t * t(*Send invitations to existing roles and set up/create dynamic pariticipants, used only in NestedProtocols extension
*)| AcceptL of Names.RoleName.t * Names.ProtocolName.t * Names.RoleName.t Base.list * Names.RoleName.t Base.list * Names.RoleName.t * t(*accept role@Proto(roles...; new roles...) from X; t, used only in Nested Protocols extension
*)| SilentL of Names.VariableName.t * Expr.payload_type * t(*Used with refinement types to indicate knowledge obtained via a global protocol, used only in RefinementTypes extension
*)
Local types. See also LiteratureSyntax.local for a simpler syntax.
module LocalProtocolId : sig ... endUnique id identifying a local protocol
type nested_t = (Names.RoleName.t Base.list * t) Base.Map.M(LocalProtocolId).tMapping of local protocol id to the protocol's roles and local type
val show : t -> Base.stringConverts a local type to a string.
val show_nested_t : nested_t -> Base.stringval project : Names.RoleName.t -> Gtype.t -> tProject a global type into a particular role.
val project_nested_t : Gtype.nested_t -> nested_tGenerate the local protocols for a given global_t
Ensure that all the local variables in each local protocol are globally unique, renaming variables to resolve conflicts
type local_proto_name_lookup =
Names.LocalProtocolName.t Base.Map.M(LocalProtocolId).tMapping from local protocol ids to their unique local protocol names
val build_local_proto_name_lookup : nested_t -> local_proto_name_lookupBuilds a map containing the unique string representations for the unique local protocol ids
val show_lookup_table : local_proto_name_lookup -> Base.stringConverts a local protocol name lookup table to a string
val lookup_local_protocol :
local_proto_name_lookup ->
Names.ProtocolName.t ->
Names.RoleName.t ->
Names.LocalProtocolName.tReturn the unique local protocol name for a (role, protocol) pair
val lookup_protocol_id :
local_proto_name_lookup ->
LocalProtocolId.t ->
Names.LocalProtocolName.tLook up the unique name for a local protocol id