Documentation

Semantic.CC.Safety

The following defines platforms.

Context signature of a platform of n ground capabilities.

Equations
Instances For

    A platform heap with n ground capabilities (basic capabilities).

    Equations
    Instances For

      The size of a signature.

      Equations
      Instances For
        def CC.BVar.level {s : Sig} {k : Kind} :
        BVar s k

        Debruijn-level of a bound variable.

        Equations
        Instances For

          Convert a capture set in a platform context to a concrete capability set. Platform contexts have N capabilities arranged as pairs (C, x) at levels (0,1), (2,3), ..., (2N-2, 2N-1), where capability i corresponds to variables at levels 2i and 2i+1. Bound variables map via level / 2, while free variables directly reference heap locations.

          Equations
          Instances For

            Type environment for a platform with N ground capabilities. Maps each pair (C, x) to capability i at heap location i: capture variable C maps to singleton ground capture set {i}, term variable x maps to heap location i.

            Equations
            Instances For

              The platform heap is well-formed: it contains only capabilities, no values.

              The platform heap has finite domain {0, 1, ..., N-1}.

              Platform memory with N ground capabilities.

              Equations
              Instances For

                Platform memory M subsumes platform memory N when M ≥ N.

                theorem CC.env_typing_platform_monotonic {s : Sig} {Γ : Ctx s} {env : TypeEnv s} {N M : } (hNM : N M) (ht : EnvTyping Γ env (Memory.platform_of N)) :

                EnvTyping for platform is monotonic: platform N types in platform M memory when M ≥ N.

                An expression e is safe with a platform environment of N ground capabilities under permission P iff for any possible reduction state starting from e on the platform, it is progressive.

                Equations
                Instances For

                  Reachability of a location in platform heap is just the singleton set.

                  The length of a platform signature is 2*N.

                  Lookup of term variable in platform environment.

                  Lookup of capture variable in platform environment.

                  For any bound term variable in a platform signature, its level divided by 2 is less than N.

                  For any bound capture variable in a platform signature, its level divided by 2 is less than N.

                  The denotation of a capture set in the platform environment equals its direct capability set translation, provided the capture set is well-formed.

                  Adequacy of semantic typing on platform contexts. Requires that the capture set is closed (contains no free variables).