Documentation

Mt.System.Basic

Equations
  • Mt.instIsReservationReservation_1 = spec.is_reservation
structure Mt.System (spec : Mt.Spec) :
Type 1

Describes a system of zero or more threads running in parallel

Systems can be iterated one atomic step at a time by choosing one of its threads. They keep track of the number of threads which panicked during execution

Instances For
    def Mt.System.ThreadIndex {spec : Mt.Spec} (s : Mt.System spec) :
    Type
    Equations
    def Mt.System.done {spec : Mt.Spec} (s : Mt.System spec) :
    Equations
    Equations
    • One or more equations did not get rendered due to their size.
    theorem Mt.System.iterate_threads {spec : Mt.Spec} (s : Mt.System spec) (thread_idx : Mt.System.ThreadIndex s) (blocked_until : Mt.Thread.block_until (List.get s.threads thread_idx) s.state = true) :
    (Mt.System.iterate s thread_idx).threads = let _discr := Mt.Thread.iterate (List.get s.threads thread_idx) s.state; match Mt.Thread.iterate (List.get s.threads thread_idx) s.state with | Mt.Thread.IterationResult.Done a => List.eraseIdx s.threads thread_idx.val | Mt.Thread.IterationResult.Panic a => List.eraseIdx s.threads thread_idx.val | Mt.Thread.IterationResult.Running a thread => List.set s.threads thread_idx.val thread
    theorem Mt.System.iterate_panics {spec : Mt.Spec} (s : Mt.System spec) (thread_idx : Mt.System.ThreadIndex s) (blocked_until : Mt.Thread.block_until (List.get s.threads thread_idx) s.state = true) :
    (Mt.System.iterate s thread_idx).panics = let _discr := Mt.Thread.iterate (List.get s.threads thread_idx) s.state; match Mt.Thread.iterate (List.get s.threads thread_idx) s.state with | Mt.Thread.IterationResult.Done a => s.panics | Mt.Thread.IterationResult.Panic a => s.panics + 1 | Mt.Thread.IterationResult.Running a a_1 => s.panics
    inductive Mt.System.reduces_to {spec : Mt.Spec} :
    Mt.System specMt.System specProp
    Instances For