Documentation

VCVio.Interaction.Multiparty.Examples

Examples: multiparty endpoints with local views #

This file contains examples showing how the native multiparty endpoint types compute definitionally in the broadcast, directed, and profile-based communication models introduced in the new Interaction.Multiparty layer.

Besides the basic broadcast and directed examples, the later sections focus on adversarial semantics. They show that the current sequential Interaction.Spec framework can already model, in a definitionally transparent way:

The examples are written using pattern-matching resolvers rather than equality tests. This is deliberate: for concrete finite party types, it keeps the local endpoint types definitionally transparent.

Instances For

    resolveBroadcastFor me owner is the local-view projection of the broadcast model to the fixed participant me.

    At nodes owned by me, the result is LocalView.active. At all other nodes, the result is LocalView.observe.

    This definition is written by pattern matching, rather than by equality tests, so that endpoint types reduce definitionally in examples.

    Instances For

      resolveDirectedFor me src dst is the local-view projection of the directed model to the fixed participant me.

      It returns:

      • active when me is the node's source party;
      • observe when me is the node's designated destination party;
      • hidden otherwise.

      As in the broadcast model, this resolver is defined by pattern matching, so that local endpoint types unfold definitionally.

      Instances For
        Instances For

          DeliveryParty is a small network with one active adversary, two possible recipients, one auditor, and one completely uninformed outsider.

          Instances For

            The public scheduling summary of a network action.

            This forgets message payloads and records only who, if anyone, received a delivery.

            Instances For

              Possible one-step powers of a scheduling adversary for a single pending message.

              The adversary may:

              • drop the message entirely;
              • deliver it only to Bob;
              • deliver it only to Carol; or
              • duplicate it and deliver to both Bob and Carol.
              Instances For
                @[implicit_reducible]
                def Interaction.Multiparty.instDecidableEqNetworkAction.decEq {Msg✝ : Type u_1} [DecidableEq Msg✝] (x✝ x✝¹ : NetworkAction Msg✝) :
                Decidable (x✝ = x✝¹)
                Instances For

                  Parties in a tiny adaptive-corruption example.

                  The adversary first chooses whom to corrupt, and then gains active control over the next move that emerges from the corrupted side.

                  Instances For

                    The honest party corrupted by the adversary.

                    Instances For