Documentation

VCVio.Interaction.Concurrent.Fairness

Fairness of dynamic concurrent runs #

This file adds the first fairness layer on top of Concurrent.ProcessOver.Run.

The key design choice is that fairness is phrased in terms of stable Tickets, not raw frontier events. This matters because the concrete event type available at one residual process state need not even be comparable with the event type at a later state, while a ticket is meant to name the same scheduling obligation across time and across different presentations of the same protocol.

The closed-world Process API is recovered as a specialization of these generic definitions.

Always P means that the temporal property P holds at every time index.

Instances For

    Eventually P means that P holds at some time index.

    Instances For

      EventuallyAlways P means that from some time onward, P keeps holding forever.

      Instances For

        InfinitelyOften P means that P holds at arbitrarily late time indices.

        Instances For
          theorem Interaction.Concurrent.ProcessOver.Run.always_mono {P Q : Prop} (himp : ∀ (n : ), P nQ n) :
          Always PAlways Q
          theorem Interaction.Concurrent.ProcessOver.Run.eventually_mono {P Q : Prop} (himp : ∀ (n : ), P nQ n) :
          def Interaction.Concurrent.ProcessOver.Ticketed.enabledAt {Γ : Spec.Node.Context} (ticketed : Ticketed Γ) (run : ticketed.toProcess.Run) (ticket : ticketed.Ticket) (n : ) :

          enabledAt ticketed run ticket n means that at time n, there exists some complete transcript of the current process step whose stable ticket is ticket.

          Instances For
            def Interaction.Concurrent.ProcessOver.Ticketed.firedAt {Γ : Spec.Node.Context} (ticketed : Ticketed Γ) (run : ticketed.toProcess.Run) (ticket : ticketed.Ticket) (n : ) :

            firedAt ticketed run ticket n means that the actual transcript chosen by the run at time n has stable ticket ticket.

            Instances For
              def Interaction.Concurrent.ProcessOver.Ticketed.WeakFairOn {Γ : Spec.Node.Context} (ticketed : Ticketed Γ) (run : ticketed.toProcess.Run) (ticket : ticketed.Ticket) :

              Weak fairness for one ticket: if the ticket is continuously enabled from some point onward, then it fires infinitely often.

              Instances For
                def Interaction.Concurrent.ProcessOver.Ticketed.StrongFairOn {Γ : Spec.Node.Context} (ticketed : Ticketed Γ) (run : ticketed.toProcess.Run) (ticket : ticketed.Ticket) :

                Strong fairness for one ticket: if the ticket is enabled infinitely often, then it is fired infinitely often.

                Instances For

                  A run is weakly fair when every ticket is weakly fair.

                  Instances For

                    A run is strongly fair when every ticket is strongly fair.

                    Instances For
                      theorem Interaction.Concurrent.ProcessOver.Ticketed.fired_implies_enabled {Γ : Spec.Node.Context} (ticketed : Ticketed Γ) (run : ticketed.toProcess.Run) (ticket : ticketed.Ticket) (n : ) :
                      ticketed.firedAt run ticket nticketed.enabledAt run ticket n

                      The actually fired ticket at time n is always enabled at time n.

                      @[reducible, inline]

                      The closed-world specialization of Always.

                      Instances For
                        @[reducible, inline]

                        The closed-world specialization of Eventually.

                        Instances For
                          @[reducible, inline]

                          The closed-world specialization of EventuallyAlways.

                          Instances For
                            @[reducible, inline]

                            The closed-world specialization of InfinitelyOften.

                            Instances For
                              theorem Interaction.Concurrent.Process.Run.always_mono {P Q : Prop} (himp : ∀ (n : ), P nQ n) :
                              Always PAlways Q
                              theorem Interaction.Concurrent.Process.Run.eventually_mono {P Q : Prop} (himp : ∀ (n : ), P nQ n) :
                              @[reducible, inline]
                              abbrev Interaction.Concurrent.Process.Ticketed.enabledAt {Party : Type u} (ticketed : Ticketed Party) (run : Run ticketed.toProcess) (ticket : ticketed.Ticket) (n : ) :

                              The closed-world specialization of enabledAt.

                              Instances For
                                @[reducible, inline]
                                abbrev Interaction.Concurrent.Process.Ticketed.firedAt {Party : Type u} (ticketed : Ticketed Party) (run : Run ticketed.toProcess) (ticket : ticketed.Ticket) (n : ) :

                                The closed-world specialization of firedAt.

                                Instances For
                                  @[reducible, inline]
                                  abbrev Interaction.Concurrent.Process.Ticketed.WeakFairOn {Party : Type u} (ticketed : Ticketed Party) (run : Run ticketed.toProcess) (ticket : ticketed.Ticket) :

                                  The closed-world specialization of weak fairness for one ticket.

                                  Instances For
                                    @[reducible, inline]
                                    abbrev Interaction.Concurrent.Process.Ticketed.StrongFairOn {Party : Type u} (ticketed : Ticketed Party) (run : Run ticketed.toProcess) (ticket : ticketed.Ticket) :

                                    The closed-world specialization of strong fairness for one ticket.

                                    Instances For
                                      @[reducible, inline]
                                      abbrev Interaction.Concurrent.Process.Ticketed.WeakFair {Party : Type u} (ticketed : Ticketed Party) (run : Run ticketed.toProcess) :

                                      The closed-world specialization of weak fairness.

                                      Instances For
                                        @[reducible, inline]
                                        abbrev Interaction.Concurrent.Process.Ticketed.StrongFair {Party : Type u} (ticketed : Ticketed Party) (run : Run ticketed.toProcess) :

                                        The closed-world specialization of strong fairness.

                                        Instances For
                                          theorem Interaction.Concurrent.Process.Ticketed.fired_implies_enabled {Party : Type u} (ticketed : Ticketed Party) (run : Run ticketed.toProcess) (ticket : ticketed.Ticket) (n : ) :
                                          ticketed.firedAt run ticket nticketed.enabledAt run ticket n