Skip to content

Instantly share code, notes, and snippets.

@aschmidt75
Created January 18, 2026 15:02
Show Gist options
  • Select an option

  • Save aschmidt75/a09f18fe75b88cefc42759c913e72127 to your computer and use it in GitHub Desktop.

Select an option

Save aschmidt75/a09f18fe75b88cefc42759c913e72127 to your computer and use it in GitHub Desktop.
SOLID.aisp
;; ─── Γ: SOLID_SPEC ───
⟦Γ:SOLID⟧{
;; SRP: Each Component C must have a unique objective ψ
∀c∈Components: ∃!ψ(c) ∧ |Links(c)| ≤ τ_s
;; OCP: Entities open for extension (via Functors), closed for modification
∀e∈Entities: Open(e) ⇔ ∃𝔽:e⇒e' ∧ Closed(e) ⇔ ∂𝒩(e)≡∅
;; LSP: Subtypes T' must be substitutable for T
∀T'⊂T: (Γ ⊢ d:T') ⇒ (Γ ⊨ d:T) ∧ Covariant(T')
;; ISP: No client forced to depend on unused signals
∀client: Interface(client) ≡ {s | s ∈ Signal ∧ Access(client, s)}
;; DIP: Depend on Abstractions (Nucleus), not Concretions (Membrane)
∀dep(A,B): Type(B) ∈ 𝒩 ∨ ⊢bridge(A,B)
}
;; ─── Λ: GENERATION_PIPELINE ───
⟦Λ:Gen⟧{
;; The code generator must optimize for the density (δ) of the spec
codegen ≜ fix λg spec. validate(spec) ≥ ◊⁺⁺ → ⊞(LLVM, spec) | refine(spec)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment