Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ethdebug/format
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: ethdebug/format
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: debugger-two-sorted-evaluate
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 10 files changed
  • 1 contributor

Commits on Aug 6, 2026

  1. format: specify two-sorted (integer/bytes) expression evaluation

    DRAFT for writer prose pass before the PR opens.
    
    Codifies the two-sorted semantics of pointer expressions: values are
    either unbounded non-negative integers (no width) or bytes (with a
    definite width). Arithmetic, JSON-number and odd-nibble-hex literals,
    $wordsize, and lookups are integers; even-nibble hex, $read, and
    $sizedN/$wordsized are bytes. An integer is accepted wherever an integer
    is expected (a bytes value is read as its big-endian integer value), but
    $concat and $keccak256 operands must be width-bearing bytes — a bare
    integer there is an error and must be resized first. Fixes the keccak256
    example's bare-integer operand to be word-sized, matching what the
    mapping/string pointer examples already do.
    gnidan committed Aug 6, 2026
    Configuration menu
    Copy the full SHA
    15469f2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e6cdad5 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2026

  1. pointers: evaluate expressions as two sorts, integer and bytes

    The evaluator used a single width-carrying Data representation for
    every expression, so a JSON number, $wordsize, or an arithmetic result
    had an incidental width that leaked into $concat and $keccak256: for
    instance `{ $keccak256: [{ $wordsized: k }, 0] }` hashed 32 bytes
    rather than 64.
    
    evaluate() now returns a Value of one of two sorts, following the
    expression schema:
    
    - integer (bigint, no width): JSON numbers, $wordsize, lookups,
      arithmetic results, and odd-digit hex literals
    - bytes (Data, definite width): even-digit hex literals, $read, and
      the resize forms
    
    Arithmetic takes its operands as integers (bytes coerce big-endian)
    and yields an integer. $concat and $keccak256 require bytes operands
    and throw, naming the offending operand and suggesting $wordsized or
    $sizedN, when given a bare integer. Resize is the only integer-to-bytes
    bridge. Variables carry the sort of their defining expression; list
    counts, conditionals, and region slot/offset/length coerce to
    integers. Cursor.Region is unchanged: its Data-valued properties now
    encode integers minimally, with bytes keeping their width.
    
    The previously skipped keccak256 test is rewritten against these
    rules, along with tests for each sort rule, both coercion directions,
    and the bare-integer errors.
    
    Claude-Session: https://claude.ai/code/session_01RJFyifZxcSXZchLFNTNPuT
    gnidan committed Sep 3, 2026
    Configuration menu
    Copy the full SHA
    17b9d54 View commit details
    Browse the repository at this point in the history
  2. format: word-size the operands of the root keccak256 example

    The expression schema's root-level `$keccak256` example still hashed a
    bare JSON number and a bare lookup, which the two-sorted rules reject.
    Wrap both operands in `$wordsized`, as the Keccak256 example already
    does.
    
    pointers: add a test that evaluates every `$keccak256` / `$concat`
    expression found in the pointer schemas' examples against stubbed
    regions and variables, so an example whose operand lacks a width fails
    the suite rather than silently contradicting the spec.
    
    Claude-Session: https://claude.ai/code/session_01RJFyifZxcSXZchLFNTNPuT
    gnidan committed Sep 3, 2026
    Configuration menu
    Copy the full SHA
    522f28a View commit details
    Browse the repository at this point in the history
  3. web: update the expression evaluation guide for two-sorted evaluation

    The guide extracts its code listings from src/evaluate.ts by symbol name,
    and the two-sorted rewrite collapsed the five per-operation arithmetic
    functions into one evaluateArithmetic, so the page failed to build.
    
    Replace the five arithmetic listings with one, introduce the integer/bytes
    sorts up front with listings of the exported Value type and namespace,
    and add listings of the evaluateInteger and evaluateBytesOperands helpers
    where coercion and width enforcement come up. Surrounding prose now
    describes integer-sort arithmetic, literal sorting by hex digit count,
    and the bytes requirement on $keccak256 / $concat operands.
    
    Claude-Session: https://claude.ai/code/session_01RJFyifZxcSXZchLFNTNPuT
    gnidan committed Sep 3, 2026
    Configuration menu
    Copy the full SHA
    255e2e4 View commit details
    Browse the repository at this point in the history
Loading