package nuscr
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c5a419fd1fdea78fb63b3a3c335b0e6b0f2b08d65b79870565bdcc0f997bc728
sha512=83ef593ed514eeef1b10069af54562833d617d1c338c5adaf82ee5c3ea7ec4569b3643fcbb237b3cb79ce2f579094cbd17217efa5f4e522bd20f67e1df3a7dbd
doc/nuscr.lib/Nuscrlib/Gtype/index.html
Module Nuscrlib.Gtype
Global types
type global_protocol = Nuscrlib__.Syntax.raw_global_protocol Loc.locatedtype payload = | PValue of Names.VariableName.t Base.option * Expr.payload_type| PDelegate of Names.ProtocolName.t * Names.RoleName.t
val equal_payload : payload -> payload -> Ppx_deriving_runtime.boolval sexp_of_payload : payload -> Sexplib0.Sexp.tval pp_payload :
Ppx_deriving_runtime.Format.formatter ->
payload ->
Ppx_deriving_runtime.unitval show_payload : payload -> Ppx_deriving_runtime.stringval compare_payload : payload -> payload -> Ppx_deriving_runtime.intA message in a global type carries a label, and a list of payloads.
val equal_message : message -> message -> Ppx_deriving_runtime.boolval sexp_of_message : message -> Sexplib0.Sexp.tval pp_message :
Ppx_deriving_runtime.Format.formatter ->
message ->
Ppx_deriving_runtime.unitval show_message : message -> Ppx_deriving_runtime.stringval compare_message : message -> message -> Ppx_deriving_runtime.intval typename_of_payload : payload -> Names.PayloadTypeName.ttype rec_var = {rv_name : Names.VariableName.t;(*Variable Name
*)rv_roles : Names.RoleName.t Base.list;(*Which roles know this variable
*)rv_ty : Expr.payload_type;(*What type does the variable carry
*)rv_init_expr : Expr.t;(*What is the initial expression assigned at the beginning of recursion
*)
}Recursion variable
val sexp_of_rec_var : rec_var -> Sexplib0.Sexp.tval equal_rec_var : rec_var -> rec_var -> Ppx_deriving_runtime.booltype t = | MessageG of message * Names.RoleName.t * Names.RoleName.t * t(*
*)MessageG (msg, sender, receiver, t)starts by sending messagemsgfromsendertoreceiverand continues ast| MuG of Names.TypeVariableName.t * rec_var Base.list * t(*
*)MuG (type_var, rec_vars, g)is a recursive type, corresponding to the syntax `\mu t. G`, where t is represented bytype_varand G is represented byt.rec_varsare recursion parameters, used in RefinementTypes extension for parameterised recursion, an empty list is supplied when that feature is not used.| TVarG of Names.TypeVariableName.t * Expr.t Base.list * t Base.Lazy.t(*
*)TVarG (type_var, exprs, g_lazy)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.g_lazyprovides a convenient way to access the type that the type variable recurses into.| ChoiceG of Names.RoleName.t * t Base.list(*
*)ChoiceG (name, ts)expresses a choice located at participantnamebetween thets| EndG(*Empty global type
*)| CallG of Names.RoleName.t * Names.ProtocolName.t * Names.RoleName.t Base.list * t(*
*)CallG (caller, protocol, participants, t)-callercallsprotocol, invitingparticipantsto carry out the roles inprotocol(dynamic roles in nested protocols are not included)
The type of global types. See also LiteratureSyntax.global for a simpler syntax.
val sexp_of_t : t -> Sexplib0.Sexp.tMapping of protocol name to the roles ('static' participants, dynamic participants) participating in the protocol, the names of the nested protocols defined inside it and its global type
type nested_global_info = {static_roles : Names.RoleName.t Base.list;dynamic_roles : Names.RoleName.t Base.list;nested_protocol_names : Names.ProtocolName.t Base.list;gtype : t;
}type nested_t = nested_global_info Base.Map.M(Names.ProtocolName).tval show : t -> Base.stringProvides a textual representation of a global type
val show_nested_t : nested_t -> Base.stringProvides a textual representation of a global type with nested protocols
val call_label :
Names.RoleName.t ->
Names.ProtocolName.t ->
Names.RoleName.t Base.list ->
Names.LabelName.tGenerates a unique label for a protocol call based on the caller, the protocol called and the participants involved
val of_protocol : global_protocol -> tTurn a raw protocol (from the parser) into a global type.
val nested_t_of_module : scr_module -> nested_tTurn scribble module (from the parser) into a nested global type
Normalise a global type. This mainly collapses nested choice on the same participant and unfolds fixpoints
Validate refinements in the given global type, requires RefinementTypes pragma
val show_rec_var : rec_var -> Base.stringConvert rec_var to string