cosmic-invariant-sieve / docs /INTERCAL_TRIPWIRE.md
SNAPKITTYWEST's picture
push from SNAPKITTYWEST/cosmic-invariant-sieve
62e986b verified
|
Raw History Blame Contribute Delete
1.94 kB

INTERCAL Tripwire

Role

INTERCAL does not execute production workloads. It acts as a compiler-shaped customs checkpoint: unpleasant, deterministic, and impossible for spaghetti code to charm its way through.

Julia and ASP decide whether code is safe. INTERCAL encodes their decision into a compiler-enforced tripwire.

Design

The INTERCAL generator takes the verified borrow chain and structural analysis, then produces:

  • For a valid borrow graph: one exact compiler-valid INTERCAL program
  • For an invalid graph: a deterministic rejection artifact by violation class

Violation Encoding

Violation Class INTERCAL Artifact
Alias violation Invalid SELECT mask
Ownership cycle Unresolved label dependency
Use-after-move Missing resource array slot
Hidden mutation Etiquette imbalance marker
Undeclared effect Forbidden COME FROM edge
Type instability Invalid width transition

Encoding Elements

  • MINGLE for resource aggregation
  • SELECT for mode validation
  • Arrays for resource state tracking
  • Labels for scope boundaries
  • Controlled COME FROM for ownership edges
  • Compiler etiquette distribution for validity checksums

Critical Rule

INTERCAL does not decide whether code is safe.
Julia and ASP decide.
INTERCAL encodes their decision into a compiler-enforced tripwire.

This prevents the comedy language from becoming the source of truth.

Profiles

Compiler profiles are stored in intercal/profiles/. The default profile (default.toml) configures:

  • Etiquette level (strict)
  • Label resolution mode (deterministic)
  • MINGLE/SELECT distribution rules
  • COME FROM edge restrictions

Templates

Templates in intercal/templates/ define the structure for:

  • Valid chains (all checks pass)
  • Alias violations
  • Cycle violations
  • Spaghetti violations