MS1V6 mlir-stage-15-v1 passing 5000/5000
Estimated confidence: 55.4%. Conservative lower bound: 7.6% (95% level).
uniform over observed structural partitions. observed partitions; unseen partitions have no supplied target weight. Partitions use recursive production counts and derivation depth. Behavioral classes combine each input’s compiler coverage and assertion decision paths. Catalog partitions with no observations retain maximal missing mass.
Baseline tests: Every tracked test file with a RUN line invoking loom-raise-opt (77 files); other executables and native unit tests excluded
| Source file | Baseline coverage | Baseline + input | Contributing input |
|---|---|---|---|
…/lib/Frontend/Raising/ExactStandardSpelling.hMS1V | 112/118lines94.9% 62/82branches75.6% | 112/118lines94.9%+0 68/82branches82.9%+6 | |
6 newly covered branches55 | |||
…/lib/Frontend/Raising/MaterializeFMulAddPass.cppMS1V | 70/106lines66.0% 11/26branches42.3% | 71/106lines67.0%+1 12/26branches46.2%+1 | |
1 newly covered line · 1 newly covered branch175 | |||
…/lib/Dataflow/Transforms/DataflowRewritePass.cppMS1V | 338/559lines60.5% 172/340branches50.6% | 338/559lines60.5%+0 172/340branches50.6%+0 | Open PBT |
…/lib/Frontend/Lowering/ExpandGraphMemrefCopyPass.cppMS1V | 79/90lines87.8% 20/22branches90.9% | 79/90lines87.8%+0 20/22branches90.9%+0 | Open PBT |
…/lib/Frontend/Lowering/LowerForToGraphPass.cppMS1V | 1033/1240lines83.3% 374/540branches69.3% | 1033/1240lines83.3%+0 374/540branches69.3%+0 | Open PBT |
…/lib/Frontend/Lowering/LowerForallToThreadPass.cppMS1V | 30/34lines88.2% 2/4branches50.0% | 30/34lines88.2%+0 2/4branches50.0%+0 | Open PBT |
…/lib/Frontend/Lowering/LowerGraphConstantsPass.cppMS1V | 80/83lines96.4% 18/24branches75.0% | 80/83lines96.4%+0 18/24branches75.0%+0 | Open PBT |
…/lib/Frontend/Lowering/LowerGraphMemoryPass.cppMS1V | 525/841lines62.4% 208/400branches52.0% | 525/841lines62.4%+0 208/400branches52.0%+0 | Open PBT |
…/lib/Frontend/Lowering/Pipeline.cppMS1V | 18/21lines85.7% branchesnot measured | 18/21lines85.7%+0 branchesnot measured | Open PBT |
…/lib/Frontend/Raising/CallableRegions.hMS1V | 32/34lines94.1% 12/16branches75.0% | 32/34lines94.1%+0 12/16branches75.0%+0 | Open PBT |
…/lib/Frontend/Raising/DeduplicateSCFWhileStatePass.cppMS1V | 13/135lines9.6% 0/60branches0.0% | 13/135lines9.6%+0 0/60branches0.0%+0 | Open PBT |
…/lib/Frontend/Raising/LLVMArithToArithPass.cppMS1V | 300/319lines94.0% 94/116branches81.0% | 300/319lines94.0%+0 94/116branches81.0%+0 | Open PBT |
…/lib/Frontend/Raising/LLVMCfToCfPass.cppMS1V | 77/80lines96.2% 8/8branches100.0% | 77/80lines96.2%+0 8/8branches100.0%+0 | Open PBT |
…/lib/Frontend/Raising/LiftCFToSCFPass.cppMS1V | 616/694lines88.8% 293/386branches75.9% | 616/694lines88.8%+0 293/386branches75.9%+0 | Open PBT |
…/lib/Frontend/Raising/NormalizeLiftedSCFExitPass.cppMS1V | 232/250lines92.8% 120/182branches65.9% | 232/250lines92.8%+0 120/182branches65.9%+0 | Open PBT |
…/lib/Frontend/Raising/Pipeline.cppMS1V | 10/19lines52.6% branchesnot measured | 10/19lines52.6%+0 branchesnot measured | Open PBT |
…/lib/Frontend/Raising/SCFForToForallPass.cppMS1V | 494/738lines66.9% 241/458branches52.6% | 494/738lines66.9%+0 241/458branches52.6%+0 | Open PBT |
…/lib/Frontend/Raising/SCFWhileToForPass.cppMS1V | 164/176lines93.2% 70/94branches74.5% | 164/176lines93.2%+0 70/94branches74.5%+0 | Open PBT |
…/loom/tools/loom-raise-opt/loom-raise-opt.cppMS1V | 12/12lines100.0% branchesnot measured | 12/12lines100.0%+0 branchesnot measured | Open PBT |
Review PR: Regression test from seed 219
Review PR: Regression test from seed 25
Review PR: Regression test from seed 219
Review PR: Regression test from seed 25
may consume the candidate. After materialization, no fmuladd operation may
remain in a finalizable Sn or be registered as a Canonical Dataflow actor.
llvm.func @envelope_0(%x: f64, %y: f64, %z: f64) -> f64 attributes {fp_contract = "off"} { %r0 = llvm.intr.fmuladd(%x, %y, %z) {fastmathFlags = #llvm.fastmath<nnan, ninf, nsz>} : (f64, f64, f64) -> f64 %r1 = llvm.intr.fmuladd(%r0, %y, %z) {fastmathFlags = #llvm.fastmath<nnan, ninf, nsz>} : (f64, f64, f64) -> f64 llvm.return %r1 : f64 } llvm.func @envelope_1(%x: f32, %y: f32, %z: f32) -> f32 attributes {denormal_fpenv = #llvm.denormal_fpenv<default_output_mode = ieee, default_input_mode = ieee, float_output_mode = ieee, float_input_mode = ieee>} { %r0 = llvm.intr.fmuladd(%x, %y, %z) {fastmathFlags = #llvm.fastmath<nnan, contract>} : (f32, f32, f32) -> f32 llvm.return %r0 : f32 } llvm.func @envelope_2(%x: f32, %y: f32, %z: f32) -> f32 attributes {denormal_fpenv = #llvm.denormal_fpenv<default_output_mode = ieee, default_input_mode = ieee, float_output_mode = ieee, float_input_mode = ieee>} { %r0 = llvm.intr.fmuladd(%x, %y, %z) {fastmathFlags = #llvm.fastmath<nnan, contract>} : (f32, f32, f32) -> f32 llvm.return %r0 : f32 }
llvm.func @fused_0(%x: f64, %y: f64, %z: f64) -> f64 { %fma = math.fma %x, %y, %z : f64 llvm.return %fma : f64 } llvm.func @envelope_1(%x: f32, %y: f32, %z: f32) -> f32 attributes {denormal_fpenv = #llvm.denormal_fpenv<default_output_mode = ieee, default_input_mode = ieee, float_output_mode = ieee, float_input_mode = ieee>} { %r0 = llvm.intr.fmuladd(%x, %y, %z) : (f32, f32, f32) -> f32 llvm.return %r0 : f32 } llvm.func @fused_2(%x: f64, %y: f64, %z: f64) -> f64 { %fma = math.fma %x, %y, %z : f64 llvm.return %fma : f64 } llvm.func @plain_3(%x: f32, %y: f32, %z: f32) -> f32 { %r0 = llvm.intr.fmuladd(%x, %y, %z) : (f32, f32, f32) -> f32 %r1 = llvm.intr.fmuladd(%r0, %y, %z) : (f32, f32, f32) -> f32 %r2 = llvm.intr.fmuladd(%r1, %y, %z) : (f32, f32, f32) -> f32 llvm.return %r2 : f32 }
The current Structured ExecutionShape generator consumes a finite set of exact Structured Program references. An empty input set produces an empty output set.
llvm.intr.fmuladd remains unchanged in S0 until one typed
ExecutionShape decision materializes either Fused or
Split(arith.mulf, arith.addf) under the exact floating environment and
fast-math contract.
A parent containing an unresolved, exactly representable
llvm.intr.fmuladd emits the canonical pair of complete Structured children:
One decision applies uniformly to every unresolved fmuladd in the selected
Spatial ownership of that complete parent. It never rewrites residual
InstructionCore operations or operations owned by nested callables.
That decision is candidate lineage and may be evaluated as a performance choice; target code generation cannot choose it implicitly. The Ownership generator selects the Spatial region but does not own this decision.
candidate.pg// Input domain for the Structured ExecutionShape generator stage // (loom-raise-opt --loom-materialize-fmuladd=shape=...). // // The generator consumes a finite set of exact Structured Program references // (linked-input-61), so each sample is a finite module holding one to four // complete Structured parents (callables). Two parent shapes are sampled: // // * parents with no unresolved selected-Spatial execution-shape choice, // which the generator must pass through unchanged (linked-input-61); // * parents holding one or more unresolved, exactly representable // `llvm.intr.fmuladd` operations (linked-input-101, linked-input-127). // // Exact representability is an input well-formedness requirement of the // sampled claim, so every sampled callable states only a floating environment // the standard `math`/`arith` spellings can restate: either no floating // attribute at all, or the ordinary non-constrained Clang envelope // (`fp_contract = "off"`, IEEE denormal environment, code-generation-only // passthrough strings, `no-trapping-math = "true"`). Operand and result // types stay exact standard numeric types (floats and fixed-shape vectors of // floats). // // One execution-shape decision applies uniformly to every unresolved fmuladd // of a complete parent (linked-input-165), so the shape itself is a single // subject-command option and is never sampled per operation here. The // grammar samples only inputs: it never spells math.fma, arith.mulf or // arith.addf as an expected result. // // Nested callables are sampled too (linked-input-165 names operations owned // by nested callables), as a native func.func parent holding an inner // imported llvm.func. start: {new COUNT = random.randint(1, 4); new I = 0} parents; parents: (I < COUNT) parent {I += 1} parents | (I == COUNT) ''; parent: plain_fma_func | typed_fma_func | envelope_fma_func | mixed_fma_func | native_fma_func | nested_callable_func | no_choice_func; // ------------------------------------------------------- unresolved parents // An imported callable stating no floating-point environment of its own. plain_fma_func: {new NAME = 'plain_' + str(I); new TY = 'f32'; new N = random.randint(1, 3); new K = 0; new SRC = '%x'; new FM = ''} 'llvm.func @' [NAME] '(%x: ' [TY] ', %y: ' [TY] ', %z: ' [TY] ') -> ' [TY] ' {\n' fma_chain ' llvm.return ' [SRC] ' : ' [TY] '\n' '}\n\n'; // The exact floating type and fast-math contract are part of the sampled // input (linked-input-101), so both vary over exact standard numeric types // and over the imported fast-math flag sets. typed_fma_func: {new NAME = 'typed_' + str(I); new TY = random.choice(['f32', 'f64', 'f16', 'vector<4xf32>', 'vector<8xf64>']); new N = random.randint(1, 3); new K = 0; new SRC = '%x'; new FM = ''} fastmath_choice 'llvm.func @' [NAME] '(%x: ' [TY] ', %y: ' [TY] ', %z: ' [TY] ') -> ' [TY] ' {\n' fma_chain ' llvm.return ' [SRC] ' : ' [TY] '\n' '}\n\n'; // An ordinary Clang function envelope that states no environment a standard // operation cannot restate: the choice is still unresolved and representable. envelope_fma_func: {new NAME = 'envelope_' + str(I); new TY = random.choice(['f32', 'f64']); new N = random.randint(1, 2); new K = 0; new SRC = '%x'; new FM = ''} fastmath_choice 'llvm.func @' [NAME] '(%x: ' [TY] ', %y: ' [TY] ', %z: ' [TY] ') -> ' [TY] '\n' ' attributes {' benign_envelope '} {\n' fma_chain ' llvm.return ' [SRC] ' : ' [TY] '\n' '}\n\n'; // A parent whose selected-Spatial ownership also holds ordinary floating and // integer computation next to the unresolved choice. mixed_fma_func: {new NAME = 'mixed_' + str(I); new TY = random.choice(['f32', 'f64']); new N = random.randint(1, 2); new K = 0; new SRC = '%x'; new FM = ''} 'llvm.func @' [NAME] '(%x: ' [TY] ', %y: ' [TY] ', %z: ' [TY] ', %i: i32) -> ' [TY] ' {\n' ' %scaled = llvm.fmul %x, %y : ' [TY] '\n' ' %counted = llvm.add %i, %i : i32\n' fma_chain ' %blended = llvm.fadd ' [SRC] ', %scaled : ' [TY] '\n' ' llvm.return %blended : ' [TY] '\n' '}\n\n'; // A genuinely standard-MLIR-native callable parent. native_fma_func: {new NAME = 'native_' + str(I); new TY = random.choice(['f32', 'f64']); new N = random.randint(1, 2); new K = 0; new SRC = '%x'; new FM = ''} 'func.func @' [NAME] '(%x: ' [TY] ', %y: ' [TY] ', %z: ' [TY] ') -> ' [TY] ' {\n' fma_chain ' return ' [SRC] ' : ' [TY] '\n' '}\n\n'; // A native parent owning a nested imported callable: the unresolved choice // lives in the nested callable's own ownership. nested_callable_func: {new NAME = 'nested_' + str(I); new TY = 'f32'; new N = random.randint(1, 2); new K = 0; new SRC = '%x'; new FM = ''} 'func.func @' [NAME] '(%a: ' [TY] ') -> ' [TY] ' {\n' ' builtin.module {\n' ' llvm.func @inner_' [NAME] '(%x: ' [TY] ', %y: ' [TY] ', %z: ' [TY] ') -> ' [TY] ' {\n' fma_chain ' llvm.return ' [SRC] ' : ' [TY] '\n' ' }\n' ' }\n' ' return %a : ' [TY] '\n' '}\n\n'; // ------------------------------------------------------- unresolved chain fma_chain: (K < N) fma_stmt {K += 1} fma_chain | (K == N) ''; fma_stmt: ' %r' [str(K)] ' = llvm.intr.fmuladd(' [SRC] ', %y, %z)' [FM] ' : (' [TY] ', ' [TY] ', ' [TY] ') -> ' [TY] '\n' {SRC = '%r' + str(K)}; fastmath_choice: {FM = random.choice(['', ' {fastmathFlags = #llvm.fastmath<contract>}', ' {fastmathFlags = #llvm.fastmath<nnan, contract>}', ' {fastmathFlags = #llvm.fastmath<nnan, ninf, nsz>}', ' {fastmathFlags = #llvm.fastmath<fast>}'])} ''; benign_envelope: 'fp_contract = "off"' | 'denormal_fpenv = #llvm.denormal_fpenv<default_output_mode = ieee, default_input_mode = ieee, float_output_mode = ieee, float_input_mode = ieee>' | 'passthrough = ["nofree", "norecurse", "nosync", ["min-legal-vector-width", "0"], ["no-trapping-math", "true"], ["stack-protector-buffer-size", "8"], ["target-cpu", "generic-rv64"]]'; // ------------------------------------------- parents with no pending choice // "A parent with no unresolved selected-Spatial execution-shape choice passes // through unchanged" (linked-input-61): sampled as callables holding ordinary // floating computation, an already-fused math.fma, or an already-split // multiply/add pair, and as an empty module. no_choice_func: ordinary_func | already_fused_func | already_split_func | empty_parent; ordinary_func: {new NAME = 'ordinary_' + str(I); new TY = random.choice(['f32', 'f64'])} 'llvm.func @' [NAME] '(%x: ' [TY] ', %y: ' [TY] ') -> ' [TY] ' {\n' ' %sum = llvm.fadd %x, %y : ' [TY] '\n' ' llvm.return %sum : ' [TY] '\n' '}\n\n'; already_fused_func: {new NAME = 'fused_' + str(I); new TY = random.choice(['f32', 'f64'])} 'llvm.func @' [NAME] '(%x: ' [TY] ', %y: ' [TY] ', %z: ' [TY] ') -> ' [TY] ' {\n' ' %fma = math.fma %x, %y, %z : ' [TY] '\n' ' llvm.return %fma : ' [TY] '\n' '}\n\n'; already_split_func: {new NAME = 'split_' + str(I); new TY = random.choice(['f32', 'f64'])} 'llvm.func @' [NAME] '(%x: ' [TY] ', %y: ' [TY] ', %z: ' [TY] ') -> ' [TY] ' {\n' ' %prod = arith.mulf %x, %y : ' [TY] '\n' ' %sum = arith.addf %prod, %z : ' [TY] '\n' ' llvm.return %sum : ' [TY] '\n' '}\n\n'; empty_parent: '';
After materialization, no
fmuladdoperation may remain in a finalizable Sn or be registered as a Canonical Dataflow actor.
candidate.spctpostcondition no_fmuladd_remains_after_materialization { language v0; vocabulary mlir = mlir.generic@1; metadata { project = "PolyArch/loom"; revision = "48615bc5925ef4b9db8b4550b5d4322933cf4b7b"; source = "docs/spec-compiler-part-2-scf.md:L185-L186"; } constraints { // "After materialization, no `fmuladd` operation may remain in a // finalizable Sn or be registered as a Canonical Dataflow actor." // // The governing context states that FMA normalization is semantic rather // than name based and that the unresolved choice is spelled // `llvm.intr.fmuladd` in S0; the materialized output is therefore an Sn // in which no such operation survives, at any depth and in any callable. assert no_fmuladd_operation_remains: none op in output.operations where op.name == "llvm.intr.fmuladd"; } }
llvm.func @envelope_0(%x: f64, %y: f64, %z: f64) -> f64 attributes {fp_contract = "off"} { %r0 = llvm.intr.fmuladd(%x, %y, %z) {fastmathFlags = #llvm.fastmath<nnan, ninf, nsz>} : (f64, f64, f64) -> f64 %r1 = llvm.intr.fmuladd(%r0, %y, %z) {fastmathFlags = #llvm.fastmath<nnan, ninf, nsz>} : (f64, f64, f64) -> f64 llvm.return %r1 : f64 } llvm.func @envelope_1(%x: f32, %y: f32, %z: f32) -> f32 attributes {denormal_fpenv = #llvm.denormal_fpenv<default_output_mode = ieee, default_input_mode = ieee, float_output_mode = ieee, float_input_mode = ieee>} { %r0 = llvm.intr.fmuladd(%x, %y, %z) {fastmathFlags = #llvm.fastmath<nnan, contract>} : (f32, f32, f32) -> f32 llvm.return %r0 : f32 } llvm.func @envelope_2(%x: f32, %y: f32, %z: f32) -> f32 attributes {denormal_fpenv = #llvm.denormal_fpenv<default_output_mode = ieee, default_input_mode = ieee, float_output_mode = ieee, float_input_mode = ieee>} { %r0 = llvm.intr.fmuladd(%x, %y, %z) {fastmathFlags = #llvm.fastmath<nnan, contract>} : (f32, f32, f32) -> f32 llvm.return %r0 : f32 }
20260911-084459started2026-09-11T08:45:00Zsubjectloom-raise-optsubject revision48615bc5925erun results
output condition verdicts
raw trace evidence
llvm.func @fused_0(%x: f64, %y: f64, %z: f64) -> f64 { %fma = math.fma %x, %y, %z : f64 llvm.return %fma : f64 } llvm.func @envelope_1(%x: f32, %y: f32, %z: f32) -> f32 attributes {denormal_fpenv = #llvm.denormal_fpenv<default_output_mode = ieee, default_input_mode = ieee, float_output_mode = ieee, float_input_mode = ieee>} { %r0 = llvm.intr.fmuladd(%x, %y, %z) : (f32, f32, f32) -> f32 llvm.return %r0 : f32 } llvm.func @fused_2(%x: f64, %y: f64, %z: f64) -> f64 { %fma = math.fma %x, %y, %z : f64 llvm.return %fma : f64 } llvm.func @plain_3(%x: f32, %y: f32, %z: f32) -> f32 { %r0 = llvm.intr.fmuladd(%x, %y, %z) : (f32, f32, f32) -> f32 %r1 = llvm.intr.fmuladd(%r0, %y, %z) : (f32, f32, f32) -> f32 %r2 = llvm.intr.fmuladd(%r1, %y, %z) : (f32, f32, f32) -> f32 llvm.return %r2 : f32 }
"builtin.module"() ({ "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<f64 (f64, f64, f64)>, linkage = #llvm.linkage<external>, sym_name = "fused_0", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({ ^bb0(%arg9: f64, %arg10: f64, %arg11: f64): %5 = "math.fma"(%arg9, %arg10, %arg11) <{fastmath = #arith.fastmath<none>}> : (f64, f64, f64) -> f64 "llvm.return"(%5) : (f64) -> () }) : () -> () "llvm.func"() <{CConv = #llvm.cconv<ccc>, denormal_fpenv = #llvm.denormal_fpenv<default_output_mode = ieee, default_input_mode = ieee, float_output_mode = ieee, float_input_mode = ieee>, function_type = !llvm.func<f32 (f32, f32, f32)>, linkage = #llvm.linkage<external>, sym_name = "envelope_1", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({ ^bb0(%arg6: f32, %arg7: f32, %arg8: f32): %4 = "math.fma"(%arg6, %arg7, %arg8) <{fastmath = #arith.fastmath<none>}> : (f32, f32, f32) -> f32 "llvm.return"(%4) : (f32) -> () }) : () -> () "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<f64 (f64, f64, f64)>, linkage = #llvm.linkage<external>, sym_name = "fused_2", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({ ^bb0(%arg3: f64, %arg4: f64, %arg5: f64): %3 = "math.fma"(%arg3, %arg4, %arg5) <{fastmath = #arith.fastmath<none>}> : (f64, f64, f64) -> f64 "llvm.return"(%3) : (f64) -> () }) : () -> () "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<f32 (f32, f32, f32)>, linkage = #llvm.linkage<external>, sym_name = "plain_3", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({ ^bb0(%arg0: f32, %arg1: f32, %arg2: f32): %0 = "math.fma"(%arg0, %arg1, %arg2) <{fastmath = #arith.fastmath<none>}> : (f32, f32, f32) -> f32 %1 = "math.fma"(%0, %arg1, %arg2) <{fastmath = #arith.fastmath<none>}> : (f32, f32, f32) -> f32 %2 = "math.fma"(%1, %arg1, %arg2) <{fastmath = #arith.fastmath<none>}> : (f32, f32, f32) -> f32 "llvm.return"(%2) : (f32) -> () }) : () -> () }) : () -> ()
partial source coverage: Approved for execution and public reporting; translation accuracy and completeness remain separately unvalidated.
authoring-context.json{"entries":[{"file_sha256":"bfc1e646e91fe0ba6d7d16e43994100b05c3b8ff79c2e07288e8955c43d9d79d","kind":"documentation_input","lines":"177-186","path":"docs/spec-compiler-part-2-scf.md","roles":["context","applicability"],"text":"FMA normalization is semantic rather than name based. An exact fused LLVM FMA\nbecomes `math.fma`. `llvm.intr.fmuladd` remains unchanged in S0 until one typed\n`ExecutionShape` decision materializes either `Fused` or\n`Split(arith.mulf, arith.addf)` under the exact floating environment and\nfast-math contract. That decision is candidate lineage and may be evaluated as\na performance choice; target code generation cannot choose it implicitly. The\nOwnership generator selects the Spatial region but does not own this decision.\nThe ExecutionShape generator resolves it before Schedule or Dataflow lowering\nmay consume the candidate. After materialization, no `fmuladd` operation may\nremain in a finalizable Sn or be registered as a Canonical Dataflow actor.","why":"Governing context of the sampled obligation: the unresolved choice is spelled llvm.intr.fmuladd in S0 and is resolved by one typed ExecutionShape decision; fixes that the output governed by the claim is the program after that materialization."},{"file_sha256":"bfc1e646e91fe0ba6d7d16e43994100b05c3b8ff79c2e07288e8955c43d9d79d","kind":"documentation_input","lines":"1016-1034","path":"docs/spec-compiler-part-2-scf.md","roles":["input_construction","input_well_formedness"],"text":"### Structured ExecutionShape Generator\n\nThe current Structured ExecutionShape generator consumes a finite set of exact\nStructured Program references. An empty input set produces an empty output\nset. A parent with no unresolved selected-Spatial execution-shape choice passes\nthrough unchanged. A parent containing an unresolved, exactly representable\n`llvm.intr.fmuladd` emits the canonical pair of complete Structured children:\n\n```text\nFused -> math.fma\nSplit -> arith.mulf followed by arith.addf\n```\n\nOne decision applies uniformly to every unresolved `fmuladd` in the selected\nSpatial ownership of that complete parent. It never rewrites residual\nInstructionCore operations or operations owned by nested callables. This is a\ntwo-element semantic policy domain, not one independent Boolean dimension per\noperation. Distinct per-operation combinations are not part of the current\ncontract.","why":"Structured ExecutionShape generator input contract: a finite set of exact Structured Program references, parents with no unresolved choice pass through unchanged, and a parent holding an unresolved exactly representable fmuladd emits the Fused/Split pair with one decision applied uniformly per parent. Drives the sampled parent mix and the single per-run shape option."},{"file_sha256":"2b0705aba1c16c80e5338d443989a9cdcbac47a60c140bff5b886c617a9f9a8f","kind":"implementation","lines":"1-33,55-115,148-181","path":"lib/Frontend/Raising/MaterializeFMulAddPass.cpp","roles":["applicability","input_construction"],"text":"// Materialize the execution shape of `llvm.intr.fmuladd`.\n//\n// `llvm.intr.fmuladd` is not a computation, it is an unmade choice: the target\n// may contract it into one fused multiply-add with a single rounding, or\n// evaluate an ordinary multiply followed by an ordinary add with two. The two\n// results differ, so nothing downstream may pick one implicitly and no shape\n// can be inferred from the intrinsic spelling. Mechanical raising therefore\n// leaves the intrinsic alone, and this pass materializes exactly the one shape\n// its caller selected:\n//\n// Fused -> math.fma\n// Split -> arith.mulf then arith.addf\n//\n// The two shapes differ in what they permit, not only in what they spell.\n// Fused carries the complete source fast-math contract onto the one fused\n// operation. Split consumes the source's `contract` permission: the multiply\n// and the add each round on their own, and neither may be contracted back\n// into a single rounding by a later pass or by target code generation.\n//\n// The selected shape is the entire decision this pass makes, so it is a\n// required typed option rather than a defaulted one, in the same shape as the\n// typed Dataflow rewrite catalog.\n//\n// A materialization is legal only when the target operations restate the whole\n// source computation: exact numeric types, the operation's fast-math contract,\n// the default floating-point environment the intrinsic is evaluated in, and\n// the enclosing callable's floating-point environment. `math.fma` and the\n// `arith` floating operations state no environment of their own, so a callable\n// stating one that they cannot restate cannot receive either shape.\n//\n// Representability is intrinsic-local. An intrinsic whose complete semantics\n// the selected standard form cannot restate remains explicit; it does not\n// prevent representable siblings from receiving the selected shape.\n// Replace one proved-representable intrinsic with the selected shape. The\n// replacement keeps the source location and the exact operand and result\n// types, and carries the source fast-math flags the selected shape still\n// permits.\nvoid materializeOne(::mlir::LLVM::FMulAddOp op, FMulAddExecutionShape shape,\n ::mlir::IRRewriter &rewriter) {\n rewriter.setInsertionPoint(op);\n ::mlir::Location loc = op.getLoc();\n ::mlir::Type type = op.getRes().getType();\n ::mlir::arith::FastMathFlags fastmath =\n loom::raising::exactFastMathFlags(op.getFastmathFlags());\n // No materialized operation states a rounding mode. An arith or math\n // operation that states one is a constrained operation: standard lowering\n // turns it into `llvm.intr.experimental.constrained.*` under an explicit\n // rounding and exception mode, and drops the fast-math flags on the way.\n // llvm.intr.fmuladd is an ordinary non-constrained intrinsic in the default\n // environment, so both shapes leave the mode absent and lower back to\n // ordinary LLVM floating operations.\n if (shape == FMulAddExecutionShape::Fused) {\n // Fusing is what the shape decided, so the complete source contract,\n // `contract` included, carries onto the one fused operation.\n rewriter.replaceOpWithNewOp<::mlir::math::FmaOp>(\n op, type, op.getA(), op.getB(), op.getC(), fastmath);\n return;\n }\n\n // `contract` is the source's permission to fuse this multiply and add into\n // one rounding. Selecting Split is the decision that declines it, so the\n // permission is consumed here rather than restated on the result: a\n // multiply and an add that still carried it would let any later contraction\n // -- upstream's own arith-to-math.fma uplift, or a backend -- re-fuse them\n // and silently undo the shape. Every other source flag is a property of the\n // computation, not of fusion, and carries onto both operations unchanged.\n ::mlir::arith::FastMathFlags split = ::mlir::arith::bitEnumClear(\n fastmath, ::mlir::arith::FastMathFlags::contract);\n\n auto product =\n ::mlir::arith::MulFOp::create(rewriter, loc, type, op.getA(), op.getB());\n product.setFastmath(split);\n auto sum = ::mlir::arith::AddFOp::create(rewriter, loc, type,\n product.getResult(), op.getC());\n sum.setFastmath(split);\n rewriter.replaceOp(op, sum);\n}\n\nvoid appendRepresentable(\n ::mlir::Operation *operation,\n ::llvm::SmallVectorImpl<::mlir::LLVM::FMulAddOp> &selected) {\n auto fmuladd = ::mlir::dyn_cast<::mlir::LLVM::FMulAddOp>(operation);\n if (fmuladd && loom::raising::restatesExactly(fmuladd.getOperation(),\n /*floating=*/true))\n selected.push_back(fmuladd);\n}\n\nvoid materializeSelected(::mlir::MLIRContext &context,\n ::llvm::ArrayRef<::mlir::LLVM::FMulAddOp> selected,\n FMulAddExecutionShape shape) {\n ::mlir::IRRewriter rewriter(&context);\n for (::mlir::LLVM::FMulAddOp op : selected)\n materializeOne(op, shape, rewriter);\n}\n // The shape is the decision, so there is no default: silently choosing one\n // would materialize a form the caller never selected.\n ::mlir::Pass::Option<FMulAddExecutionShape> shape{\n *this, \"shape\",\n ::llvm::cl::desc(\"execution shape to materialize for llvm.intr.fmuladd\"),\n ::llvm::cl::values(\n clEnumValN(FMulAddExecutionShape::Fused, \"fused\",\n \"one math.fma with a single rounding\"),\n clEnumValN(FMulAddExecutionShape::Split, \"split\",\n \"an arith.mulf followed by an arith.addf\"))};\n\n void runOnOperation() final {\n if (!shape.hasValue()) {\n getOperation()->emitError(\n \"loom-materialize-fmuladd requires an explicit 'shape' option\");\n return signalPassFailure();\n }\n\n ::llvm::SmallVector<::mlir::LLVM::FMulAddOp> selected;\n (void)loom::raising::forEachCallableRegion(\n getOperation(), [&](::mlir::Region ®ion) {\n (void)loom::raising::forEachOwnedOperation(\n region, [&](::mlir::Operation *op) {\n appendRepresentable(op, selected);\n return ::mlir::WalkResult::advance();\n });\n return ::mlir::success();\n });\n\n if (selected.empty())\n return markAllAnalysesPreserved();\n\n materializeSelected(getContext(), selected, shape.getValue());\n }","why":"The subject stage itself: 'shape' is a required typed option with no default (so the bare flag fails), the pass collects only representable llvm.intr.fmuladd inside callable regions, and rewrites each to math.fma or arith.mulf+arith.addf. Establishes the correct invocation and which inputs the stage acts on."},{"file_sha256":"fc8794a0235430f2ab7b87b0fb63e4991acfa052ab630501b484fce956154a56","kind":"verifier","lines":"35-52,54-161","path":"lib/Frontend/Raising/ExactStandardSpelling.h","roles":["input_well_formedness"],"text":"inline bool isExactNumericType(::mlir::Type type) {\n if (auto vectorType = ::mlir::dyn_cast<::mlir::VectorType>(type)) {\n if (vectorType.isScalable())\n return false;\n type = vectorType.getElementType();\n }\n if (auto integerType = ::mlir::dyn_cast<::mlir::IntegerType>(type))\n return integerType.isSignless() && integerType.getWidth() > 0;\n return ::mlir::isa<::mlir::IndexType, ::mlir::FloatType>(type);\n}\n\ninline bool allExactNumericTypes(::mlir::ValueRange values) {\n for (::mlir::Value value : values) {\n if (!isExactNumericType(value.getType()))\n return false;\n }\n return true;\n}\ninline bool\nstatesDefaultDenormalEnvironment(::mlir::LLVM::DenormalFPEnvAttr env) {\n using Kind = ::mlir::LLVM::DenormalModeKind;\n return env.getDefaultOutputMode() == Kind::IEEE &&\n env.getDefaultInputMode() == Kind::IEEE &&\n env.getFloatOutputMode() == Kind::IEEE &&\n env.getFloatInputMode() == Kind::IEEE;\n}\n\n// True when `funcOp` states a floating-point policy that no standard MLIR\n// operation restates.\n//\n// An unflagged standard floating operation means the pinned default LLVM\n// floating-point environment, and neither arith nor math states an enclosing\n// environment of its own. The typed attributes read below are compared against\n// that default directly. A reciprocal-estimate policy names the operations the\n// target may compute as an estimate plus refinement rather than exactly, so\n// any such policy blocks a rewrite. The importer's generic passthrough storage\n// is classified separately because it also contains unrelated LLVM function\n// and code-generation attributes.\ninline bool passthroughEntryStatesFloatingPolicy(::mlir::Attribute entry) {\n ::llvm::StringRef name;\n ::std::optional<::llvm::StringRef> value;\n if (auto nameAttr = ::mlir::dyn_cast<::mlir::StringAttr>(entry)) {\n name = nameAttr.getValue();\n } else if (auto pair = ::mlir::dyn_cast<::mlir::ArrayAttr>(entry);\n pair && pair.size() == 2) {\n auto nameAttr = ::mlir::dyn_cast<::mlir::StringAttr>(pair[0]);\n auto valueAttr = ::mlir::dyn_cast<::mlir::StringAttr>(pair[1]);\n if (!nameAttr || !valueAttr)\n return true;\n name = nameAttr.getValue();\n value = valueAttr.getValue();\n } else {\n return true;\n }\n\n // The LLVM importer places every function attribute that LLVMFuncOp does\n // not model explicitly in one passthrough array. LLVM enum attributes still\n // retain their stable native spelling there. Of those function attributes,\n // strictfp alone changes the floating execution environment; the others\n // describe effects, control, ABI, or code generation without changing the\n // meaning of an ordinary floating instruction.\n const ::llvm::Attribute::AttrKind kind =\n ::llvm::Attribute::getAttrKindFromName(name);\n if (kind != ::llvm::Attribute::None)\n return kind == ::llvm::Attribute::StrictFP;\n\n // These string attributes are emitted by ordinary Clang compilation but\n // are not all modeled as typed LLVMFuncOp fields by the pinned importer.\n // Keep this list closed: an unknown string attribute may carry target\n // floating semantics and therefore fails closed.\n const bool codegenOnly = ::llvm::StringSwitch<bool>(name)\n .Cases({\"min-legal-vector-width\",\n \"stack-protector-buffer-size\",\n \"target-cpu\"},\n true)\n .Default(false);\n if (codegenOnly)\n return false;\n\n // Clang's default -ffp-exception-behavior=ignore spelling. A false or\n // malformed value cannot be represented by an unconstrained arith/math op.\n if (name == \"no-trapping-math\")\n return !value || *value != \"true\";\n\n return true;\n}\n\ninline bool statesFloatingPolicy(::mlir::LLVM::LLVMFuncOp funcOp) {\n if (auto env = funcOp.getDenormalFpenvAttr())\n if (!statesDefaultDenormalEnvironment(env))\n return true;\n if (auto noSignedZeros = funcOp.getNoSignedZerosFpMathAttr())\n if (noSignedZeros.getValue())\n return true;\n if (auto contraction = funcOp.getFpContractAttr())\n if (contraction.getValue() != \"off\")\n return true;\n if (funcOp.getReciprocalEstimatesAttr())\n return true;\n if (auto passthrough = funcOp.getPassthroughAttr())\n for (::mlir::Attribute entry : passthrough)\n if (passthroughEntryStatesFloatingPolicy(entry))\n return true;\n return false;\n}\n\n// True when the enclosing callable states a floating-point environment the\n// standard operation cannot restate.\ninline bool enclosingFloatingPolicyBlocksRewrite(::mlir::Operation *op) {\n auto funcOp = ::mlir::dyn_cast_or_null<::mlir::LLVM::LLVMFuncOp>(\n getNearestCallableOp(op));\n return funcOp && statesFloatingPolicy(funcOp);\n}\n\n// True when every operand and the single result of `op` have an exact standard\n// counterpart and, for a computation that reads or produces a floating value,\n// the enclosing callable states no environment the standard operation cannot\n// restate. An integer computation is independent of that environment and is\n// never blocked by it.\ninline bool restatesExactly(::mlir::Operation *op, bool floating) {\n if (!allExactNumericTypes(op->getOperands()))\n return false;\n if (!isExactNumericType(op->getResult(0).getType()))\n return false;\n return !floating || !enclosingFloatingPolicyBlocksRewrite(op);\n}","why":"Acceptance implementation of 'exactly representable': exact standard numeric types (floats, fixed-shape vectors; scalable vectors excluded) and the closed classifier for the enclosing callable's floating environment. Determines which llvm.func attribute envelopes the grammar may sample while keeping the input well formed for the claim."},{"file_sha256":"d1315fabeb736f07fdd93eca093e20d05a201967b181a40cb02f37048ba2c79a","kind":"implementation","lines":"29-95","path":"lib/Frontend/Raising/CallableRegions.h","roles":["input_construction","input_well_formedness"],"text":"inline bool isCallableOp(::mlir::Operation *op) {\n return ::mlir::isa<::mlir::LLVM::LLVMFuncOp, ::mlir::func::FuncOp>(op);\n}\n\n// Return the nearest callable that owns `op`, or null when `op` is outside\n// every callable region. A nested callable cuts off ownership inherited from\n// any callable above it.\ninline ::mlir::Operation *getNearestCallableOp(::mlir::Operation *op) {\n for (::mlir::Operation *parent = op->getParentOp(); parent;\n parent = parent->getParentOp()) {\n if (isCallableOp(parent))\n return parent;\n }\n return nullptr;\n}\n\n// Run `transform` on every non-empty region of every callable reachable from\n// `root`, visiting nested callables before their ancestors and stopping at the\n// first failure.\n//\n// Callable regions are the sole subject of mechanical raising. An imported\n// llvm.func owns its body and its complete ABI envelope, so raising rewrites\n// that body where it stands instead of copying the function into another\n// dialect to obtain a pass wrapper. A region outside a callable, such as an\n// llvm.mlir.global initializer, carries no recoverable control flow and must\n// stay expressible as an LLVM constant, so it is never rewritten.\ninline ::mlir::LogicalResult forEachCallableRegion(\n ::mlir::Operation *root,\n ::llvm::function_ref<::mlir::LogicalResult(::mlir::Region &)> transform) {\n ::mlir::WalkResult walked =\n root->walk<::mlir::WalkOrder::PostOrder>([&](::mlir::Operation *op) {\n if (!isCallableOp(op))\n return ::mlir::WalkResult::advance();\n for (::mlir::Region ®ion : op->getRegions()) {\n if (region.empty())\n continue;\n if (failed(transform(region)))\n return ::mlir::WalkResult::interrupt();\n }\n return ::mlir::WalkResult::advance();\n });\n return walked.wasInterrupted() ? ::mlir::failure() : ::mlir::success();\n}\n\n// Offer `visit` to every operation `region` owns, recursing into nested\n// regions that belong to the same callable -- scf.for, scf.if, a graph\n// region -- but stopping at any nested callable, whose own body this region\n// must not claim to own.\n//\n// This is the operation-level half of callable ownership: a callable processes\n// exactly the operations its nearest enclosing callable owns, and a nested\n// callable's body is left to that callable's own region-level walk. Crossing\n// into a nested callable here would visit its operations twice -- once\n// descended into from the enclosing region and once from the callable's own\n// walk -- so the nested callable is pruned instead. Pruning happens in\n// pre-order: in a post-order walk a callable's body is visited before the\n// callable itself, so the skip would arrive one descent too late.\ninline ::mlir::WalkResult forEachOwnedOperation(\n ::mlir::Region ®ion,\n ::llvm::function_ref<::mlir::WalkResult(::mlir::Operation *)> visit) {\n return region.walk<::mlir::WalkOrder::PreOrder>(\n [&](::mlir::Operation *op) -> ::mlir::WalkResult {\n if (isCallableOp(op))\n return ::mlir::WalkResult::skip();\n return visit(op);\n });\n}","why":"Defines the callable parents of an S0 program (llvm.func and func.func) and the ownership walk that prunes nested callables, which is what the sampled nested func.func/builtin.module/llvm.func parent exercises."},{"file_sha256":"6f55dfe3ca2a9edcd0d955b965b5011a8010478cf28db89485df1fdfb2750c9c","kind":"test","lines":"1-10,91-126","path":"test/raise/fmuladd-materialization.mlir","roles":["input_construction","context"],"text":"// RUN: split-file %s %t\n// RUN: not loom-raise-opt --loom-materialize-fmuladd %t/choice.mlir 2>&1 | FileCheck %s --check-prefix=UNSELECTED\n// RUN: loom-raise-opt --loom-materialize-fmuladd=shape=fused %t/choice.mlir | FileCheck %s --check-prefix=FUSED\n// RUN: loom-raise-opt --loom-materialize-fmuladd=shape=split %t/choice.mlir | FileCheck %s --check-prefix=SPLIT\n// RUN: loom-raise-opt --loom-materialize-fmuladd=shape=fused %t/choice.mlir | mlir-opt --convert-math-to-llvm --convert-arith-to-llvm | FileCheck %s --check-prefix=FUSED-LLVM --implicit-check-not=constrained\n// RUN: loom-raise-opt --loom-materialize-fmuladd=shape=split %t/choice.mlir | mlir-opt --convert-math-to-llvm --convert-arith-to-llvm | FileCheck %s --check-prefix=SPLIT-LLVM --implicit-check-not=constrained\n// RUN: loom-raise-opt --loom-materialize-fmuladd=shape=split %t/choice.mlir | mlir-opt --math-uplift-to-fma | FileCheck %s --check-prefix=SPLIT-KEPT --implicit-check-not=math.fma\n// RUN: loom-raise-opt --loom-materialize-fmuladd=shape=fused %t/unrepresentable.mlir | FileCheck %s --check-prefix=SCOPED\n// RUN: loom-raise-opt --loom-materialize-fmuladd=shape=fused %t/nested.mlir | FileCheck %s --check-prefix=NESTED --implicit-check-not=llvm.intr.fmuladd\n// RUN: loom-raise-opt --loom-lower-for-to-graph --mlir-disable-threading %t/selected-fused.mlir | FileCheck %s --check-prefix=SELECTED-FUSED --implicit-check-not=loom.spatial_region\n//--- choice.mlir\nllvm.func @chosen(%x: f32, %y: f32, %z: f32) -> f32 {\n %r = llvm.intr.fmuladd(%x, %y, %z)\n {fastmathFlags = #llvm.fastmath<nnan, contract>} : (f32, f32, f32) -> f32\n llvm.return %r : f32\n}\n\nllvm.func @vector_chosen(%x: vector<4xf32>, %y: vector<4xf32>,\n %z: vector<4xf32>) -> vector<4xf32> {\n %r = llvm.intr.fmuladd(%x, %y, %z)\n : (vector<4xf32>, vector<4xf32>, vector<4xf32>) -> vector<4xf32>\n llvm.return %r : vector<4xf32>\n}\n\n//--- unrepresentable.mlir\nllvm.func @representable(%x: f32, %y: f32, %z: f32) -> f32 {\n %r = llvm.intr.fmuladd(%x, %y, %z) : (f32, f32, f32) -> f32\n llvm.return %r : f32\n}\n\nllvm.func @estimated(%x: f32, %y: f32, %z: f32) -> f32\n attributes {reciprocal_estimates = \"all\"} {\n %r = llvm.intr.fmuladd(%x, %y, %z) : (f32, f32, f32) -> f32\n llvm.return %r : f32\n}\n\n//--- nested.mlir\nfunc.func @native_owner(%a: f32, %b: f32, %c: f32) -> f32 {\n builtin.module {\n llvm.func @inner(%x: f32, %y: f32, %z: f32) -> f32 {\n %r = llvm.intr.fmuladd(%x, %y, %z) : (f32, f32, f32) -> f32\n llvm.return %r : f32\n }\n }\n return %a : f32\n}","why":"Fixes the concrete invocation spelling (bare flag is the error case; =shape=fused and =shape=split are the selections) and accepted input spellings for llvm.intr.fmuladd with fastmathFlags, vector operands, an unrepresentable envelope, and the nested-callable module."},{"file_sha256":"a7ed02dd0bc477975d2b6755e3f7a0fc843775eb371999dd18fc02b6e06c64d9","kind":"example","lines":"89-122","path":"test/raise/preserved-semantics.mlir","roles":["input_well_formedness"],"text":"//--- environment.mlir\nllvm.func @default_environment(%a: f32, %b: f32) -> f32 {\n %0 = llvm.fadd %a, %b : f32\n llvm.return %0 : f32\n}\n\nllvm.func @estimated(%a: f32, %b: f32) -> f32\n attributes {reciprocal_estimates = \"all\"} {\n %0 = llvm.fadd %a, %b : f32\n llvm.return %0 : f32\n}\n\nllvm.func @flushed(%a: f32, %b: f32, %i: i32) -> f32\n attributes {denormal_fpenv = #llvm.denormal_fpenv<\n default_output_mode = preservesign, default_input_mode = ieee,\n float_output_mode = ieee, float_input_mode = ieee>} {\n %0 = llvm.fadd %a, %b : f32\n %1 = llvm.add %i, %i : i32\n llvm.return %0 : f32\n}\n\nllvm.func @contracted(%a: f32, %b: f32) -> f32\n attributes {fp_contract = \"fast\"} {\n %0 = llvm.fmul %a, %b : f32\n llvm.return %0 : f32\n}\n\nllvm.func @ordinary_clang_envelope(%a: f32, %b: f32) -> f32\n attributes {passthrough = [\"nofree\", \"norecurse\", \"nosync\",\n [\"min-legal-vector-width\", \"0\"], [\"no-trapping-math\", \"true\"],\n [\"stack-protector-buffer-size\", \"8\"], [\"target-cpu\", \"generic-rv64\"]]} {\n %0 = llvm.fadd %a, %b : f32\n llvm.return %0 : f32\n}","why":"Accepted spellings of llvm.func floating-environment attributes (denormal_fpenv, fp_contract, reciprocal_estimates, ordinary Clang passthrough envelope) used to spell only environments that keep the sampled fmuladd exactly representable."}],"primary_bundle_sha256":"635e1ded89f470aacc6c62a990f2ff11ca246b1b2754e69819070d214183e85e","project":"PolyArch/loom","revision":"48615bc5925ef4b9db8b4550b5d4322933cf4b7b","schema":"spectriad.authoring-context/v1","selection_sha256":"1bb9f10281e1b48cba0f656e803e2789a0925173c0de09c1f4c0ed1c2a906968"}
sessions/reverse-generator/session-evidence/result-events.json[
{
"api_error_status": null,
"duration_api_ms": 62683,
"duration_ms": 62734,
"fast_mode_disabled_reason": "sdk_opt_in_required",
"fast_mode_state": "off",
"first_content_frame_ms": 1563,
"is_error": false,
"modelUsage": {
"claude-opus-5": {
"cacheCreationInputTokens": 6536,
"cacheReadInputTokens": 0,
"canonicalModel": "claude-opus-5",
"contextWindow": 1000000,
"costBasis": "list",
"costUSD": 0.183095,
"inputTokens": 2,
"maxOutputTokens": 64000,
"outputTokens": 4709,
"provider": "firstParty",
"thinkingTokens": 1626,
"webSearchRequests": 0
}
},
"num_turns": 1,
"permission_denials": [],
"queued_turn_count": 0,
"result": "## Preconditions\n\n1. A valid input is a single textual MLIR module body consisting of a sequence of complete top-level callable definitions, concatenated in order with no enclosing `module { ... }` wrapper, no target-triple/data-layout preamble, and no other top-level operations.\n2. The module may legitimately be empty (contain no callable at all), since one admissible parent form contributes no text whatsoever.\n3. Every top-level callable is either an imported callable spelled `llvm.func @NAME(args) -> RESULT { body }` or a native callable spelled `func.func @NAME(args) -> RESULT { body }`; no declaration-only (bodiless) callable, no variadic signature, and no visibility or linkage keyword ever appears.\n4. Every callable body terminates with a terminator matching its dialect: `llvm.return VALUE : TYPE` inside an `llvm.func`, and `return VALUE : TYPE` inside a `func.func`; the returned value's type always equals the declared result type.\n5. Each callable body is a single straight-line block: it contains no basic-block labels, no branches, loops, calls, constants, memory allocations, or any control flow.\n6. Every unresolved execution-shape choice is spelled as an `llvm.intr.fmuladd(a, b, c)` operation whose three operand types and result type are all one and the same type, written in the full form `: (T, T, T) -> T`.\n7. The type `T` of any `llvm.intr.fmuladd` is an exact standard numeric floating type or a fixed-shape vector of such a type \u2014 never an index type, integer type, dynamically shaped or ranked-tensor type, or an extended/non-standard float type.\n8. An `llvm.intr.fmuladd` may carry at most one optional attribute, a `fastmathFlags = #llvm.fastmath<...>` attribute; no other attribute (alignment, aliasing, metadata) is ever attached to it.\n9. Where a callable contains several `llvm.intr.fmuladd` operations, they form a single linear def\u2013use chain: the first operation's first operand is a block argument, and every subsequent operation's first operand is the SSA result of the immediately preceding one, while the second and third operands are the same two block arguments for all operations in the chain.\n10. All SSA value names are defined before use and are unique within their defining callable, and all symbol names (`@...`) are unique across the module, including the names of nested callables.\n11. Any function-level `attributes { ... }` dictionary on a callable holding an unresolved choice may state only a floating environment that ordinary standard-dialect arithmetic can restate exactly: contraction explicitly disabled, an all-IEEE denormal environment, or code-generation-only passthrough strings including non-trapping math; no `strictfp`, no constrained-FP or rounding-mode/exception-behavior attribute, and no unsafe/contract-enabling function attribute may appear.\n12. A nested callable is admissible: a native `func.func` may own a `builtin.module { ... }` region that in turn holds a complete `llvm.func` definition with its own body and terminator, and the unresolved choice may live entirely inside that nested callable.\n13. A callable body holding an unresolved choice may freely also contain ordinary unrelated computation \u2014 floating arithmetic (`llvm.fmul`, `llvm.fadd`) and integer arithmetic (`llvm.add` on `i32`) \u2014 including operations that consume the result of the fmuladd chain.\n14. A callable with no unresolved choice is equally a valid input; such a callable may contain ordinary floating arithmetic, an already-fused `math.fma`, or an already-split `arith.mulf`/`arith.addf` pair, and these operations may coexist in the same module with callables that do hold unresolved choices.\n15. No input ever mixes the resolved spellings (`math.fma`, `arith.mulf`, `arith.addf`) into the definition of an unresolved chain: within any one callable, an `llvm.intr.fmuladd` never feeds or is fed by those operations.\n\n## Sampling conventions\n\n1. The module is given exactly one to four parents (`randint(1, 4)`), each independently chosen; a different grammar could pick any other count or bound.\n2. Parents are drawn from exactly ten fixed skeletons \u2014 six unresolved forms (plain, typed, envelope, mixed, native, nested) plus four no-choice forms (ordinary, already-fused, already-split, empty) \u2014 and no other callable shape is ever produced.\n3. Symbol names are mechanically derived from the parent's zero-based index as `plain_I`, `typed_I`, `envelope_I`, `mixed_I`, `native_I`, `nested_I`, `ordinary_I`, `fused_I`, `split_I`, with the nested inner callable named `inner_nested_I`; the index counter advances even for the empty parent, so indices may be non-contiguous but never collide.\n4. Every emitted parent is followed by a blank line (`\\n\\n`); the empty parent emits nothing at all, not even whitespace.\n5. Unresolved chains are of length one to three for the plain and typed forms (`randint(1, 3)`) and one to two for the envelope, mixed, native and nested forms (`randint(1, 2)`); a chain of length zero is never emitted in an \"unresolved\" parent.\n6. Chained fmuladd results are always named `%r0`, `%r1`, `%r2` in order, and the chain always starts from the parameter `%x`, with `%y` and `%z` as the fixed second and third operands.\n7. Parameter names are fixed: `%x`, `%y`, `%z` for the three-operand forms, plus `%i : i32` in the mixed form and `%a` for the outer nested wrapper; no other parameter names or arities are used.\n8. All three operands and the result of every callable share a single type per parent \u2014 the grammar never emits a callable whose parameters differ in type (apart from the deliberate `i32` extra parameter of the mixed form).\n9. The element/operand type is sampled from a fixed five-member set only in the typed form (`f32`, `f64`, `f16`, `vector<4xf32>`, `vector<8xf64>`); the envelope, mixed, native, ordinary, fused and split forms are restricted to `f32` or `f64`, and the plain and nested forms are pinned to `f32`.\n10. Vector types therefore appear only in the typed form, and `f16` only there as well; no other vector shapes or element widths (e.g. `f80`, `bf16`, `vector<2xf16>`) are ever generated.\n11. Fast-math flags are sampled from exactly five spellings: absent, `<contract>`, `<nnan, contract>`, `<nnan, ninf, nsz>`, and `<fast>`; no other flag combination is produced.\n12. Fast-math flags are attached only in the typed and envelope forms; the plain, mixed, native and nested forms always emit their fmuladds with no attribute at all.\n13. When a fast-math choice is made, the single chosen spelling is applied uniformly to every fmuladd in that parent's chain \u2014 flags are never varied per operation within a callable.\n14. Function-level attributes are emitted only by the envelope form, which emits exactly one attribute chosen from three fixed literal spellings (`fp_contract = \"off\"`; a fully-IEEE `denormal_fpenv`; a fixed seven-element `passthrough` list naming a `generic-rv64` target CPU); the grammar never emits two attributes together, and every other parent form has no `attributes` clause.\n15. The envelope form places its `attributes { ... }` clause on its own line indented by four spaces, between the signature line and the opening brace.\n16. The mixed form uses a fixed surrounding skeleton: a preceding `%scaled = llvm.fmul %x, %y` and `%counted = llvm.add %i, %i : i32`, and a trailing `%blended = llvm.fadd <chain result>, %scaled` that is the returned value; `%counted` is deliberately left unused.\n17. The nested form uses a fixed two-level skeleton \u2014 a `func.func` taking and returning a single `%a`, a `builtin.module` region, and one inner `llvm.func` \u2014 and the outer function's returned value is always the untouched argument `%a`, never anything computed by the inner callable.\n18. Indentation is fixed textually rather than structurally: chain statements are always prefixed with exactly two spaces, so inside the nested form they appear at two spaces while the surrounding inner-callable terminator sits at six spaces.\n19. The no-choice parents use three fixed bodies only \u2014 a single `llvm.fadd` of two arguments, a single `math.fma` of three arguments, or an `arith.mulf` followed by `arith.addf` \u2014 with fixed result names `%sum`, `%fma`, `%prod`; no other resolved shape and no no-choice `func.func` is generated.\n20. All no-choice callables are spelled as `llvm.func` with `llvm.return`, even the ones whose bodies use the `math` and `arith` dialects.\n21. The grammar emits inputs only: it never spells an expected post-transformation result, and it never encodes the execution-shape selection itself, which is treated as a single external command option rather than a per-operation sampled choice.",
"result_index": 0,
"session_id": "2e9a3459-055e-447c-b2d9-ea3f855f7680",
"stop_reason": "end_turn",
"subagent_stats": {
"by_type": {},
"completed": 0,
"failed": 0,
"killed": {
"parent": 0,
"system": 0,
"user": 0
},
"max_depth": 0,
"refused": {
"budget": 0,
"concurrency_limit": 0,
"depth_limit": 0
},
"requested": {
"background": 0,
"foreground": 0,
"unset": 0
},
"spawned": 0,
"spawned_by_subagents": 0,
"started_in_background": 0
},
"subtype": "success",
"terminal_reason": "completed",
"time_to_request_ms": 51,
"total_cost_usd": 0.183095,
"ttft_ms": 22073,
"ttft_stream_ms": 1205,
"type": "result",
"usage": {
"cache_creation": {
"ephemeral_1h_input_tokens": 6536,
"ephemeral_5m_input_tokens": 0
},
"cache_creation_input_tokens": 6536,
"cache_read_input_tokens": 0,
"inference_geo": "not_available",
"input_tokens": 2,
"iterations": [],
"output_tokens": 4709,
"output_tokens_details": {
"thinking_tokens": 1626
},
"server_tool_use": {
"web_fetch_requests": 0,
"web_search_requests": 0
},
"service_tier": "standard",
"speed": "standard"
},
"uuid": "cf56c694-ca60-4143-958f-27035e21dddf"
}
]
sessions/reverse-postcondition/session-evidence/result-events.json[
{
"api_error_status": null,
"duration_api_ms": 10630,
"duration_ms": 10654,
"fast_mode_disabled_reason": "sdk_opt_in_required",
"fast_mode_state": "off",
"first_content_frame_ms": 1558,
"is_error": false,
"modelUsage": {
"claude-opus-5": {
"cacheCreationInputTokens": 5374,
"cacheReadInputTokens": 0,
"canonicalModel": "claude-opus-5",
"contextWindow": 1000000,
"costBasis": "list",
"costUSD": 0.06770000000000001,
"inputTokens": 2,
"maxOutputTokens": 64000,
"outputTokens": 558,
"provider": "firstParty",
"thinkingTokens": 24,
"webSearchRequests": 0
}
},
"num_turns": 1,
"permission_denials": [],
"queued_turn_count": 0,
"result": "This postcondition contains a single assertion that quantifies negatively and universally over `output.operations`, which is the full pre-order listing of every operation in the subject's output program \u2014 the root `builtin.module` included, plus every operation nested at any depth inside any region, block, or callable. The selection predicate is an exact string comparison on `op.name` against the literal `\"llvm.intr.fmuladd\"`; no dialect test, attribute test, operand or result inspection, type check, or structural containment test is applied. The assertion passes when that filtered selection is empty and fails as soon as one operation whose name is exactly that string exists anywhere in the output.\n\nThe only value source is the output program; `input` is never read, so nothing is compared across the two programs, and no counts, symbol resolutions, or identity relations are involved. Name matching is literal and case-sensitive, so an operation named, for example, `math.fma`, `llvm.fmuladd`, or anything else that is not the precise string `llvm.intr.fmuladd` is accepted regardless of what it computes. There are no supplementary conditions restricting where such an operation would be forbidden \u2014 no restriction to a particular graph, actor registration, or region \u2014 so the prohibition is uniform across the whole program.\n\nThe assertion is vacuously true whenever the output contains no operation with that name, which includes an empty program and a program consisting only of the root module; under this encoding a trivially empty output satisfies the postcondition. It is non-vacuous only in the failing direction: a witness exists exactly when at least one matching operation is found, and no accompanying assertion requires that anything be present, so the constraint can never force the output to contain any construct.",
"result_index": 0,
"session_id": "47dee9e9-a9a4-42ef-87db-6fda02a6eedd",
"stop_reason": "end_turn",
"subagent_stats": {
"by_type": {},
"completed": 0,
"failed": 0,
"killed": {
"parent": 0,
"system": 0,
"user": 0
},
"max_depth": 0,
"refused": {
"budget": 0,
"concurrency_limit": 0,
"depth_limit": 0
},
"requested": {
"background": 0,
"foreground": 0,
"unset": 0
},
"spawned": 0,
"spawned_by_subagents": 0,
"started_in_background": 0
},
"subtype": "success",
"terminal_reason": "completed",
"time_to_request_ms": 24,
"total_cost_usd": 0.06770000000000001,
"ttft_ms": 1559,
"ttft_stream_ms": 1171,
"type": "result",
"usage": {
"cache_creation": {
"ephemeral_1h_input_tokens": 5374,
"ephemeral_5m_input_tokens": 0
},
"cache_creation_input_tokens": 5374,
"cache_read_input_tokens": 0,
"inference_geo": "not_available",
"input_tokens": 2,
"iterations": [],
"output_tokens": 558,
"output_tokens_details": {
"thinking_tokens": 24
},
"server_tool_use": {
"web_fetch_requests": 0,
"web_search_requests": 0
},
"service_tier": "standard",
"speed": "standard"
},
"uuid": "797d4d0f-3767-4f8c-add7-cd2d9067d403"
}
]
This paired revision was activated by an explicit partial-scope team review bound to both executable artifact hashes.
Approved for execution and public reporting; translation accuracy and completeness remain separately unvalidated.