Documentation

Complexity.Foundations.Semantics.Stateful.Module

Compositional semantic implementations #

A module implements one interface using operations of another. Linking uses the upstream free-monad interpreter. Behavior proofs neither choose a computational model nor assign costs. Realization composes representation relations and hides intermediate states existentially. Linking uses the upstream interpreter's common universe for operation answers and client results. Native execution itself permits an independent universe for client results.

Main definitions #

Main results #

@[reducible, inline]
abbrev Cslib.Stateful.Methods (D E : Spec) :
Type (max v w)

Interface methods are programs over another interface.

Instances For
    structure Cslib.Stateful.Module (D E : Spec) :
    Type (max (max u v) w)

    Purely semantic module correctness; neither an execution model nor a cost appears.

    Instances For
      def Cslib.Stateful.Module.realize {D E : Spec} {C τ : Type x} (M : Module D E) {exec : Execution E C τ} (R : Realization E exec) :
      Realization D fun (c : C) (o : D.Op) (a : D.Result o) (c' : C) (ts : List τ) => Executes exec (M.methods o) c a c' ts

      Module realization hides the intermediate representation and composes at any backend.

      Instances For