Defects found in the implementation, for the owner to get to. Written by Claude sessions; each entry says how it was reproduced, and nothing here is a design decision. Remove an entry when it is fixed.
-
A
tailmark is refused in a function whose returns are all erased. Withg : (unique (Nat) x) -> (unique (Nat) r at x), the body(let ((unique y)) (tail (g x))) (Zero)of a function returning(erased (Nat) e)is refused as not in tail position:project_codeshort-circuits on an empty list of kept results, so the trailing erased code never becomes(values)forcheck_marksto fold. Such a function is only ever called erased, so nothing runs wrongly. -
self/eval.slanswers a failed step with an ordinary value. Audit 2026-10-07 A2 and A3 (audit/2026-10-07-audit.mdand its reproducers underaudit/2026-10-07/, in the tree ataa84d4e) are two instances. A survey ofself/eval.slandself/heap.slatf9d57e1(read from the code; beyond A2/A3, none of the cases below was reproduced) found the same shape in several places, in three groups:- Fuel. No longer a fixed 1000000:
flatten-valueseedsrope-walkwith twice the store's allocation count (store-size; the rope pair spends two units per level),ErListToArrayseedslist-refswith the count itself, and running out becomes aBError("out of fuel") rather thanREmptyorNil. With that, A2's and A3's reproducers match the reference under--interpretand compiled, underulimit -s unlimited(at the default 8 MB stack,slcoverflows on them before and after); no test was added yet. That the count suffices on an acyclic heap is an informal pigeonhole argument, not a proof. Nothing at the meta level excludes a cycle (store-writestores a body over the whole current history, andCCellWritewritesBTagblocks). On one, the report is an error block, with the limits of the third group below. - A block of the wrong shape, or a missing argument.
rope-walkreturnsREmptyon a block that is neitherBTagnor a string/charBExt.list-refsandctor-fieldsreturnNilon a non-BTag.heap-strreturnsSNil,field-natreturns 0, andapply-extern'sna/nb/sa/sbdefault to 0 orSNilon a missing argument.ExFlattengivesSNilon a missing argument, andErListToArray,ErArrayMake,ErArrayCopy,ErArraySubandErArrayBlitbuild fromNilwhenarray-fieldsor the argument is missing.ErWriteandErArrayBlitkeep the store unchanged on alist-nthmiss. Well-typed input may never reach these; nothing in the evaluator shows that. - Error blocks that don't stop evaluation. Where the evaluator
does report (
error-vals, out of fuel included, andarray-constructandapply-array-change), the report is aBErrorvalue. It becomes aruntime error:only when read as a final or a request, applied (apply'sBErrorcase), or emitted (failwith). As read,dispatchreturnsNonefor aBErrorscrutinee, andCMatch'sNonepath then runs the first branch overctor-fieldsof the error block, so a matched error might turn into an ordinary result. A dropped one disappears. Separately,apply-extern's fallback for an extern with no implementation of its own reports throughErPayload $ PStr "...", which seems to allocate a stringBExtrather than aBError.
A likely structural fix, not decided: give the evaluator's results a
Result-shaped type, i.e. a failure with its message or the values. Each helper above would return that type, andevaland its mutual group would short-circuit on a failure at every step, making exhaustion and shape mismatches impossible to answer with an ordinary value. TheBErrorblock would then remain only as the emitted representation, if anywhere. Cheaper partial alternatives are aBErrorthatdispatchand every block-inspecting helper propagate (each site an obligation, and a missed one keeps the bug), or a host-level abort primitive, which would be a design addition. Separately, the acyclicity a measure-based traversal would need is a question aboutheap.sl's store invariant. - Fuel. No longer a fixed 1000000:
-
The compilers run a final value that is not in the last file at different times. The reference runs a file's final value as soon as it reaches it, before reading the files after it on the command line;
slc, compiled or under--interpret, elaborates every file first and runs the finals afterwards. Reproduced with two files:a.slending in aProgramthat writes to stderr and exits with 0, andb.slholding only acompile-warn. The reference writes the program's line and never readsb.sl, so it gives no warning;slcwrites the warning, then the program's line. With a final that does not exit, the reference's warnings from later files would follow the program's output instead of preceding it. No test has this shape;self/bootstrap.shcompares each side's whole stderr, warnings included, so one that did would fail there. Which order is wanted is not decided here. -
The two compilers disagree on a
letof a constant before adelegatecall. In a functionf at gwhose body is(let ((many s)) (settled-of many g)) (delegate (g ...)), the reference refuses thedelegateas not in tail position, andslc, compiled or under--interpret, accepts it.(cell-same u u)in place of thesettled-ofsplits the same way. The reference's normalizer folds away aletof constants only when its right-hand side is avaluesof constants, and both forms compile to a bare constant;slc's folding appears to cover that case. DESIGN.md §19 says adelegate-bodied function is nothing but the call once lets that only rename are resolved away, which seems not to settle a let of a constant. Which answer is wanted is not decided here. No test has this shape. -
slcrefuses atailcall returned beside anatentry. Withfreturning(unique (World) w2 at w) (many (Nat) n)andgreturning(many (Nat) n), both in onedef-fnsblock, the body(values w (tail $ g rest))offis accepted by the reference and refused byslcas "atail-marked call is not in tail position", onorigin/mainas ofe6ebf28and after5da2b75; the same holds with(many (Nat) j at k)in place of the world. The reference drops anatentry from the returns before judging tail position (DESIGN.md §19, §36);slc'stails-okandcall-reportappear to see avaluesform of two entries and treat every entry as non-tail. No test has this shape;open-contradictsinself/elab-main.sltakes and returns the macro world so thatelab-refuteavoids it. -
Checking is exponential in a term's sharing. Canonical forms are expanded in full and walked as trees, so the cost seems to track the expanded size, not the source. Reproduced with n lets
(let ((erased x{i+1})) (Node x{i} x{i})))in a function body: the reference takes 6.8 s and 301 MB at n=20 and times out at n=22;slcoverflows its stack at n=18 (3.1 s and 196 MB underulimit -s unlimited). An unshared chain stays flat, even 1000 deep. The same growth was seen atmany, in run position, through a call'sisreturn, and with the chain then matched,is-checked, used as a type index, or given toprove-subterm. A failingprove-subtermis worst, since its message prints the expanded term (22 s and 5.2 MB at n=18). Memoizingcanonalone (not committed) left the time exponential infold_varsandunify, so a fix probably has to make every term walk sharing-aware, in both compilers. -
slcand the reference word two refusals differently. A refuted branch in a run-positionmatchgets "omit it or write(absurd Zero)" at column 45 from the reference and "omit it or writeabsurd" at column 44 fromslc(proposals/self-formal/proto/aftererr/17_type_error_first.slon the branchclaude/confident-hamilton-ug3l7r, line 2). A macro whose run crashes,proposals/self-formal/proto/review8/bugs_macro_crash.slthere under--eval-fuel 100, gets "macromfailed: out of fuel" from the reference and "compile-time evaluation failed: out of fuel" fromslc, at the same position. Reproduced atf348279d. -
slc --interpretcuts a long list in a request short.heap-strs,heap-pairs, andheap-jobsinself/eval.sl, which read the lists aConfinePathsorExecrequest carries, take a fixed fuel of 1000000 and answer running out withNil, so a longer list seems to be cut short with no report. Withproposals/self-formal/proto/bugs/heap_strs_cut.slon the branchclaude/confident-hamilton-ug3l7r(areadslist of 1000000 entries"absent-dir"then".", then aStat "."), underulimit -s unlimited,slc --interpretprintsconfine okandstat cwd refused, where the reference and the binaryslc --buildmakes printstat cwd ok.Exec's lists were not tried. This seems to conflict with DESIGN.md §31's "A crash produces no value, never a different one". Reproduced at81c534a9. -
The compilers differ in acceptance when a later file fails. With
proposals/self-formal/proto/review5/01_prog_first.slon the branchclaude/confident-hamilton-ug3l7r, whoseProgramwriteseffectand exits 0, followed on the command line byproposals/self-formal/proto/review5/01_late_error.slthere (acompile-error), the reference writeseffectand exits 0, reporting nothing about the second file, whileslc, compiled or under--interpret, reports the second file's error and exits 1 without running theProgram. This follows from entry 19's difference in when a final value runs. Reproduced atf348279d.