Repository navigation
widgets: twelve logic files and five more native pages in .t27 - #11018
Merged
Merged
Conversation
…ols carry 22833 hand lines, 2775 of them pure logic (Closes #10938) specs/widgets/catalog.t27 pins the census measured at trinity origin/main. specs/t27f/widget_factory.t27 states six stages, the t27c-seal build key and the port gate. specs/t27f/frontend.t27 registers SF_WIDGET_FACTORY. Epic #10937. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…les and page in one .t27, a 9269-byte wasm, 3015 DOM comparisons against tool.js, 0 differences (Closes #10938) specs/widgets/jtag_verdict.t27 holds the trinity spec's words and a native page (w_init, w_input, w_click, w_hash, w_render, w_hash_out); html_out.t27 becomes a stateless writer (a pub var does not cross a use). catalog.t27 records gatle at PORT_LOGIC and jtag-verdict at PORT_DRAW. Epic #10937. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…idget data files match JSON.parse except 6 numbers of 16-17 digits; html_out gains named fill (Closes #10938) json_scan.t27 gives spans of values (obj_get, arr_at, str_byte with UTF-8 decoding, num_f64) so a native view needs no tree. html_out.t27 gets fill_named and dec_to. Epic #10937. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…m, 59 DOM comparisons including 13 data variants, 0 differences (Closes #10938) specs/widgets/race_the_bee.t27: the trinity spec's words plus the page (tabs, snapshot, lanes, head to head, open issues) over json_scan spans; catalog.t27 records it at PORT_DRAW. Epic #10937. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…isons vs treemap.js, 0 mismatches (Closes #10938) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…sons vs lut.js, 0 mismatches (Closes #10938) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… vs ltpparse.js, 0 mismatches (Closes #10938) specs/widgets/lut_depth_logic.t27 ports every function of apps/website/public/widgets/lut-depth/ltpparse.js (parseLtp, classOf, bare; listsOf is only a renaming of the spec constants and is left to the glue). Built to wasm (4430 bytes with a thin C-ABI wrapper) and compared field by field with the original JavaScript on the shipped sample, its prefixes and variants, mutations and grammar fuzz: 0 mismatches; a negative control (class_of min -> max) gives 2838. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… vs statparse.js, 0 mismatches (Closes #10938) specs/widgets/stat_card_logic.t27 ports parseStat (with a strict JSON.parse reader and the JS object rules it leaned on: duplicate keys, key order, Number() of counts, the module expansion of flatten) and badgeSvg. listsOf is a renaming of spec constants and is left to the glue. Cases the port does not carry (string/array counts, numbers not exactly rounded here, lone surrogates, integer-like or Object.prototype type names) answer status 9, listed in the header. Built to wasm (13741 bytes with a thin C-ABI wrapper) and compared field by field with the original JavaScript: 0 mismatches; a negative control (group priority reversed) gives 2469. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…sons vs skyline.js, 0 mismatches (Closes #10938) specs/widgets/fasm_skyline_logic.t27 ports every export of apps/website/public/widgets/fasm-skyline/skyline.js: parseFasm, decodeGrid (split into grid_* calls the glue makes from grid.json, plus grid_lookup and grid_at), familyOf and summarize. Built to wasm (8390 bytes with a thin C-ABI wrapper) and compared with the original JavaScript on the real grid.json (every cell, every sample tile name, 60000 random names), FASM texts built from the two shipped samples, line-grammar fuzz, 6000 random small grids and random family lists: 0 mismatches; a negative control (zero test of a constant reversed) gives 6165. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…epth, stat-card, fasm-skyline, lut-treemap, lut-explain (Closes #10960)
…a019d686a52279b4d # Conflicts: # specs/t27f/widget_factory.t27 # specs/widgets/catalog.t27
…catalog-3e2d7f # Conflicts: # specs/t27f/widget_factory.t27 # specs/widgets/catalog.t27
…mparisons, 0 differences (Closes #10938) String(x), toFixed, toLocaleString('en-US'), Math.round/floor and a correctly rounded Number(text) as one stateless library for the native widget views (json_scan.num_f64 is off in the last place for the 16- and 17-digit numbers of t27-cell and t27-vs-nvfp4). 5 tests, 7398-byte wasm. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… vs bitparse.js, 0 mismatches (Closes #10938) specs/widgets/bit_diff_logic.t27 ports every export of apps/website/public/widgets/bit-diff/bitparse.js: findSync, parseBitstream, packetLine, packetSequence, lineDiff, frameSlots, mapFrames, frameDelta, compareFrames, bytesIdentical, stripOf, summarize (as getters) and compareBitstreams (compare_all), plus decodeFar/encodeFar, the register, command and block name tables and the constants. Built to wasm (14133 bytes with a thin C-ABI wrapper) and compared field by field with the original JavaScript on 52 real .bit/.bin files from this repository (parse, packet lines, pairs, derived pairs), mutations of their headers and bodies, 5000 synthetic streams and pairs against the four shipped geometries, and the small pure functions: 0 mismatches; a negative control (ECC mask changed) gives 1098 on the quick run. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ns vs vcdstats.js, 0 mismatches (Closes #10938) specs/widgets/vcd_wrapped_logic.t27 ports every export of apps/website/public/widgets/vcd-wrapped/vcdstats.js: the streaming reader (createVcdReader as vcd_begin/vcd_push/vcd_end with the VcdError codes and details), summarize, vcdSummary and spanUnits (with an exact toPrecision(4) done in small big integers). Built to wasm (14135 bytes with a thin C-ABI wrapper) and compared field by field with the original JavaScript on the three shipped sample VCDs (whole, in random chunks, prefixes, mutated), grammar fuzz of headers and bodies in random chunking, and 60000+ spanUnits cases: 0 mismatches; a negative control (name order reversed) gives 1730. Cases the port does not carry answer status 90 and are listed in the header. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rse's verdict on a JSON span; js_num grows ceil, min, max, log2 (Closes #10938) js_val.t27 reads a value in the bytes the way JavaScript reads the parsed value (null prints "null", a missing key "undefined", 1.50 prints "1.5", 1e23 prints "1e+23") and fills {name} / {0} templates from a value pool. js_num.t27 gains Math.ceil, two-argument Math.max/min and Math.log2 (fdlibm port, bit-identical to V8), all checked against node over 1925210 comparisons, 0 differences. 9 tests in the two files. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…parisons, 0 differences (Closes #10938) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…vs xdc.js, 0 mismatches (Closes #10938) specs/widgets/pin_map_logic.t27 ports every export of xdc.js: parseXdc, lintXdc, summarize, covers, pinType, isDualConfig. Differential: wasm built from t27c gen (Zig) against the verbatim xdc.js, ASCII domain. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ons vs smellparse.js, 0 mismatches (Closes #10938) specs/widgets/synth_smells_logic.t27 ports every export of smellparse.js: CELL_GROUPS/groupOf, parseYosysLog, smellCounts, trimLog. Differential: wasm built from t27c gen (Zig) against the verbatim smellparse.js, full result. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ns vs fsmparse.js, 0 mismatches (Closes #10938) specs/widgets/fsm_sketch_logic.t27 ports every export of fsmparse.js: sniff, parseAny, parseKiss2, parseLog, countsOf, codeValue, conditionOf, walkOrder, layoutFsm. Math.sin, Math.cos and Math.atan2 of layoutFsm stay with the host (passed in as a table / computed from the returned points): V8's own results differ from fdlibm and musl in the last bit. Differential: wasm built from t27c gen (Zig) against the verbatim fsmparse.js. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ns vs autopsy.js, 0 mismatches (Closes #10938) specs/widgets/bit_autopsy_logic.t27 ports every export of autopsy.js: the constants and name tables, hex8, parseHeader, findSync, dieOf, lookupIdcode, frameSlots, walkPackets and autopsy. Differential: wasm built from t27c gen (Zig) against the verbatim autopsy.js on the five real .bit files of fpga/openxc7-synth, their mutations and truncations, and 4000 generated streams. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… synth-smells, fsm-sketch, bit-autopsy join (Closes #10960)
…o/0b with one rounding, -0) -- 170040 comparisons, 0 differences (Closes #10938) Number(text) over 90027 texts and JSON.parse's verdict over 80013 texts against node 23: 0 differences. The hex path folds dropped digits into a sticky bit so a 20-digit 0x value rounds once, as JavaScript does. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…sons, 0 differences (Closes #10938) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…parisons, 0 differences (Closes #10938) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n SVG title (Closes #10938) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…arisons, 0 differences (Closes #10938) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…orted, 786923-byte data in a 1 MiB buffer, 0 differences (Closes #10938) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ts-catalog-3e2d7f # Conflicts: # specs/widgets/catalog.t27
…catalog-3e2d7f # Conflicts: # specs/widgets/catalog.t27
| assert T_SLOTS[4] == 4294967295; | ||
| assert T_SLOTS[5] == 8388608; | ||
| } | ||
|
|
| assert T_OLEN[0] == 123; | ||
| assert match_in(T_TRIM[0 .. 4096], 0, 123, "banner\n-- Running command `x' --\n[1]\n2.1. Executing CHECK pass.\n[1]\nWarning: w\n detail\n[2]\n7. Printing statistics.\ntail\n"); | ||
| } | ||
|
|
Contributor
gHashTag
enabled auto-merge (squash)
October 19, 2026 11:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11016. Epic #10937.
All twelve pure logic files of the widget census as
.t27(bit-autopsy, bit-diff, fasm-skyline, fsm-sketch, lut-depth, lut-explain, lut-treemap, pin-map, stat-card, synth-smells, vcd-wrapped; gatle landed before), each built to wasm and compared with the hand-written JavaScript: 0 mismatches over 12 thousand to 14.7 million comparisons per file. Five more native pages (t27-vs-nvfp4, t27-cell, build-receipt, uart-bucket, test-touch) with DOM compared against tool.js in happy-dom, and two JavaScript-semantics libraries they needed (js_num.t27, js_val.t27: 1.9 million and 170 thousand comparisons with node, 0 differences). catalog.t27 records 12 tools at PORT_LOGIC and 7 at PORT_DRAW.Measured with t27c 0.5.2
test-report. Not claimed: the pages in gHashTag/trinity still load the hand-written files; canvas tools, gatle's and t27c-stages' compiler calls, the data builders and card renderers are not ported; the DOM comparisons ran in happy-dom, not in a browser, except jtag-verdict (browser pane, earlier PR).🤖 Generated with Claude Code