Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Nuscrlib.LtypeLocal type management
type t = | RecvL of Gtype.message * Names.RoleName.t * tRecvL (msg, name, t) waits for message msg from name and continues as t
| SendL of Gtype.message * Names.RoleName.t * tSendL (msg, name, t) sends message msg to name and continues as t
| ChoiceL of Names.RoleName.t * t Base.listChoiceL (name, ts) is a choice (internal or external) from name between the ts
| TVarL of Names.TypeVariableName.t * Expr.t Base.listTVarL (type_var, exprs) is a type variable, scoped inside a recursion. type_var is the name of the type variable, exprs are 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 * tMuL (type_var, rec_vars, l) is a recursive type, corresponding to the syntax `\mu t. L`, where t is represented by type_var and L is represented by t. rec_vars are 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.
| EndLEmpty type
*)| InviteCreateL of Names.RoleName.t Base.list
* Names.RoleName.t Base.list
* Names.ProtocolName.t
* tSend 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
* taccept role@Proto(roles...; new roles...) from X; t, used only in Nested Protocols extension
*)| SilentL of Names.VariableName.t * Expr.payload_type * tUsed 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