SlimeFORTRAN — FORTRAN → modern FORTRAN bit-exact transpiler
★ 9-language Multi-target completed (measured 2026-05-09)
SlimeFORTRAN is the industry’s first 9-language-simultaneous FORTRAN transpiler.
From F77 fixed-form (col 1-72) input, it emits bit-exact code in
modern FORTRAN / C++23 / C11 / Rust / Go / Java / Python / Kotlin / C# — 9 targets, with
each target’s stdout verified byte-identical to gfortran.
| Language | compile | run | vs gfortran stdout | Use case |
|---|---|---|---|---|
| ① modern FORTRAN (F2018 free) | gfortran 13.3 | 25/25 | (reference) | Natural HPC migration target, OpenMP / coarrays |
| ② C++23 | g++ 13.3 -std=c++23 | 10/10 | ✅ 10/10 byte-exact | HPC ecosystem (Eigen/Kokkos), array-hell language-native solution |
| ③ C11 | gcc 13.3 -std=c11 | 10/10 | ✅ 10/10 byte-exact | RHEL 7 / older AIX / older CUDA legacy environments |
| ④ Rust | rustc 1.93 --edition=2021 | 10/10 | ✅ 9/10 (REAL single→double) | memory safety, quant / computational chemistry mission-critical |
| ⑤ Go | go 1.22 | 10/10 | ✅ 9/10 (REAL single→double) | cloud-native batch, Kubernetes / Lambda migration |
| ⑥ Java (SlimeNENC mainline) | javac 21 | 10/10 | ✅ 9/10 (REAL single→double) | Financial batch, Spring Batch / JVM ecosystem integration |
| ⑦ Python | python3 3.12 | 10/10 | ✅ 9/10 (all-double float) | NumPy / SciPy / Jupyter research-ecosystem entry point |
| ⑧ Kotlin | kotlinc 1.3 + java 21 | 10/10 | ✅ 9/10 (REAL single→double) | Android / Kotlin Multiplatform / Spring |
| ⑨ C# | dotnet 8 / .NET 8 | 10/10 | ✅ 9/10 (REAL single→double) | Unity / Windows native / Azure / .NET enterprise |
Test conditions: F77 fixed-form 10-sample subset (hello / arith / if_else / do / real / array / double / dowhile / logical / data) compiled and run on all 8 targets;
stdout compared byte-by-byte against gfortran -o ref && ./ref > expected.txt via diff -q.
The 9/10 figure for the five higher-level targets reflects a single sample (REAL single-precision print formatting only) — a structural artifact of those targets’ floating-point type systems, with no impact on numerical accuracy.
The modern FORTRAN target hits 25/25 byte-exact and S9 5-axis 100%.
Deterministic modernization of FORTRAN 77 assets running at NASA, ECMWF, JAEA, and university labs — to modern FORTRAN.
Generational refresh of HPC numerical code, executed not as a human-review-gated refactor but with bit-exact correctness, audit chains, and tamper detection. Shares S2-S5 / S7-S9 with SlimeCOBOL, SlimeMUMPS, SlimePL/I, and SlimeRPG — only S1 (FORTRAN FST) and S6 (modern FORTRAN emitter) are language-specific.
- 5-dialect fingerprint detection — F77 fixed (col 1-72) / F90 fixed / F90 free / IBM VS / DEC/VAX
- S9 bench: all 5 axes 100% (25/25) + S6 byte-exact regression 25/25 PASS + gfortran compile 25/25 PASS(measured 2026-05-08)
- HPC F77 essentials — SUBROUTINE / typed FUNCTION / RETURN / CALL / COMMON blocks / SAVE / EXTERNAL / function-as-argument / PARAMETER
- Full file I/O —
OPEN(UNIT=N, FILE=..., STATUS=...)+WRITE / REWIND / READ / CLOSE+WRITE(unit, label)form + numbered FORMAT statements (`100 FORMAT('X=', I5, F8.2)`) - Full F66/F77 obsolescent compatibility — arithmetic IF (
IF (X) 10, 20, 30), computed GOTO (GOTO (10,20,30) X), labeled CONTINUE auto-restructured todo/end do, automaticIMPLICIT NONEinjection
Implements the bit-exact + instant tamper detection + 100% gfortran compile guarantee required by HPC. Auditors can re-verify "no information lost in conversion" after the fact — the world's first deterministic FORTRAN 77 → modern FORTRAN transpiler (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 25 samples emit F2018 that compiles clean and runs as expected
actual/.f90 and expected/.f90 match exactly
dialect / token / gfortran / mutation / determinism — all PASS
core syntax → SUBROUTINE/FUNCTION → CHARACTER/DO WHILE/2D arrays → COMMON/SAVE/EXTERNAL → file I/O / arith IF / computed GOTO
F77 fixed / F90 fixed / F90 free / IBM VS / DEC VAX
DO/CONTINUE → do/end do, auto IMPLICIT NONE, identifiers lower-cased, .GT./.LT./.AND. → .gt./.lt./.and.
Market context — the world's FORTRAN legacy
| Weather / geophysics | ECMWF / Japan Meteorological Agency / NOAA / NCAR numerical weather prediction (IFS / GFS / WRF), earthquake and tsunami simulation. Cores written in 1980s-90s F77 and still maintained. |
|---|---|
| Nuclear / particle physics | JAEA / Sandia / Argonne transport, neutron diffusion, Monte Carlo. F77 + extensions carry 30+ years of validated heritage. |
| Computational chemistry | Gaussian / GAMESS / NWChem / VASP atomic / molecular codes. F77/90 mix on HPC clusters with OpenMP/MPI parallelism. |
| Climate / ocean | POP / CCSM / MOM / NEMO ocean general-circulation models, CESM climate model. Long-term climate prediction at research labs. |
| Market scale | Estimated tens of billions of LOC worldwide; running at 60%+ of TOP500 HPC sites. Competitors (NAG Fortran Modernization Tool / Plusoft / open-source fixed2free) charge per-LOC at multi-million-USD scale, or do not preserve semantics. SlimeFORTRAN charges only the WASM converter tool — generated modern FORTRAN is perpetually free to deploy. |
Supported features (Phase 1-5)
| Control flow | IF/THEN/ELSE/ELSEIF/ENDIF / DO label V=a,b[,step] + label CONTINUE → structured do/end do / DO WHILE (cond) / arithmetic IF (IF (X) 10, 20, 30) / computed GOTO (GOTO (10,20,30), X) / GOTO label / STOP / RETURN |
|---|---|
| Types | INTEGER / REAL / DOUBLE PRECISION / CHARACTER*N → character(len=N) / LOGICAL + .TRUE. / .FALSE. |
| Data structures | 1D arrays (INTEGER A(5) / DIMENSION A(5)) / 2D arrays (INTEGER M(2,3)) / DATA initialization (DATA A /1, 2, 3/) / PARAMETER constants |
| Procedures | SUBROUTINE NAME(params) + CALL NAME(args) / typed FUNCTION (INTEGER FUNCTION SQR(X)) / RETURN / function-as-argument (EXTERNAL F + F(X)) / INTRINSIC ABS, SQRT |
| Variable sharing | COMMON blocks (COMMON /SHARED/ X, Y) / SAVE attribute (state persists across CALL) |
| Operators | arithmetic (`+ - * / **`) / relational (.EQ. .NE. .LT. .GT. .LE. .GE. → .eq. .ne. .lt. .gt. .le. .ge.) / logical (.AND. .OR. .NOT.) / string concat (//) / identifiers and keywords auto lower-cased |
| I/O | PRINT *, / WRITE(*,*) / unit-numbered WRITE(unit, label) + READ(unit, label) / numbered FORMAT statements (100 FORMAT('X=', I5)) / OPEN(UNIT=N, FILE='...', STATUS=...) + REWIND + CLOSE |
| Auto-normalization | IMPLICIT NONE auto-injected (right after PROGRAM/SUBROUTINE/FUNCTION) / fixed-form col 1-72 truncation + col 6 continuation recognition / identifiers lower-cased / case preserved inside string literals |
Conversion example — function-as-argument (EXTERNAL + higher-order)
A typical HPC idiom compiles and runs unchanged as modern FORTRAN:
PROGRAM ETEST
EXTERNAL DBL
INTEGER DBL, APPLY, X
X = APPLY(DBL, 5)
PRINT *, 'RESULT=', X
END
INTEGER FUNCTION APPLY(F, X)
INTEGER F, X
EXTERNAL F
APPLY = F(X)
RETURN
END
INTEGER FUNCTION DBL(N)
INTEGER N
DBL = N * 2
RETURN
END
! Generated F2018 (deterministic, byte-exact) program etest implicit none external dbl integer :: dbl, apply, x x = apply (dbl, 5) print * , 'RESULT=', x end program integer function apply(f,x) implicit none integer :: f, x external f apply = f (x) return end function integer function dbl(n) implicit none integer :: n dbl = n * 2 return end function
Algorithms verified end-to-end (Phase 1-5)
- Core syntaxHello World / arithmetic (INTEGER 7×6=42) / IF/ELSE numeric branching / DO loop accumulation (1+2+3+4+5=15) / REAL + SQRT (3-4-5 hypotenuse=5)
- Arrays / types1D array sum-of-squares (1+4+9+16+25=55) / DOUBLE PRECISION division (1.0D0/3.0D0=0.333..) / 2D array (M(I,J)=I*10+J, M(2,3)=23) / DATA initialization (10+20+30=60) / PARAMETER constant (PI×R²=12.566)
- ProceduresSUBROUTINE PRSUM (Σ i=1..N=10) / typed FUNCTION SQR (7²=49) / function-as-argument APPLY(DBL, 5)=10 / SAVE attribute (3 CALLs → COUNT=1,2,3)
- Strings / logicalCHARACTER*20 + concat
//(`Hello, World`) / DO WHILE accumulation / LOGICAL +.AND. .NOT.range check (`in range`) - F66/F77 obsolescentarithmetic IF 3-way (X=-5 → `neg`) / computed GOTO 3-way (X=2 → `two`) / GOTO + labeled statement / DIMENSION on a separate line
- Variable sharing + I/OCOMMON block (X+Y=30) / numbered FORMAT (`X= 42 Y= 3.14`) / OPEN/WRITE/REWIND/READ/CLOSE round-trip (SUM=600) / INTRINSIC ABS+SQRT
Audit fitness (HPC validation heritage / weather / nuclear)
- Bit-exactSame F77 source → same F2018 sha256. Includes arrays, SUBROUTINE, COMMON blocks, function-as-arg — fully deterministic.
- Byte-exact regression
make testdiffs actual/.f90 against expected/.f90 — 25/25 PASS(2026-05-08 baseline). Future emitter changes that introduce unintended drift are detected immediately. - gfortran compile 100%All generated F2018 passes
gfortran 13.3(25/25). Runtime output remains bit-identical to the F77 original after structuring. - Audit chainPluggable into the SlimeNENC shared S7 stage (SHA-256 monotonic chain). Aligns with 30-year retention requirements for weather / nuclear validation.
- 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.
Multi-target roadmap (revised 2026-05-08, Phase-1 completed 2026-05-09)
Reordered priorities based on speed, talent pool, and the “array hell” resolution:
C++ first → C second → Rust third.
The decisive factor is C++23 std::mdspan, which makes the array-hell problem (column/row major + stride + arbitrary base) a native language feature.
Phase 1 (8-language baseline) was completed bit-exact on 2026-05-09; later phases are deepening:
| ① modern FORTRAN | ✅ Phase 1-5 done (F77 fixed → F2018 free), 25/25 byte-exact, natural HPC migration target. |
|---|---|
| ② C++23 | ✅ Phase 7 done (10/10 bit-exact). Next: deepen with std::mdspan + layout_left for ~80% array-hell language solution, HPC ecosystem (Eigen/Kokkos/RAJA) integration. |
| ③ C11 | ✅ Phase 8 done (10/10 bit-exact). Column-major via IDX1D/IDX2D macros, for older CUDA / RHEL 7 / older AIX legacy environments. |
| ④ Rust | ✅ Phase 9 done (9/10 bit-exact). Next: native ndarray Array2 + Order::ColumnMajor, memory-safety premium for mission-critical migration. |
| ⑤ Go | ✅ Phase 9.5 done (9/10 bit-exact). Cloud-native batch, Kubernetes / Lambda migration. |
| ⑥ Java | ✅ Phase 9.6 done (9/10 bit-exact). SlimeNENC family mainline, Spring Batch / JVM legacy integration. |
| ⑦ Python | ✅ Phase 9.7 done (9/10 bit-exact). Shortest path to NumPy/SciPy/Jupyter research-ecosystem. |
| ⑧ Kotlin | ✅ Phase 9.8 done (9/10 bit-exact). Android / Kotlin Multiplatform / mobile-side numerics. |
| ⑨ C# | ✅ Phase 9.9 done (9/10 bit-exact). .NET 8 top-level statements; Unity / Windows native / Azure / .NET enterprise. |
| ⑩ CUDA (Phase 10, future) | Subset of C++ Phase 7 for GPU offloading; one NAS Parallel Benchmark conversion as proof. |
The “array hell” problem and SlimeFORTRAN’s per-array mode selection
FORTRAN and C/C++/Rust differ on six axes regarding array semantics
(index base / memory layout / lower bound / slice notation / whole-array ops / shape-knowing).
Even a trivial A(I,J) conversion requires solving all six axes simultaneously to preserve behaviour.
SlimeFORTRAN selects, per array, one of four conversion modes via the Slot IR, optimised for use case:
| Mode | Approach | bit-exact | Use case |
|---|---|---|---|
| A: Column-major maintain | Preserve FORTRAN’s column-major layout and 1-based index in C++/C/Rust (mdspan layout_left / IDX2D macro / Order::ColumnMajor) | ✅ Fully preserved (memory order match → round-off matches too) | Numerical kernels, BLAS, CFD, signal processing (primary) |
| B: Row-major transpose | Transpose to match the target language’s convention | ❌ Not preserved (cache-locality / SIMD reduction order changes) | GUI / I/O / string processing dominated code (secondary) |
| C: Strided descriptor | mdspan layout_stride for runtime-specified lower bound / stride / layout | ✅ With function inlining (negligible overhead) | Assumed-shape A(:,:) arguments, generic libraries |
| D: ISO_C_BINDING + retain FORTRAN | Keep the computational kernel as compiled FORTRAN (.o via gfortran); thin C++/Rust wrapper calls in | ✅ Fully preserved (original code executes) | Phased migration; rewrite UI in C++ but keep the kernel |
Which array used which target / mode is recorded in the audit chain — auditors can re-verify after the fact.
Conversion example (Mode A, C++23)
! FORTRAN (column-major, 1-indexed) REAL :: A(M, N) A(I, J) = 3.14 // C++23 (Mode A, bit-exact, std::mdspan) #include <mdspan> std::vector<double> data(M*N); auto A = std::mdspan<double, std::dextents<size_t,2>, std::layout_left>(data.data(), M, N); A[i-1, j-1] = 3.14; // SHA-256 parity with FORTRAN A(I,J)
License model
License model
| Charged | WASM/WASI converter tool (developer side) |
|---|---|
| Free | Generated modern FORTRAN source (customer asset, perpetual deploy) |
| Method | Ed25519-signed 144B license + 3-hop air-gap activation (HPC / nuclear audit-ready) |
| Parallelization (PSDP) | Not bundled with this product. See PSDP as a separate SKU under SlimeNENC. |
Resources
- Tech overviewSlimeNENC Technical Overview (FORTRAN chapter in preparation)
- Patent applicationJP 2026-046620 v15b — claims 11 / 14d cover legacy dialect processing for COBOL / MUMPS / PL/I / RPG / FORTRAN explicitly
- Sibling productsSlimeCOBOL / SlimeMUMPS / SlimePL/I / SlimeRPG / SlimeJCL share the same S2-S5 / S7-S9 backbone
- BenchmarksS9 bench harness (5-axis correctness);
make testins6_modern_emit_fortran/gives byte-exact regression 25/25;make compile-testgives gfortran compile 25/25
FORTRAN PoC / Materials Back to SlimeNENC family SlimeRPG SlimePL/I
