PML Research LabLanguage · v0.3

SmokyCoders Research · PML v0.3

PML formal language specification

Independent researcher: Prabhat Kumar Manna · Experimental framework — not a P vs NP solution.

PML is a declarative domain-specific language for E–T–I–G experiments. Every construct must map to a mathematical object.

Alphabet & types

EBNF (core)

system       = "SYSTEM" ident "{" block* "}" ;
block        = space_b | geom_b | info_b | energy_b | dyn_b | time_b | obj_b | verify_b ;
space_b      = "SPACE" ":" "X" "IN" "BOOLEAN_HYPERCUBE" "(" int ")" ;
geom_b       = "GEOMETRY" ":" "DISTANCE" "=" ("HAMMING" | "FISHER") ;
info_b       = "INFORMATION" ":" info_item+ ;
info_item    = "DISTRIBUTION" "=" dist | "MEASURE" "=" "SHANNON_ENTROPY" ;
dist         = "FACTORIZED_BERNOULLI" | "EXACT" | "SPARSE_POPULATION" ;
energy_b     = "ENERGY" ":" "FUNCTION" "=" "UNSAT_CLAUSES" ;
dyn_b        = "DYNAMICS" ":" "TYPE" "=" ("NATURAL_GRADIENT" | "MOMENTUM" | "LOCAL_SEARCH" | "ENERGY_ONLY") ;
time_b       = "TIME" ":" "TYPE" "=" ("DISCRETE" | "CONTINUOUS") ;
obj_b        = "OBJECTIVE" ":" "MINIMIZE" "(" ("FREE_ENERGY" | "EXPECTED_ENERGY" | "ENERGY") ")" ;
verify_b     = "VERIFY" ":" "INDEPENDENT_BOOLEAN_CHECK" ;

Semantics

SPACE binds \(X=\{0,1\}^n\). ENERGY binds \(H(x)=\#\) unsatisfied clauses. INFORMATION chooses a model for \(p\). OBJECTIVE MINIMIZE(FREE_ENERGY) means minimize \(F=\langle H\rangle-\tau S(p)\). VERIFY requires decoding to a Boolean vector and evaluating the original CNF — never trusting optimizer energy alone.

Compiler pipeline (v0.3)

  1. Lexer / parser — subset implemented via JSON config in the simulator UI.
  2. AST → mathematical IR (CNF + dynamics params).
  3. Numerical engine (pml-core.js).
  4. Independent SAT verifier.

Full text grammar parsing of .pml source files is planned; current IR is constructed programmatically with the same semantics.

See the paper §3 and simulator.