Documentation

CatCryptCore.Deep.GamePackage

Single-Export Game Packages from Reflected Code #

A RawCode Bool is packaged as a DeepPackage (respectively NomPackage) whose sole export is the main procedure (0, Unit, Bool) — the entry point that runPkg / runDeep evaluate. Composed with rawCode% (reflection of a shallow SPComp α into a syntactic RawCode α), these constructors realize the round trip from a shallow game to a package and back: runDeep (NomPackage.ofCode (rawCode% g)) equals the original shallow program g.

Main definitions #

Main results #

The single-export DeepPackage whose main procedure (0, Unit, Bool) is implemented by c. It has locations L, no imports, and exactly one export; the codomain of that export is Bool, into which c's bundle is cast from the singleton-membership equality.

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

    Evaluating the main export of DeepPackage.ofCode c yields c.eval.

    The stateless nominal package whose main procedure is implemented by c. Its underlying DeepPackage uses no locations, so its atom set is empty and the location invariant reduces to ∅ = ∅.image _.

    Equations
    Instances For

      Evaluating the nominal wrapper yields c.eval.

      End-to-end reflection round trip: a shallow coin-flip game reflects into deep code via rawCode%, wraps into a nominal package via NomPackage.ofCode, and runDeep recovers the original shallow program.