SlimeRPG — RPG → Java bit-exact transpiler
Deterministic modernization of IBM Power Systems / iSeries / AS/400 RPG assets to Java.
Hundreds of millions of lines of RPG run worldwide on IBM Power Systems, iSeries, and AS/400 in banks, manufacturers, distributors, and insurers. SlimeRPG converts them to Java with bit-exact correctness, audit chains, and tamper detection — sharing S2-S5 / S7-S9 with SlimeCOBOL, SlimeMUMPS, and SlimePL/I, with only S1 (RPG FST) and S6 (Java emitter) being RPG-specific.
- RPG IV free-format (`**FREE` directive) is the primary target; 4-dialect fingerprint detection (IBM Classic / IBM Enterprise / Open PL/I-style / GNU-style)
- S9 bench: all 5 axes 100% (35/35) + S6 byte-exact regression 35/35 PASS(measured 2026-05-08)
- Production RPG features — arrays (DIM) / DCL-DS data structures / array-of-DS / internal PROC + DCL-PI + RETURN + recursion / SELECT/WHEN/OTHER / 17 BIFs
- Full file I/O —
DCL-F NAME DISK USAGE(*INPUT/*OUTPUT) EXTFILE('path')+READ / WRITE / CLOSE / %EOF; production RPG batch (file_write / file_read / file_copy / file_grep / file_uppercase) all working - Statement-level proc calls (`HANOI(3:'A':'C':'B');`); string equality auto-rewritten to Java
.equals(); `NOT %EOF(F)` → `!SlimeRPG.eof(F)`
Implements the bit-exact + instant tamper detection required by financial and manufacturing audit. Auditors can re-verify "no information lost in conversion" after the fact — the world's first deterministic transpiler dedicated to RPG (per our research).
A SlimeNENC-family tool that moves legacy code into a modern language without changing its meaning. A hand rewrite quietly drifts and causes incidents; SlimeNENC doesn't interpret meaning — it copies only the "skeleton" (structure), so the computed results stay identical to the original. It proves the behaviour first, so migration anxiety disappears. It copies only what it can, honestly, and isolates what it can't.
Hand rewrites drift on subtle numeric/exception differences (boundary conditions), and verifying that (old-vs-new testing) costs enormous labour. SlimeNENC faithfully mirrors language-specific traps, proves "zero divergence" via differential testing, backed by an independent reference implementation. The deliverable is a machine-checkable "certificate of behavioural invariance," not human UAT. No overstating; what it can't do isn't hidden.
Source is projected onto a Slot IR (language-independent structural intermediate form) and transcribed structure-preserving into the target. The statically-determined core is made bit-exact; dynamic, state-dependent parts are honestly isolated (isolate, don't confabulate). Backed by differential fuzzing plus formal methods where applicable, with deterministic verification a third party can reproduce locally.
Projection (π) of source as unique structure, not semantics. Primitives are modelled rigorously in bit-vector theory and formally verified over all inputs; composition/loops are covered by Csmith-style differential fuzzing — a two-tier guarantee. Non-reproducible computation (float/parallel/AI) goes to tier-③: meaning-equivalence + convergence + residual. "Where there is form, prove it in bytes; where there is none, in meaning. Lie on neither face."
📋 "Ask your AI at this level" copies this page's explanation with an instruction matched to the level you picked. Paste it into your own AI (Claude · GPT · Gemini · Grok) to dig deeper at that resolution.
Headline metrics (measured 2026-05-08)
all 35 samples emit Java that compiles clean and runs as expected
actual/.java and expected/.java match exactly
dialect / token / javac / mutation / determinism — all PASS
DCL-F / READ / WRITE / CLOSE / %EOF / EXTFILE complete
core syntax → arrays → SELECT → internal PROC → DCL-DS → Rosetta → file I/O
%CHAR / %SUBST / %LEN / %TRIM / %SCAN / %REM / %DIV / %ELEM / %UPPER / %LOWER / %EOF and more
Market context — the world's RPG legacy
| Banking | Mid-market US / European banks: account systems on AS/400 / iSeries. RPG II / III / IV / Free-format under continuous maintenance for decades. |
|---|---|
| Manufacturing | Order / inventory / shipping / MRP backbones on IBM i (formerly OS/400). Common in mid-tier manufacturers worldwide, including Japan. |
| Distribution | POS, inventory, sales management. 1980s-90s ERP packages were typically written in RPG/400. |
| Insurance | Mid-tier US life / P&C insurers: claims, contract management, payments. |
| Market scale | Estimated hundreds of millions of LOC worldwide; the IBM i installed base is roughly 120,000 customers (per IBM's own figures). Competitors (Modern Systems / Fresche Solutions / ARCAD / X-Analysis) charge per-LOC at multi-million-dollar scale. SlimeRPG charges only the WASM converter tool — the generated Java is perpetually free to deploy. |
Supported features (Phase 1-8)
| Control flow | IF/ELSEIF/ELSE/ENDIF / FOR (TO/DOWNTO/BY) / DOW (do-while) / SELECT/WHEN/OTHER/ENDSL / RETURN |
|---|---|
| Types | INT(n) → int / PACKED(p:q) → BigDecimal / ZONED / CHAR(n) → String / VARCHAR |
| Data structures | 1D arrays (DIM(N)) / DCL-DS data structures / array-of-DS (DCL-DS NAME DIM(N); FIELD ... ; END-DS;) |
| Procedures | internal DCL-PROC + DCL-PI ... END-PI parameter declarations / RETURN expr / recursion / parameter type inference / class-level static promotion (so internal PROCs share main-scope state) / statement-level proc calls |
| BIFs (17) | %CHAR / %SUBST / %LEN / %TRIM / %TRIML / %TRIMR / %INT / %SCAN / %ABS / %MIN / %MAX / %REM / %DIV / %ELEM / %UPPER / %LOWER / %EOF |
| Operators | arithmetic / comparison / concat (`+`) / <> → != / string equality auto-rewritten to Java .equals() (literals and variables, with `!` prefix on the LHS for `<>`) / NOT → ! / AND → && / OR → || |
| I/O | DSPLY (Java System.out) / indicator *INLR = *ON (no-op comment) / *ON / *OFF / DCL-F NAME DISK USAGE(*INPUT/*OUTPUT) EXTFILE('path') + OPEN / CLOSE / READ FILE / WRITE FILE / %EOF full file I/O |
Conversion example — recursive PROC (Towers of Hanoi)
A typical recursive procedure compiles and runs unchanged:
**FREE
// SlimeRPG sample 21 — Towers of Hanoi (3 disks)
HANOI(3:'A':'C':'B');
*INLR = *ON;
DCL-PROC HANOI;
DCL-PI *N;
N INT(10);
SRC CHAR(1);
DST CHAR(1);
VIA CHAR(1);
END-PI;
IF N = 0;
RETURN;
ENDIF;
HANOI(N - 1:SRC:VIA:DST);
DSPLY 'move ' + %CHAR(N) + ' ' + SRC + '->' + DST;
HANOI(N - 1:VIA:DST:SRC);
END-PROC;
// Generated Java (deterministic, byte-exact)
public class M_21_hanoi {
public static void main(String[] args) {
HANOI(3, "A", "C", "B");
}
public static void HANOI(int N, String SRC, String DST, String VIA) {
if (N == 0) {
return;
}
HANOI(N - 1, SRC, VIA, DST);
SlimeRPG.dsply("move " + SlimeRPG.charOf(N) + " " + SRC + "->" + DST);
HANOI(N - 1, VIA, DST, SRC);
}
}
Algorithms verified end-to-end (Phase 1-8)
- SortingBubble sort (nested FOR + array swap)
- Number theorySieve of Eratosthenes / primality test (DOW + %REM) / Euclidean GCD (recursive + %REM) / factorial / iterative Fibonacci / Collatz 3n+1
- String processingSUBST / SCAN / TRIM / UPPER / Caesar cipher / palindrome (CHAR(1) compare auto-rewritten to
.equals()) / concatenation / word counter / letter frequency / string reverse - ClassicsTowers of Hanoi (recursive + CHAR(1) peg) / 99 bottles / FizzBuzz
- BusinessDCL-DS PERSON (NAME/AGE/CITY) / array-of-struct EMP DIM(3) (NAME/SALARY) / item compute PRICE×QTY=TOTAL / array sum/avg/min/max / grade book (5-tier IF/ELSEIF chain)
- File I/Ofile_write (5 lines out) / file_read (line-by-line + %EOF) / file_copy (verbatim) / file_grep (%SCAN match filter) / file_uppercase (%UPPER conversion)
Audit fitness (financial / manufacturing)
- Bit-exactSame input → same sha256. Includes arrays, data structures, recursion — fully deterministic.
- Byte-exact regression
make testdiffs actual/.java against expected/.java — 35/35 PASS(2026-05-08 baseline). Future emitter changes that introduce unintended output drift are detected immediately. - Audit chainPluggable into the SlimeNENC shared S7 stage (SHA-256 monotonic chain).
- Hallucination detectionTrigram + bigram language model. Axis 2 rejects 100% of mutations.
- Build-time LLMLLM is used only at rule-construction time. Runtime is deterministic rules — basis of the 100.000% claim.
License model
| Charged | WASM/WASI converter tool (developer side) |
|---|---|
| Free | Generated Java source (customer asset, perpetual deploy) |
| Method | Ed25519-signed 144B license + 3-hop air-gap activation (financial / manufacturing audit-ready) |
| Parallelization (PSDP) | Not bundled with this product. See PSDP as a separate SKU under SlimeNENC. |
Resources
- Tech overviewSlimeNENC Technical Overview (RPG chapter in preparation)
- Patent applicationJP 2026-046620 v15b — claims 11 / 14d cover legacy dialect processing for COBOL / MUMPS / PL/I / RPG explicitly
- Sibling productsSlimeCOBOL / SlimeMUMPS / SlimePL/I / SlimeJCL share the same S2-S5 / S7-S9 backbone
- BenchmarksS9 bench harness (5-axis correctness);
make testins6_java_emit_rpg/gives byte-exact regression 35/35
RPG PoC / Materials Back to SlimeNENC family SlimePL/I SlimeCOBOL
