Documentation

Miri.Interpreter.Clock

Pinned clock.rs. Host time is an explicit environment, never substituted with virtual time. Nanoseconds are exact integers; u128 saturation, Duration's u64 seconds bound, mixed-clock assertions and host checked-add fallback are preserved. No particular host clock trace is a proof over all environments.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Instances For
            def Miri.Interpreter.Clock.instReprInstant.repr {Host✝ : Type} [Repr Host✝] :
            Instant Host✝ → Nat → Std.Format
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Instances For
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  inductive Miri.Interpreter.Clock.Deadline (Host System : Type) :
                  Instances For
                    @[instance_reducible]
                    instance Miri.Interpreter.Clock.instReprDeadline {Host✝ System✝ : Type} [Repr Host✝] [Repr System✝] :
                    Repr (Deadline Host✝ System✝)
                    Equations
                    def Miri.Interpreter.Clock.instReprDeadline.repr {Host✝ System✝ : Type} [Repr Host✝] [Repr System✝] :
                    Deadline Host✝ System✝ → Nat → Std.Format
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Instances For
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          Instances For
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              @[reducible, inline]
                              Equations
                              Instances For
                                structure Miri.Interpreter.Clock.HostHooks (Host System S : Type) :
                                Instances For
                                  def Miri.Interpreter.Clock.addHostLossy {H S : Type} (checkedAdd : H → Duration → M S (Option H)) (time : H) (duration : Duration) :
                                  M S H

                                  On host overflow the source retries exactly one hour, then asserts that this succeeds. It does not clamp to a fabricated maximum host timestamp.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    def Miri.Interpreter.Clock.Instant.addLossy {Host System S : Type} (h : HostHooks Host System S) (instant : Instant Host) (duration : Duration) :
                                    M S (Instant Host)
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      def Miri.Interpreter.Clock.Instant.durationSince {Host System S : Type} (h : HostHooks Host System S) (instant earlier : Instant Host) :
                                      Equations
                                      Instances For
                                        def Miri.Interpreter.Clock.Monotonic.new {Host System S : Type} (h : HostHooks Host System S) (communicate : Bool) :
                                        M S (Monotonic Host)
                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          def Miri.Interpreter.Clock.Monotonic.tick {Host : Type} (checkedArithmetic : Bool) (clock : Monotonic Host) :

                                          Rust's virtual tick uses ordinary u128 addition. The source build's arithmetic overflow-check setting is explicit, rather than silently saturating.

                                          Equations
                                          Instances For
                                            def Miri.Interpreter.Clock.Monotonic.sleep {Host System S : Type} (h : HostHooks Host System S) (clock : Monotonic Host) (duration : Duration) :
                                            M S (Monotonic Host)
                                            Equations
                                            Instances For
                                              def Miri.Interpreter.Clock.Deadline.addLossy {Host System S : Type} (h : HostHooks Host System S) (deadline : Deadline Host System) (duration : Duration) :
                                              M S (Deadline Host System)
                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                def Miri.Interpreter.Clock.timeout {Host System S : Type} (h : HostHooks Host System S) (clock : Monotonic Host) (communicate : Bool) (kind : TimeoutClock) (style : TimeoutStyle) (duration : Duration) :
                                                M S (Deadline Host System)

                                                Preserve source effect ordering: RealTime checks communication before reading the host; Absolute monotonic uses epoch without reading now.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For