Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions LEDGER.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,26 @@ failure tables below preserve the round-6 measurements; the current measurement
`SUMMARY S=0/0 D=124/136 fail=0 diverge=12 hang=0 crash=0 unsupported=0 examined=136 assert=n/a`.
- **Grader verdict, end of round 13 (Tier D):**
`SUMMARY S=0/0 D=125/137 fail=0 diverge=12 hang=0 crash=0 unsupported=0 examined=137 assert=n/a`.
- **Library-edge additions for #61/#62 (Tier D, 2026-10-28):** `utf8_codes_offset.lua` MATCHes;
`math_fmod_ult_reverse.lua` DIVERGEs only for the pre-existing non-finite,
float-subtype, 64-bit-integer, and NUL-string EigenScript gaps itemized
below.
- **Grader verdict after the #61/#62 additions (Tier D):**
`SUMMARY S=0/0 D=146/159 fail=0 diverge=13 hang=0 crash=0 unsupported=0 examined=159 assert=n/a`.
- **Before round 7** (same checkout before EigenLua#35's changes, on v0.45.1):
`SUMMARY S=23/23 D=108/108 fail=0 diverge=0 hang=0 crash=0 unsupported=0 examined=131 assert=trusted`.
- **Before round 6** (round 5, 79e29669, re-measured on v0.45.0): `SUMMARY S=2/23 D=87/99 fail=15 diverge=12
hang=2 crash=0 unsupported=4 examined=122 assert=trusted`. Round 5's own line (on 686d3b7d) had fail=16 hang=1:
cstack.lua is a HANG on v0.45.0 (below), with its first failure unchanged.

Tier D has 157 rows: 145 match and the 12 current divergences are the longstanding EigenScript gaps listed below.
Tier D has 160 rows: 147 match, and the 13 current divergences are the longstanding EigenScript gaps listed below
(159 rows measured after the #61/#62 additions, plus #55's `tbl_sparse_offset_descending.lua`, which MATCHed in its
own run, D=146/158, EigenLua#67).
Rounds 3 through 13 and their additions are described in the historical material below; rounds 14 and 15 added
20 matching rows without changing the divergence classes. Tier S has 23 rows. Across both tiers, the first-failure
classes remain 27 EigenScript gaps, 6 out-of-scope rows, no open front-end bugs, and no unspecified rows.
20 matching rows without changing the divergence classes, and the #61/#62 library-edge programs add one MATCH
(`utf8_codes_offset.lua`) and one row (`math_fmod_ult_reverse.lua`) that diverges only within the existing gap
classes. Tier S has 23 rows. Across both tiers, the first-failure classes are 28 EigenScript gaps (27 before the
#61/#62 additions), 6 out-of-scope rows, no open front-end bugs, and no unspecified rows.

## Classes

Expand All @@ -43,11 +53,11 @@ A row's class is the class of its **first failure**. Its first ten failures were

| class | rows | S | D |
|---|---|---|---|
| EigenScript gap | 27 | 15 | 12 |
| EigenScript gap | 28 | 15 | 13 |
| out of scope | 6 | 6 | 0 |
| front-end bug (open) | 0 | 0 | 0 |
| unspecified | 0 | 0 | 0 |
| PASS / MATCH | 147 | 2 | 145 |
| PASS / MATCH | 149 | 2 | 147 |

**Scope of the zero in the "front-end bug (open)" row: graded rows only.** No graded row's first failure is a
known front-end bug. That says nothing about code the corpus does not reach, and probing beyond it keeps finding
Expand Down Expand Up @@ -178,9 +188,11 @@ fails correctly.
| vararg.lua | **PASS** | 80 | | |
| verybig.lua | UNSUPPORTED | 5 | out of scope | 141 OOS (`os.tmpname`); 147 OOS (`io.close`); 148 OOS (`dofile` of the file); 149 OOS (`os.remove`). Then it runs to the end. |

## Tier D: DIVERGE (12 rows)
## Tier D: DIVERGE (13 rows)

Unchanged from round 2: each row's first difference, and every differing line of ops_matrix, is one of the gaps.
The original 12 rows are unchanged from round 2; round 14 adds the final row.
Each first difference, every differing line of `ops_matrix.lua`, and every
difference in the new row is one of the recorded EigenScript gaps.

| row | first difference | class | evidence |
|---|---|---|---|
Expand All @@ -196,6 +208,7 @@ Unchanged from round 2: each row's first difference, and every differing line of
| str_format_num.lua | line 11 `1 1.0` vs `1 1` | EigenScript gap | `no-float-subtype` (`%s` of 1.0) |
| str_len.lua | line 3 `3` vs `1` | EigenScript gap | `nul-in-string` |
| utf8_lib.lua | line 9 `utf8.charpattern` bytes | EigenScript gap | `nul-in-string` |
| math_fmod_ult_reverse.lua | line 5: float zero divisor returns `-nan` in Lua but raises `(zero)` in EigenLua; line 7: `2.0` prints as `2`; lines 12-13: `math.maxinteger` has no integer representation; line 16: reversed embedded-NUL string is truncated | EigenScript gaps | `no-nonfinite` and `no-float-subtype` (lines 5 and 7), `no-int64` (lines 12-13), and `nul-in-string` (line 16). These are the complete stdout differences; both arms exit 0. |

## Front-end bugs fixed in round 3

Expand Down
1 change: 1 addition & 0 deletions changes/added/61-62-library-edge-corpus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Add differential corpus coverage for `utf8.codes`, `utf8.offset`, `math.fmod`, `math.ult`, and `string.reverse` edge cases (#61, #62).
2 changes: 2 additions & 0 deletions corpus/D.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,5 @@ tbl_table_value_type_matrix.lua unspecified-audit: ok
tbl_sparse_geometric_keys.lua unspecified-audit: ok
tbl_sparse_offset_descending.lua unspecified-audit: ok
tbl_set_churn_bounded.lua unspecified-audit: ok
utf8_codes_offset.lua unspecified-audit: ok
math_fmod_ult_reverse.lua unspecified-audit: ok
Comment on lines +160 to +161

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the parser test's expected corpus population

Adding these two programs increases Tier D from 157 to 159 files, but tests/parse_all.sh:22 still requires exactly 157. With the expected EigenScript executable available, the test now exits with HARNESS: population D=159 S=23, want 157 and 23 before parsing any files. Update the population guard alongside these additions so the parser regression suite remains runnable.

Useful? React with 👍 / 👎.

27 changes: 27 additions & 0 deletions corpus/D/math_fmod_ult_reverse.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- surface: math fmod signed zero-divisor and mixed operands, ult sign-boundary comparisons, and string reverse empty multibyte and NUL bytes
local function show(label, f, ...)
local r = table.pack(pcall(f, ...))
io.write(label)
for i = 1, r.n do io.write("\t", tostring(r[i])) end
io.write("\n")
end

show("fmod -7 3", math.fmod, -7, 3)
show("fmod 7 -3", math.fmod, 7, -3)
show("fmod -7 -3", math.fmod, -7, -3)
show("fmod int zero", math.fmod, 7, 0)
show("fmod float zero", math.fmod, 7.0, 0.0)
show("fmod mixed float dividend", math.fmod, 7.5, 2)
show("fmod mixed float divisor", math.fmod, 7, 2.5)

show("ult negative positive", math.ult, -1, 1)
show("ult positive negative", math.ult, 1, -1)
show("ult min zero", math.ult, math.mininteger, 0)
show("ult zero min", math.ult, 0, math.mininteger)
show("ult max negative", math.ult, math.maxinteger, -1)
show("ult negative max", math.ult, -1, math.maxinteger)

print("reverse empty", string.reverse("") == "")
print("reverse multibyte", string.reverse("A\xc3\xa9\xe2\x82\xacZ"))
local nul = string.reverse("a\0bc")
print("reverse NUL", #nul, string.byte(nul, 1, -1))
35 changes: 35 additions & 0 deletions corpus/D/utf8_codes_offset.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-- surface: utf8 codes strict and lax iteration, invalid sequences, and offset boundary and continuation-byte behavior
local function show(label, f, ...)
local r = table.pack(pcall(f, ...))
io.write(label)
for i = 1, r.n do io.write("\t", tostring(r[i])) end
io.write("\n")
end

local function codes(s, lax)
local out = {}
for p, c in utf8.codes(s, lax) do
out[#out + 1] = p .. ":" .. c
end
return table.concat(out, ",")
end

local valid = "A\xc3\xa9\xe2\x82\xac\xf0\x9f\x98\x80Z"
show("codes valid", codes, valid)
show("codes continuation", codes, "A\x80B")
show("codes truncated", codes, "A\xe2\x82")
show("codes overlong strict", codes, "\xc0\x80")
show("codes out-of-range strict", codes, "\xf4\x90\x80\x80")
show("codes out-of-range lax", codes, "\xf4\x90\x80\x80", true)
show("codes extended lax", codes, "\xf8\x88\x80\x80\x80", true)

show("offset forward", utf8.offset, valid, 1, 1)
show("offset negative n", utf8.offset, valid, -1, #valid + 1)
show("offset zero lead", utf8.offset, valid, 0, 6)
show("offset zero continuation", utf8.offset, valid, 0, 7)
show("offset continuation start", utf8.offset, valid, 1, 3)
show("offset i zero", utf8.offset, valid, 1, 0)
show("offset i negative", utf8.offset, valid, 1, -1)
show("offset i past end", utf8.offset, valid, 1, #valid + 2)
show("offset n past end", utf8.offset, valid, 20, 1)
show("offset negative past start", utf8.offset, valid, -20, #valid + 1)
Loading