# ============================================================================ # conversion.model -- the Java -> SLeeLa conversion subject (declarative model) # # Like math and physics, conversion is a SUBJECT: one folder, one model, one # set of laws. Math owns arithmetic; physics owns mechanics; conversion owns the # laws under which Java source becomes functionally equivalent SLeeLa source. # # The model is DATA. The sleelactl converter (sleelactl/convert) holds no Java # semantic knowledge of its own: every typing rule, operator lowering and cast # below is read from this file, and the converter FAILS CLOSED when a construct # is not covered here (it never guesses, it never emits a near-miss). # # Normative sources: The Java Language Specification (JLS) chapters 4 (types), # 5 (conversions and promotion), 14 (statements), 15 (expressions). # The executable halves of the laws live in lib/java/JavaOperands.sleela and # are checked line for line against a real JDK by examples/java/differential. # # Record grammar: one record per line, fields separated by whitespace, the last # field of a record takes the rest of the line (so templates may contain spaces). # '#' starts a comment line. # model # type # kind: integral | floating | boolean | text | reference | void # rank: numeric promotion order (higher wins), '-' when not numeric # box # promote (JLS 5.6 unary promotion) # binop