SlimeCL — AS/400 Control Language Modernizer
CL is the glue of every IBM i (AS/400) shop. SlimeCL transpiles it into portable bash or a single-binary Rust program — so the orchestration layer keeps its behavior while running on commodity hardware.
Control Language declares variables and files, calls RPG / COBOL programs, submits jobs, monitors messages, and drives the batch flow. When an IBM i estate is modernized, the application code gets attention — but the CL that holds the whole shop together is the part nobody wants to touch. SlimeCL reads CL faithfully and re-expresses it as readable, reviewable code, so the job/process layer moves forward by continuity, not by rewrite.
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.
RCVF record I/O, MONMSG message monitoring) are still placeholders, and command coverage is being widened corpus-by-corpus.
We publish the real state rather than a polished promise.
Where it stands today
all implemented (Phase 0)
(dispatcher; Java a later option)
lexer + IR + emit, incl. compile-and-run
variant auto-detection
static executable — no runtime
auditable, reproducible
CL1 → CL2 → CL6 pipeline
SlimeCL follows the same staged shape proven across the JAVATEL transpiler family (lexer → language-agnostic Slot IR → target emitter):
+/- continuation, labels, KWD(val) params, OPM/ILE detectpc state machineTwo targets, one faithful model
CL is a labeled-statement language with GOTO — which neither bash nor safe Rust has.
Rather than approximate it, SlimeCL reproduces it exactly with a small program-counter (pc) state machine: each label becomes a dispatch arm, GOTO sets the next label, and fall-through is explicit. The control flow is preserved, not guessed.
| Target | What it gives you |
|---|---|
| bash | Closest 1:1 to CL’s command-orchestration nature. Readable, reviewable, runs on any Linux today. CHGVAR → assignment / $(( )) arithmetic, IF COND(…) → [ … ] test, SNDPGMMSG → printf. |
| Rust | One static binary, no runtime — the strongest hardware-independence story. Infers types from DCL: *DEC → i64/f64, *CHAR → String, *LGL → bool. |
End-to-end demo (real output)
A self-contained CL program that sums 1..&N using a GOTO loop, transpiled to bash and run as-is:
/* COUNTDOWN - sums 1..&N, no file/CALL */ PGM PARM(&N) DCL VAR(&SUM) TYPE(*DEC) LEN(10 0) VALUE(0) LOOP: IF COND(&I *GT &N) THEN(GOTO CMDLBL(DONE)) CHGVAR VAR(&SUM) VALUE(&SUM + &I) GOTO CMDLBL(LOOP) DONE: SNDPGMMSG MSG(&SUM) ENDPGM # → slimecl --emit bash countdown.clp → runs on Linux: # bash countdown.sh 5 → 15 # bash countdown.sh 100 → 5050 # The Rust target compiles to one static binary with the same result.
What SlimeCL reads today
- Program structure
PGM/ENDPGM, parameters,DCL(typed variables),DCLF(file declarations) - Control flow
IF COND(…) THEN(…),ELSE,DO/ENDDOblocks,GOTO+ labels - Logic & calls
CHGVARassignments / expressions,CALL PGM(…) PARM(…),RETURN - Messaging (parsed)
MONMSG,SNDPGMMSG— captured in the IR; runtime modeling is on the roadmap - Lexical fidelity
/* */comments,+/-line continuation, quoted literals,&-variables,*-special values
Roadmap
- Now (Phase 0)CL1 lexer + CL2 Slot IR + CL6 bash/Rust emit; self-contained programs transpile and run end-to-end
- NextCL2 expression parsing for decimal arithmetic + string comparison; widen command coverage (
SBMJOB,OVRDBF,RTV*,CRT*/DLT*) - ThenRuntime modeling of
RCVFrecord I/O,MONMSGmessage monitoring and data queues, so file-driven CL runs end-to-end - ValidationCL corpus + clean-lex benchmark, published with honest pass-rate tiers (lex / IR / emit / run) — the same transparency we apply across the family
Availability
| Status | Phase 0 prototype — pipeline complete, runnable demo, not yet GA |
|---|---|
| Platform | AS/400 / IBM i Control Language (OPM CLP and ILE CLLE) |
| Targets | bash (today), Rust single binary (today); Java under consideration |
| Engagement | Early-access PoC on your own CL — please get in touch. Pricing and GA finalized after PoC validation. |
Related products
Request an early-access PoC See SlimeJCL (mainframe JCL) LANGUAGE products All products
