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.
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_SPECIFICATIONv1.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:
Input(port_spec)andOutput(port_spec)— graph boundary port declarations;Literal(const_val)— inline typed constants;Pattern(pattern_id)— catalog nodes (800core patterns +dyn:extensions);SubGraph(graph_hash)— content-addressed hierarchical subgraphs (71multi-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):
| Upstream Node | Upstream ensures | Downstream Node | Downstream requires | Graph Construction Verdict |
|---|---|---|---|---|
hash_dedup | { Unique } (omits Sorted) | binary_search | { Sorted } | ContractViolation rejected at build time |
merge_sort | { Sorted } | sorted_dedup | { Sorted } -> ensures { Sorted, Unique } | Valid (2-stage contract chain) |
sorted_dedup | { Sorted, Unique } | binary_search | { Sorted } | Valid (Contract Satisfied) |
November 25, 2026 Errata, Related Work, and Evolution Addendum
Arithmetic & Type-Soundness Errata (2026-11-25 Audit)
- Pairwise Percentage Fix (
227,653 / 413,449 = 55.06%[55.1%], NOT54.9%):- Dividing
227,653compatible port pairs (numerator) by413,449total ordered pairs (denominator) equals0.550619... = 55.06%(55.1%), while the remaining185,796 / 413,449incompatible pairs equal0.449380... = 44.94%(44.9%), summing cleanly to100%(55.06% + 44.94% = 100%). The February 2026 PDF mistakenly printed54.9%(100% - 45.1%, transposing the tenths digit of44.94%).
- Dividing
- Why
"Port-Type-Compatible (with Any Wildcard)"Replaces"Type-Safe"(Non-Transitivity & Unsoundness ofAny):- In Pattern v1.1’s port matcher, the dynamic wildcard type
Anymatched every concreteGraphTypebidirectionally (T ~ AnyandAny ~ Ufor allT, U). As established in gradual-typing theory (Siek & Taha, 2006), consistency~withAnyis not transitive: anIntoutput wired into anAnypass-through node wired into aTextconsumer passes pairwise port checks (Int ~ AnyandAny ~ Text) while producing an ill-typedInt -> Textmismatch 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 byAny-typed generic utility ports (identity,print, container wrappers). Accordingly, we replace"type-safe pairings"with"port-type-compatible (with Any wildcard)", and note that finitePort Semantic Contracts(Sorted,NonEmpty, etc.) were syntactic tag propagation rules rather than SMT-discharged refinement proofs.
- In Pattern v1.1’s port matcher, the dynamic wildcard type
- Epistemic & Licensing Status (
unmetered,BSL-1.1/ Private Core): Archival PDF (#08) is public at/papers/archive/08-Pattern-Programming-Language.pdfunder CC BY-ND 4.0. Publicpattern-langbinaries atopenIE-dev/pattern-langship under BSL-1.1, while full core compiler and 37-language emitter sources reside in private mirroropenIE-dev/pattern-lang-core(unreproduced externally).
Chronological Evolution Within OpenIE Research
- Sound Typed Graphs, Loops & Machine-Checked VCs (Reality Code Engine (
RCE) & RCE-VC): Eliminated unsound bidirectionalAnywildcards and pure-DAG acyclicity restrictions (Kahn's sortcannot express stateful event loops or OS kernels), scaling RCE to2,221deterministic verification checks backed by machine-checked proof obligations (RCE-VC). - Unifying Language and Tensor DAGs (
flowG): Merged.gpdataflow concepts with dtype-explicit, capability-safeFunctionGraphlowering inopenIE-dev/flow-g(Apache-2.0). - 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/10bounded ties,3.59xrepeat-energy reduction).
Related Work & External References
- Dennis, J. B., & Misunas, D. P. (1975). A Preliminary Architecture for a Basic Data-Flow Processor. ISCA 1975, 126–132 — foundational formulation of static dataflow program graphs and token-firing semantics.
- Morrison, J. P. (1994 / 2010). Flow-Based Programming: A New Approach to Application Development. Van Nostrand Reinhold — bounded-port black-box component networks closely foreshadowing
.gpgraphs. - Meyer, B. (1992). Applying “Design by Contract”. IEEE Computer, 25(10), 40–51 — origin of
requires/ensuresprecondition and postcondition software contracts. - Plotkin, G., & Pretnar, M. (2009). Handlers of Algebraic Effects. ESOP 2009; Gifford, D. K., & Lucassen, J. M. (1986). Integrating Functional and Imperative Programming (type-and-effect systems for automatic parallelization).
- Rondon, P. M., Kawaguchi, M., & Jhala, R. (2008). Liquid Types. PLDI 2008, 159–169 — SMT-decidable refinement predicates (
{v: List Int | Sorted v}), contrasting with Pattern v1.1’s syntactic finite tag propagation. - Siek, J. G., & Taha, W. (2006). Gradual Typing for Functional Languages. Scheme and Functional Programming Workshop 2006 — formal explanation of why bidirectional
Anyconsistency breaks static transitivity and soundness without runtime casts.
Changelog (2026-11-25)
- Corrected
227,653 / 413,449from"54.9%"to55.06%(55.1%) alongside185,796 / 413,449 = 44.94%(44.9%), summing to100%. - Replaced
"type-safe"intitle,headlineMetric, and claims with"port-type-compatible (with Any wildcard)"and added an explicit soundness erratum explaining how bidirectionalAnymatching breaks static type soundness. - Disclosed
BSL-1.1binary licensing and privateopenIE-dev/pattern-lang-coreprovenance (unreproduced externally), separated Part I from Part II, and cited Dennis & Misunas (1975), Morrison FBP (1994), Meyer (1992), Gifford & Lucassen (1986) / Plotkin & Pretnar (2009), Liquid Types (Rondon et al., 2008), and Siek & Taha (2006).
David Charlot
Open Interface Engineering, Inc. · Signed Provenance · Self-Checked
Archival PDF (#08) public at /papers/archive/08-Pattern-Programming-Language.pdf under CC BY-ND 4.0; Pattern-lang binaries ship under BSL-1.1 at openIE-dev/pattern-lang, while full core sources reside in private mirror openIE-dev/pattern-lang-core (externally unreproduced). Full licensing & AI-use disclosure →
Video Summaries, Syndication & Site Reference
Check the primary artifacts or run an independent replication
Inspect signed provenance manifests, rerun our public Apache-2.0 commodity-hardware replication kits, review our November 25, 2026 outside-review errata, or browse primary manuscripts on the Research Hub.