The Pattern Programming Language: Programs as Port-Type-Compatible Pattern Graphs Across 37 Target Languages

February 11, 2026 v1.1 language specification representing programs as ~200-byte binary-serialized DAGs (.gp) with a 5-class Effect System, Port Semantic Contracts, and 37-language codegen—with November 25, 2026 errata fixing its 55.1% port-compatibility share and Any-wildcard soundness caveat.

Diagram of typed pattern DAG execution, effect-based stage splitting, and multi-language emission
Diagram of typed pattern DAG execution, effect-based stage splitting, and multi-language emission

Temporal & Archival Scope: Era 0 Historical Whitepaper (Originally dated February 11, 2026; verbatim historical summary followed below by dated November 25, 2026 Errata & Related Work Addendum) · Canonical OpenIE Chronicle Entry: https://blog.openie.dev/posts/wp-pattern-programming-language/ · Original Archival PDF: https://blog.openie.dev/papers/archive/08-Pattern-Programming-Language.pdf

Provenance & Telemetry Hygiene: Signed Provenance · Self-Checked (automated OpenIE internal gates; not externally peer-reviewed) · Energy Class: unmetered (measured_j ⊥ reported_j ⊥ est_j ⊥ unmetered — Verification, Licensing & AI-Use Disclosure · Glossary & Non-Mixing Rules).

Part I: Contemporary Historical Summary (As Written in February 2026)

Historical Source Provenance (Original Date: February 11, 2026): David Jean Charlot, PhD · Open Interface Engineering. Preserved from PATTERN_LANGUAGE_SPECIFICATION v1.1 (Download Original Feb 2026 PDF).

Thesis: Programs as Directed Acyclic Graphs, Text as a Target View

Completed on February 11, 2026 (one day prior to our public essay on Christopher Alexander’s architectural patterns), the Pattern Programming Language v1.1 Specification inverted traditional source representation: the canonical artifact is a binary-serialized, acyclically checked Directed Acyclic Graph (.gp, averaging ~200 bytes for a 4-node pipeline) that emits source code across 37 target programming languages.

Port-Type Algebra & Five NodeKind Primitives

Every .gp graph wires directed ports over structural GraphType / SynthType descriptors (Int, Float, Bool, Text, Bytes, List<T>, Map<K, V>, Struct, plus a dynamic Any wildcard port descriptor) and 5 NodeKind variants:

  1. Input(port_spec) and Output(port_spec) — graph boundary port declarations;
  2. Literal(const_val) — inline typed constants;
  3. Pattern(pattern_id) — catalog nodes (800 core patterns + dyn: extensions);
  4. SubGraph(graph_hash) — content-addressed hierarchical subgraphs (71 multi-node composite recipes in v1.1).

Evaluating all 413,449 ordered (output_port, input_port) pairs across the 800-pattern core catalog yielded 227,653 port-type-compatible (with Any wildcard) pairings and 185,796 incompatible pairings—printed in the original February 2026 table as "54.9%" (Superseded / corrected to 55.06% [55.1%] compatible + 44.94% [44.9%] incompatible = 100% — see Nov 25, 2026 Errata below).

Stage-Splitting Parallelism via the 5-Class Effect System

Pattern v1.1 labeled each node with one of five effect classes and applied Kahn’s topological sort + an Effect Conflict Matrix to partition independent nodes into parallel vs. serialized execution waves:

5-Class Effect System:
  Pure  ·  IO  ·  State(resource_id)  ·  Concurrent  ·  Nondeterministic

Stage-Splitting Conflict Rules:
  Pure        x  Any Effect        -> Parallelizable whenever data-independent
  State(r_1)  x  State(r_2)        -> Parallelizable when resource_id r_1 != r_2;
                                      Serialized when r_1 == r_2
  IO          x  IO                -> Serialized (preserves observable IO ordering)
  IO          x  Concurrent        -> Serialized
  Concurrent  x  Concurrent        -> Serialized barrier unless isolated in disjoint SubGraphs

Port Semantic Contracts (requires / ensures Predicates)

Because structural port types (List<Int> -> List<Int>) do not track ordering or domain invariants—for instance, wiring hash_dedup(List<Int>) directly into binary_search(List<Int>, Int) destroys sort order while still matching List<Int>—Pattern v1.1 attached finite Port Semantic Contracts (requires / ensures sets over Sorted, Unique, NonEmpty, Normalized, Positive, NonNegative, Bounded):


Arithmetic & Type-Soundness Errata (2026-11-25 Audit)

  1. Pairwise Percentage Fix (227,653 / 413,449 = 55.06% [55.1%], NOT 54.9%):
    • Dividing 227,653 compatible port pairs (numerator) by 413,449 total ordered pairs (denominator) equals 0.550619... = 55.06% (55.1%), while the remaining 185,796 / 413,449 incompatible pairs equal 0.449380... = 44.94% (44.9%), summing cleanly to 100% (55.06% + 44.94% = 100%). The February 2026 PDF mistakenly printed 54.9% (100% - 45.1%, transposing the tenths digit of 44.94%).
  2. Why "Port-Type-Compatible (with Any Wildcard)" Replaces "Type-Safe" (Non-Transitivity & Unsoundness of Any):
    • In Pattern v1.1’s port matcher, the dynamic wildcard type Any matched every concrete GraphType bidirectionally (T ~ Any and Any ~ U for all T, U). As established in gradual-typing theory (Siek & Taha, 2006), consistency ~ with Any is not transitive: an Int output wired into an Any pass-through node wired into a Text consumer passes pairwise port checks (Int ~ Any and Any ~ Text) while producing an ill-typed Int -> Text mismatch in statically typed targets (Rust, C, Haskell) or a runtime type error in dynamic targets (Python, JS) unless explicit runtime cast/blame guards are inserted!
    • Furthermore, the 55.1% compatible share is substantially inflated by Any-typed generic utility ports (identity, print, container wrappers). Accordingly, we replace "type-safe pairings" with "port-type-compatible (with Any wildcard)", and note that finite Port Semantic Contracts (Sorted, NonEmpty, etc.) were syntactic tag propagation rules rather than SMT-discharged refinement proofs.
  3. Epistemic & Licensing Status (unmetered, BSL-1.1 / Private Core): Archival PDF (#08) is public at /papers/archive/08-Pattern-Programming-Language.pdf under CC BY-ND 4.0. Public pattern-lang binaries at openIE-dev/pattern-lang ship under BSL-1.1, while full core compiler and 37-language emitter sources reside in private mirror openIE-dev/pattern-lang-core (unreproduced externally).

Chronological Evolution Within OpenIE Research

  1. Sound Typed Graphs, Loops & Machine-Checked VCs (Reality Code Engine (RCE) & RCE-VC): Eliminated unsound bidirectional Any wildcards and pure-DAG acyclicity restrictions (Kahn's sort cannot express stateful event loops or OS kernels), scaling RCE to 2,221 deterministic verification checks backed by machine-checked proof obligations (RCE-VC).
  2. Unifying Language and Tensor DAGs (flowG): Merged .gp dataflow concepts with dtype-explicit, capability-safe FunctionGraph lowering in openIE-dev/flow-g (Apache-2.0).
  3. Empirical Lookup Testing (The Deterministic Null & AI Coding Market): Evaluated zero-parameter deterministic pattern lookup against cloud LLMs under hardware energy counters (reported_j, 9/10 bounded ties, 3.59x repeat-energy reduction).

Changelog (2026-11-25)


Canonical Provenance, Primary Artifacts & Independent Replication