Home /Modules/docs/JAVA.CONVERSION.STATUS.md

JAVA.CONVERSION.STATUS.md

docs/reference/JAVA.CONVERSION.STATUS.md · 161 line(s) · markdown

<img align="right" src="../../images/sleela/sleela-medium-profile-permanent-icon-002.jpg" width="45" height="45" alt="SLeeLa">

Java to SLeeLa Conversion: Overall Status

As of: 2026-11-13. Branches: master and main (same content; see section 7). Subject: sleelactl java-convert (the C/C++ converter in sleelactl/convert), the conversion model impl/subjects/conversion/conversion.model (revision 1.3.0), and the Java tier under lib/java that converted programs run on.

This page records measured status only. Every number below comes from a run on the date shown; nothing is projected. The rules are in .kiro/steering/java-to-sleela-conversion.md, the specification in lib/java/JAVA.SPEC.md, the principles and the done/open ledger in CONVERSION.PRINCIPLES.md. Where those and this page disagree, those win and this page is stale.

1. Summary

QuestionAnswer (2026-11-13)
Do converted programs behave like Java?For every construct with a test, yes: 32 of 32 differential checks pass. 22 programs give output byte-identical to OpenJDK 25.0.2, 9 refusal programs are refused with the right construct, and a stale-output check passes.
How much of a real JDK converts?420 of 884 files of the JDK 25.0.2 java.base subset (496 SLeeLa files); 426 with --single-thread. The 2026-11-12 baseline was 344.
Does "converted" mean "compiles"?No. A converted file passed the converter, which refuses what it cannot convert exactly. A tree-wide sleela check of the output has not been measured (section 4).
Is the JDK converted?No. 464 files fail closed and write nothing.
Is it gated in CI?Yes, from 2026-11-13: .github/workflows/java-convert.yml, first run 31 of 31 (section 6).

2. Differential suite (tests/javaconv_differential_test.sh)

Each program in sleelactl/convert/tests/java/ runs on a JDK (javac + java) and, converted, on the SLeeLa VM built from the same commit (impl/build/sleela). The two outputs must be byte-identical.

KindCountMembers
Programs identical to the JDK22Anon, Basics, Bounds, Control, Enums, Floats, Flow, Formats, Functional, Grid, Init, Nested, ObjectText, Operands (191 lines), Records, Refs, Resources, Shapes, Strings, Switches, Sync, Varargs
Refusals (must fail closed with the stated construct, write nothing)9BareObjectMethod, BoxedDecl, IdentityText, LambdaUse, ObjectMethod, QualifiedNested, StringIdentity, SyncBlock, Untyped
Stale-output check1a file converted on one run and refused on the next leaves no .sleela behind
Result32 / 32re-run 2026-11-13 at e048707f (after bd4fc607 added Bounds) against OpenJDK 25.0.2

3. Whole-tree measurement

Input: JDK 25.0.2 src.zip, java.base packages java/lang, java/util, java/math, java/text with their subpackages, 884 files (the same set as the 2026-11-12 baseline). Commands in sleelactl/jdk/README.md.

3.1 History

Date / converterConverted of 884Note
2026-11-12, first converter344baseline
2026-11-13, 323cc04f (before the review)424the 2026-11-13 lowerings (enums, lambdas, nested types, ...)
2026-11-13, 8f617ba2 (review commit)did not finishhung on java/text/{DateFormat,MessageFormat,NumberFormat}; fixed in 55f52f49
2026-11-13, 55f52f49423qualified nested names fixed (+13); 10 files now refused [object-method] whose earlier output the checker rejects
2026-11-13, model 1.3.0 (e3993045)420 (426 with --single-thread)3 more files refused [boxed]; their earlier output did not compile
2026-11-13, e048707f (after bd4fc607 JavaChecks and the language-handler refactor)420 (426 with --single-thread)unchanged; re-measured

The count went down twice on purpose: each time the converter stopped writing output that SLeeLa rejects. A lower honest number is the goal of the fail-closed rule, not a regression.

3.2 Why files fail closed

First refusal of each of the 464 files that fail closed:

ConstructFilesMeaning
nested-ambiguous131one simple name used by several nested types in a file (Entry, Node)
nested67nested forms not converted (local classes, outer.new Inner(), ...)
untyped57an operand of unknown type: no generics inference
volatile32needs --single-thread
object-method31equals/hashCode/getClass on a type that does not declare them
syntax28Java forms the parser does not take
init-block25static { } blocks
model18model limits (64-field class cap, ...)
synchronized16needs --single-thread
boxed13a boxed declared or cast type (Integer i)
native12no Java body
other34lambda-target 11, reserved-member 6, and smaller groups

All diagnostics (a file can carry many): nested-ambiguous 2,566, untyped 810, synchronized 529, nested 400, syntax 274, model 269, volatile 215, native 203, object-method 168, init-block 132, boxed 125, lambda-target 88, reserved-member 47, methodref 19, string-identity 14, switch-expr 14, outer-instance 12, string-static 10, anonymous-nested 9, format-nonliteral 5, lambda-this 5, side-effecting-lvalue 3, member-annotation 2, object-text 2, format-conv 1.

4. What "converted" does and does not prove

4.1 Known ways a converted program can still differ from Java

These are not refused today. Each is listed here so that no result is read as more than it is.

CaseJavaConverted program
An object held in an erased generic shown as text (Box<StringBuilder>.v)its toString()the VM handle; the value's run-time kind is unknown at conversion
getClass() on a type whose ancestor is outside the converted tree (in.getClass() with in a java.io stream)the classwritten; the checker rejects it
A nested user exception in Throwable.toString()Outer$Inner: msgOuter__Inner: msg
A char passed to a library member other than StringBuilder/StringBuffer append/insert that takes it as text (list.add('c') then print)c99
An uncaught exceptionException in thread "main" ... and a stack trace on stderruncaught language exception
x % 0.0 on doublesNaNa VM fault
Null dereference, stack overflowNullPointerException, StackOverflowErrorfatal VM error

5. Changes made on 2026-11-13 (review and follow-up)

CommitChangeProof
8f617ba2field default values (JLS 4.12.5); field initializers and instance { } blocks after super(...) (JLS 12.5); members inherited from library superclasses typed; [object-method] refusal; records declare their generated equals/hashCode; stale output removed on re-runInit, Records, reject/ObjectMethod, stale-output check
55f52f49Outer.Inner in a type resolves to Outer__Inner (a nested class had become its own superclass and hung the whole-tree run); bounded superclass walks; bare getClass() refused too; model 1.2.0reject/QualifiedNested, reject/BareObjectMethod
1273f634 (main)main brought level with mastersection 7
c91a4ecfmaster given the loader CMakeLists from main; stale sleela_terminal.c manifest entry refreshed (it failed verify-security in CI since 8e39e535)CI section 6
e3993045 (model 1.3.0)library objects shown as text through toString() (tostr reference, JavaFormat.objectText) instead of the VM handle; unknown-typed values keep plain text; [object-text] for a user object without toString(); chartext rows (append('x') appends x, not 120); [boxed] instead of writing Integer i = 42 that did not compile; CI workflow java-convert.ymlObjectText, reject/IdentityText, reject/BoxedDecl

6. Continuous integration

WorkflowState on 2026-11-13
java-convert.yml (new): manifest gate, runtime build, converter build, model self-check, differential suite on Temurin 25pass, 31 of 31, on e3993045 (Temurin 25.0.5, so a second JDK build agrees with the local OpenJDK 25.0.2)
Advantage Library Verification, Native Drivefailed on master from 8e39e535 (stale manifest entry); pass on c91a4ecf and e3993045
Native Drive on main (1273f634)failed once (nm timed out after 15 s on the runner, passes locally in 0.1 s); passed on re-run
sleelactl, API documentation build, SLeeLa GUI Document CI, Heterogeneous value regression, Comparison Standards Conformancepass
Native C and C++ Portability, Complete SLeeLa VM and Language Conformance, SLeeLa VM Arithmetic Table Completionstill running on e3993045 when this page was written; not claimed

7. Branches

main and master carry the same content. On 2026-11-13 every file of both trees was compared against 1,656 commits of master history: nothing in main's compiler, VM, library, sleelactl, bin or tests was unique to main, so main was brought to master's tree in one fast-forward commit (1273f634), keeping the one file main had changed on its own (os-level-support/loader/CMakeLists.txt, which master then took in c91a4ecf). The generated API HTML (api/, docs/api/, sleeladoc-api/) is rebuilt by CI on each branch and may differ between them; it is generated output, not divergence.

8. Open work, in order of measured effect

#ItemEffectWhere
1Resolve a bare nested name by scope instead of refusing it (nested-ambiguous)first refusal of 131 JDK filessleelactl/convert
2Generics inference (untyped)57 files; the main blocker for collections and lambdasboth converters
3Measure sleela check over the converted tree; resolve Outer__Inner files across split outputturns "converted" into "compiles"loader / sleelactl
4Local classes, outer.new Inner() (nested)67 filessleelactl/convert
5Identity equals/hashCode and a run-time class name (object-method, getClass)31 files; also fixes Outer$Inner textlibrary / converter
6Boxing lowering (declare as Any, unbox at use, keep null)13 files first-refused, 125 diagnosticssleelactl/convert
7static { } blocks (guarded static initialisation, JLS 12.4)25 filessleelactl/convert
8Section 4.1 casescorrectness, not countsconverter / library / VM
9Repeat the measurement on a larger tree (java.base whole, java.io)coverage of the status—

9. Reproduce

cd impl && make build/sleela && cd ..                      # needs g++, X11, fontconfig, freetype, libpng
make -C sleelactl/convert && sleelactl/convert/build/javaconv --self-check
bash tests/javaconv_differential_test.sh                   # section 2 (needs a JDK on PATH)
# section 3: unzip the four packages from $JAVA_HOME/lib/src.zip, then
sleelactl/convert/build/javaconv --jdk <dir> --out <out> --jdk-version 25   # CONVERSION-REPORT.md/.json in <out>

Not run for this page (.kiro/steering/validation-cadence.md): the long suites (make -k test, the jdk-28 compile check, the hand-converted examples/java/differential suite, conformance programs). The second converter, lib/java/converter (SLeeLa, per-member stubs, 0.7.0), was not re-measured; its last numbers are in its README.