BRIK64
PCD — Printed Circuit Description

The blueprint standard for software.

PCD is a Turing-complete language where programs are circuit schematics. Every valid PCD program has Thermodynamic Coherence Φc = 1: no dead branches, no unreachable code, no undefined flows.

“PCD is to code what architectural blueprints are to buildings. You describe once. You build in any material.”

[01] NOT A LANGUAGE — A FORMAT

Not a language

PCD is a format, like PDF for documents or SVG for graphics. It describes computation, not syntax.

Verified operations

Every PCD program is built from formally verified operations. Core proven in Coq, plus contract-based extended set.

Verified by design

If the blueprint doesn’t close as a circuit (Φ_c ≠ 1), it simply won’t compile. The math is the guarantee.

Multi-target

Compile to Rust, JavaScript, Python, C, C++, Go, COBOL, and more.

Self-compiling

The brikc compiler compiles itself producing an identical hash. The fixpoint is the proof.

Designed for AI

128 total operations. An LLM can learn the entire language. Generate certified PCD in seconds.

[02] SYNTAX

Circuit schematics, not source code

Every PCD program is a named circuit block. The OUTPUT directive marks the final value emitted. Variables are immutable (SSA form). Functions, closures, loops, and conditionals are all supported.

Program Structure

PC circuit_name {
    // functions and logic here
    OUTPUT result;
}

Variables & Functions

let x = 42;           // immutable
let name = "hello";    // string
let flag = true;       // boolean

fn add(a, b) {
    return a + b;
}

fn factorial(n) {
    if (n <= 1) { return 1; }
    return n * factorial(n - 1);
}

Loops & Closures

// Loop with carried variable
let count = 0;
loop(10) as i {
    let count = count + 1;
}

// Closure
let double = fn(n) { n * 2 };
let result = double(5);   // 10
PC hello {
    let msg = "Hello, verified world!";
    let n = LEN(msg);
    WRITE(1, msg, n);
    OUTPUT 0;
}

[03] 128 MONOMERS

The complete operation catalog

64 formally verified atomic operations (Core, Coq-proven) + 64 bounds-checked extended operations (CONTRACT). Every monomer has a declared domain, range, postconditions, and termination guarantee.

Core Monomers — 64 operations Φc = 1

Arithmetic8 operations for integer mathCoq
Logic8 operations for bitwise logicCoq
Memory8 operations for memory managementCoq
Control8 operations for control flowCoq
I/O8 operations for input/outputCoq
String8 operations for string processingCoq
Crypto8 operations for cryptographyCoq
System8 operations for system callsCoq

Extended Monomers — 64 operations CONTRACT

Float648 operations for floating-point math
Math8 operations for transcendental functions
Network8 operations for networking
Graphics8 operations for graphics buffers
Audio8 operations for audio processing
Filesystem8 operations for filesystem access
Concurrency8 operations for parallel execution
Interop8 operations for foreign function interface

Core monomers remain formally verified regardless of what Extended monomers surround them. The compiler enforces the boundary statically.

[04] EVA ALGEBRA

Three operators. Correctness preserved.

SEQ

Sequential

Do A then B: output of A feeds into B. Pipeline composition.

PAR

Parallel

Do A and B independently on the same input. Results as tuple.

COND

Conditional

If predicate P holds, do A; otherwise do B. Both branches verified.

Correctness preserved by composition. Proven in Coq. Φc = 1 for the entire composition if all constituent monomers are Core.

One blueprint. Any material.

PCD describes WHAT your program computes — not HOW. Language-agnostic. Mathematically verifiable. Compiles to any target.